/* ===========================================================
   COLORS — same as your index.html, keep them in sync
   =========================================================== */
:root {
  --primary:     #1e40af;
  --accent:      #e8e8e8;
  --bg:          #ffffff;
  --surface:     #fafafa;
  --text:        #220e0c;
  --muted:       #475569;
  --footer-bg:   #1e40af;
  --footer-text: #ffffff;
}

/* === Base === */
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Quicksand', sans-serif; background: var(--bg); color: var(--text); line-height: 1.5; }
h1, h2, h3 { font-family: 'Quicksand', sans-serif; font-weight: 700; }
a { text-decoration: none; color: inherit; }
img { display: block; max-width: 100%; }
button { font-family: inherit; cursor: pointer; }

/* === Nav === */
.nav {
  background: #ffffff;
  position: sticky;
  top: 0;
  z-index: 999;
  border-bottom: none;
  padding: 0 5%;
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.nav-links { display: flex; gap: 28px; list-style: none; }
.nav-links a { font-size: 14px; font-weight: 600; color: var(--text); opacity: 0.8; transition: opacity 0.2s; }
.nav-links a:hover { opacity: 1; }

/* === Breadcrumb === */
.breadcrumb {
  padding: 14px 5%;
 font-size: 13px;
 color: var(--muted);
 display: flex;
 align-items: center;
 gap: 8px;
}

.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: #220e0c; }
.breadcrumb .sep { opacity: 0.4; }
.breadcrumb .current { color: var(--text); font-weight: 600; }

/* === Main product layout === */
.product-wrapper {
  max-width: 1200px;
  margin: 40px auto;
  padding: 0 5%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: start;
}

/* === LEFT: Image Gallery === */
.gallery { display: flex; flex-direction: column; gap: 12px; }

/* Main large image */
.gallery-main {
  border-radius: 20px;
  overflow: hidden;
  background: var(--surface);
  aspect-ratio: 1 / 1;
  position: relative;
}
.gallery-main img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.3s;
}

/* Thumbnail row */
.gallery-thumbs {
  display: flex;
  gap: 10px;
}
.thumb {
  width: 72px;
  height: 72px;
  border-radius: 12px;
  overflow: hidden;
  border: 2px solid transparent;
  cursor: pointer;
  transition: border-color 0.2s;
  flex-shrink: 0;
  background: var(--surface);
}
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb.active { border-color: var(--primary); }
.thumb:hover { border-color: var(--primary); }

/* === RIGHT: Product Info === */
.product-info { display: flex; flex-direction: column; gap: 20px; }

/* Tag / badge */
.product-tag {
  display: inline-block;
  background: var(--primary);
  color: white;
  border-radius: 8px;
  padding: 4px 14px;
  font-size: 12px;
  font-weight: 700;
  width: fit-content;
}

