/*
Theme Name: Toko Furniture
Theme URI: 
Author: Toko Furniture
Description: Child theme GeneratePress untuk toko furniture/interior berbasis WooCommerce — desain premium, mobile-friendly, SEO-friendly, dan bisa diatur penuh lewat Customizer.
Template: generatepress
Version: 1.6.0
Requires at least: 6.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: LICENSE
Text Domain: toko-furniture
*/

/* ==========================================================================
   RESET & PENGAMAN LEBAR (mencegah halaman melebar di mobile)
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }

#page, #content, .site-content { overflow: visible; }

#page, #content, .site-content,
#primary, #main,
.tf-container, .tf-container > *,
.tf-hero-slider, .tf-hero-slider > *,
.tf-category-grid, .tf-category-grid > *,
.tf-product-grid, .tf-product-grid > *,
.tf-footer-grid, .tf-footer-grid > *,
.single-product div.product, .single-product div.product > *,
.woocommerce-product-gallery, .summary.entry-summary {
  min-width: 0;
}

img, svg, video, iframe { max-width: 100%; height: auto; }

/* ==========================================================================
   DESIGN TOKENS — warna kayu/natural, semua elemen tema pakai variable ini,
   jadi bisa diganti sepenuhnya lewat Kustomisasi tanpa sentuh CSS.
   ========================================================================== */
:root {
  --color-bg: #FAF6F0;
  --color-bg-alt: #F1E8DC;
  --color-surface: #FFFFFF;

  --color-primary: #A0672D;
  --color-primary-dark: #7A4F1F;
  --color-primary-darker: #5C3B17;
  --color-primary-tint: #F3E7D8;

  --color-secondary: #3E2A1E;
  --color-secondary-tint: #EAE1D8;

  --color-accent: #B8901F;
  --color-accent-tint: #F7EFDA;

  --color-sale: #B23B3B;
  --color-sale-tint: #FBE9E9;

  --color-text: #2B2420;
  --color-text-muted: #6B5D52;
  --color-line: #E5DACB;
  --color-focus: #7A4F1F;

  --font-display: "Poppins", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: ui-monospace, monospace;

  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --shadow-sm: 0 1px 2px rgba(43,36,32,0.06);
  --shadow-md: 0 8px 24px rgba(43,36,32,0.10);

  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2.5rem;
  --space-5: 4rem;

  /* Jumlah kolom grid produk — bisa diubah lewat Kustomisasi tanpa CSS. */
  --tf-cols-mobile: 2;
  --tf-cols-tablet: 3;
  --tf-cols-desktop: 4;
}

/* ==========================================================================
   TIPOGRAFI DASAR — font diperkecil sesuai referensi (furnitama.com)
   ========================================================================== */
body {
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 0.95rem;
  line-height: 1.6;
}
h1, h2, h3, h4, .site-title, .widget-title {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--color-text);
}
h1 { font-size: 1.5rem; line-height: 1.3; }
h2 { font-size: 1.25rem; line-height: 1.35; }
h3 { font-size: 1.05rem; line-height: 1.4; }
h4 { font-size: 0.92rem; line-height: 1.4; }
@media (min-width: 782px) {
  h1 { font-size: 1.9rem; }
  h2 { font-size: 1.5rem; }
  h3 { font-size: 1.15rem; }
}
a { color: var(--color-primary-dark); text-decoration-color: var(--color-primary); text-underline-offset: 3px; }

.tf-container { max-width: 1240px; margin-inline: auto; padding-inline: var(--space-2); }
@media (min-width: 782px) { .tf-container { padding-inline: var(--space-3); } }

.tf-band { padding-block: var(--space-4); }
.tf-band-alt { background: var(--color-bg-alt); }
.tf-band-surface { background: var(--color-surface); border-block: 1px solid var(--color-line); }
.tf-band-dark { background: var(--color-secondary); color: rgba(255,255,255,0.85); }
.tf-band-dark h2, .tf-band-dark h3, .tf-band-dark h4 { color: #fff; }

.tf-section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-bottom: var(--space-3); flex-wrap: wrap; }
.tf-section-heading h2 { margin: 0; }
.tf-section-heading a { font-size: 0.85rem; font-weight: 600; text-decoration: none; white-space: nowrap; }
.tf-section-heading a:hover { text-decoration: underline; }
.tf-eyebrow {
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.68rem;
  color: var(--color-primary-dark);
  background: var(--color-primary-tint);
  display: inline-block;
  padding: 0.3em 0.8em;
  border-radius: 999px;
  margin-bottom: 0.6em;
}

