/* ── Variables ──────────────────────────────────────── */
:root {
  --primary:        #1B4332;
  --primary-light:  #2D6A4F;
  --primary-mid:    #52B788;
  --secondary:      #F4A261;
  --secondary-dark: #c47c2b;
  --accent:         #E63946;
  --bg:             #FEFAE0;
  --bg-light:       #f5f0e0;
  --mint:           #D8F3DC;
  --text:           #1a1a1a;
  --text-muted:     #666;
  --white:          #ffffff;
  --border:         #e0e0e0;
  --radius:         12px;
  --radius-sm:      8px;
  --shadow:         0 4px 20px rgba(0,0,0,.08);
  --shadow-md:      0 8px 40px rgba(0,0,0,.12);
  --transition:     .25s ease;
}

/* ── Reset & Base ───────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Poppins', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

h1, h2, h3, h4 {
  font-family: 'Playfair Display', serif;
  line-height: 1.2;
}

img { max-width: 100%; display: block; }

a { text-decoration: none; color: inherit; }

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ── Buttons ────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  border: none;
  transition: all var(--transition);
  text-align: center;
  justify-content: center;
}

.btn-primary {
  background: var(--secondary);
  color: var(--white);
}
.btn-primary:hover { background: var(--secondary-dark); transform: translateY(-1px); box-shadow: 0 4px 16px rgba(244,162,97,.4); }

.btn-secondary {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
}
.btn-secondary:hover { background: var(--primary); color: var(--white); }

.btn-success {
  background: #2D6A4F;
  color: #fff;
}
.btn-success:hover { background: #1B4332; }

.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 1.5px solid var(--primary-mid);
}
.btn-outline:hover { background: var(--primary); color: #fff; }

.btn-lg { padding: 16px 36px; font-size: 16px; }
.btn-sm { padding: 8px 16px; font-size: 13px; }
.btn-full { width: 100%; }

.btn:disabled { opacity: .5; cursor: not-allowed; transform: none !important; }

/* ── Header ─────────────────────────────────────────── */
.header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: rgba(27,67,50,.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255,255,255,.1);
  transition: all var(--transition);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
}
.logo-img {
  height: 42px;
  width: 72px;
  object-fit: cover;
  border-radius: 10px;
  border: 2px solid var(--secondary);
}
.logo-text {
  font-family: 'Playfair Display', serif;
  font-size: 20px;
  font-weight: 700;
  color: var(--secondary);
  letter-spacing: .5px;
}

.nav { display: flex; gap: 32px; }
.nav-link {
  color: rgba(255,255,255,.85);
  font-size: 14px;
  font-weight: 500;
  transition: color var(--transition);
  position: relative;
}
.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px; left: 0; right: 0;
  height: 2px;
  background: var(--secondary);
  transform: scaleX(0);
  transition: transform var(--transition);
}
.nav-link:hover { color: var(--secondary); }
.nav-link:hover::after { transform: scaleX(1); }

.header-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.lang-switcher {
  display: flex;
  align-items: center;
  gap: 2px;
}