/* Star rating */
.rating {
  display: flex;
  align-items: center;
  gap: 8px;
}
.stars { color: #f59e0b; font-size: 18px; letter-spacing: 2px; }
.rating-count { font-size: 13px; color: var(--muted); }

/* Product name */
.product-name {
  font-size: 32px;
  line-height: 1.2;
  color: var(--text);
}

/* Price */
.product-price {
  font-size: 30px;
  font-weight: 700;
  color: #220e0c;
}
.product-price .old-price {
  font-size: 18px;
  color: var(--muted);
  text-decoration: line-through;
  margin-left: 10px;
  font-weight: 400;
}

/* Short description */
.product-short-desc {
  font-size: 15px;
  color: var(--muted);
  line-height: 1.8;
  padding: 16px;
  background: var(--surface);
  border-radius: 12px;
  border-left: 4px solid var(--primary);
}

/* Feature list */
.features { display: flex; flex-direction: column; gap: 10px; }
.feature-item {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  color: var(--muted);
  font-weight: 600;
}
.feature-item .icon { font-size: 20px; width: 28px; text-align: center; }

/* Divider */
.divider { height: 1px; background: #eef0f4; }

/* Quantity selector */
.qty-row {
  display: flex;
  align-items: center;
  gap: 16px;
}
.qty-label { font-size: 14px; font-weight: 700; color: var(--text); }
.qty-controls {
  display: flex;
  align-items: center;
  gap: 0;
  border: 2px solid var(--accent);
  border-radius: 10px;
  overflow: hidden;
}
.qty-btn {
  background: var(--surface);
  border: none;
  width: 36px;
  height: 36px;
  font-size: 18px;
  font-weight: 700;
  color: #220e0c;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}
.qty-btn:hover { background: var(--accent); }
.qty-num {
  width: 44px;
  text-align: center;
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  border: none;
  background: white;
  outline: none;
}

/* Buy buttons */
.btn-group { display: flex; flex-direction: column; gap: 10px; }
.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 12px;
  padding: 16px 24px;
  font-weight: 700;
  font-size: 15px;
  width: 100%;
  transition: transform 0.2s, opacity 0.2s;
}
.btn:hover { transform: translateY(-2px); opacity: 0.92; }
.btn-shopee { background: #ee4d2d; }
.btn-tiktok { background: #010101; }
.btn-outline {
  background: transparent;
  color: #220e0c;
  border: 2px solid var(--primary);
  border-radius: 12px;
  padding: 14px 24px;
  font-weight: 700;
  font-size: 15px;
  width: 100%;
  transition: background 0.2s;
}
.btn-outline:hover { background: var(--surface); }
.btn-icon { font-size: 20px; }

/* Guarantee badges */
.badges {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}
.badge {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  background: var(--surface);
  border-radius: 8px;
  padding: 8px 12px;
  flex: 1;
  min-width: 120px;
}
.badge .badge-icon { font-size: 18px; }

/* ===========================================================
   TABS SECTION (Description / Ingredients / How to use)
   =========================================================== */
.tabs-section {
  max-width: 1200px;
  margin: 60px auto;
  padding: 0 5%;
}
.tab-buttons {
  display: flex;
  border-bottom: 2px solid #eef0f4;
  gap: 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.tab-buttons::-webkit-scrollbar {
  display: none;
}
.tab-btn {
  background: transparent;
  border: none;
  padding: 14px 28px;
  font-size: 15px;
  font-weight: 700;
  color: var(--muted);
  cursor: pointer;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  white-space: nowrap;
  transition: color 0.2s, border-color 0.2s;
}
.tab-btn.active {
  color: #220e0c;
  border-bottom-color: var(--primary);
}
.tab-btn:hover { color: #220e0c; }

.tab-content { display: none; padding: 36px 0; }
.tab-content.active { display: block; }
.tab-content p {
  font-size: 15px;
  color: var(--muted);
  line-height: 1.9;
  margin-bottom: 16px;
  max-width: 720px;
}
.tab-content h4 {
  font-size: 17px;
  color: var(--text);
  margin-bottom: 10px;
  margin-top: 24px;
}
.tab-content ul {
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.tab-content ul li {
  font-size: 15px;
  color: var(--muted);
  line-height: 1.7;
}

/* How to use steps */
.steps { display: flex; flex-direction: column; gap: 20px; margin-top: 8px; }
.step {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}
.step-num {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--primary);
  color: white;
  font-weight: 700;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.step-text { font-size: 15px; color: var(--muted); line-height: 1.7; padding-top: 6px; }

/* ===========================================================
   RELATED PRODUCTS
   =========================================================== */
.related {
  max-width: 1200px;
  margin: 0 auto 60px;
  padding: 0 5%;
}
.related h2 {
  font-size: 26px;
  margin-bottom: 28px;
  color: var(--text);
}
.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}
.related-card {
  background: var(--surface);
  border-radius: 20px;
  overflow: hidden;
  transition: transform 0.3s, box-shadow 0.3s;
  text-decoration: none;
  color: inherit;
  display: block;
}
.related-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 16px 32px rgba(0,0,0,0.08);
}
.related-card img {
width: 100%;
 aspect-ratio: 1 / 1;
 object-fit: cover;
}
.related-card-body { padding: 5px; }
.related-card-body h3 { font-size: 15px; margin-bottom: 4px; }
.related-card-body p { font-size: 13px; color: var(--muted); }

/* === Footer === */
.footer {
  background: var(--footer-bg);
  color: var(--footer-text);
  padding: 32px 5%;
  text-align: center;
  font-size: 13px;
  opacity: 1;
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}
.footer-copyright { font-size: 12px; opacity: 0.6; }
.compliance-text { font-size: 11px; font-style: italic; opacity: 0.8; }

/* === Mobile === */
@media (max-width: 768px) {
  .product-wrapper { grid-template-columns: 1fr; gap: 32px; margin: 24px auto; }
  .product-name { font-size: 24px; }
  .nav { background: transparent; border-bottom: none; }
  .nav-links { display: none; }
  .nav-inner { justify-content: center; }
  .tab-btn { padding: 12px 16px; font-size: 13px; }
  .footer-inner { flex-direction: column; text-align: center; }
}

/* ========================================================== */
/* FLOATING BUTTONS                                           */
/* ========================================================== */
.fab-container {
  position: fixed;
  bottom: 30px;
  right: 30px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: 9999; /* Ensures they always stay on top of other content */
}
.fab-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background-color: #1e40af;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
  transition: transform 0.2s ease, background-color 0.2s ease, opacity 0.2s ease;
  border: none;
  cursor: pointer;
}
.fab-btn:hover {
  transform: translateY(-4px);
  background-color: #333333;
}
.fab-btn svg {
  width: 20px;
  height: 20px;
}
/* Faded out while a real button/tab/link sits underneath, so it never blocks a tap */
.fab-container.fab-dim {
  pointer-events: none;
}
.fab-container.fab-dim .fab-btn {
  opacity: 0.35;
}

/* Mobile adjust to make them slightly smaller */
@media (max-width: 768px) {
  .fab-container {
    bottom: 20px;
    right: 20px;
  }
  .fab-btn {
    width: 44px;
    height: 44px;
  }
}
