/* ─── Variables ────────────────────────────────────────────────────────────── */
:root {
  --green:   #5ba75d;
  --green-d: #4a9050;
  --blue:    #134a77;
  --blue-d:  #0e3b60;
  --orange:  #f97316;
  --orange-d:#ea6c0c;
  --light-bg:#f8fafc;
  --card-bg: #ffffff;
  --text:    #1e293b;
  --muted:   #64748b;
  --border:  #e2e8f0;
}

/* ─── Base ──────────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

body {
  font-family: 'Poppins', sans-serif;
  background: var(--light-bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.fw-500 { font-weight: 500; }
.fw-600 { font-weight: 600; }
.fw-700 { font-weight: 700; }

a { text-decoration: none; }

/* ─── Navbar ────────────────────────────────────────────────────────────────── */
.navbar-custom {
  background: linear-gradient(135deg, var(--blue) 0%, var(--green) 100%);
  padding: 10px 0;
}

.brand-name {
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.3px;
}

.navbar-custom .nav-link {
  padding: 6px 14px;
  border-radius: 6px;
  transition: background .2s;
}

.navbar-custom .nav-link:hover,
.navbar-custom .nav-link.active {
  background: rgba(255,255,255,.18);
}

.btn-cart {
  background: rgba(255,255,255,.15);
  color: #fff;
  border: 1px solid rgba(255,255,255,.3);
  border-radius: 8px;
  padding: 6px 12px;
  transition: background .2s;
}
.btn-cart:hover { background: rgba(255,255,255,.25); color: #fff; }

.cart-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  background: var(--orange);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

/* ─── Hero ──────────────────────────────────────────────────────────────────── */
.hero {
  background: linear-gradient(135deg, var(--blue) 0%, var(--green) 100%);
  color: #fff;
  padding: 80px 0 90px;
  position: relative;
  overflow: hidden;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 40px;
  background: var(--light-bg);
  clip-path: ellipse(55% 100% at 50% 100%);
}

.hero-title {
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 700;
  line-height: 1.2;
}

.hero-sub {
  font-size: 1.1rem;
  opacity: .88;
}

/* ─── Buttons ───────────────────────────────────────────────────────────────── */
.btn-primary-custom {
  background: var(--green);
  color: #fff;
  border: none;
  padding: 10px 28px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: background .2s, transform .15s;
}
.btn-primary-custom:hover { background: var(--green-d); color: #fff; transform: translateY(-1px); }

.btn-orange {
  background: var(--orange);
  color: #fff;
  border: none;
  padding: 10px 28px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: background .2s, transform .15s;
}
.btn-orange:hover { background: var(--orange-d); color: #fff; transform: translateY(-1px); }

.btn-outline-green {
  border: 2px solid var(--green);
  color: var(--green);
  background: transparent;
  padding: 8px 22px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.9rem;
  transition: all .2s;
}
.btn-outline-green:hover { background: var(--green); color: #fff; }

/* ─── Section headings ──────────────────────────────────────────────────────── */
.section-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--blue);
  position: relative;
  padding-bottom: 10px;
  margin-bottom: 28px;
}
.section-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 48px;
  height: 3px;
  background: var(--green);
  border-radius: 2px;
}
.section-title.centered { text-align: center; }
.section-title.centered::after { left: 50%; transform: translateX(-50%); }

/* ─── Product Card ──────────────────────────────────────────────────────────── */
.product-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  transition: box-shadow .25s, transform .2s;
  height: 100%;
  display: flex;
  flex-direction: column;
}
.product-card:hover {
  box-shadow: 0 8px 28px rgba(19,74,119,.12);
  transform: translateY(-3px);
}