.lang-btn {
  background: none;
  border: none;
  color: rgba(255,255,255,.6);
  font-family: 'Poppins', sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .5px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  transition: all var(--transition);
}
.lang-btn.active {
  color: var(--secondary);
  background: rgba(244,162,97,.15);
}
.lang-btn:hover:not(.active) { color: #fff; }

.lang-divider {
  color: rgba(255,255,255,.25);
  font-size: 11px;
  user-select: none;
}

.cart-btn {
  position: relative;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.cart-icon {
  width: 26px;
  height: 26px;
  filter: invert(1);
}
.cart-badge {
  position: absolute;
  top: 0; right: 0;
  background: var(--secondary);
  color: var(--white);
  border-radius: 50%;
  width: 18px; height: 18px;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ── Hero ───────────────────────────────────────────── */
.hero {
  min-height: 80vh;
  background: linear-gradient(135deg, #1B4332 0%, #2D6A4F 50%, #1a5c3e 100%);
  display: flex;
  align-items: center;
  padding: 60px 24px;
  gap: 40px;
  max-width: 1200px;
  margin: 0 auto;
}

.hero-content { flex: 1; }

.hero-tag {
  display: inline-block;
  background: rgba(244,162,97,.15);
  color: var(--secondary);
  padding: 6px 16px;
  border-radius: 30px;
  font-size: 13px;
  font-weight: 600;
  border: 1px solid rgba(244,162,97,.3);
  margin-bottom: 20px;
}

.hero-title {
  font-size: clamp(36px, 5vw, 64px);
  color: var(--white);
  margin-bottom: 20px;
  line-height: 1.15;
}

.hero-title span { color: var(--secondary); }

.hero-subtitle {
  font-size: 18px;
  color: rgba(255,255,255,.75);
  margin-bottom: 36px;
  max-width: 440px;
}

.hero-cta { margin-top: 8px; }

.hero-image-wrap {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-image {
  width: 100%;
  max-width: 520px;
  border-radius: 24px;
  box-shadow: var(--shadow-md);
  object-fit: contain;
  height: auto;
}

/* ── Trust Bar ──────────────────────────────────────── */
.trust-bar {
  background: var(--primary);
  padding: 16px 0;
}

.trust-bar-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 32px;
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--mint);
  font-size: 14px;
  font-weight: 500;
}
.trust-icon { font-size: 20px; }

/* ── Sections ───────────────────────────────────────── */
.section { padding: 80px 0; }
#products { padding-top: 110px; }

.section-header { text-align: center; margin-bottom: 48px; }

.section-title {
  font-size: clamp(28px, 4vw, 42px);
  color: var(--primary);
  margin-bottom: 12px;
}

.section-subtitle {
  font-size: 16px;
  color: var(--text-muted);
  max-width: 560px;
  margin: 0 auto;
}

.section-tag {
  display: inline-block;
  color: var(--secondary);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 8px;
}

/* ── Products Grid ──────────────────────────────────── */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 28px;
}

.product-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform var(--transition), box-shadow var(--transition);
  display: flex;
  flex-direction: column;
}

.product-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
}

.product-image-wrap {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4/3;
  cursor: pointer;
}

.product-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .4s ease;
}

.product-card:hover .product-image { transform: scale(1.05); }

.product-badge {
  position: absolute;
  top: 12px; left: 12px;
  background: var(--secondary);
  color: var(--white);
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: .5px;
}

.product-info {
  padding: 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.product-name {
  font-size: 20px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 4px;
}

.product-tagline {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 10px;
  font-weight: 500;
}

.product-desc {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 16px;
}

.product-footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.product-price {
  font-size: 22px;
  font-weight: 700;
  color: var(--primary);
  text-align: center;
}

.product-unit {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
  text-align: center;
}

.add-to-cart-btn {
  background: var(--primary);
  color: var(--white);
  border: none;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  font-family: 'Poppins', sans-serif;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
  width: 100%;
  text-align: center;
}
.add-to-cart-btn:hover { background: var(--primary-light); transform: translateY(-1px); }

/* ── About ──────────────────────────────────────────── */
.about-section { background: var(--white); }

.about-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.about-image-wrap {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  aspect-ratio: 4/3;
}

.about-image { width: 100%; height: 100%; object-fit: cover; }

.about-content { display: flex; flex-direction: column; gap: 16px; }
.about-content p { color: var(--text-muted); line-height: 1.8; }

/* ── How It Works ───────────────────────────────────── */
.how-section { background: var(--bg-light); }

.steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 24px;
}

.step-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 32px 24px;
  text-align: center;
  box-shadow: var(--shadow);
  position: relative;
}

.step-num {
  position: absolute;
  top: 16px; right: 16px;
  width: 28px; height: 28px;
  background: var(--primary);
  color: var(--white);
  border-radius: 50%;
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.step-icon { font-size: 40px; margin-bottom: 16px; }
.step-card h3 { font-size: 18px; color: var(--primary); margin-bottom: 8px; }
.step-card p { font-size: 14px; color: var(--text-muted); }

/* ── Contact ────────────────────────────────────────── */
.contact-section { background: var(--primary); }
.contact-section .section-title { color: var(--white); }

.contact-inner { text-align: center; }

.contact-cards {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  justify-content: center;
  margin-top: 40px;
}

.contact-card {
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.15);
  border-radius: var(--radius);
  padding: 28px 36px;
  min-width: 180px;
  flex: 1;
  max-width: 240px;
}
.contact-icon { font-size: 36px; margin-bottom: 12px; }
.contact-card h4 { color: var(--secondary); font-size: 16px; margin-bottom: 8px; }
.contact-card p { color: rgba(255,255,255,.8); font-size: 14px; }

/* ── Footer ─────────────────────────────────────────── */
.footer {
  background: #0d2a1f;
  color: rgba(255,255,255,.7);
}

