/* ============================================================
   SABALAND — product-detail.html MOBILE FIX
   Add this inside the <style> tag in product-detail.html
   OR link it as a separate <link rel="stylesheet"> file.

   All fixes are inside @media (max-width: 768px)
   so they ONLY apply on mobile. Desktop is untouched.
   ============================================================ */


/* ── 1. OVERALL PAGE PADDING ─────────────────────────────── */
@media (max-width: 768px) {

  /* Remove excess top space so content starts higher */
  section[style*="padding-top:32px"],
  section[style*="padding-top: 32px"] {
    padding-top: 16px !important;
  }

  /* Container side padding — tighter on mobile */
  .container {
    padding-left: 16px !important;
    padding-right: 16px !important;
  }
}


/* ── 2. PRODUCT DETAIL GRID ──────────────────────────────── */
@media (max-width: 768px) {

  /* Stack gallery above info (already 1 col, but fix gap) */
  .pd-wrap {
    grid-template-columns: 1fr !important;
    gap: 24px !important;
  }
}


/* ── 3. MAIN IMAGE ───────────────────────────────────────── */
@media (max-width: 768px) {

  /* Limit image height on small screens so it doesn't take full screen */
  .gallery-main {
    max-height: 320px;      /* ← Change this value to taste */
    border-radius: 14px !important;
  }

  /* Keep image perfectly cropped inside the box */
  .gallery-main img {
    object-fit: cover !important;
    object-position: center top !important;
  }
}


/* ── 4. THUMBNAIL STRIP ──────────────────────────────────── */
@media (max-width: 768px) {

  /* Smaller thumbs, tighter gap */
  .gallery-thumbs {
    gap: 8px !important;
    margin-top: 8px !important;
  }

  .gallery-thumb {
    border-radius: 8px !important;
  }
}


/* ── 5. PRODUCT TITLE ────────────────────────────────────── */
@media (max-width: 768px) {

  .pd-title {
    font-size: 1.2rem !important;    /* Smaller on mobile */
    line-height: 1.35 !important;
    margin-bottom: 10px !important;
  }

  .pd-badge {
    font-size: 10px !important;
    padding: 3px 10px !important;
    margin-bottom: 10px !important;
  }
}


/* ── 6. PRICE ROW ────────────────────────────────────────── */
@media (max-width: 768px) {

  .pd-price-row {
    padding: 14px 16px !important;
    gap: 8px !important;
    margin-bottom: 16px !important;
  }

  .pd-price {
    font-size: 1.7rem !important;   /* Slightly smaller price */
  }

  .pd-original {
    font-size: 1rem !important;
  }

  .pd-save {
    font-size: 11px !important;
    padding: 3px 10px !important;
  }
}


/* ── 7. META GRID (Size / Category / Availability / Delivery) */
@media (max-width: 768px) {

  .pd-meta {
    margin-bottom: 16px !important;
  }

  .pd-meta-item {
    padding: 10px 12px !important;
  }

  .pd-meta-label {
    font-size: 9px !important;
  }

  .pd-meta-val {
    font-size: 0.85rem !important;
  }
}


/* ── 8. QUANTITY SELECTOR ────────────────────────────────── */
@media (max-width: 768px) {

  .pd-qty-row {
    gap: 12px !important;
    margin-bottom: 16px !important;
  }

  /* Qty input box size */
  .qty-selector {
    min-width: 0 !important;
  }

  .qty-input {
    width: 44px !important;
    font-size: 1rem !important;
  }

  .qty-btn {
    width: 36px !important;
    height: 36px !important;
    font-size: 1.1rem !important;
  }

  #qty-total {
    font-size: 0.95rem !important;
  }
}


/* ── 9. ACTION BUTTONS ───────────────────────────────────── */
@media (max-width: 768px) {

  /* Stack all 3 buttons vertically, full width */
  .pd-actions {
    gap: 10px !important;
    margin-bottom: 16px !important;
  }

  .pd-actions .btn {
    font-size: 14px !important;
    padding: 14px 16px !important;
    width: 100% !important;
  }
}


/* ── 10. DELIVERY / TRUST STRIP ──────────────────────────── */
@media (max-width: 768px) {

  /* The 4-icon strip below buttons */
  .pd-wrap #info-col > div[style*="display:flex"][style*="gap:12px"] {
    gap: 8px !important;
    padding: 12px !important;
    flex-wrap: wrap !important;
  }

  .pd-wrap #info-col > div[style*="display:flex"] span {
    font-size: 10px !important;
  }
}


/* ── 11. TABS ────────────────────────────────────────────── */
@media (max-width: 768px) {

  .pd-tabs {
    margin-top: 20px !important;
  }

  .pd-tab-btn {
    font-size: 11px !important;
    padding: 10px 14px !important;
    letter-spacing: 1px !important;
  }

  .benefits-list li {
    font-size: 0.9rem !important;
  }

  #ingredients-text,
  #howtouse-text {
    font-size: 0.9rem !important;
    line-height: 1.7 !important;
  }

  .disclaimer-box {
    padding: 12px 14px !important;
  }

  .disclaimer-box p {
    font-size: 0.82rem !important;
  }
}


/* ── 12. RELATED PRODUCTS ────────────────────────────────── */
@media (max-width: 768px) {

  /* 2 columns on mobile for related */
  .related-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 14px !important;
  }

  .product-card-name {
    font-size: 0.8rem !important;
    -webkit-line-clamp: 2 !important;
  }

  .product-card-body {
    padding: 12px !important;
  }

  .product-card-actions {
    flex-direction: column !important;
    gap: 6px !important;
  }

  .product-card-actions .btn {
    font-size: 11px !important;
    padding: 8px 10px !important;
  }
}

@media (max-width: 380px) {
  /* Tiny phones: 1 column for related */
  .related-grid {
    grid-template-columns: 1fr !important;
  }
}


/* ── 13. MOBILE STICKY BUY BAR ───────────────────────────── */
@media (max-width: 768px) {

  .mobile-buy-bar {
    padding: 10px 12px !important;
    gap: 8px !important;
  }

  .mobile-buy-bar .btn {
    font-size: 13px !important;
    padding: 13px 8px !important;
  }

  /* Push page content above the sticky bar */
  body {
    padding-bottom: 76px !important;
  }
}


/* ── 14. FLOATING WHATSAPP BUTTON ────────────────────────── */
@media (max-width: 768px) {

  /* Move it up above the sticky buy bar */
  a[href*="wa.me"][style*="position:fixed"] {
    bottom: 88px !important;
    right: 12px !important;
    width: 46px !important;
    height: 46px !important;
    font-size: 1.3rem !important;
  }
}


/* ── 15. BREADCRUMB ──────────────────────────────────────── */
@media (max-width: 768px) {

  /* Less top padding so breadcrumb doesn't push content down */
  div[style*="padding:90px 0 0"],
  div[style*="padding: 90px 0 0"] {
    padding-top: 76px !important;
  }
}