.product-card-img {
  width: 100%;
  height: 210px;
  object-fit: cover;
  background: #f1f5f9;
}
.product-card-img-placeholder {
  width: 100%;
  height: 210px;
  background: linear-gradient(135deg, #e2e8f0, #f1f5f9);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
  font-size: 3rem;
}

.product-card-body {
  padding: 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.product-name {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-brand {
  font-size: 0.78rem;
  color: var(--muted);
  margin-bottom: 8px;
}

.product-price {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--green);
}
.product-mrp {
  font-size: 0.8rem;
  color: var(--muted);
  text-decoration: line-through;
  margin-left: 6px;
}
.product-discount-badge {
  background: #fef3c7;
  color: #b45309;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 10px;
  margin-left: 6px;
}

.out-of-stock-badge {
  background: #fee2e2;
  color: #b91c1c;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 10px;
}

.btn-add-cart {
  background: var(--green);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 8px 0;
  font-size: 0.88rem;
  font-weight: 600;
  width: 100%;
  margin-top: auto;
  transition: background .2s;
  cursor: pointer;
}
.btn-add-cart:hover { background: var(--green-d); }
.btn-add-cart:disabled { background: #94a3b8; cursor: not-allowed; }

/* ─── Category Pills ────────────────────────────────────────────────────────── */
.category-pills {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: none;
}
.category-pills::-webkit-scrollbar { display: none; }

.cat-pill {
  display: inline-block;
  padding: 7px 18px;
  border-radius: 20px;
  border: 2px solid var(--border);
  background: #fff;
  color: var(--text);
  font-size: 0.85rem;
  font-weight: 500;
  white-space: nowrap;
  transition: all .2s;
  cursor: pointer;
  text-decoration: none;
}
.cat-pill:hover, .cat-pill.active {
  border-color: var(--green);
  background: var(--green);
  color: #fff;
}

/* ─── Shop sidebar filter ───────────────────────────────────────────────────── */
.filter-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
}
.filter-title {
  font-size: 0.9rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--blue);
  margin-bottom: 14px;
}

/* ─── Product Detail ────────────────────────────────────────────────────────── */
.gallery-thumb {
  width: 70px;
  height: 70px;
  object-fit: cover;
  border-radius: 8px;
  border: 2px solid var(--border);
  cursor: pointer;
  transition: border-color .2s;
}
.gallery-thumb.active, .gallery-thumb:hover { border-color: var(--green); }

.main-product-img {
  width: 100%;
  max-height: 440px;
  object-fit: contain;
  border-radius: 14px;
  background: #f8fafc;
  border: 1px solid var(--border);
  padding: 10px;
}

.qty-stepper {
  display: flex;
  align-items: center;
  gap: 0;
  border: 2px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  width: fit-content;
}
.qty-btn {
  background: #f1f5f9;
  border: none;
  width: 38px;
  height: 38px;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  cursor: pointer;
  transition: background .15s;
}
.qty-btn:hover { background: var(--green); color: #fff; }
.qty-input {
  width: 50px;
  text-align: center;
  border: none;
  font-size: 0.95rem;
  font-weight: 600;
  padding: 0;
  outline: none;
  background: #fff;
}

/* ─── Cart ──────────────────────────────────────────────────────────────────── */
.cart-table th {
  font-size: 0.82rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .4px;
  color: var(--muted);
  border-bottom: 2px solid var(--border);
}
.cart-img {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--border);
}
.cart-img-placeholder {
  width: 64px;
  height: 64px;
  background: #f1f5f9;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
  font-size: 1.5rem;
}

.order-summary-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 24px;
  position: sticky;
  top: 80px;
}

/* ─── Checkout ──────────────────────────────────────────────────────────────── */
.checkout-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 28px;
}
.payment-option {
  border: 2px solid var(--green);
  background: #f0fdf4;
  border-radius: 10px;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 600;
  color: var(--green);
}