.footer-inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 48px;
  padding: 56px 24px 40px;
}

.footer-logo {
  font-family: 'Playfair Display', serif;
  font-size: 22px;
  color: var(--secondary);
  display: block;
  margin-bottom: 12px;
}

.footer-brand p { font-size: 14px; line-height: 1.7; }

.footer-links { display: flex; flex-direction: column; gap: 8px; }
.footer-links h4 { color: var(--white); font-size: 15px; margin-bottom: 8px; }
.footer-links a { font-size: 14px; color: rgba(255,255,255,.6); transition: color var(--transition); }
.footer-links a:hover { color: var(--secondary); }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.08);
  padding: 20px 24px;
  text-align: center;
  font-size: 13px;
}

/* ── Modal ──────────────────────────────────────────── */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.6);
  z-index: 2000;
}
.modal-overlay.active { display: block; }

.modal {
  display: none;
  position: fixed;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  background: var(--white);
  border-radius: var(--radius);
  width: 90%;
  max-width: 760px;
  max-height: 90vh;
  overflow-y: auto;
  z-index: 2001;
  padding: 32px;
}
.modal.active { display: block; }

.modal-close {
  position: absolute;
  top: 16px; right: 16px;
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
  color: var(--text-muted);
  transition: color var(--transition);
}
.modal-close:hover { color: var(--text); }

.modal-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  align-items: start;
}

.modal-image {
  border-radius: var(--radius-sm);
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
}

.modal-info { display: flex; flex-direction: column; gap: 12px; }

.modal-badge {
  display: inline-block;
  background: rgba(244,162,97,.15);
  color: var(--secondary-dark);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  width: fit-content;
}

.modal-name {
  font-size: 28px;
  color: var(--primary);
}

.modal-tagline { font-size: 13px; color: var(--text-muted); font-weight: 500; }

.modal-desc { font-size: 14px; color: var(--text-muted); line-height: 1.7; }

.modal-price { font-size: 26px; font-weight: 700; color: var(--primary); }

.modal-variants { display: flex; flex-direction: column; gap: 6px; }

.modal-variants label { font-size: 13px; font-weight: 600; color: var(--text); }

.modal-variants select {
  padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: 'Poppins', sans-serif;
  font-size: 14px;
  color: var(--text);
  background: var(--white);
  cursor: pointer;
}

.qty-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.qty-row label { font-size: 13px; font-weight: 600; }

.qty-ctrl {
  display: flex;
  align-items: center;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.qty-ctrl button {
  background: var(--bg-light);
  border: none;
  width: 36px; height: 36px;
  font-size: 18px;
  cursor: pointer;
  font-weight: 600;
  transition: background var(--transition);
}
.qty-ctrl button:hover { background: var(--border); }

.qty-ctrl input {
  width: 50px;
  text-align: center;
  border: none;
  border-left: 1.5px solid var(--border);
  border-right: 1.5px solid var(--border);
  height: 36px;
  font-family: 'Poppins', sans-serif;
  font-size: 14px;
  font-weight: 600;
}

/* ── Toast ──────────────────────────────────────────── */
.toast {
  position: fixed;
  bottom: 28px; right: 28px;
  background: var(--primary);
  color: var(--white);
  padding: 14px 24px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  box-shadow: var(--shadow-md);
  transform: translateY(100px);
  opacity: 0;
  transition: all .3s ease;
  z-index: 9999;
  max-width: 320px;
}
.toast.show { transform: translateY(0); opacity: 1; }
.toast.success { background: #2D6A4F; }
.toast.error { background: #c0392b; }

/* ── Checkout page ──────────────────────────────────── */
.page-header {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  padding: 100px 0 40px;
  color: var(--white);
  text-align: center;
}

.page-header h1 { color: var(--secondary); font-size: 36px; margin-bottom: 8px; }
.page-header p { color: rgba(255,255,255,.7); }

.checkout-layout {
  display: grid;
  grid-template-columns: 1fr 400px;
  gap: 32px;
  padding: 48px 0;
  align-items: start;
}

.form-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow);
}

.form-card h2 {
  font-size: 22px;
  color: var(--primary);
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 2px solid var(--bg-light);
}

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}

.form-group label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

.form-group input,
.form-group select,
.form-group textarea {
  padding: 12px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: 'Poppins', sans-serif;
  font-size: 14px;
  color: var(--text);
  transition: border-color var(--transition);
  background: var(--white);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary-mid);
}

