/* ========================
   Root Variables
======================== */
:root {
  --primary: #0070ff;
  --dark: #0a0f18;
  --light: #f5f7fa;
  --card: #ffffff;
  --radius: 12px;
  --transition: 0.3s ease;
}

/* ========================
   Global Styles
======================== */
body {
  font-family: 'Inter', Arial, sans-serif;
  margin: 0;
  background: var(--light);
  color: #111;
  line-height: 1.6;
  opacity: 0;
  transform: scale(0.98);
  animation: fadeInScale 0.7s forwards;
}

@keyframes fadeInScale {
  from { opacity: 0; transform: scale(0.98); }
  to { opacity: 1; transform: scale(1); }
}

h2 { margin-bottom: 1rem; }

/* ========================
   Header & Navigation
======================== */
header {
  background: var(--dark);
  color: #fff;
  padding: 1.2rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

nav a {
  color: #fff;
  margin-left: 1.5rem;
  text-decoration: none;
  font-weight: 500;
  position: relative; /* needed for cart-counter */
  transition: var(--transition);
}

nav a:hover { color: var(--primary); }

/* ========================
   Hero Section
======================== */
.hero {
  text-align: center;
  padding: 6rem 1rem;
  background: linear-gradient(135deg, var(--dark), #001b3c);
  color: #fff;
}

/* ========================
   Buttons
======================== */
button, .button {
  background-color: var(--primary);
  color: #fff;
  border: none;
  padding: 0.8rem 1.2rem;
  font-size: 1rem;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.3s ease;
}

button:hover, .button:hover {
  box-shadow: 0 4px 15px rgba(0, 123, 255, 0.4);
  transform: translateY(-2px);
}

/* ========================
   Services
======================== */
.services-list {
  max-width: 1200px;
  margin: auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.5rem;
  padding: 2rem;
}

.service {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  padding: 1.5rem;
  width: 260px;
  transition: var(--transition);
  opacity: 0;
  transform: translateY(20px);
}

.service:hover { transform: translateY(-5px); }

.service.visible { opacity: 1; transform: translateY(0); }

/* ========================
   Forms & Contact
======================== */
form, form#contact-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

input, textarea {
  padding: 0.6rem;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 1rem;
  width: 100%;
  box-sizing: border-box;
  transition: border 0.3s ease, box-shadow 0.3s ease;
}

input:focus, textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 6px rgba(0, 123, 255, 0.3);
  outline: none;
}

#thank-you { font-weight: bold; color: green; margin-top: 1rem; }

/* ========================
   Footer
======================== */
footer {
  text-align: center;
  padding: 2rem;
  background: var(--dark);
  color: #fff;
  margin-top: 3rem;
}

/* ========================
   Cart
======================== */
#cart-items {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

#cart-items div {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.6rem 0.8rem;
  background-color: var(--card);
  border-radius: 8px;
  box-shadow: 0 3px 10px rgba(0,0,0,0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

#cart-items div:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.12);
}

.cart-item-info {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  flex: 1;
}

.cart-item-controls {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

#cart-items button {
  background-color: var(--primary);
  color: #fff;
  border: none;
  padding: 0.3rem 0.6rem;
  font-size: 0.9rem;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.3s ease;
}

#cart-items button:hover {
  box-shadow: 0 4px 15px rgba(0,123,255,0.4);
  transform: translateY(-2px);
}

/* ========================
   Cart Bubble - FIXED
======================== */
.cart-counter {
  position: absolute;
  top: -8px;
  right: -18px; /* Moved further right to avoid overlapping "Cart" text */
  background-color: red;
  color: white;
  font-size: 11px;
  font-weight: bold;
  padding: 3px 6px;
  border-radius: 50%;
  display: none; /* Hidden by default, shown when count > 0 */
  align-items: center;
  justify-content: center;
  z-index: 1000;
  min-width: 18px;
  min-height: 18px;
}

.cart-counter::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 4px solid red;
}

/* ========================
   Cart Toast - FIXED
======================== */
.cart-toast {
  position: absolute;
  background-color: #4da6ff;
  color: #fff;
  padding: 12px 20px;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(77, 166, 255, 0.5);
  z-index: 9999;
  font-weight: bold;
  font-size: 0.95rem;
  text-align: center;
  opacity: 0;
  transform: translateY(-10px);
  transition: opacity 0.4s ease, transform 0.4s ease;
  min-width: 240px;
  border: 2px solid #fff;
}

.cart-toast.show { 
  opacity: 1;
  transform: translateY(0);
}

.cart-toast .toast-arrow {
  position: absolute;
  width: 0;
  height: 0;
  border-left: 10px solid transparent;
  border-right: 10px solid transparent;
  border-top: 10px solid #4da6ff;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
}