.btn {
  display: inline-block;
  padding: 0.7em 1.5em;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.88rem;
  text-decoration: none;
  cursor: pointer;
  border: none;
  font-family: var(--font-body);
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.btn-primary { background: var(--color-primary-dark); color: #fff; }
.btn-primary:hover { background: var(--color-primary-darker); color: #fff; }
.btn-secondary { background: transparent; color: var(--color-secondary); border: 1.5px solid var(--color-secondary); }
.btn-secondary:hover { background: var(--color-secondary); color: #fff; }
.btn-sm { padding: 0.5em 1.1em; font-size: 0.78rem; }

.text-muted { color: var(--color-text-muted); }

/* Header GeneratePress */
.site-header { background: var(--color-surface); border-bottom: 1px solid var(--color-line); position: sticky; top: 0; z-index: 200; transition: box-shadow 0.2s ease; }
.site-header.is-scrolled { box-shadow: 0 2px 10px rgba(43,36,32,0.08); }
.site-header .site-title a, .site-header .main-title a { color: var(--color-secondary); font-family: var(--font-display); font-weight: 700; text-decoration: none; font-size: 1.15rem; }
.main-navigation a { font-size: 0.85rem; }

/* Menu toggle (hamburger mobile) — sederhana, outline tipis */
.main-navigation .menu-toggle { background: transparent; color: var(--color-secondary); border: 1px solid var(--color-line); border-radius: 8px; box-shadow: none; padding: 0.5em 0.7em; }
.main-navigation .menu-toggle:hover, .main-navigation .menu-toggle:focus { background: var(--color-bg-alt); }

/* Footer GeneratePress */
.site-footer, .site-info { background: var(--color-secondary); color: rgba(255,255,255,0.85); }
.site-footer a { color: rgba(255,255,255,0.85); }
.site-footer a:hover { color: #fff; }

/* Full-width primary di halaman-halaman kunci (hindari GP flex constraint) */
.home #primary.content-area,
.woocommerce #primary.content-area,
.woocommerce-page #primary.content-area,
.single #primary.content-area,
.archive #primary.content-area,
.search #primary.content-area,
.woocommerce #content, .woocommerce-page #content,
.woocommerce #main, .woocommerce-page #main {
  width: 100% !important;
  max-width: 100% !important;
  float: none !important;
  flex: 1 1 100% !important;
}

/* ==========================================================================
   UTILITY BAR (search + WA + cart) — di bawah header utama
   ========================================================================== */
.tf-utility-bar { background: var(--color-bg-alt); border-bottom: 1px solid var(--color-line); padding-block: 0.6rem; }
.tf-utility-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.tf-utility-search {
  display: flex; align-items: center; background: var(--color-surface); border: 1px solid var(--color-line);
  border-radius: 999px; padding: 0.35rem 0.35rem 0.35rem 1.1rem; flex: 1; max-width: 420px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.tf-utility-search:focus-within { border-color: var(--color-primary); box-shadow: 0 0 0 3px var(--color-primary-tint); }
.tf-utility-search input { border: none; outline: none; flex: 1; font-size: 0.85rem; background: transparent; color: var(--color-text); }
.tf-utility-search input::placeholder { color: var(--color-text-muted); }
.tf-utility-search button {
  background: var(--color-primary-dark); color: #fff; border: none; border-radius: 50%;
  width: 34px; height: 34px; display: flex; align-items: center; justify-content: center;
  cursor: pointer; flex-shrink: 0; transition: background 0.15s ease;
}
.tf-utility-search button:hover { background: var(--color-primary-darker); }
.tf-utility-search button svg { width: 15px; height: 15px; }
.tf-utility-links { display: flex; align-items: center; gap: 1.2rem; flex-shrink: 0; }
.tf-utility-wa { display: flex; align-items: center; gap: 0.4rem; color: var(--color-secondary); text-decoration: none; font-size: 0.82rem; font-weight: 600; }
.tf-utility-wa svg { width: 18px; height: 18px; }
.tf-utility-cart { position: relative; display: flex; color: var(--color-secondary); }
.tf-utility-cart svg { width: 20px; height: 20px; }
.tf-cart-count {
  position: absolute; top: -8px; right: -8px; background: var(--color-primary-dark); color: #fff;
  font-size: 0.62rem; font-weight: 700; min-width: 16px; height: 16px; border-radius: 999px;
  display: flex; align-items: center; justify-content: center; padding: 0 3px;
}
@media (max-width: 640px) { .tf-utility-search { max-width: none; } .tf-utility-wa span { display: none; } }

/* ==========================================================================
   HERO SLIDER
   ========================================================================== */
.tf-hero-slider { position: relative; overflow: hidden; height: 380px; background: var(--color-secondary); }
@media (min-width: 782px) { .tf-hero-slider { height: 520px; } }
.tf-hero-slide { position: absolute; inset: 0; opacity: 0; visibility: hidden; transition: opacity 0.5s ease; display: flex; align-items: center; }
.tf-hero-slide.is-active { opacity: 1; visibility: visible; }
.tf-hero-slide-bg { position: absolute; inset: 0; }
.tf-hero-slide-bg img { width: 100%; height: 100%; object-fit: cover; }
.tf-hero-slide-overlay { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(20,14,10,0.68) 0%, rgba(20,14,10,0.25) 60%, rgba(20,14,10,0.05) 100%); }
.tf-hero-slide-content { position: relative; z-index: 2; max-width: 520px; color: #fff; }
.tf-hero-slide-content h1 { color: #fff; font-size: 1.6rem; margin-bottom: 0.5em; }
@media (min-width: 782px) { .tf-hero-slide-content h1 { font-size: 2.4rem; } }
.tf-hero-slide-content p { color: rgba(255,255,255,0.85); margin-bottom: 1.3em; font-size: 0.92rem; }
.tf-hero-fallback { display: flex; align-items: center; justify-content: center; height: 320px; }
.tf-hero-fallback .tf-hero-slide-content { text-align: center; max-width: 480px; margin-inline: auto; }
.tf-hero-fallback h1 { color: #fff; }
.tf-hero-fallback p { color: rgba(255,255,255,0.75); }

.tf-hero-slider-dots { position: absolute; bottom: 1.2rem; left: 50%; transform: translateX(-50%); display: flex; gap: 0.4rem; z-index: 3; }
.tf-hero-dot { width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,0.4); border: none; cursor: pointer; padding: 0; }
.tf-hero-dot.is-active { background: #fff; width: 22px; border-radius: 4px; }
.tf-hero-arrow {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 3;
  width: 38px; height: 38px; border-radius: 50%; background: rgba(255,255,255,0.15); color: #fff;
  border: 1px solid rgba(255,255,255,0.3); cursor: pointer; display: none; align-items: center; justify-content: center; font-size: 1.1rem;
}
.tf-hero-slider:hover .tf-hero-arrow { display: flex; }
.tf-hero-arrow-prev { left: 1rem; }
.tf-hero-arrow-next { right: 1rem; }

/* ==========================================================================
   KATEGORI PRODUK
   ========================================================================== */
.tf-category-grid { display: grid; gap: 0.9rem; grid-template-columns: repeat(3, 1fr); margin-top: var(--space-2); }
@media (min-width: 640px) { .tf-category-grid { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 1000px) { .tf-category-grid { grid-template-columns: repeat(8, 1fr); } }
.tf-category-card { display: flex; flex-direction: column; align-items: center; text-align: center; text-decoration: none; gap: 0.5rem; }
.tf-category-thumb {
  width: 100%; aspect-ratio: 1/1; border-radius: 50%; overflow: hidden; background: var(--color-bg-alt);
  display: flex; align-items: center; justify-content: center; border: 1px solid var(--color-line);
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.tf-category-card:hover .tf-category-thumb { border-color: var(--color-primary); transform: translateY(-2px); }
.tf-category-thumb img { width: 100%; height: 100%; object-fit: cover; }
.tf-category-fallback { color: var(--color-primary-dark); width: 34%; }
.tf-category-name { font-size: 0.8rem; font-weight: 600; color: var(--color-text); }
.tf-category-count { font-size: 0.7rem; color: var(--color-text-muted); }

/* ==========================================================================
   BANNER PROMO
   ========================================================================== */
.tf-band-promo { padding-block: var(--space-3); }
.tf-promo-banner { position: relative; display: block; border-radius: var(--radius-lg); overflow: hidden; text-decoration: none; }
.tf-promo-banner img { width: 100%; height: auto; max-height: 320px; object-fit: cover; display: block; }
.tf-promo-banner-content { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center; padding: var(--space-3) var(--space-4); background: linear-gradient(90deg, rgba(20,14,10,0.6) 0%, rgba(20,14,10,0.1) 70%); }
.tf-promo-banner-content h2 { color: #fff; margin-bottom: 0.3em; }
.tf-promo-banner-content p { color: rgba(255,255,255,0.85); margin-bottom: 1em; font-size: 0.88rem; }
.tf-promo-banner-content .btn { align-self: flex-start; }

/* ==========================================================================
   GRID PRODUK & KARTU PRODUK
   ========================================================================== */
.tf-product-grid { display: grid; gap: 0.9rem; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 640px) { .tf-product-grid { gap: 1.1rem; grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1000px) { .tf-product-grid { grid-template-columns: repeat(4, 1fr); } }

/* Wrapper bawaan WooCommerce (produk terkait, up-sells, cross-sells di cart)
   dibuat berperilaku sama seperti .tf-product-grid, supaya konsisten. */
ul.products {
  display: grid !important;
  gap: 0.9rem;
  grid-template-columns: repeat(2, 1fr) !important;
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
}
@media (min-width: 640px) { ul.products { grid-template-columns: repeat(3, 1fr) !important; gap: 1.1rem; } }
@media (min-width: 1000px) { ul.products { grid-template-columns: repeat(4, 1fr) !important; } }
ul.products li.product { margin: 0 !important; }

.tf-product-card { background: var(--color-surface); border: 1px solid var(--color-line); border-radius: var(--radius-md); overflow: hidden; display: flex; flex-direction: column; height: 100%; transition: box-shadow 0.15s ease, transform 0.15s ease; }
.tf-product-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.tf-band-dark .tf-product-card { background: var(--color-surface); }
.tf-product-thumb { position: relative; display: block; aspect-ratio: 1/1; overflow: hidden; background: var(--color-bg-alt); }
.tf-product-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tf-badge {
  position: absolute; top: 0.6rem; font-size: 0.62rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em;
  padding: 0.3em 0.65em; border-radius: 4px; z-index: 2; color: #fff;
}
.tf-badge-sale { left: 0.6rem; background: var(--color-sale); }
.tf-badge-featured { right: 0.6rem; background: var(--color-accent); }
.tf-product-body { padding: 0.7rem 0.8rem 0.85rem; display: flex; flex-direction: column; gap: 0.35rem; flex: 1; }
/* Judul produk SENGAJA tidak bold sesuai permintaan */
.tf-product-title { font-size: 0.82rem; font-weight: 400; margin: 0; line-height: 1.35; font-family: var(--font-body); }
.tf-product-title a { color: var(--color-text); text-decoration: none; }
.tf-product-title a:hover { color: var(--color-primary-dark); }
.tf-product-price { font-size: 0.88rem; font-weight: 600; color: var(--color-primary-dark); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tf-product-price del { color: var(--color-text-muted); font-weight: 400; font-size: 0.8rem; margin-right: 0.4em; }
.tf-product-price ins { text-decoration: none; }
.tf-product-actions { margin-top: auto; padding-top: 0.4rem; display: flex; gap: 0.4rem; }
.tf-add-to-cart {
  display: flex; align-items: center; justify-content: center; gap: 0.4em; flex: 1;
  text-align: center; padding: 0.6em; border-radius: var(--radius-sm);
  background: var(--color-primary-dark); color: #fff; font-size: 0.78rem; font-weight: 600;
  text-decoration: none; border: none; cursor: pointer; transition: background 0.15s ease, transform 0.1s ease;
}
.tf-add-to-cart svg { width: 15px; height: 15px; flex-shrink: 0; }
.tf-add-to-cart:hover { background: var(--color-primary-darker); }
.tf-add-to-cart:active { transform: scale(0.97); }
.tf-add-to-cart.added { background: var(--color-secondary); }
.tf-add-to-cart.loading { opacity: 0.6; pointer-events: none; }
.tf-card-wa-btn {
  flex-shrink: 0; width: 38px; display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-sm); background: #E9F8EF; color: #1B8A4C; transition: background 0.15s ease, color 0.15s ease;
}
.tf-card-wa-btn:hover { background: #25D366; color: #fff; }
.tf-card-wa-btn svg { width: 17px; height: 17px; }

@media (min-width: 640px) { .tf-product-title { font-size: 0.9rem; } .tf-product-price { font-size: 0.95rem; } }

/* ==========================================================================
   FLASH SALE & COUNTDOWN
   ========================================================================== */
.tf-countdown { display: flex; gap: 0.6rem; }
.tf-countdown > div { text-align: center; background: rgba(255,255,255,0.1); border-radius: var(--radius-sm); padding: 0.4em 0.7em; min-width: 46px; }
.tf-countdown-val { display: block; font-family: var(--font-display); font-size: 1.1rem; font-weight: 700; color: #fff; line-height: 1.2; }
.tf-countdown-label { font-size: 0.6rem; color: rgba(255,255,255,0.7); text-transform: uppercase; letter-spacing: 0.04em; }

/* ==========================================================================
   TENTANG KAMI
   ========================================================================== */
.tf-about-grid { display: grid; gap: var(--space-3); grid-template-columns: 1fr; align-items: center; }
@media (min-width: 900px) { .tf-about-grid { grid-template-columns: 0.9fr 1.1fr; gap: var(--space-4); } }
.tf-about-image { border-radius: var(--radius-lg); overflow: hidden; aspect-ratio: 4/3; background: var(--color-bg-alt); }
.tf-about-image img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tf-about-image-placeholder { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; color: var(--color-primary-dark); }
.tf-about-image-placeholder svg { width: 30%; height: 30%; }
.tf-about-content p { color: var(--color-text-muted); }
.tf-usp-list { display: grid; gap: 1rem; margin-top: var(--space-2); }
@media (min-width: 480px) { .tf-usp-list { grid-template-columns: repeat(3, 1fr); } }
.tf-usp-item { display: flex; gap: 0.7rem; align-items: flex-start; }
.tf-usp-icon { flex-shrink: 0; width: 36px; height: 36px; border-radius: 50%; background: var(--color-primary-tint); color: var(--color-primary-dark); display: flex; align-items: center; justify-content: center; }
.tf-usp-icon svg { width: 18px; height: 18px; }
.tf-usp-item h4 { font-size: 0.85rem; margin: 0 0 0.2em; }
.tf-usp-item p { font-size: 0.78rem; margin: 0; color: var(--color-text-muted); }

/* ==========================================================================
   FAQ
   ========================================================================== */
.tf-faq-list { display: flex; flex-direction: column; gap: 0.6rem; }
.tf-faq-item { background: var(--color-surface); border: 1px solid var(--color-line); border-radius: var(--radius-md); padding: 0.85rem 1rem; }
.tf-faq-item summary { cursor: pointer; font-weight: 600; font-size: 0.9rem; list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.tf-faq-item summary::-webkit-details-marker { display: none; }
.tf-faq-item summary::after { content: "+"; font-size: 1.2rem; color: var(--color-primary-dark); flex-shrink: 0; }
.tf-faq-item[open] summary::after { content: "\2212"; }
.tf-faq-item p { margin: 0.7em 0 0; color: var(--color-text-muted); font-size: 0.85rem; }

/* ==========================================================================
   BREADCRUMB
   ========================================================================== */
.tf-breadcrumbs { font-size: 0.78rem; color: var(--color-text-muted); margin-block: 0.8rem; }
.tf-breadcrumbs a { color: var(--color-text-muted); text-decoration: none; }
.tf-breadcrumbs a:hover { color: var(--color-primary-dark); }

/* ==========================================================================
   ARSIP / HALAMAN KATEGORI: banner, toolbar, deskripsi di bawah
   ========================================================================== */
.tf-archive-banner { position: relative; height: 200px; background-size: cover; background-position: center; margin-bottom: 0; }
@media (min-width: 782px) { .tf-archive-banner { height: 280px; } }
.tf-archive-banner-overlay { position: absolute; inset: 0; background: rgba(20,14,10,0.45); }
.tf-archive-banner-content { position: relative; height: 100%; display: flex; align-items: center; }
.tf-archive-banner-content h1 { color: #fff; margin: 0; }

.tf-archive-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-block: var(--space-2); flex-wrap: wrap; font-size: 0.82rem; color: var(--color-text-muted); }
.tf-archive-toolbar select { font-size: 0.82rem; padding: 0.4em 0.6em; border: 1px solid var(--color-line); border-radius: var(--radius-sm); background: var(--color-surface); }
.woocommerce-pagination { margin-block: var(--space-3); text-align: center; }
.woocommerce-pagination ul { list-style: none; display: inline-flex; gap: 0.4rem; padding: 0; margin: 0; }
.woocommerce-pagination a, .woocommerce-pagination span { display: flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: var(--radius-sm); border: 1px solid var(--color-line); font-size: 0.82rem; text-decoration: none; color: var(--color-text); }
.woocommerce-pagination .current { background: var(--color-primary-dark); color: #fff; border-color: var(--color-primary-dark); }

.tf-archive-description { margin-block: var(--space-4); padding-top: var(--space-3); border-top: 1px solid var(--color-line); }
.tf-archive-description-inner { font-size: 0.88rem; color: var(--color-text-muted); overflow: hidden; position: relative; max-height: none; }
.tf-archive-description-inner[data-collapsed="true"] { max-height: 6.5em; }
.tf-archive-description-inner[data-collapsed="true"]::after {
  content: ""; position: absolute; bottom: 0; left: 0; right: 0; height: 2.5em;
  background: linear-gradient(rgba(250,246,240,0), var(--color-bg));
}
.tf-archive-desc-toggle {
  margin-top: 0.7em; background: none; border: none; color: var(--color-primary-dark); font-weight: 600;
  font-size: 0.82rem; cursor: pointer; padding: 0; text-decoration: underline;
}

/* ==========================================================================
   MENU BAWAH MOBILE (app-style, dengan cart)
   ========================================================================== */
.tf-bottom-nav {
  display: none; position: fixed; left: 0; right: 0; bottom: 0; z-index: 300;
  background: var(--color-surface); border-top: 1px solid var(--color-line);
  padding-bottom: env(safe-area-inset-bottom, 0); box-shadow: 0 -2px 10px rgba(43,36,32,0.08);
}
@media (max-width: 899px) { .tf-bottom-nav { display: flex; } body { padding-bottom: 60px; } }
.tf-bottom-nav a, .tf-bottom-nav-btn {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.15rem;
  padding: 0.5rem 0.2rem 0.45rem; text-decoration: none; color: var(--color-text-muted); font-size: 0.62rem; font-weight: 600;
  background: transparent; border: none; cursor: pointer; font-family: inherit; position: relative;
}
.tf-bottom-nav a svg, .tf-bottom-nav-btn svg { width: 20px; height: 20px; }
.tf-bottom-nav-btn.is-active { color: var(--color-primary-dark); }
.tf-bottom-nav-cart { position: relative; }
.tf-bottom-nav-cart-badge {
  position: absolute; top: 0.15rem; right: 22%; background: var(--color-primary-dark); color: #fff;
  font-size: 0.58rem; font-weight: 700; min-width: 14px; height: 14px; border-radius: 999px;
  display: flex; align-items: center; justify-content: center; padding: 0 3px;
}

.tf-panel-backdrop { position: fixed; inset: 0; background: rgba(20,14,10,0.45); z-index: 310; opacity: 0; pointer-events: none; transition: opacity 0.2s ease; }
.tf-panel-backdrop.is-open { opacity: 1; pointer-events: auto; }
.tf-bottom-panel {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 320; background: var(--color-surface);
  border-radius: 18px 18px 0 0; padding: 1rem 1.2rem calc(1.2rem + env(safe-area-inset-bottom, 0));
  max-height: 70vh; overflow-y: auto; transform: translateY(100%); transition: transform 0.25s ease;
  box-shadow: 0 -8px 24px rgba(43,36,32,0.15);
}
.tf-bottom-panel.is-open { transform: translateY(0); }
.tf-bottom-panel-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.8rem; }
.tf-panel-close { background: var(--color-bg-alt); border: none; width: 30px; height: 30px; border-radius: 50%; font-size: 1.2rem; cursor: pointer; }
.tf-panel-category-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.4rem; }
.tf-panel-category-list a { display: flex; justify-content: space-between; padding: 0.7em 0.85em; border-radius: 10px; background: var(--color-bg-alt); text-decoration: none; color: var(--color-text); font-size: 0.85rem; font-weight: 500; }
.tf-panel-category-list a span { color: var(--color-text-muted); font-weight: 400; }
.tf-panel-search-form { display: flex; gap: 0.5rem; }
.tf-panel-search-form input { flex: 1; padding: 0.7em 0.9em; border: 1px solid var(--color-line); border-radius: 10px; font-size: 0.9rem; }

@media (min-width: 900px) { .tf-panel-backdrop, .tf-bottom-panel { display: none; } }

/* ==========================================================================
   HALAMAN PRODUK TUNGGAL (single-product)
   ========================================================================== */
.single-product .product_title { font-weight: 400; font-family: var(--font-body); font-size: 1.15rem; margin-bottom: 0.4em; }
@media (min-width: 782px) { .single-product .product_title { font-size: 1.4rem; } }
.single-product .price { font-size: 1.2rem; font-weight: 600; color: var(--color-primary-dark); }
.single-product .price del { color: var(--color-text-muted); font-weight: 400; font-size: 0.9rem; }
/* ==========================================================================
   SELARASKAN DENGAN WOOCOMMERCE — CSS bawaan WooCommerce sekarang AKTIF
   (mengurus struktur penting seperti galeri produk, form, dsb). Bagian di
   bawah ini cuma MENIMPA warna/gaya supaya selaras dengan tema, bukan
   membangun ulang strukturnya dari nol.
   ========================================================================== */
.woocommerce a.button, .woocommerce button.button, .woocommerce input.button,
.woocommerce #respond input#submit, .woocommerce-page a.button {
  background: var(--color-primary-dark) !important; color: #fff !important;
  border-radius: var(--radius-sm) !important; font-family: var(--font-body) !important;
  font-weight: 600 !important; font-size: 0.85rem !important; border: none !important;
}
.woocommerce a.button:hover, .woocommerce button.button:hover, .woocommerce input.button:hover {
  background: var(--color-primary-darker) !important; color: #fff !important;
}
.woocommerce span.onsale { background: var(--color-sale) !important; }
.woocommerce .star-rating span::before, .woocommerce p.stars a::before { color: var(--color-accent) !important; }
.single-product .woocommerce-product-gallery__image { border-radius: var(--radius-md); overflow: hidden; background: var(--color-bg-alt); }
.single-product .flex-control-thumbs li img { border-radius: var(--radius-sm); }
/* WooCommerce sengaja set galeri jadi opacity:0 di awal, baru dimunculkan oleh
   JavaScript-nya setelah galeri selesai diinisialisasi. Kalau skrip itu gagal
   jalan karena alasan apa pun, galeri jadi "ada tapi tak kelihatan" — persis
   seperti ruang kosong. Baris ini paksa galeri selalu terlihat sebagai jaring
   pengaman, apapun status JavaScript-nya. */
.single-product .woocommerce-product-gallery { opacity: 1 !important; }
/* Jaring pengaman tambahan: kalau JavaScript galeri WooCommerce gagal jalan
   sama sekali, CSS ini pastikan tetap terlihat rapi (gambar pertama besar,
   sisanya disembunyikan) — bukan menumpuk vertikal berantakan. Kalau JS
   berhasil jalan normal, ia akan membangun struktur slider-nya sendiri di
   atas ini, jadi tidak saling bentrok. */
.single-product .woocommerce-product-gallery__wrapper { display: flex; flex-direction: column; gap: 0.5rem; }
.single-product .woocommerce-product-gallery__wrapper > .woocommerce-product-gallery__image:not(:first-child) {
  display: none;
}
.single-product div.product { display: grid !important; gap: var(--space-3); grid-template-columns: 1fr; }
@media (min-width: 900px) { .single-product div.product { grid-template-columns: 1fr 1fr !important; gap: var(--space-4); } }
/* WooCommerce bawaan memberi lebar 48% + float pada galeri & ringkasan produk —
   itu bentrok dengan grid kita, jadi kita reset paksa supaya keduanya penuh
   mengisi kolom grid masing-masing. */
.single-product div.product div.images,
.single-product div.product div.summary {
  width: 100% !important;
  float: none !important;
  margin: 0 !important;
}
/* PENTING: grid 2 kolom di atas cuma untuk galeri & ringkasan. Elemen LAIN yang
   ikut jadi anak langsung "div.product" (tab Deskripsi/Spesifikasi, Related
   Products, Upsells) harus melebar penuh 1 baris sendiri di bawahnya —
   kalau tidak, mereka ikut kepaksa masuk ke grid 2 kolom yang sama dan jadi
   berantakan (ini penyebab pasti "Related Products" terlihat sempit/berantakan). */
@media (min-width: 900px) {
  .single-product div.product > .woocommerce-tabs,
  .single-product div.product > .related.products,
  .single-product div.product > .upsells.products {
    grid-column: 1 / -1;
  }
}

/* Tombol Tambah ke Keranjang bawaan WooCommerce, diselaraskan dengan gaya tema */
.single-product .single_add_to_cart_button {
  background: var(--color-primary-dark); color: #fff; border: none; padding: 0.85em 2em;
  border-radius: var(--radius-sm); font-weight: 600; font-size: 0.92rem; cursor: pointer;
}
.single-product .single_add_to_cart_button:hover { background: var(--color-primary-darker); }
.single-product form.cart { display: flex; flex-wrap: wrap; gap: 0.7rem; align-items: center; }

/* Tombol WhatsApp di samping Tambah ke Keranjang */
.tf-product-wa-btn {
  display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.85em 1.5em;
  background: transparent; border: 1.5px solid #25D366; color: #1B8A4C; border-radius: var(--radius-sm);
  font-weight: 600; font-size: 0.88rem; text-decoration: none; margin-left: 0.5rem;
}
.tf-product-wa-btn:hover { background: #25D366; color: #fff; }
.tf-product-wa-btn svg { width: 18px; height: 18px; }

/* 3 trust badge dekat tombol beli */
.tf-product-trust-badges { display: flex; flex-wrap: wrap; gap: 1rem; margin-block: 0.9rem; padding-block: 0.9rem; border-block: 1px solid var(--color-line); }
.tf-product-trust-item { display: flex; align-items: center; gap: 0.4rem; font-size: 0.78rem; color: var(--color-text-muted); }
.tf-product-trust-item svg { width: 17px; height: 17px; color: var(--color-primary-dark); flex-shrink: 0; }

/* Tab Deskripsi/Spesifikasi/Ulasan */
.woocommerce-tabs { margin-top: var(--space-4); }
.woocommerce-tabs ul.tabs { display: flex; gap: 0.3rem; list-style: none; padding: 0; margin: 0 0 1.2rem; border-bottom: 1px solid var(--color-line); flex-wrap: wrap; }
.woocommerce-tabs ul.tabs li { margin: 0; }
.woocommerce-tabs ul.tabs li a { display: block; padding: 0.7em 1.1em; font-size: 0.85rem; font-weight: 600; text-decoration: none; color: var(--color-text-muted); border-bottom: 2px solid transparent; }
.woocommerce-tabs ul.tabs li.active a { color: var(--color-primary-dark); border-bottom-color: var(--color-primary-dark); }
.woocommerce-tabs .panel { font-size: 0.88rem; color: var(--color-text-muted); }
table.woocommerce-product-attributes { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
table.woocommerce-product-attributes th { text-align: left; padding: 0.6em 0.8em; width: 35%; color: var(--color-text); font-weight: 600; background: var(--color-bg-alt); border: 1px solid var(--color-line); }
table.woocommerce-product-attributes td { padding: 0.6em 0.8em; border: 1px solid var(--color-line); color: var(--color-text-muted); }

/* ==========================================================================
   STICKY BAR MOBILE (khusus halaman produk, menggantikan menu bawah standar)
   ========================================================================== */
.tf-sticky-product-bar {
  display: none; position: fixed; left: 0; right: 0; bottom: 0; z-index: 305;
  background: var(--color-surface); border-top: 1px solid var(--color-line);
  padding: 0.7rem 1rem calc(0.7rem + env(safe-area-inset-bottom, 0));
  align-items: center; justify-content: space-between; gap: 0.8rem;
  box-shadow: 0 -4px 16px rgba(43,36,32,0.12);
}
@media (max-width: 899px) {
  .single-product .tf-sticky-product-bar { display: flex; }
  .single-product .tf-bottom-nav { display: none !important; }
  body.single-product { padding-bottom: 70px; }
}
.tf-sticky-price { font-size: 0.95rem; font-weight: 700; color: var(--color-primary-dark); flex-shrink: 0; }
.tf-sticky-price del { display: none; } /* ringkas di mobile, harga coret cukup di atas */
.tf-sticky-actions { display: flex; align-items: center; gap: 0.6rem; flex: 1; justify-content: flex-end; }
.tf-sticky-wa {
  width: 42px; height: 42px; border-radius: 50%; background: #25D366; color: #fff;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.tf-sticky-wa svg { width: 20px; height: 20px; }
.tf-sticky-add-cart { flex: 1; text-align: center; padding: 0.8em 1em; font-size: 0.85rem; white-space: nowrap; }

/* ==========================================================================
   TOMBOL KEMBALI KE ATAS
   ========================================================================== */
.tf-back-to-top {
  position: fixed; right: 1.1rem; bottom: 1.1rem; z-index: 250;
  width: 44px; height: 44px; border-radius: 50%; background: var(--color-secondary); color: #fff;
  border: 2px solid rgba(255,255,255,0.15); cursor: pointer; display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-md); opacity: 0; transform: translateY(10px) scale(0.9); pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease, background 0.15s ease;
}
.tf-back-to-top.is-visible { opacity: 1; transform: translateY(0) scale(1); pointer-events: auto; }
.tf-back-to-top:hover { background: var(--color-primary-dark); }
.tf-back-to-top:active { transform: scale(0.92); }
.tf-back-to-top svg { width: 19px; height: 19px; }

/* Di mobile, geser ke atas supaya tidak tertutup menu bawah / sticky bar produk. */
@media (max-width: 899px) {
  .tf-back-to-top { bottom: 72px; right: 0.85rem; width: 38px; height: 38px; }
  body.single-product .tf-back-to-top { bottom: 82px; }
}