.form-group textarea { resize: vertical; min-height: 80px; }

/* Order Summary */
.order-summary {
  background: var(--white);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
  position: sticky;
  top: 90px;
}

.order-summary h2 {
  font-size: 20px;
  color: var(--primary);
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--bg-light);
}

.summary-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--bg-light);
}

.summary-item-image {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  flex-shrink: 0;
}

.summary-item-info { flex: 1; min-width: 0; }
.summary-item-name { font-size: 14px; font-weight: 600; color: var(--text); }
.summary-item-variant { font-size: 12px; color: var(--text-muted); }
.summary-item-qty { font-size: 12px; color: var(--text-muted); }
.summary-item-price { font-size: 14px; font-weight: 700; color: var(--primary); white-space: nowrap; }

.summary-qty-ctrl {
  display: flex;
  align-items: center;
  gap: 0;
  border: 1.5px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
  width: fit-content;
  margin-top: 6px;
}

.summary-qty-btn {
  background: var(--bg-light);
  border: none;
  width: 28px;
  height: 26px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  color: var(--primary);
  transition: background var(--transition);
  line-height: 1;
}
.summary-qty-btn:hover { background: var(--border); }

.summary-qty-num {
  width: 32px;
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  border-left: 1.5px solid var(--border);
  border-right: 1.5px solid var(--border);
  line-height: 26px;
}

.remove-item-btn {
  background: none;
  border: none;
  font-size: 16px;
  cursor: pointer;
  opacity: .45;
  transition: opacity var(--transition), transform var(--transition);
  padding: 2px;
  line-height: 1;
  flex-shrink: 0;
}
.remove-item-btn:hover { opacity: 1; transform: scale(1.2); }

.summary-totals { margin-top: 16px; }

.summary-row {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  font-size: 14px;
  color: var(--text-muted);
}

.summary-row.total {
  font-size: 18px;
  font-weight: 700;
  color: var(--primary);
  border-top: 2px solid var(--bg-light);
  padding-top: 12px;
  margin-top: 6px;
}

.free-shipping-note {
  background: rgba(82,183,136,.15);
  border: 1px solid rgba(82,183,136,.3);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 13px;
  color: var(--primary-light);
  margin-top: 12px;
  text-align: center;
  font-weight: 500;
}

.empty-cart {
  text-align: center;
  padding: 60px 24px;
  color: var(--text-muted);
}
.empty-cart-icon { font-size: 60px; margin-bottom: 16px; }
.empty-cart h3 { font-size: 22px; color: var(--text); margin-bottom: 8px; }

/* ── Success page ───────────────────────────────────── */
.success-page {
  min-height: 100vh;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 100px 24px;
}

.success-card {
  background: var(--white);
  border-radius: 20px;
  padding: 56px 48px;
  text-align: center;
  box-shadow: var(--shadow-md);
  max-width: 520px;
  width: 100%;
}

.success-icon { font-size: 72px; margin-bottom: 20px; }
.success-card h1 { font-size: 32px; color: var(--primary); margin-bottom: 12px; }
.success-card p { color: var(--text-muted); font-size: 16px; line-height: 1.7; margin-bottom: 12px; }
.order-num-tag {
  display: inline-block;
  background: var(--mint);
  color: var(--primary);
  padding: 8px 24px;
  border-radius: 30px;
  font-weight: 700;
  font-size: 18px;
  margin: 12px 0 24px;
}

