/* ─── 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;
}

@media (max-width: 576px) {
  .brand-name {
    display: none;
  }
}

.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;
}

.hero-poster-container {
  position: relative;
  display: inline-block;
  padding: 10px;
  z-index: 1;
}

.hero-poster-img {
  max-height: 460px;
  border-radius: 20px;
  transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
  border: 6px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 20px 50px rgba(0,0,0,0.3);
}

.hero-poster-img:hover {
  transform: translateY(-8px) scale(1.02);
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: 0 30px 60px rgba(0,0,0,0.4);
}

.hero-poster-container::after {
  content: '';
  position: absolute;
  top: 30px;
  left: 30px;
  right: -10px;
  bottom: -10px;
  background: rgba(0, 0, 0, 0.1);
  border-radius: 24px;
  z-index: -1;
  filter: blur(20px);
}

/* ─── 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%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  background: #f1f5f9;
}

.wishlist-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,.9);
  color: #aaa;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,.15);
  transition: color .2s, background .2s, transform .15s;
  z-index: 2;
}
.wishlist-btn:hover { background: #fff; color: #ef4444; transform: scale(1.1); }
.wishlist-btn.active { color: #ef4444; }
.wishlist-btn:disabled { opacity: .6; cursor: not-allowed; transform: none; }
.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; }
.out-of-stock-btn { background: #fee2e2 !important; color: #b91c1c !important; cursor: not-allowed !important; }
.in-cart-btn { background: #16a34a; color: #fff; text-decoration: none; }
.in-cart-btn:hover { background: #15803d; color: #fff; }

/* ─── 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; }

/* ─── Orders page — stat chips in header ────────────────────────────────────── */
.order-stat-chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: rgba(255,255,255,.15);
  border: 1px solid rgba(255,255,255,.25);
  border-radius: 10px;
  padding: 6px 16px;
  min-width: 64px;
  color: #fff;
}
.order-stat-num  { font-size: 1.2rem; font-weight: 700; line-height: 1.1; }
.order-stat-lbl  { font-size: 0.68rem; opacity: .85; text-transform: uppercase; letter-spacing: .5px; }
.order-stat-pending   { background: rgba(202,138,4,.3);  border-color: rgba(202,138,4,.4); }
.order-stat-delivered { background: rgba(22,163,74,.3);  border-color: rgba(22,163,74,.4); }

/* ─── Orders page — filter bar ──────────────────────────────────────────────── */
.order-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.order-filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.82rem;
  font-weight: 600;
  border: 1.5px solid var(--border);
  background: #fff;
  color: var(--muted);
  cursor: pointer;
  transition: all .15s;
}
.order-filter-btn:hover { border-color: #94a3b8; color: var(--text); }
.order-filter-btn .order-filter-count {
  background: #e2e8f0;
  color: #475569;
  border-radius: 10px;
  padding: 1px 7px;
  font-size: 0.72rem;
}
/* tinted idle state per status */
.order-filter-btn.filter-pending    { background: #fef9c3; border-color: #fde68a; color: #854d0e; }
.order-filter-btn.filter-processing { background: #dbeafe; border-color: #bfdbfe; color: #1e40af; }
.order-filter-btn.filter-shipped    { background: #ede9fe; border-color: #ddd6fe; color: #5b21b6; }
.order-filter-btn.filter-delivered  { background: #dcfce7; border-color: #bbf7d0; color: #166534; }
.order-filter-btn.filter-cancelled  { background: #fee2e2; border-color: #fecaca; color: #991b1b; }
.order-filter-btn.filter-pending    .order-filter-count { background: #fde68a; color: #854d0e; }
.order-filter-btn.filter-processing .order-filter-count { background: #bfdbfe; color: #1e40af; }
.order-filter-btn.filter-shipped    .order-filter-count { background: #ddd6fe; color: #5b21b6; }
.order-filter-btn.filter-delivered  .order-filter-count { background: #bbf7d0; color: #166534; }
.order-filter-btn.filter-cancelled  .order-filter-count { background: #fecaca; color: #991b1b; }
/* active state */
.order-filter-btn.active,
.order-filter-btn.active:hover {
  border-color: var(--blue);
  background: var(--blue);
  color: #fff;
}
.order-filter-btn.active .order-filter-count { background: rgba(255,255,255,.25); color: #fff; }
.order-filter-btn.filter-pending.active    { background: #854d0e; border-color: #854d0e; }
.order-filter-btn.filter-processing.active { background: #1e40af; border-color: #1e40af; }
.order-filter-btn.filter-shipped.active    { background: #5b21b6; border-color: #5b21b6; }
.order-filter-btn.filter-delivered.active  { background: #166534; border-color: #166534; }
.order-filter-btn.filter-cancelled.active  { background: #991b1b; border-color: #991b1b; }

/* ─── Orders page — order card ──────────────────────────────────────────────── */
.order-card-wrap {
  display: flex;
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  transition: box-shadow .2s, transform .15s;
}
/* per-status subtle tinted background */
.order-card-wrap.status-bg-pending    { background: linear-gradient(to right, #fffbeb 0%, #fff 120px); border-color: #fde68a; }
.order-card-wrap.status-bg-processing { background: linear-gradient(to right, #eff6ff 0%, #fff 120px); border-color: #bfdbfe; }
.order-card-wrap.status-bg-shipped    { background: linear-gradient(to right, #f5f3ff 0%, #fff 120px); border-color: #ddd6fe; }
.order-card-wrap.status-bg-delivered  { background: linear-gradient(to right, #f0fdf4 0%, #fff 120px); border-color: #bbf7d0; }
.order-card-wrap.status-bg-cancelled  { background: linear-gradient(to right, #fff1f2 0%, #fff 120px); border-color: #fecaca; }
.order-card-wrap:hover { box-shadow: 0 4px 20px rgba(0,0,0,.1); transform: translateY(-1px); }
.order-card-accent { width: 6px; flex-shrink: 0; }
.status-accent-pending    { background: linear-gradient(to bottom, #f59e0b, #ca8a04); }
.status-accent-processing { background: linear-gradient(to bottom, #3b82f6, #1e40af); }
.status-accent-shipped    { background: linear-gradient(to bottom, #a78bfa, #5b21b6); }
.status-accent-delivered  { background: linear-gradient(to bottom, #4ade80, #16a34a); }
.status-accent-cancelled  { background: linear-gradient(to bottom, #f87171, #dc2626); }
.order-card-body { flex: 1; padding: 20px 22px; min-width: 0; }
.order-id-text     { font-size: 1rem; color: var(--blue); }
.order-amount-text {
  display: inline-block;
  font-size: 1.1rem;
  font-weight: 700;
  color: #166534;
  background: #dcfce7;
  border: 1px solid #bbf7d0;
  border-radius: 8px;
  padding: 2px 10px;
  letter-spacing: -.2px;
}
.order-item-chip {
  display: inline-flex;
  align-items: center;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 6px;
  padding: 3px 10px;
  font-size: 0.78rem;
  color: #166534;
}
.order-item-chip-more {
  background: #f8fafc;
  border-color: var(--border);
  border-style: dashed;
  color: var(--muted);
}
.order-address-text {
  max-width: 340px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.btn-reorder {
  background: #eff6ff;
  color: #1d4ed8;
  border: 1.5px solid #bfdbfe;
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: 8px;
  transition: background .15s;
}
.btn-reorder:hover { background: #dbeafe; color: #1e40af; border-color: #93c5fd; }

/* ─── 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; }
  .hero-poster-img { max-height: 320px; }
}

@media (max-width: 991px) and (min-width: 577px) {
  .hero-poster-img { max-height: 400px; }
}
