/* ═══════════════════════════════════════════════
   Farmacia del Parco — Main Stylesheet
   ═══════════════════════════════════════════════ */

:root {
  --forest: #1a4a3a;
  --emerald: #2d6a4f;
  --sage: #52796f;
  --cream: #faf8f2;
  --warm: #f5f0e8;
  --gold: #c9a84c;
  --gold-light: #f5ecd4;
  --text: #1a2a1a;
  --text-muted: #6b7b6b;
  --border: #e2ddd4;
  --white: #ffffff;
  --danger: #c0392b;
  --twint: #000000;
  --twint-accent: #00A3E0;
  --font-serif: 'Cormorant Garamond', 'EB Garamond', 'Garamond', Georgia, serif;
  --font-sans: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 2px 20px rgba(26,74,58,0.1);
  --shadow-hover: 0 8px 28px rgba(26,74,58,0.12);
  --max-width: 1100px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: var(--font-sans);
  background: var(--cream);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.5;
}

a { color: var(--emerald); text-decoration: none; }
a:hover { color: var(--forest); }

.container { max-width: var(--max-width); margin: 0 auto; padding: 0 24px; }

/* ═══ HEADER ═══ */
#header-slot {
  position: sticky; top: 0; z-index: 50;
}
.header {
  background: var(--white);
  box-shadow: 0 2px 16px rgba(0,0,0,0.08);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 0; gap: 16px; flex-wrap: wrap;
}
.logo { display: flex; align-items: center; cursor: pointer; text-decoration: none; }
.logo-img { height: 96px; width: auto; object-fit: contain; }