/* ── Admin pages ────────────────────────────────────── */
.admin-body { background: #f0f4f8; min-height: 100vh; font-family: 'Poppins', sans-serif; }

.admin-header {
  background: var(--primary);
  padding: 0 32px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.admin-header-logo {
  font-family: 'Playfair Display', serif;
  font-size: 20px;
  color: var(--secondary);
  font-weight: 700;
}

.admin-header-right { display: flex; align-items: center; gap: 16px; }
.admin-username { color: rgba(255,255,255,.8); font-size: 14px; }

.admin-main { max-width: 1200px; margin: 0 auto; padding: 32px 24px; }

.admin-page-title { font-size: 28px; color: var(--primary); margin-bottom: 8px; }
.admin-page-sub { color: var(--text-muted); font-size: 14px; margin-bottom: 32px; }

/* Stats Cards */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 32px;
}

.stat-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  border-left: 4px solid;
}
.stat-card.total { border-color: var(--primary-mid); }
.stat-card.pending { border-color: #f59e0b; }
.stat-card.confirmed { border-color: var(--primary); }
.stat-card.shipped { border-color: #6366f1; }

.stat-num { font-size: 32px; font-weight: 700; color: var(--text); margin-bottom: 4px; }
.stat-label { font-size: 13px; color: var(--text-muted); font-weight: 500; }

/* Filter tabs */
.filter-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
  background: var(--white);
  padding: 6px;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  width: fit-content;
}

.filter-tab {
  padding: 8px 20px;
  border-radius: 6px;
  border: none;
  background: none;
  font-family: 'Poppins', sans-serif;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  color: var(--text-muted);
  transition: all var(--transition);
}
.filter-tab.active { background: var(--primary); color: var(--white); }
.filter-tab:hover:not(.active) { background: var(--bg-light); color: var(--text); }

/* Orders Table */
.orders-table-wrap {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.orders-table {
  width: 100%;
  border-collapse: collapse;
}

.orders-table th {
  background: var(--primary);
  color: var(--white);
  text-align: left;
  padding: 14px 16px;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}

.orders-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--bg-light);
  font-size: 14px;
  color: var(--text);
  vertical-align: middle;
}

.orders-table tr:hover td { background: #f8f9fa; }
.orders-table tr:last-child td { border-bottom: none; }

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}
.status-badge.pending  { background: #fef3c7; color: #92400e; }
.status-badge.confirmed { background: #d1fae5; color: #065f46; }
.status-badge.shipped   { background: #ede9fe; color: #4c1d95; }

.action-btns { display: flex; gap: 8px; }

/* Admin Order Detail Modal */
.admin-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.6);
  z-index: 3000;
}
.admin-modal-overlay.active { display: block; }

.admin-modal {
  display: none;
  position: fixed;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  background: var(--white);
  border-radius: var(--radius);
  width: 90%;
  max-width: 700px;
  max-height: 90vh;
  overflow-y: auto;
  z-index: 3001;
  padding: 36px;
}
.admin-modal.active { display: block; }

.admin-modal h2 { font-size: 22px; color: var(--primary); margin-bottom: 24px; }

.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-bottom: 24px; }

.detail-section h4 { font-size: 13px; color: var(--text-muted); text-transform: uppercase; letter-spacing: .5px; margin-bottom: 8px; }
.detail-section p { font-size: 14px; color: var(--text); line-height: 1.7; }

.detail-items { margin-bottom: 24px; }
.detail-items h4 { font-size: 13px; color: var(--text-muted); text-transform: uppercase; letter-spacing: .5px; margin-bottom: 12px; }

.detail-item {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--bg-light);
  font-size: 14px;
}

.admin-actions {
  display: flex;
  gap: 12px;
  padding-top: 16px;
  border-top: 2px solid var(--bg-light);
}

/* ── Admin page tabs ────────────────────────────────── */
.admin-page-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 28px;
}

.admin-page-tab {
  padding: 10px 24px;
  border-radius: var(--radius-sm);
  border: 2px solid var(--border);
  background: var(--white);
  font-family: 'Poppins', sans-serif;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  color: var(--text-muted);
  transition: all var(--transition);
}
.admin-page-tab.active {
  background: var(--primary);
  color: var(--white);
  border-color: var(--primary);
}
.admin-page-tab:hover:not(.active) { border-color: var(--primary); color: var(--primary); }

/* ── Product status grid ─────────────────────────────── */
.product-status-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
}

.product-status-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  gap: 16px;
  border-left: 4px solid #2D6A4F;
  transition: all var(--transition);
}
.product-status-card.paused {
  border-left-color: #e74c3c;
  opacity: .7;
}

.product-status-img {
  width: 72px;
  height: 72px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  flex-shrink: 0;
}

