:root {
  --ink: #141210;
  --ink-soft: #282420;
  --muted: #6b645c;
  --paper: #f8f5ee;
  --paper-subtle: #f3efe5;
  --cream: #ece5d6;
  --white: #ffffff;
  --red: #a32227;
  --red-dark: #78181c;
  --gold: #c9933e;
  --gold-light: #edd6a8;
  --line: rgba(20, 18, 16, 0.12);
  --radius-sm: 8px;
  --radius: 16px;
  --radius-lg: 24px;
  --shadow-sm: 0 4px 14px rgba(20,18,16,0.06);
  --shadow: 0 14px 36px rgba(20, 18, 16, 0.08);
  --shadow-lg: 0 24px 60px rgba(20, 18, 16, 0.15);
  --transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'DM Sans', system-ui, -apple-system, sans-serif;
  color: var(--ink);
  background: #faf8f5;
  line-height: 1.55;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; color: inherit; transition: var(--transition); }
button, input, select { font: inherit; }

.container { max-width: 1360px; margin: auto; padding: 0 24px; }

/* Announcement Bar */
.announcement {
  background: var(--ink);
  color: #fff;
  text-align: center;
  padding: 9px 20px;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 600;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 15px;
}
.announcement span { color: var(--gold); }

/* Header */
.header {
  position: sticky;
  top: 0;
  width: 100%;
  z-index: 1000;
  background: rgba(250, 248, 245, 0.96);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
  transition: var(--transition);
}
.nav {
  max-width: 1360px;
  margin: auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 25px;
}
.brand { display: flex; align-items: center; gap: 14px; }
.brand img { height: 54px; width: auto; object-fit: contain; }
.brand-text { display: flex; flex-direction: column; }
.brand-name { font-family: 'DM Sans', sans-serif; font-weight: 900; font-size: 26px; letter-spacing: 0.08em; line-height: 1; color: var(--ink); }
.brand-tag { font-size: 9px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--red); font-weight: 700; margin-top: 3px; }
.menu { display: flex; align-items: center; gap: 32px; }
.menu a { font-size: 14px; font-weight: 600; color: var(--ink-soft); position: relative; }
.menu a:hover, .menu a.active { color: var(--red); }
.menu a.active::after { content: ""; position: absolute; bottom: -6px; left: 0; width: 100%; height: 2px; background: var(--red); border-radius: 2px; }
.actions { display: flex; align-items: center; gap: 14px; }
.icon-btn { background: none; border: 1px solid var(--line); width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; cursor: pointer; position: relative; transition: var(--transition); color: var(--ink); }
.icon-btn:hover { background: var(--ink); color: #fff; border-color: var(--ink); }
.icon-btn svg { width: 18px; height: 18px; }
.cart-count { position: absolute; top: -4px; right: -4px; background: var(--red); color: #fff; font-size: 10px; font-weight: 800; width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; border: 2px solid var(--paper); }

/* Breadcrumbs */
.breadcrumb-bar {
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}
.breadcrumbs {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.breadcrumbs a:hover { color: var(--red); text-decoration: underline; }
.breadcrumbs span { color: var(--ink); font-weight: 700; }

/* Product Details Main Grid */
.product-detail-section {
  padding: 50px 0 80px;
}
.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 60px;
  align-items: start;
}

/* Gallery Column */
.gallery-wrap {
  position: sticky;
  top: 95px;
}
.main-img-box {
  background: radial-gradient(circle, #fcfaf6 0%, #f1e9dc 100%);
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  padding: 40px;
  height: 480px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.main-img-box img {
  max-height: 380px;
  width: auto;
  object-fit: contain;
  transition: transform 0.4s ease;
  filter: drop-shadow(0 18px 28px rgba(20,18,16,0.14));
}
.main-img-box:hover img {
  transform: scale(1.08) rotate(-1deg);
}
.badge-pill-detail {
  position: absolute;
  top: 20px;
  left: 20px;
  background: var(--ink);
  color: var(--gold);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 6px 14px;
  border-radius: 30px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}
.gallery-thumbs {
  display: flex;
  gap: 14px;
  margin-top: 18px;
}
.thumb-btn {
  width: 75px;
  height: 75px;
  border-radius: var(--radius-sm);
  border: 2px solid var(--line);
  background: var(--paper);
  padding: 6px;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: var(--transition);
}
.thumb-btn.active, .thumb-btn:hover {
  border-color: var(--red);
  background: #fff;
  box-shadow: var(--shadow-sm);
}
.thumb-btn img { max-height: 55px; }

/* Product Info Column */
.info-col {
  display: flex;
  flex-direction: column;
}
.detail-cat {
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--red);
  font-weight: 800;
  margin-bottom: 8px;
}
.detail-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(28px, 3.2vw, 40px);
  font-weight: 800;
  line-height: 1.2;
  color: var(--ink);
  margin-bottom: 12px;
}
.rating-reviews-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
}
.rating-pill {
  background: #fef3c7;
  color: #92400e;
  font-weight: 800;
  font-size: 13px;
  padding: 4px 10px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  gap: 4px;
}
.review-count {
  font-size: 13px;
  color: var(--muted);
  font-weight: 600;
}

/* Pricing Box */
.price-row {
  display: flex;
  align-items: baseline;
  gap: 14px;
  padding: 16px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  margin-bottom: 24px;
}
.current-price {
  font-size: 32px;
  font-weight: 900;
  color: var(--red);
  line-height: 1;
}
.original-price {
  font-size: 18px;
  color: var(--muted);
  text-decoration: line-through;
}
.discount-badge {
  background: #15803d;
  color: white;
  font-size: 12px;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 20px;
}
.tax-inclusive {
  font-size: 12px;
  color: var(--muted);
}

.detail-desc {
  font-size: 15px;
  color: var(--ink-soft);
  line-height: 1.65;
  margin-bottom: 24px;
}

/* Pack Size Selector */
.option-block {
  margin-bottom: 24px;
}
.option-title {
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink);
  margin-bottom: 10px;
}
.pack-grid {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.pack-pill {
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--line);
  background: var(--white);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  text-align: left;
}
.pack-pill:hover, .pack-pill.active {
  border-color: var(--red);
  background: rgba(163,34,39,0.06);
  color: var(--red);
}
.pack-pill small { display: block; font-size: 11px; color: var(--muted); font-weight: 600; margin-top: 2px; }