.nav-btns { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.nav-btn {
  background: var(--warm); border: 1.5px solid var(--border);
  border-radius: var(--radius-sm); padding: 9px 16px;
  color: var(--forest); font-size: 13px; font-weight: 600; cursor: pointer;
  display: flex; align-items: center; gap: 6; transition: all 0.2s;
  text-decoration: none;
}
.nav-btn:hover { background: var(--forest); color: #fff; border-color: var(--forest); }
.nav-btn.active { background: var(--forest); color: #fff; border-color: var(--forest); }
.nav-badge {
  background: var(--gold); color: var(--forest);
  border-radius: 12px; padding: 1px 8px; font-size: 11px; font-weight: 800;
}
.nav-btn.active .nav-badge, .nav-btn:hover .nav-badge { background: var(--gold-light); }

/* ═══ ADMIN DROPDOWN ═══ */
.admin-dropdown { position: relative; }
.admin-dropdown-menu {
  display: none; position: absolute; top: calc(100% + 6px); right: 0;
  background: var(--white); border: 1.5px solid var(--border); border-radius: var(--radius-sm);
  box-shadow: 0 8px 32px rgba(26,74,58,0.15); min-width: 200px; z-index: 100;
  padding: 6px 0; animation: dropIn 0.15s ease-out;
}
.admin-dropdown.open .admin-dropdown-menu { display: block; }
@keyframes dropIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: translateY(0); } }
.admin-dropdown-item {
  display: flex; align-items: center; gap: 8px; width: 100%;
  padding: 10px 16px; font-size: 13px; font-weight: 600; color: var(--forest);
  background: none; border: none; cursor: pointer; text-decoration: none; transition: background 0.15s;
}
.admin-dropdown-item:hover { background: var(--warm); }
.admin-dropdown-item.active { background: var(--warm); color: var(--emerald); font-weight: 700; }

.header-bar {
  background: var(--forest); padding: 7px 24px; text-align: center;
  color: rgba(255,255,255,0.85); font-size: 11.5px; font-weight: 500; letter-spacing: 0.4px;
}
.header-bar-link { color: rgba(255,255,255,0.85); text-decoration: none; }
.header-bar-link:hover { color: #fff; text-decoration: underline; }

/* ═══ HERO ═══ */
.hero {
  margin: 28px 0 12px;
  background: linear-gradient(135deg, var(--forest) 0%, var(--emerald) 100%);
  border-radius: 18px; padding: 28px 40px 22px;
  display: flex; align-items: center; justify-content: center;
  text-align: center; flex-direction: column;
  gap: 8px; position: relative; overflow: hidden;
}

/* ═══ PRODUCT CAROUSEL ═══ */
.product-carousel-wrap {
  margin: 0 0 12px; overflow: hidden; position: relative;
}
.product-carousel-title {
  font-family: var(--font-serif); font-size: 16px; font-weight: 700;
  color: var(--forest); margin-bottom: 10px; text-align: center;
}
.product-carousel {
  display: flex; gap: 14px; width: max-content; cursor: grab;
}
.product-carousel.dragging { cursor: grabbing; }
.product-carousel-wrap { -webkit-overflow-scrolling: touch; }
.carousel-card {
  flex: 0 0 150px; background: #fff; border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.06); padding: 10px;
  text-align: center; cursor: pointer; transition: transform 0.2s, box-shadow 0.2s;
  text-decoration: none; color: inherit; display: block; position: relative;
}
.carousel-discount-badge {
  position: absolute; top: 8px; right: 8px; background: var(--danger); color: #fff;
  font-family: var(--font-sans); font-size: 12px; font-weight: 800;
  padding: 3px 8px; border-radius: 8px; z-index: 2; line-height: 1.2;
}
.carousel-card:hover { transform: translateY(-3px); box-shadow: 0 4px 16px rgba(0,0,0,0.12); }
.carousel-card img { width: 100%; height: 100px; object-fit: contain; margin-bottom: 6px; }
.carousel-card-name { font-size: 11px; font-weight: 600; color: var(--text); line-height: 1.3; height: 28px; overflow: hidden; }
.carousel-card-price { font-family: var(--font-sans); font-size: 13px; font-weight: 800; color: var(--forest); margin-top: 4px; }
.carousel-card-original { font-family: var(--font-sans); font-size: 10px; font-weight: 600; color: var(--text-muted); text-decoration: line-through; }
.carousel-card-sale { font-family: var(--font-sans); font-size: 13px; font-weight: 800; color: var(--danger); margin-top: 2px; }
/* carouselScroll now handled by JS for drag support */
.payment-trust-bar {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  padding: 6px 0 2px; flex-wrap: wrap;
}
.payment-trust-bar img { height: 26px; width: auto; max-width: 60px; object-fit: contain; opacity: 0.85; }
.payment-trust-bar span { font-size: 12px; color: rgba(255,255,255,0.9); font-weight: 700; }
.hero::before {
  content: ''; position: absolute; left: -60px; bottom: -60px;
  width: 200px; height: 200px; border-radius: 50%; background: rgba(255,255,255,0.04);
}
.hero::after {
  content: ''; position: absolute; right: -30px; top: -30px;
  width: 180px; height: 180px; border-radius: 50%; background: rgba(201,168,76,0.08);
}
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 11.5px; font-weight: 700; letter-spacing: 1.8px; text-transform: uppercase;
  color: rgba(255,255,255,0.78);
  padding: 6px 14px; border-radius: 999px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.14);
  margin-bottom: 14px;
}
.hero-eyebrow-emoji { font-size: 15px; line-height: 1; }
@media (max-width: 720px) {
  .hero-eyebrow { font-size: 10.5px; letter-spacing: 1.2px; padding: 5px 12px; }
}
.hero-content { position: relative; z-index: 1; }
.hero h1 { font-family: var(--font-serif); font-size: 42px; font-weight: 700; color: #fff; line-height: 1.15; margin-bottom: 10px; letter-spacing: 0.3px; }
.hero p { font-size: 14px; color: rgba(255,255,255,0.88); line-height: 1.5; max-width: 560px; margin: 0 auto; }
.hero-emoji { font-size: 36px; position: relative; z-index: 1; margin-top: 0; }

/* ═══ FREE SHIPPING BANNER ═══ */
.free-shipping-banner {
  background: linear-gradient(135deg, #f0f9f4 0%, #e8f5e9 100%);
  border: 1px solid #c8e6c9; border-radius: 10px;
  padding: 14px 24px; text-align: center;
  font-size: 16px; font-weight: 700; color: var(--emerald);
  margin-bottom: 16px; letter-spacing: 0.3px;
}

/* ═══ PROMO LAUNCH BANNER ═══ */
.promo-launch-banner {
  background: linear-gradient(135deg, #1a4a3a 0%, #2d6a4f 50%, #40916c 100%);
  border-radius: 14px; padding: 20px 28px; text-align: center;
  font-size: 17px; color: #fff; margin-bottom: 18px;
  line-height: 1.6; letter-spacing: 0.2px;
  box-shadow: 0 4px 20px rgba(26,74,58,0.25);
  position: relative; overflow: hidden;
}
.promo-launch-banner strong { color: #f0c040; }
.promo-launch-banner::before {
  content: ""; position: absolute; top: -40px; right: -40px;
  width: 120px; height: 120px; border-radius: 50%;
  background: rgba(255,255,255,0.06);
}
.promo-launch-banner::after {
  content: ""; position: absolute; bottom: -30px; left: -30px;
  width: 90px; height: 90px; border-radius: 50%;
  background: rgba(255,255,255,0.04);
}

/* ═══ SEARCH & FILTERS ═══ */
.search-bar { display: flex; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; align-items: stretch; }
.search-input-wrap { position: relative; flex: 1 1 280px; }
/* Icon on the right side, Amavita-style */
.search-icon {
  position: absolute; right: 22px; left: auto; top: 50%;
  transform: translateY(-50%); font-size: 20px;
  color: #1a4a3a; opacity: 0.75; pointer-events: none;
  transition: opacity 0.2s;
}
.search-input {
  width: 100%; height: 58px; padding: 0 56px 0 22px; border-radius: 14px;
  border: 1.5px solid #d9dcda; background: #f4f5f3;
  font-size: 16px; font-weight: 400; color: #1a1a1a; outline: none;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}
.search-input::placeholder { color: #8a8f8c; font-weight: 400; }
.search-input:hover {
  border-color: #1a4a3a;
  background: #fff;
}
.search-input:hover + .search-icon,
.search-input:focus + .search-icon { opacity: 1; }
.search-input:focus {
  border-color: #1a4a3a;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(26, 74, 58, 0.08);
}
.search-input--prominent {
  height: 64px; font-size: 17px; padding: 0 64px 0 24px;
  border-radius: 16px; border-width: 2px;
  box-shadow: 0 2px 10px rgba(26, 74, 58, 0.06);
}
.search-input--prominent + .search-icon { right: 24px; font-size: 22px; }

.sort-select {
  height: 48px; padding: 0 16px; border-radius: 12px; border: 1.5px solid var(--border);
  background: var(--white); font-size: 13px; font-weight: 600; outline: none;
  color: var(--forest); cursor: pointer; min-width: 140px;
}

.filter-bar {
  display: flex; gap: 16px; align-items: center; flex-wrap: wrap;
  margin-bottom: 16; padding: 12px 16px; background: var(--white);
  border-radius: 12px; border: 1px solid var(--border);
}
.filter-label { font-weight: 700; color: var(--sage); font-size: 13px; }
.filter-range { width: 120px; accent-color: var(--emerald); }
.filter-value { font-weight: 600; color: var(--forest); font-size: 13px; }
.filter-checkbox {
  display: flex; align-items: center; gap: 6; font-size: 13px;
  font-weight: 600; color: var(--forest); cursor: pointer;
}
.filter-checkbox input { accent-color: var(--emerald); width: 16px; height: 16px; }
.filter-reset {
  background: none; border: 1px solid var(--border); border-radius: 8px;
  padding: 5px 12px; font-size: 12px; font-weight: 600; color: var(--text-muted); cursor: pointer;
}

.cat-tabs { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 10px; margin-bottom: 20px; scrollbar-width: thin; scrollbar-color: var(--border) transparent; flex-wrap: nowrap; }
.cat-tabs::-webkit-scrollbar { height: 4px; }
.cat-tabs::-webkit-scrollbar-track { background: transparent; }
.cat-tabs::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
.cat-tabs::-webkit-scrollbar-thumb:hover { background: var(--sage); }
.cat-tab {
  flex-shrink: 0; padding: 9px 16px; border-radius: var(--radius-sm);
  border: 2px solid transparent; background: var(--warm);
  color: var(--text-muted); font-weight: 500; font-size: 13px; cursor: pointer;
  display: flex; align-items: center; gap: 5px; transition: all 0.2s;
}
.cat-tab.active {
  border-color: var(--emerald); background: var(--white);
  color: var(--forest); font-weight: 700;
  box-shadow: 0 2px 10px rgba(45,106,79,0.12);
}
.cat-tab-all {
  background: var(--warm); color: var(--forest) !important; font-weight: 700; font-size: 14px;
  padding: 10px 20px; border: 2px solid var(--border); letter-spacing: 0.3px;
}
.cat-tab-all:hover { background: var(--white); border-color: var(--forest); color: var(--forest) !important; }
.cat-tab-all.active {
  background: var(--forest); color: #fff !important; border-color: var(--forest);
  box-shadow: 0 2px 12px rgba(45,106,79,0.18);
}
.cat-tab-promo {
  background: #dc2626; color: #fff !important; font-weight: 800; font-size: 14px;
  padding: 10px 22px; border: 2px solid #b91c1c; letter-spacing: 0.3px;
  text-transform: uppercase; animation: promo-pulse 2s ease-in-out infinite;
}
.cat-tab-promo:hover { background: #b91c1c; border-color: #991b1b; color: #fff !important; }
.cat-tab-promo.active {
  background: #fef2f2; color: #991b1b !important; border-color: #dc2626;
  box-shadow: 0 2px 14px rgba(220,38,38,0.3); animation: none;
}
@keyframes promo-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(220,38,38,0.4); }
  50% { box-shadow: 0 0 12px 4px rgba(220,38,38,0.25); }
}
.cat-tab-icon { font-size: 15px; }
.result-count { font-size: 13px; color: var(--text-muted); margin-bottom: 14px; font-weight: 500; }

/* ═══ PRODUCT GRID ═══ */
.product-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; padding-bottom: 48px; }
@media (max-width: 900px) { .product-grid { grid-template-columns: repeat(2, 1fr); } }
.product-card {
  background: var(--white); border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--border); transition: all 0.25s;
  display: flex; flex-direction: column; height: 100%;
}
.product-card:hover { box-shadow: var(--shadow-hover); transform: translateY(-3px); }
.product-img {
  height: 140px; background: var(--warm);
  display: flex; align-items: center; justify-content: center; overflow: hidden; position: relative;
}
.product-img img { max-height: 100%; max-width: 100%; object-fit: contain; }
.product-img-placeholder { font-size: 48px; color: var(--sage); opacity: 0.5; }
.product-badge-oos {
  position: absolute; top: 10px; right: 10px; background: var(--danger);
  color: #fff; font-size: 10px; font-weight: 700; padding: 3px 8px; border-radius: 6px; z-index: 2;
}
.product-body { padding: 16px 18px 18px; flex: 1; display: flex; flex-direction: column; }
.product-body .product-desc { flex: 1; }
.product-name { font-family: var(--font-serif); font-size: 16px; font-weight: 700; color: var(--forest); margin-bottom: 4px; line-height: 1.3; }
.product-desc { font-size: 12.5px; color: var(--text-muted); margin-bottom: 14px; line-height: 1.45; }
.product-footer { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 6px; }
.product-cart-actions { display: flex; align-items: center; gap: 6px; }
.qty-selector { display: flex; align-items: center; background: #f0f0f0; border-radius: 8px; overflow: hidden; }
.qty-btn { width: 28px; height: 28px; border: none; background: transparent; font-size: 16px; font-weight: 700; color: var(--forest); cursor: pointer; display: flex; align-items: center; justify-content: center; transition: background 0.15s; }
.qty-btn:hover { background: #e0e0e0; }
.qty-val { min-width: 22px; text-align: center; font-size: 14px; font-weight: 700; color: var(--forest); }
.product-price { font-family: var(--font-sans); font-size: 20px; font-weight: 800; color: var(--forest); }
.product-price-wrap { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; }
.price-original { font-family: var(--font-sans); font-size: 14px; font-weight: 600; color: var(--text-muted); text-decoration: line-through; }
.price-discounted { font-family: var(--font-sans); font-size: 20px; font-weight: 800; color: var(--danger); }
.discount-badge {
  position: absolute; top: 10px; right: 10px; background: #ef4444; color: #fff;
  font-size: 12px; font-weight: 800; padding: 5px 10px; border-radius: 8px;
  z-index: 3; box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3);
}
.discount-badge.group-badge {
  background: #f97316; box-shadow: 0 2px 8px rgba(249, 115, 22, 0.4);
}
.discount-savings { font-size: 11px; color: #16a34a; font-weight: 600; margin-top: 2px; }

/* ═══ BUTTONS ═══ */
.btn {
  border: none; border-radius: var(--radius-sm); padding: 9px 16px;
  font-size: 13px; font-weight: 700; cursor: pointer; transition: all 0.2s;
  display: inline-flex; align-items: center; gap: 6;
}
.btn-primary { background: var(--forest); color: #fff; }
.btn-primary:hover { background: var(--emerald); }
.btn-primary:disabled { background: #ccc; cursor: not-allowed; }
.btn-secondary { background: var(--warm); color: var(--forest); }
.btn-danger { background: #fde8e8; color: var(--danger); }
.btn-lg { padding: 13px 28px; font-size: 15px; border-radius: 12px; }
.btn-full { width: 100%; justify-content: center; }
.btn-back {
  background: none; border: none; color: var(--emerald);
  font-size: 14px; font-weight: 600; cursor: pointer; margin-bottom: 20px;
  display: flex; align-items: center; gap: 6; padding: 0;
}

/* ═══ CARD ═══ */
.card {
  background: var(--white); border-radius: 16px; border: 1px solid var(--border); padding: 28px;
}
.card-title { font-family: var(--font-serif); font-size: 22px; font-weight: 700; color: var(--forest); margin-bottom: 8px; }

/* ═══ FORMS ═══ */
.form-group { margin-bottom: 18px; }
.form-label {
  display: block; font-size: 12px; font-weight: 700; color: var(--sage);
  margin-bottom: 6px; text-transform: uppercase; letter-spacing: 0.5px;
}
.form-input, .form-textarea, .form-select {
  width: 100%; padding: 11px 14px; border-radius: var(--radius-sm);
  border: 1.5px solid var(--border); font-size: 14px; outline: none; font-family: var(--font-sans);
}
.form-input:focus, .form-textarea:focus, .form-select:focus { border-color: var(--emerald); }
.form-textarea { resize: vertical; }
.form-select { background: var(--white); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-grid .full { grid-column: 1 / -1; }

/* ═══ CART ═══ */
.cart-item { display: flex; gap: 16px; padding: 18px 20px; align-items: center; flex-wrap: wrap; }
.cart-item + .cart-item { border-top: 1px solid var(--border); }
.cart-item-img {
  width: 52px; height: 52px; border-radius: var(--radius-sm); background: var(--warm);
  display: flex; align-items: center; justify-content: center; font-size: 24px; flex-shrink: 0;
}
.cart-item-info { flex: 1; min-width: 120px; }
.cart-item-name { font-size: 14px; font-weight: 700; color: var(--forest); }
.cart-item-price { font-family: var(--font-sans); font-size: 13px; font-weight: 600; color: var(--text-muted); margin-top: 2px; }
.cart-qty { display: flex; align-items: center; gap: 4px; }
.cart-qty-btn {
  width: 32px; height: 32px; border-radius: 8px; border: 1px solid var(--border);
  background: var(--white); cursor: pointer; font-size: 15px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.cart-qty-val { width: 34px; text-align: center; font-weight: 700; font-size: 14px; }
.cart-item-total { font-family: var(--font-sans); font-weight: 800; font-size: 15px; color: var(--forest); min-width: 90px; text-align: right; }
.cart-remove { background: none; border: none; cursor: pointer; font-size: 16px; color: #ccc; transition: color 0.2s; }
.cart-remove:hover { color: var(--danger); }
.cart-summary { padding: 24px; margin-top: 18px; }
.cart-row { display: flex; justify-content: space-between; margin-bottom: 8px; font-size: 14px; }
.cart-row-label { color: var(--text-muted); }
.cart-row-value { font-family: var(--font-sans); font-weight: 700; }
.cart-row-value.free { color: var(--emerald); }
.cart-total-row { display: flex; justify-content: space-between; padding-top: 16px; border-top: 2px solid var(--border); }
.cart-total-label { font-family: var(--font-sans); font-size: 17px; font-weight: 700; }
.cart-total-value { font-family: var(--font-sans); font-size: 20px; font-weight: 800; color: var(--forest); }

/* ═══ CHECKOUT / TWINT ═══ */
.checkout-wrap { max-width: 560px; margin: 0 auto; }
.twint-btn {
  background: var(--twint); border-radius: var(--radius); padding: 22px 28px;
  margin: 0 auto 18px; max-width: 320px; cursor: pointer; transition: all 0.2s;
  display: flex; align-items: center; justify-content: center; gap: 14px; border: none;
}
.twint-btn:hover { transform: scale(1.02); box-shadow: 0 8px 24px rgba(0,0,0,0.25); }
.twint-btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; box-shadow: none; }
.twint-label { color: #fff; font-size: 18px; font-weight: 800; letter-spacing: 1px; }
.twint-sub { color: rgba(255,255,255,0.6); font-size: 11px; }
.qr-placeholder {
  margin: 24px auto 0; width: 160px; height: 160px; background: var(--warm);
  border-radius: 12px; display: flex; align-items: center; justify-content: center;
  border: 2px dashed var(--border); flex-direction: column; gap: 8px;
}
.qr-placeholder-icon { font-size: 36px; }
.qr-placeholder-text { font-size: 11px; color: var(--text-muted); font-weight: 600; }
.success-card { padding: 48px 32px; text-align: center; }
.success-icon { font-size: 56px; margin-bottom: 16px; }
.success-info { background: var(--gold-light); border-radius: var(--radius-sm); padding: 14px 18px; margin: 24px 0; font-size: 13px; color: var(--forest); line-height: 1.5; }
.success-note { font-size: 12px; color: var(--text-muted); margin-bottom: 24px; }

/* ═══ ORDERS ═══ */
.order-card {
  background: var(--white); border-radius: var(--radius); border: 1px solid var(--border);
  padding: 20px 24px; cursor: pointer; transition: all 0.2s; margin-bottom: 14px;
}
.order-card:hover { box-shadow: 0 4px 16px rgba(26,74,58,0.08); transform: translateY(-2px); }
.order-header { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; }
.order-id { font-family: var(--font-serif); font-size: 16px; font-weight: 700; color: var(--forest); }
.order-meta { font-size: 12px; color: var(--text-muted); margin-top: 4px; }
.order-total { font-family: var(--font-serif); font-size: 18px; font-weight: 800; color: var(--forest); }
.order-status { display: inline-block; margin-top: 6px; padding: 4px 12px; border-radius: 8px; font-size: 11px; font-weight: 700; }
.status-pending { background: #fff3cd; color: #856404; }
.status-confirmed { background: #d4edda; color: #155724; }
.status-ready { background: #cce5ff; color: #004085; }
.status-completed { background: #e2e3e5; color: #383d41; }
.status-btns { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 24px; }
.status-btns span { font-size: 12px; font-weight: 700; color: var(--sage); align-self: center; }
.status-btn {
  background: var(--warm); border: 2px solid transparent; border-radius: 8px;
  padding: 5px 12px; font-size: 11px; font-weight: 700; cursor: pointer;
}
.status-btn.active { border-color: currentColor; }

/* ═══ ADMIN TABLE ═══ */
.admin-table { overflow: hidden; }
.admin-table-head {
  display: grid; grid-template-columns: 1fr 50px 60px 120px 120px 90px;
  padding: 12px 20px; background: var(--warm);
  font-size: 12px; font-weight: 700; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.5px; gap: 12px;
}
.admin-table-row {
  display: grid; grid-template-columns: 1fr 50px 60px 120px 120px 90px;
  padding: 14px 20px; align-items: center; gap: 12px; font-size: 13px;
}
.admin-table-row + .admin-table-row { border-top: 1px solid var(--border); }
.admin-product-name { font-weight: 700; color: var(--forest); }
.admin-product-desc { font-size: 11.5px; color: var(--text-muted); margin-top: 2px; }
.admin-cat-badge { background: var(--warm); padding: 3px 8px; border-radius: 6px; font-size: 11px; font-weight: 600; color: var(--sage); }
.admin-actions { display: flex; gap: 6px; justify-content: flex-end; }

.toggle {
  width: 44px; height: 24px; border-radius: 12px; position: relative;
  transition: background 0.2s; cursor: pointer; border: none;
}
.toggle.on { background: var(--emerald); }
.toggle.off { background: #ccc; }
.toggle-knob {
  width: 20px; height: 20px; border-radius: 10px; background: #fff;
  position: absolute; top: 2px; transition: left 0.2s; box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.toggle.on .toggle-knob { left: 22px; }
.toggle.off .toggle-knob { left: 2px; }

/* ═══ EMPTY STATE ═══ */
.empty-state { text-align: center; padding: 60px 20px; color: var(--text-muted); }
.empty-icon { font-size: 48px; margin-bottom: 12px; }
.empty-title { font-size: 16px; font-weight: 600; }
.empty-sub { font-size: 13px; margin-top: 6px; }

/* ═══ OFFLINE BANNER ═══ */
.api-offline-banner {
  display: none; background: #fff3cd; color: #856404;
  padding: 10px 24px; text-align: center; font-size: 13px; font-weight: 500;
  line-height: 1.5; border-bottom: 1px solid #ffc107;
}

/* ═══ TOAST ═══ */
.toast {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 9999; background: var(--forest); color: #fff;
  padding: 18px 24px; font-size: 17px; font-weight: 700;
  box-shadow: 0 4px 24px rgba(26,74,58,0.4);
  display: flex; align-items: center; justify-content: center; gap: 10px;
  animation: toastIn 0.35s ease-out;
}
@keyframes toastIn {
  from { transform: translateY(-100%); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* ═══ FOOTER ═══ */
.footer {
  background: var(--forest); color: rgba(255,255,255,0.75);
  padding: 28px 24px; text-align: center; font-size: 12px;
}
.footer-logo { height: 70px; width: auto; object-fit: contain; margin-bottom: 14px; filter: brightness(0) invert(1); opacity: 0.92; }
.footer-title { font-family: var(--font-serif); color: #fff; font-weight: 700; font-size: 15px; margin-bottom: 6px; }
.footer-address { color: rgba(255,255,255,0.7); font-size: 12.5px; line-height: 1.6; margin-bottom: 14px; }
.footer-links { margin-bottom: 12px; line-height: 1.6; }
.footer-links a { color: rgba(255,255,255,0.75); }
.footer-links a:hover { color: #fff; }
.footer-note { font-size: 11px; opacity: 0.75; line-height: 1.5; }

/* ═══ FOOTER NEWSLETTER ═══ */
.footer-newsletter {
  background: rgba(255,255,255,0.08); border-radius: var(--radius);
  padding: 24px 28px; margin-bottom: 24px; max-width: 520px; margin-left: auto; margin-right: auto;
}
.footer-newsletter-title { color: #fff; font-family: var(--font-serif); font-size: 16px; font-weight: 700; margin-bottom: 4px; }
.footer-newsletter-sub { color: rgba(255,255,255,0.7); font-size: 12.5px; margin-bottom: 14px; line-height: 1.5; }
.footer-newsletter-form { display: flex; gap: 8px; margin-bottom: 8px; }
.footer-newsletter-input {
  flex: 1; padding: 10px 14px; border: 1px solid rgba(255,255,255,0.2); border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.1); color: #fff; font-size: 13px; outline: none;
}
.footer-newsletter-input::placeholder { color: rgba(255,255,255,0.4); }
.footer-newsletter-input:focus { border-color: var(--gold); background: rgba(255,255,255,0.15); }
.footer-newsletter-btn {
  padding: 10px 20px; background: var(--gold); color: var(--forest); border: none;
  border-radius: var(--radius-sm); font-weight: 700; font-size: 13px; cursor: pointer; white-space: nowrap;
}
.footer-newsletter-btn:hover { background: #d4b45a; }
.footer-newsletter-msg { font-size: 12px; padding: 6px 0; }
.footer-newsletter-msg.success { color: #7dcea0; }
.footer-newsletter-msg.error { color: #e74c3c; }
.footer-newsletter-msg.info { color: var(--gold); }
.footer-newsletter-privacy { font-size: 11px; color: rgba(255,255,255,0.65); margin-top: 4px; }

/* ═══ FOOTER FEEDBACK ═══ */
.footer-feedback {
  background: rgba(255,255,255,0.06); border-radius: var(--radius);
  padding: 24px 28px; margin-bottom: 24px; max-width: 520px; margin-left: auto; margin-right: auto;
}
.footer-feedback-title { color: #fff; font-family: var(--font-serif); font-size: 16px; font-weight: 700; margin-bottom: 4px; }
.footer-feedback-intro { color: rgba(255,255,255,0.7); font-size: 12.5px; margin-bottom: 14px; line-height: 1.5; }
.footer-feedback-form { display: flex; flex-direction: column; gap: 8px; }
.footer-feedback-input {
  width: 100%; padding: 10px 14px; border: 1px solid rgba(255,255,255,0.2); border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.1); color: #fff; font-size: 13px; outline: none; resize: vertical;
  font-family: inherit; min-height: 70px; box-sizing: border-box;
}
.footer-feedback-input::placeholder { color: rgba(255,255,255,0.4); }
.footer-feedback-input:focus { border-color: var(--gold); background: rgba(255,255,255,0.15); }
.footer-feedback-btn {
  align-self: flex-end; padding: 10px 24px; background: var(--gold); color: var(--forest); border: none;
  border-radius: var(--radius-sm); font-weight: 700; font-size: 13px; cursor: pointer;
}
.footer-feedback-btn:hover { background: #d4b45a; }

/* ═══ WHATSAPP CTA ═══ */
.footer-whatsapp {
  text-align: center; padding: 32px 0 24px; margin-top: 8px;
  border-top: 1px solid rgba(255,255,255,0.1);
}
.footer-whatsapp-title {
  color: #fff; font-family: var(--font-serif); font-size: 20px; font-weight: 700; margin-bottom: 16px;
}
.footer-whatsapp-btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 36px; border: 2px solid #25D366; border-radius: var(--radius-sm);
  background: transparent; color: #fff; font-size: 16px; font-weight: 700;
  text-decoration: none; transition: all 0.2s ease;
}
.footer-whatsapp-btn svg { color: #25D366; flex-shrink: 0; }
.footer-whatsapp-btn:hover {
  background: #25D366; color: #fff; border-color: #25D366;
}
.footer-whatsapp-btn:hover svg { color: #fff; }
.footer-whatsapp-hours {
  margin-top: 10px; font-size: 13px; color: rgba(255,255,255,0.6);
}

/* ═══ GOOGLE REVIEW CTA ═══ */
.footer-google-review-wrapper {
  text-align: center; margin: 20px 0 4px;
  padding-top: 16px;
  border-top: 1px solid rgba(255,255,255,0.08);
}
.footer-google-review {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 24px;
  border: 1px solid rgba(255,255,255,0.15); border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.05);
  color: rgba(255,255,255,0.75); text-decoration: none;
  font-size: 12px; font-weight: 500; letter-spacing: 0.2px;
  transition: all 0.25s ease;
}
.footer-google-review:hover {
  background: rgba(255,255,255,0.1); border-color: rgba(255,255,255,0.25);
  color: rgba(255,255,255,0.95);
}
.footer-google-g { flex-shrink: 0; }
.footer-google-review-stars {
  display: flex; align-items: center; gap: 1px; flex-shrink: 0;
}
.footer-google-review-text {
  white-space: nowrap;
}
@media (max-width: 480px) {
  .footer-google-review { padding: 9px 18px; gap: 6px; font-size: 11px; }
}

/* ═══ LANGUAGE SWITCHER ═══ */
.lang-switcher { position: relative; display: flex; align-items: center; gap: 6px; }
.lang-label { font-size: 11px; color: rgba(255,255,255,0.85); font-weight: 500; white-space: nowrap; }
@media (max-width: 768px) { .lang-label { display: none; } }
.lang-btn {
  background: var(--warm); border: 1.5px solid var(--border);
  border-radius: var(--radius-sm); padding: 8px 12px;
  font-size: 13px; font-weight: 600; cursor: pointer; color: var(--forest);
  display: flex; align-items: center; gap: 4px;
}
.lang-btn:hover { border-color: var(--emerald); }
.lang-backdrop {
  display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.3); z-index: 199;
}
.lang-backdrop.open { display: block; }
.lang-menu {
  display: none; position: absolute; top: 100%; right: 0; margin-top: 6px;
  background: var(--white); border: 1px solid var(--border); border-radius: 10px;
  box-shadow: var(--shadow); overflow: hidden; z-index: 200; min-width: 140px;
}
.lang-menu.open { display: block; }
.lang-option {
  display: block; width: 100%; text-align: left; padding: 10px 14px;
  font-size: 13px; font-weight: 500; border: none; background: none;
  cursor: pointer; color: var(--text);
}
.lang-option:hover { background: var(--warm); }
.lang-option.active { font-weight: 700; color: var(--forest); background: var(--warm); }

/* Mobile: language menu as fixed overlay */
@media (max-width: 768px) {
  .lang-menu {
    position: fixed; top: auto; bottom: 0; left: 0; right: 0;
    margin-top: 0; border-radius: 16px 16px 0 0;
    box-shadow: 0 -4px 24px rgba(0,0,0,0.15);
    padding: 8px 0 env(safe-area-inset-bottom, 8px);
  }
  .lang-option { padding: 14px 20px; font-size: 15px; }
}

/* ═══ SHIPPING FILTER ═══ */
.shipping-filter {
  display: flex; gap: 8px; justify-content: center; margin-bottom: 16px; flex-wrap: wrap;
}
.ship-btn {
  background: var(--white); border: 2px solid var(--border); border-radius: 30px;
  padding: 10px 20px; font-size: 14px; font-weight: 600; cursor: pointer;
  color: var(--text); transition: all 0.2s; display: flex; align-items: center; gap: 6px;
}
.ship-btn:hover { border-color: var(--emerald); background: var(--warm); }
.ship-btn.active { background: var(--forest); color: white; border-color: var(--forest); }
.ship-btn-deliver.active { background: #065f46; border-color: #065f46; }
.ship-btn-pickup.active { background: #7c3aed; border-color: #7c3aed; }
.ship-count {
  background: rgba(0,0,0,0.1); border-radius: 12px; padding: 1px 8px; font-size: 12px;
}
.ship-btn.active .ship-count { background: rgba(255,255,255,0.25); }
@media (max-width: 768px) {
  .ship-btn { padding: 8px 14px; font-size: 13px; }
}

/* ═══ PRODUCT DETAIL ═══ */
.pd-layout {
  display: grid; grid-template-columns: 1fr 1fr; gap: 36px; align-items: start;
  background: var(--white); border-radius: var(--radius); border: 1px solid var(--border);
  overflow: hidden;
}
.pd-image {
  position: relative; background: var(--warm);
  display: flex; align-items: center; justify-content: center;
  min-height: 320px; overflow: hidden;
}
.pd-image img { max-width: 100%; max-height: 360px; object-fit: contain; }
.pd-image-placeholder { font-size: 96px; opacity: 0.4; display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; }
.pd-info { padding: 32px 32px 32px 0; }
.pd-category { margin-bottom: 12px; }
.pd-name {
  font-family: var(--font-serif); font-size: 28px; font-weight: 700;
  color: var(--forest); line-height: 1.25; margin-bottom: 14px;
}
.pd-desc {
  font-size: 15px; color: var(--text-muted); line-height: 1.6; margin-bottom: 20px;
}
.pd-price {
  font-family: var(--font-sans); font-size: 32px; font-weight: 800; color: var(--forest); margin-bottom: 8px;
}
.price-wrap {
  display: flex; gap: 12px; align-items: baseline; margin-bottom: 8px;
}
.pd-stock { font-size: 13px; font-weight: 600; margin-bottom: 24px; }
.pd-stock.in-stock { color: var(--emerald); }
.pd-stock.out-of-stock { color: var(--danger); }
.pd-actions { display: flex; flex-direction: column; gap: 16px; }
.pd-qty-wrap { display: flex; align-items: center; gap: 14px; }
.pd-qty-label { font-size: 13px; font-weight: 700; color: var(--sage); text-transform: uppercase; letter-spacing: 0.5px; }
.pd-qty { display: flex; align-items: center; gap: 4px; }
.pd-qty-input {
  width: 52px; text-align: center; font-weight: 700; font-size: 14px;
  border: 1px solid var(--border); border-radius: 8px; padding: 6px 4px;
  outline: none; font-family: var(--font-sans);
  -moz-appearance: textfield;
}
.pd-qty-input::-webkit-outer-spin-button,
.pd-qty-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.pd-qty-input:focus { border-color: var(--emerald); }
.pd-add-btn { max-width: 320px; justify-content: center; }
.product-card-link { text-decoration: none; color: inherit; display: flex; width: 100%; height: 100%; }
.product-card-link .product-card { width: 100%; }

@media (max-width: 768px) {
  .pd-layout { grid-template-columns: 1fr; gap: 0; }
  .pd-image { min-height: 220px; }
  .pd-info { padding: 24px; }
  .pd-name { font-size: 22px; }
  .pd-price { font-size: 26px; }
}

/* ═══ DELIVERY OPTIONS ═══ */
.delivery-choice { display: flex; flex-direction: column; gap: 10px; }
.delivery-option {
  display: flex; align-items: center; gap: 14px; padding: 16px 18px;
  border: 2px solid var(--border); border-radius: 12px; cursor: pointer;
  transition: all 0.2s; background: var(--white);
}
.delivery-option:hover { border-color: var(--sage); }
.delivery-option.active { border-color: var(--emerald); background: #f0f9f4; }
.delivery-option input[type="radio"] { accent-color: var(--emerald); width: 18px; height: 18px; flex-shrink: 0; }
.delivery-option-content { flex: 1; }
.delivery-option-label { font-size: 14px; font-weight: 700; color: var(--forest); }
.delivery-option-desc { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.delivery-option-price { font-family: var(--font-sans); font-size: 14px; font-weight: 700; color: var(--forest); white-space: nowrap; }

/* ═══ RESPONSIVE ═══ */
@media (max-width: 768px) {
  .hero h1 { font-size: 26px; }
  .hero { padding: 24px 20px; }
  .product-grid { grid-template-columns: 1fr; }
  .admin-table-head, .admin-table-row { grid-template-columns: 1fr 50px 90px 90px; }
  .admin-table-head > *:nth-child(4), .admin-table-row > *:nth-child(4) { display: none; }
  .form-grid { grid-template-columns: 1fr; }
  .header-inner { padding: 12px 0; }
  .cart-item { gap: 10px; }
}
@media (max-width: 480px) {
  .container { padding: 0 16px; }
  .nav-btn { padding: 7px 10px; font-size: 12px; }
  .hero-emoji { display: none; }
  /* ═══ COMPACT MOBILE: show products above the fold ═══ */
  .logo-img { height: 48px; }
  .header-inner { padding: 8px 0; gap: 8px; }
  .hero { margin: 12px 0 8px; padding: 14px 16px; border-radius: 12px; }
  .hero h1 { font-size: 22px; margin-bottom: 4px; }
  .hero p { font-size: 12px; line-height: 1.3; }
  .hero #hero-address { display: none !important; }
  .carousel-card { flex: 0 0 130px; }
  .carousel-card img { height: 80px; }
  .payment-trust-bar img { height: 18px; width: auto; max-width: 50px; }
  .free-shipping-banner { padding: 6px 12px; font-size: 11px; margin-bottom: 10px; border-radius: 8px; }
  .search-bar { margin-bottom: 8px; }
  .search-input { height: 52px; padding: 0 16px 0 46px; font-size: 16px; border-radius: 12px; border-width: 2px; }
  .search-icon { left: 16px; font-size: 18px; }
  .sort-select { padding: 10px 10px; font-size: 16px; border-radius: 10px; }
  .filter-bar { padding: 8px 12px; margin-bottom: 8px; border-radius: 10px; gap: 10px; }
  .filter-bar .filter-label { font-size: 12px; }
  .filter-bar .filter-value { font-size: 12px; }
  .cat-tabs { margin-bottom: 10px; padding-bottom: 4px; }
  .cat-tab { padding: 6px 12px; font-size: 12px; }
  .cat-tab-all { padding: 8px 16px; font-size: 13px; }
  .cat-tab-promo { padding: 8px 16px; font-size: 13px; }
  .result-count { margin-bottom: 8px; font-size: 12px; }
  .product-grid { gap: 12px; }
}

/* ═══ REVIEWS ═══ */
.reviews-section { margin-top: 36px; }
.reviews-header { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-bottom: 20px; }
.reviews-title { font-family: var(--font-serif); font-size: 22px; font-weight: 700; color: var(--forest); }
.reviews-summary { display: flex; align-items: center; gap: 10px; }
.reviews-avg { font-size: 28px; font-weight: 800; color: var(--forest); }
.reviews-avg-detail { font-size: 13px; color: var(--text-muted); }
.review-stars { color: var(--gold); letter-spacing: 2px; }

.review-card { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px 24px; margin-bottom: 14px; }
.review-top { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.review-author { font-weight: 700; color: var(--forest); font-size: 14px; }
.review-date { font-size: 12px; color: var(--text-muted); }
.review-comment { font-size: 14px; color: var(--text); line-height: 1.6; margin-top: 8px; }
.review-actions { margin-top: 12px; display: flex; gap: 10px; align-items: center; }

.review-reply { margin-top: 12px; margin-left: 24px; padding: 14px 18px; background: #f0f9f4; border-radius: 10px; border-left: 3px solid var(--emerald); }
.review-reply-author { font-weight: 700; font-size: 13px; color: var(--emerald); display: flex; align-items: center; gap: 6px; }
.review-reply-badge { background: var(--emerald); color: #fff; font-size: 10px; padding: 2px 6px; border-radius: 4px; font-weight: 700; }
.review-reply-comment { font-size: 13px; color: var(--text); line-height: 1.5; margin-top: 6px; }
.review-reply-date { font-size: 11px; color: var(--text-muted); margin-top: 4px; }

.review-form { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; margin-bottom: 20px; }
.review-form-title { font-family: var(--font-serif); font-size: 18px; font-weight: 700; color: var(--forest); margin-bottom: 16px; }

.star-picker { display: flex; gap: 4px; margin-bottom: 14px; }
.star-pick {
  background: none; border: none; font-size: 28px; cursor: pointer;
  color: #ccc; padding: 2px 4px; transition: color 0.15s, transform 0.15s;
}
.star-pick:hover { transform: scale(1.2); }
.star-pick.active { color: var(--gold); }

.reply-form { margin-top: 10px; margin-left: 24px; display: flex; gap: 8px; flex-wrap: wrap; }
.reply-form textarea { flex: 1; min-width: 200px; padding: 8px 12px; border: 1px solid var(--border); border-radius: 8px; font-size: 13px; font-family: var(--font-sans); resize: vertical; min-height: 60px; }

.review-empty { text-align: center; padding: 32px; color: var(--text-muted); }
.review-empty-icon { font-size: 36px; margin-bottom: 8px; }

.product-card-stars { display: flex; align-items: center; gap: 4px; margin-bottom: 8px; }
.product-card-stars .review-stars { font-size: 13px; }
.product-card-stars-count { font-size: 11px; color: var(--text-muted); }

.review-login-hint { text-align: center; padding: 16px; background: var(--warm); border-radius: 10px; margin-bottom: 20px; }
.review-login-hint a { color: var(--emerald); font-weight: 700; }

/* ═══ ACCESSIBILITY ═══ */

/* Skip-to-content link (visible on focus for keyboard users) */
.skip-link {
  position: absolute;
  top: -100px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--forest);
  color: #fff;
  padding: 10px 24px;
  border-radius: 0 0 10px 10px;
  font-size: 14px;
  font-weight: 700;
  z-index: 9999;
  text-decoration: none;
  transition: top 0.2s;
}
.skip-link:focus {
  top: 0;
  color: #fff;
}

/* Focus indicators for keyboard navigation (WCAG 2.1 AA) */
*:focus-visible {
  outline: 3px solid var(--emerald);
  outline-offset: 2px;
}
input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 3px solid var(--emerald);
  outline-offset: 0;
  border-color: var(--emerald);
}
button:focus-visible, .btn:focus-visible, .nav-btn:focus-visible {
  outline: 3px solid var(--emerald);
  outline-offset: 2px;
}
a:focus-visible {
  outline: 3px solid var(--emerald);
  outline-offset: 2px;
  border-radius: 4px;
}