.product-status-info { flex: 1; min-width: 0; }
.product-status-name    { font-size: 16px; font-weight: 700; color: var(--primary); }
.product-status-tagline { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.product-status-price   { font-size: 13px; font-weight: 600; color: var(--text); margin-top: 4px; }

.product-status-toggle-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.product-status-label {
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}
.product-status-label.live   { color: #2D6A4F; }
.product-status-label.paused { color: #e74c3c; }

/* ── Toggle switch ───────────────────────────────────── */
.toggle-switch { position: relative; display: inline-block; cursor: pointer; }
.toggle-input  { display: none; }

.toggle-slider {
  display: block;
  width: 48px;
  height: 26px;
  background: #ccc;
  border-radius: 13px;
  position: relative;
  transition: background .3s;
}
.toggle-slider::after {
  content: '';
  position: absolute;
  width: 20px; height: 20px;
  background: var(--white);
  border-radius: 50%;
  top: 3px; left: 3px;
  transition: transform .3s;
  box-shadow: 0 1px 4px rgba(0,0,0,.2);
}
.toggle-input:checked + .toggle-slider { background: #2D6A4F; }
.toggle-input:checked + .toggle-slider::after { transform: translateX(22px); }

/* Login page */
.login-page {
  min-height: 100vh;
  background: linear-gradient(135deg, var(--primary) 0%, #1a5c3e 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.login-card {
  background: var(--white);
  border-radius: 20px;
  padding: 48px 40px;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 20px 60px rgba(0,0,0,.2);
  text-align: center;
}

.login-logo {
  font-family: 'Playfair Display', serif;
  font-size: 28px;
  color: var(--primary);
  margin-bottom: 8px;
}
.login-sub { color: var(--text-muted); font-size: 14px; margin-bottom: 32px; }

.login-card .form-group { text-align: left; }
.login-error { background: #fef2f2; color: #c0392b; padding: 10px 14px; border-radius: var(--radius-sm); font-size: 13px; margin-top: 12px; display: none; }
.login-error.show { display: block; }

/* ── Responsive ─────────────────────────────────────── */
@media (max-width: 900px) {
  .hero { flex-direction: column; text-align: center; padding: 100px 24px 48px; }
  .hero-subtitle { margin: 0 auto 28px; }
  .about-inner { grid-template-columns: 1fr; }
  .checkout-layout { grid-template-columns: 1fr; }
  .order-summary { position: static; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .detail-grid { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .admin-modal { padding: 24px; }
  .admin-actions { flex-wrap: wrap; }
}

@media (max-width: 600px) {
  .nav { display: none; }
  .logo-text { font-size: 16px; }
  .products-grid { grid-template-columns: 1fr 1fr; }
  .steps-grid { grid-template-columns: 1fr 1fr; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .modal-inner { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; }
  .trust-bar-inner { gap: 12px; }
  .trust-item { font-size: 12px; }

  /* Admin table: enable horizontal scroll */
  .orders-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .orders-table { min-width: 640px; }

  /* Admin filter tabs: wrap */
  .filter-tabs { flex-wrap: wrap; width: 100%; }
  .filter-tab { flex: 1; text-align: center; padding: 8px 12px; font-size: 13px; }

  /* Admin page tabs: full width */
  .admin-page-tabs { flex-wrap: wrap; }
  .admin-page-tab { flex: 1; text-align: center; padding: 10px 12px; }

  /* Admin header: tighten */
  .admin-header { padding: 0 16px; }
  .admin-header-logo { font-size: 16px; }
  .admin-username { display: none; }

  /* Admin main: less padding */
  .admin-main { padding: 20px 16px; }

  /* Checkout form card */
  .form-card { padding: 20px 16px; }
  .order-summary { padding: 20px 16px; }

  /* Contact cards: full width on narrow screens */
  .contact-card { min-width: 0; flex: 1 1 100%; max-width: 100%; }

  /* Product status grid */
  .product-status-grid { grid-template-columns: 1fr; }

  /* Success card */
  .success-card { padding: 36px 24px; }
}

@media (max-width: 480px) {
  /* Hide logo text to save header space */
  .logo-text { display: none; }

  /* Hero adjustments */
  .hero { padding: 90px 16px 40px; gap: 24px; }
  .hero-subtitle { font-size: 15px; }

  /* Section padding */
  .section { padding: 56px 0; }
  #products { padding-top: 90px; }

  /* Step cards */
  .steps-grid { grid-template-columns: 1fr; }

  /* Stats: 2 columns, smaller numbers */
  .stat-num { font-size: 26px; }
  .stat-card { padding: 16px; }

  /* Admin modal: minimal padding */
  .admin-modal { padding: 16px; width: 95%; }

  /* Toast: full width at bottom */
  .toast { left: 16px; right: 16px; bottom: 16px; max-width: unset; }

  /* Footer compact */
  .footer-inner { padding: 40px 16px 24px; gap: 32px; }

  /* Container padding */
  .container { padding: 0 16px; }
}

@media (max-width: 400px) {
  .products-grid { grid-template-columns: 1fr; }
  .steps-grid { grid-template-columns: 1fr; }
  .contact-cards { flex-direction: column; }
}