/* ─── Order Status Badges ───────────────────────────────────────────────────── */
.badge-status {
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: capitalize;
}
.badge-pending    { background: #fef9c3; color: #854d0e; }
.badge-processing { background: #dbeafe; color: #1e40af; }
.badge-shipped    { background: #ede9fe; color: #5b21b6; }
.badge-delivered  { background: #dcfce7; color: #166534; }
.badge-cancelled  { background: #fee2e2; color: #991b1b; }

/* ─── Order Timeline ────────────────────────────────────────────────────────── */
.timeline {
  list-style: none;
  padding: 0;
  margin: 0;
  position: relative;
}
.timeline::before {
  content: '';
  position: absolute;
  left: 16px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--border);
}
.timeline-item {
  display: flex;
  gap: 16px;
  padding: 0 0 24px 0;
  position: relative;
}
.timeline-dot {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
  font-size: 0.8rem;
  flex-shrink: 0;
  z-index: 1;
}
.timeline-item.done .timeline-dot {
  background: var(--green);
  color: #fff;
}
.timeline-label { font-size: 0.9rem; font-weight: 600; margin-bottom: 2px; }
.timeline-sub   { font-size: 0.8rem; color: var(--muted); }

/* ─── Auth pages ────────────────────────────────────────────────────────────── */
.auth-wrapper {
  min-height: 100vh;
  background: linear-gradient(135deg, var(--blue) 0%, var(--green) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.auth-card {
  background: #fff;
  border-radius: 20px;
  padding: 40px 36px;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 20px 60px rgba(0,0,0,.2);
}
.auth-logo {
  width: 72px;
  height: 72px;
  object-fit: contain;
  border-radius: 14px;
}
.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-size: 0.85rem;
  margin: 20px 0;
}
.auth-divider::before, .auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.form-control-custom {
  border: 2px solid var(--border);
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 0.95rem;
  transition: border-color .2s;
  font-family: 'Poppins', sans-serif;
  width: 100%;
}
.form-control-custom:focus {
  outline: none;
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(91,167,93,.12);
}

/* ─── Success page ──────────────────────────────────────────────────────────── */
.success-icon {
  width: 80px;
  height: 80px;
  background: #dcfce7;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  font-size: 2.5rem;
  color: var(--green);
}

/* ─── Empty state ───────────────────────────────────────────────────────────── */
.empty-state {
  padding: 60px 20px;
  text-align: center;
}
.empty-state-icon {
  font-size: 4rem;
  color: #cbd5e1;
  margin-bottom: 16px;
}
.empty-state h5 { color: var(--muted); font-weight: 600; }

/* ─── Footer ────────────────────────────────────────────────────────────────── */
.footer {
  background: var(--blue);
  margin-top: auto;
}
.footer-links li { margin-bottom: 8px; }
.footer-links a, .footer-link-btn {
  color: rgba(255,255,255,.65);
  font-size: 0.88rem;
  transition: color .2s;
  text-decoration: none;
  background: none;
  cursor: pointer;
  border: none;
  padding: 0;
  font-family: 'Poppins', sans-serif;
}
.footer-links a:hover, .footer-link-btn:hover { color: #fff; }

/* ─── Alerts & toasts ───────────────────────────────────────────────────────── */
.alert-custom {
  border-radius: 10px;
  border: none;
  padding: 14px 18px;
  font-size: 0.9rem;
  font-weight: 500;
}

/* ─── Misc ──────────────────────────────────────────────────────────────────── */
.page-header {
  background: linear-gradient(135deg, var(--blue) 0%, var(--green) 100%);
  color: #fff;
  padding: 36px 0;
  margin-bottom: 36px;
}
.page-header h1 { font-size: 1.8rem; font-weight: 700; margin: 0; }
.page-header p  { opacity: .8; margin: 4px 0 0; font-size: 0.92rem; }

.card-plain {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 24px;
}

/* ─── Responsive tweaks ─────────────────────────────────────────────────────── */
@media (max-width: 576px) {
  .auth-card { padding: 28px 20px; }
  .hero { padding: 50px 0 60px; }
  .checkout-card { padding: 20px 16px; }
}