/* Quantity & Action Buttons */
.action-row {
  display: flex;
  gap: 14px;
  align-items: center;
  margin-bottom: 30px;
}
.qty-selector {
  display: flex;
  align-items: center;
  border: 1.5px solid var(--line);
  border-radius: 30px;
  background: var(--white);
  padding: 4px;
}
.qty-selector button {
  width: 36px;
  height: 36px;
  border: none;
  background: none;
  font-size: 18px;
  font-weight: 800;
  cursor: pointer;
  color: var(--ink);
  display: grid;
  place-items: center;
  border-radius: 50%;
  transition: var(--transition);
}
.qty-selector button:hover { background: var(--paper); color: var(--red); }
.qty-selector input {
  width: 40px;
  text-align: center;
  border: none;
  background: none;
  font-weight: 800;
  font-size: 15px;
  color: var(--ink);
  outline: none;
}

.btn-add-cart {
  flex: 1;
  background: var(--ink);
  color: white;
  border: none;
  padding: 15px 24px;
  border-radius: 30px;
  font-weight: 800;
  font-size: 14px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: var(--transition);
}
.btn-add-cart:hover {
  background: var(--ink-soft);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.18);
}

.btn-buy-now {
  flex: 1;
  background: var(--red);
  color: white;
  border: none;
  padding: 15px 24px;
  border-radius: 30px;
  font-weight: 800;
  font-size: 14px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: var(--transition);
}
.btn-buy-now:hover {
  background: var(--red-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(163,34,39,0.3);
}

/* Feature Checkpoints */
.feature-checks {
  background: var(--paper);
  border-radius: var(--radius);
  padding: 18px 20px;
  border: 1px solid var(--line);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.feat-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-soft);
}
.feat-item svg { width: 18px; height: 18px; color: var(--gold); flex-shrink: 0; }

/* Tabs Section */
.product-tabs-section {
  padding: 60px 0;
  border-top: 1px solid var(--line);
  background: #fff;
}
.tab-headers {
  display: flex;
  gap: 10px;
  border-bottom: 2px solid var(--line);
  margin-bottom: 35px;
  
  /* Modern cross-browser horizontal scrolling */
  overflow-x: auto;
  white-space: nowrap; /* Prevents tabs from wrapping to the next line */
  
  /* Hide scrollbar for Firefox */
  scrollbar-width: none;
  
  /* Hide scrollbar for IE and legacy Edge */
  -ms-overflow-style: none;
}

/* Hide scrollbar for Chrome, Safari, and Opera */
.tab-headers::-webkit-scrollbar {
  display: none;
}

.tab-btn-detail {
  padding: 12px 24px;
  font-size: 15px;
  font-weight: 800;
  color: var(--muted);
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}
.tab-btn-detail.active {
  color: var(--red);
  border-color: var(--red);
}
.tab-panel {
  display: none;
  animation: fadeIn 0.3s ease;
}
.tab-panel.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }

.nutrition-table {
  width: 100%;
  max-width: 600px;
  border-collapse: collapse;
  margin-top: 15px;
}
.nutrition-table th, .nutrition-table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
  text-align: left;
}
.nutrition-table th { background: var(--paper); font-weight: 800; }

/* Related Products Grid */
.related-section {
  padding: 70px 0 90px;
  background: #faf8f5;
  border-top: 1px solid var(--line);
}
.related-title {
  font-family: 'Playfair Display', serif;
  font-size: 32px;
  font-weight: 800;
  text-align: center;
  margin-bottom: 40px;
}
.related-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

/* Product Card reused */
.product-card {
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid rgba(20, 18, 16, 0.08);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: var(--transition);
  position: relative;
}
.product-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow);
  border-color: var(--gold);
}
.product-img-box-rel {
  background: radial-gradient(circle, #fcfaf6 0%, #f3ede2 100%);
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.product-img-box-rel img { max-height: 150px; }
.product-card-body { padding: 18px; display: flex; flex-direction: column; flex-grow: 1; }
.product-card-body h4 { font-size: 15px; font-weight: 800; margin: 4px 0 12px; color: var(--ink); line-height: 1.3; }

/* Cart Drawer & Overlay */
.cart-drawer {
  position: fixed;
  top: 0;
  right: -420px;
  width: 400px;
  max-width: 90vw;
  height: 100vh;
  background: #fff;
  z-index: 2000;
  box-shadow: -10px 0 40px rgba(0,0,0,0.25);
  transition: right 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
}
.cart-drawer.open { right: 0; }
.cart-header { padding: 20px 24px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; background: var(--paper); }
.cart-header h3 { font-family: 'Playfair Display', serif; font-size: 20px; font-weight: 800; }
.close-btn { background: none; border: none; font-size: 24px; cursor: pointer; color: var(--ink); }
.cart-body { flex: 1; overflow-y: auto; padding: 20px; }
.cart-items { list-style: none; }
.cart-item { display: flex; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--line); align-items: center; }
.cart-item-img { width: 60px; height: 60px; background: var(--paper); border-radius: 8px; display: grid; place-items: center; padding: 4px; }
.cart-item-img img { max-height: 50px; }
.cart-item-info { flex: 1; }
.cart-item-title { font-weight: 700; font-size: 14px; color: var(--ink); line-height: 1.2; }
.cart-item-price { font-size: 13px; color: var(--red); font-weight: 800; margin-top: 3px; }
.cart-item-qty { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.qty-btn { width: 22px; height: 22px; border: 1px solid var(--line); background: #fff; border-radius: 4px; cursor: pointer; font-weight: 700; }
.remove-item { background: none; border: none; color: #a00; font-size: 11px; cursor: pointer; margin-left: auto; text-decoration: underline; }
.cart-footer { padding: 20px 24px; border-top: 1px solid var(--line); background: var(--paper); }
.cart-subtotal { display: flex; justify-content: space-between; font-size: 16px; font-weight: 800; margin-bottom: 16px; }
.checkout-btn { width: 100%; background: var(--red); color: white; border: none; padding: 15px; border-radius: 30px; font-weight: 800; font-size: 15px; cursor: pointer; text-align: center; display: block; }
.checkout-btn:hover { background: var(--red-dark); }
.overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 1500; opacity: 0; pointer-events: none; transition: opacity 0.3s ease; }
.overlay.show { opacity: 1; pointer-events: auto; }

/* Toast */
.toast { position: fixed; bottom: 30px; right: 30px; background: var(--ink); color: #fff; padding: 14px 24px; border-radius: 50px; font-weight: 700; font-size: 13px; z-index: 3000; box-shadow: 0 10px 30px rgba(0,0,0,0.2); transform: translateY(100px); opacity: 0; transition: all 0.3s ease; }
.toast.show { transform: translateY(0); opacity: 1; }

/* Footer */
.footer { background: #0e0d0b; color: #fff; padding: 80px 0 30px; border-top: 1px solid rgba(255,255,255,0.08); }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1.2fr; gap: 40px; margin-bottom: 60px; }
.footer-brand img { height: 48px; margin-bottom: 16px; }
.footer-brand p { color: #aaa197; font-size: 14px; line-height: 1.6; max-width: 320px; }
.footer-col h4 { font-family: 'DM Sans', sans-serif; font-size: 15px; font-weight: 800; color: var(--gold); text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 20px; }
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 12px; }
.footer-col a { color: #aaa197; font-size: 14px; }
.footer-col a:hover { color: #fff; padding-left: 4px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.08); padding-top: 30px; display: flex; justify-content: space-between; align-items: center; color: #7a7269; font-size: 13px; flex-wrap: wrap; gap: 15px; }

@media (max-width: 992px) {
  .detail-grid { grid-template-columns: 1fr; gap: 40px; }
  .gallery-wrap { position: static; }
  .related-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
  .menu { display: none; }
  .action-row { flex-direction: column; align-items: stretch; }
  .related-grid { grid-template-columns: 1fr; }
  .feature-checks { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
}
