/* =====================================================================
   Wiru — gaya modul blok builder (views/themes/wiru/desktop/modules)
   Dimuat di semua halaman dan perangkat; semua selektor di bawah body.wiru.
   Kelas utilitas mockup (text-ink, border-line, font-serif, ...) datang dari
   tailwind.config di layout; berkas ini hanya menambal hal yang tidak bisa
   ditulis sebagai kelas di template.
   ===================================================================== */

/* 1. Radius mengikuti setelan admin (Website > radius gambar/tombol, live customizer).
   Bingkai gambar/kartu modul memakai .wiru-r-img = --site-image-radius (none 0, soft 12px,
   medium 24px, round 32px). Tombol memakai .wiru-r-btn = --site-button-radius; pilihan
   "default" (tanpa radius situs) = 4px gaya Wiru. Live customizer mengubah variabel di :root
   dan data-button-radius di body, jadi pratinjau langsung ikut. */
body.wiru .wiru-r-img { border-radius: var(--site-image-radius, 0px); overflow: hidden; }
body.wiru .wiru-r-btn { border-radius: 4px; }
body.wiru:not([data-button-radius="default"]) .wiru-r-btn { border-radius: var(--site-button-radius, 4px); }

/* 2. Lebar kontainer konsisten dengan mockup (max-w-7xl + gutter 16/24/32px).
   webstyle-desktop memotong .builder-html-scope.w-full .max-w-7xl menjadi
   calc(100% - 80px) di 1024-1359px, sehingga isi htmlblock lebar penuh tidak
   sejajar dengan modul lain. */
@media (min-width: 1024px) and (max-width: 1359px) {
  body.wiru .builder-html-scope.w-full .max-w-7xl { max-width: 80rem !important; }
}

/* 3. Teks tanpa kelas di blok heading/paragraph/htmlblock (isi editor admin). */
body.wiru .wiru-heading h1:not([class]),
body.wiru .wiru-paragraph h1:not([class]) {
  font-family: var(--font-heading, "Cormorant Garamond", Georgia, serif);
  font-size: clamp(1.875rem, 4vw, 3rem);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -0.025em;
  color: #1F1A17;
  margin-bottom: 1rem;
}
body.wiru .wiru-heading h2:not([class]),
body.wiru .wiru-paragraph h2:not([class]) {
  font-family: var(--font-heading, "Cormorant Garamond", Georgia, serif);
  font-size: clamp(1.875rem, 3vw, 2.25rem);
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: -0.025em;
  color: #1F1A17;
  margin-bottom: 0.5rem;
}
body.wiru .wiru-heading h3:not([class]),
body.wiru .wiru-paragraph h3:not([class]) {
  font-family: var(--font-heading, "Cormorant Garamond", Georgia, serif);
  font-size: 1.5rem;
  font-weight: 400;
  line-height: 1.3;
  color: #1F1A17;
  margin-bottom: 0.5rem;
}
body.wiru .wiru-heading p:not([class]),
body.wiru .wiru-paragraph p:not([class]) {
  font-size: 0.875rem;
  font-weight: 300;
  line-height: 1.625;
  color: #6F665B;
  margin-bottom: 1rem;
}
body.wiru .wiru-paragraph a:not([class]),
body.wiru .wiru-heading a:not([class]) {
  color: #1F1A17;
  text-decoration: underline;
  text-underline-offset: 3px;
}
body.wiru .wiru-paragraph a:not([class]):hover,
body.wiru .wiru-heading a:not([class]):hover { color: #1F1A17; }

/* 4. Herofeature karusel & toggle (kelas base dipakai herofeature.css/js). */
body.wiru .wiru-mod .herofeature-content { gap: 0; }
body.wiru .wiru-mod .herofeature-title {
  font-family: var(--font-heading, "Cormorant Garamond", Georgia, serif);
  font-size: clamp(1.875rem, 3vw, 2.25rem);
  font-weight: 400;
  line-height: 1.25;
  color: #1F1A17;
  margin-bottom: 1rem;
}
body.wiru .wiru-mod .herofeature-description {
  color: #6F665B;
  font-size: 0.9375rem;
  font-weight: 300;
  margin-bottom: 1.5rem;
}
body.wiru .wiru-mod .herofeature-features {
  margin-top: 0;
  padding-top: 1rem;
  border-top: 1px solid #D9CFBB;
}
body.wiru .wiru-mod .herofeature-feature-title {
  font-size: 0.75rem;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #7A7C83;
}
body.wiru .wiru-mod .herofeature-feature-desc {
  font-size: 0.875rem;
  font-weight: 500;
  color: #1F1A17;
  opacity: 1;
}
body.wiru .wiru-mod .herofeature-faq { border-top: 1px solid #D9CFBB; }
body.wiru .wiru-mod .herofeature-faq > .faq-item { border-color: #D9CFBB; }
body.wiru .wiru-mod .herofeature-faq .faq-question {
  font-family: var(--font-heading, "Cormorant Garamond", Georgia, serif);
  font-size: 1.125rem;
  color: #1F1A17;
}
body.wiru .wiru-mod .herofeature-faq .faq-question:hover { color: #1F1A17; }
body.wiru .wiru-mod .herofeature-faq .faq-answer {
  font-size: 0.875rem;
  font-weight: 300;
  line-height: 1.625;
  color: #6F665B;
  opacity: 1;
}

/* 5. Menu (blok menu builder): gaya navigasi mockup. */
body.wiru .wiru-mod.menu-section { padding: 1.5rem 0; }
body.wiru .wiru-mod .menu-item a,
body.wiru .wiru-mod .menu-item span {
  font-size: 0.875rem;
  font-weight: 500;
  color: #6F665B;
  transition: color 0.2s ease;
}
body.wiru .wiru-mod .menu-item a:hover { color: #1F1A17; }

/* 6. Teaser, kategori, halaman: kartu bergaris tipis tanpa bayangan. */
body.wiru .wiru-mod.teaser article,
body.wiru .wiru-mod.page article { background: #FFFFFF; }
body.wiru .wiru-mod.teaser h3,
body.wiru .wiru-mod.page h3 { font-weight: 500; }

/* 7. Slideshow (hero kartu) dengan lebih dari satu slide: karusel Swiper dari slideshow.js tema.
   Sebelum Swiper siap hanya slide pertama yang tampil (tanpa lonjakan tinggi halaman). */
body.wiru .wiru-slideshow .swiper:not(.swiper-initialized) .swiper-slide:not(:first-child) { display: none; }
body.wiru .wiru-slideshow .swiper-slide { height: auto; }
body.wiru .wiru-slideshow .swiper-button-next,
body.wiru .wiru-slideshow .swiper-button-prev { color: #FFFFFF; }
body.wiru .wiru-slideshow .swiper-button-next::after,
body.wiru .wiru-slideshow .swiper-button-prev::after { font-size: 22px; }
@media (max-width: 639px) {
  body.wiru .wiru-slideshow .swiper-button-next,
  body.wiru .wiru-slideshow .swiper-button-prev { display: none; }
}
body.wiru .wiru-slideshow .swiper-pagination { bottom: 20px; }
body.wiru .wiru-slideshow .swiper-pagination-bullet { background: #FFFFFF; opacity: .45; }
body.wiru .wiru-slideshow .swiper-pagination-bullet-active { opacity: 1; }

/* 7b. Herofeature list langsung diikuti blok button (CTA terpisah): jarak bawah dan garis
   seksi diserahkan ke blok button, supaya tombol duduk 32px di bawah isi seperti mockup. */
body.wiru .block-type-herofeature:has(+ .block-type-button) .wiru-herofeature { padding-bottom: 0; border-bottom: 0; }

/* 8. Kolom gaya footer (about/contact/links/social) bila dipakai di badan halaman. */
body.wiru .block-position-wrapper h4.font-serif { color: #1F1A17; }

/* 9. Tombol kaca hero tetap transparan walau "override_bg_white" aktif
   (webstyle mengganti semua [class*="bg-white"] menjadi warna body). */
html body.wiru .wiru-mod .bg-white\/10 { background-color: rgba(255, 255, 255, 0.1) !important; }
html body.wiru .wiru-mod .hover\:bg-white\/20:hover { background-color: rgba(255, 255, 255, 0.2) !important; }

/* ---------- Wiru (mockup THEMES/Wiru-Batik) ---------- */
body.wiru [hidden] { display: none !important; }

/* Panggung kain beranda (modules/slideshow.twig dua slide atau lebih; theme.js [data-wr-pentas]). */
body.wiru .wr-pentas__bidang { position: relative; height: 66vh; height: 66svh; min-height: 440px; overflow: hidden; background-color: #ECE4D3; }
@media (min-width: 1024px) { body.wiru .wr-pentas__bidang { height: 100vh; height: calc(100svh - var(--wr-mast-h, 76px)); min-height: 680px; max-height: 1000px; } }
body.wiru .wr-pentas__cadangan { position: absolute; inset: 0; background-repeat: repeat; background-size: 220px; transition: opacity 0.6s ease; }
body.wiru .wr-pentas__bidang.is-hidup .wr-pentas__cadangan { opacity: 0; }
body.wiru .wr-pentas__kanvas { position: absolute; inset: 0; width: 100%; height: 100%; }
body.wiru .wr-pentas__atas { position: relative; margin-top: -128px; pointer-events: none; }
@media (min-width: 1024px) { body.wiru .wr-pentas__atas { position: absolute; left: 0; right: 0; bottom: 13%; margin-top: 0; } }
body.wiru .wr-pentas__kartu { pointer-events: auto; padding: 24px; background: #F6F1E7; border: 1px solid #D9CFBB; }
@media (min-width: 640px) { body.wiru .wr-pentas__kartu { padding: 32px; } }
@media (min-width: 1024px) { body.wiru .wr-pentas__kartu { padding: 40px; max-width: 580px; } }
body.wiru .wr-pentas__motif { pointer-events: auto; padding: 10px; background: #F6F1E7; border: 1px solid #D9CFBB; }
@media (min-width: 1024px) { body.wiru .wr-pentas__motif { width: 230px; } }
body.wiru .wr-pilih { display: flex; flex-direction: column; align-items: center; gap: 6px; width: 100%; padding: 6px; text-align: left; color: #1F1A17; border: 1px solid transparent; transition: border-color 0.3s ease; }
@media (min-width: 1024px) { body.wiru .wr-pilih { flex-direction: row; gap: 12px; } }
body.wiru .wr-pilih:hover { border-color: #D9CFBB; }
body.wiru .wr-pilih[aria-pressed="true"] { border-color: #1F1A17; }
body.wiru .wr-pentas__lihat { margin-top: 8px; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 14px; background: #1F1A17; color: #FFFFFF; font-size: 13px; transition: background-color 0.3s ease; }
body.wiru .wr-pentas__lihat:hover { background: #8A4F24; }

/* Pita kain halaman dalam (slideshow satu slide). */
body.wiru .wr-pita { overflow: hidden; }
body.wiru .wr-pita__kain { position: absolute; left: 0; right: 0; top: 0; height: 260px; background-repeat: repeat; background-size: 200px; }
@media (min-width: 1024px) { body.wiru .wr-pita__kain { height: 340px; background-size: 240px; } }
body.wiru .wr-pita__kartu { position: relative; padding: 24px; background: #F6F1E7; border: 1px solid #D9CFBB; max-width: 760px; }
@media (min-width: 640px) { body.wiru .wr-pita__kartu { padding: 32px; } }
@media (min-width: 1024px) { body.wiru .wr-pita__kartu { padding: 40px; } }

/* Kartu motif (modules/listcategory/grid.twig, tipe Motif): pola 3:4, nama, arti. */
body.wiru .wr-motifs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px 16px; list-style: none; margin: 0; padding: 0; }
@media (min-width: 1024px) { body.wiru .wr-motifs { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 40px 24px; } }
body.wiru .wr-motif { display: block; color: #1F1A17; }
body.wiru .wr-motif img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; background: #ECE4D3; border-radius: var(--site-image-radius, 0px); transition: opacity 0.3s ease; }
body.wiru .wr-motif:hover img { opacity: 0.88; }
body.wiru .wr-motif__name { margin-top: 16px; font-size: 18px; font-weight: 700; }
body.wiru .wr-motif__desc { margin-top: 6px; color: #6F665B; }

/* Deret cerita pembeli (htmlblock [data-wr-rail-root], latar nila): digeser menyamping, garis kiri tiap kutipan. */
body.wiru .wr-rail { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding: 0 20px; scroll-padding: 0 20px; }
body.wiru .wr-rail::-webkit-scrollbar { display: none; }
body.wiru .wr-rail:focus { outline: none; }
body.wiru .wr-rail__item { flex: none; width: min(82vw, 520px); padding: 2px 24px; border-left: 1px solid rgba(255, 255, 255, 0.22); scroll-snap-align: start; }
@media (min-width: 1024px) {
  body.wiru .wr-rail { padding: 0 max(40px, calc((100vw - 1320px) / 2 + 40px)); scroll-padding: 0 max(40px, calc((100vw - 1320px) / 2 + 40px)); }
  body.wiru .wr-rail__item { padding: 2px 40px; }
}
body.wiru .wr-rail__btn { width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid rgba(255, 255, 255, 0.3); color: #FFFFFF; transition: border-color 0.3s ease; }
body.wiru .wr-rail__btn:hover { border-color: #FFFFFF; }

/* Tahap membatik (htmlblock #proses): garis kawung tergambar, malam, celup nila, lorod, berjalan saat tampil. */
body.wiru .wr-tahap .wr-mori { fill: #EFE6D2; }
body.wiru .wr-tahap .wr-kelopak { fill: rgba(190, 140, 70, 0); stroke: #8B8377; stroke-width: 2; stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 1.3s ease 0.2s; }
body.wiru .wr-tahap.is-revealed .wr-kelopak,
html:not(.wr-reveal-on) body.wiru .wr-tahap .wr-kelopak { stroke-dashoffset: 0; }
body.wiru .wr-tahap-malam.is-revealed .wr-kelopak,
body.wiru .wr-tahap-celup.is-revealed .wr-kelopak { animation: wr-malam 0.8s ease 1.4s forwards; }
body.wiru .wr-tahap-celup.is-revealed .wr-mori,
body.wiru .wr-tahap-lorod.is-revealed .wr-mori { animation: wr-celup 1.1s ease 2.3s forwards; }
body.wiru .wr-tahap-lorod.is-revealed .wr-kelopak { animation: wr-malam 0.8s ease 1.4s forwards, wr-lorod 0.9s ease 3.6s forwards; }
@keyframes wr-malam { to { fill: rgba(190, 140, 70, 0.62); stroke: #9A6A2C; stroke-width: 4; } }
@keyframes wr-celup { to { fill: #1D2B52; } }
@keyframes wr-lorod { to { fill: #EFE6D2; stroke: #EFE6D2; stroke-width: 2; } }
@media (prefers-reduced-motion: reduce) {
  body.wiru .wr-tahap .wr-kelopak { transition: none; stroke-dashoffset: 0; }
  body.wiru .wr-tahap-malam .wr-kelopak, body.wiru .wr-tahap-celup .wr-kelopak { fill: rgba(190, 140, 70, 0.62); stroke: #9A6A2C; stroke-width: 4; animation: none; }
  body.wiru .wr-tahap-celup .wr-mori, body.wiru .wr-tahap-lorod .wr-mori { fill: #1D2B52; animation: none; }
  body.wiru .wr-tahap-lorod .wr-kelopak { fill: #EFE6D2; stroke: #EFE6D2; animation: none; }
}

/* Pita produk selebar layar (blok product width full = latar gading). */
body.wiru .wr-band { background: #ECE4D3; }

/* Kartu kain (partials/book_card.twig): gambar 4:5 siku, lencana, judul, harga, terjual, titik warna. */
body.wiru .wr-card { display: block; color: #1F1A17; }
body.wiru .wr-card__media { position: relative; display: block; overflow: hidden; background-color: #ECE4D3; border-radius: var(--site-image-radius, 0px); }
body.wiru .wr-card__media img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; transition: opacity 0.3s ease; }
body.wiru .wr-card:hover .wr-card__media img { opacity: 0.88; }
body.wiru .wr-card__badge { position: absolute; top: 10px; left: 10px; padding: 3px 9px; font-size: 12px; font-weight: 700; line-height: 1.4; background-color: #F6F1E7; color: #1F1A17; }
body.wiru .wr-card__badge--off { background-color: #8A4F24; color: #FFFFFF; }
body.wiru .wr-card__title { margin-top: 14px; font-size: 15px; line-height: 1.45; font-weight: 700; }
body.wiru .wr-card:hover .wr-card__title { color: #8A4F24; }
body.wiru .wr-card__spec { display: none; }
body.wiru .wr-card__price { margin-top: 4px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; font-weight: 700; }
body.wiru .wr-card__compare { font-size: 13px; font-weight: 400; color: #6F665B; text-decoration: line-through; }
body.wiru .wr-card__meta { margin-top: 4px; display: flex; align-items: center; gap: 10px; font-size: 13px; color: #6F665B; }
body.wiru .wr-card__dots { display: inline-flex; gap: 4px; }
body.wiru .wr-card__dots span { width: 12px; height: 12px; border: 1px solid rgba(31, 26, 23, 0.2); }

/* Kartu tulisan (modules/blog/_card.twig): gambar 16:10 siku, tanggal, judul. */
body.wiru .wr-post { display: block; color: #1F1A17; }
body.wiru .wr-post__media { display: block; overflow: hidden; background-color: #ECE4D3; border-radius: var(--site-image-radius, 0px); }
body.wiru .wr-post__media img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; transition: opacity 0.3s ease; }
body.wiru .wr-post:hover .wr-post__media img { opacity: 0.88; }
body.wiru .wr-post__date { margin-top: 16px; font-size: 13px; color: #6F665B; }
body.wiru .wr-post__title { margin-top: 4px; font-size: 19px; line-height: 1.35; font-weight: 700; }
body.wiru .wr-post:hover .wr-post__title { color: #8A4F24; }
body.wiru .wr-post--feature { display: grid; gap: 24px; align-items: center; }
@media (min-width: 1024px) { body.wiru .wr-post--feature { grid-template-columns: 7fr 5fr; gap: 48px; } }
body.wiru .wr-work img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; background-color: #ECE4D3; border-radius: var(--site-image-radius, 0px); }
body.wiru .wr-work figcaption { margin-top: 12px; font-size: 14px; font-weight: 700; }
body.wiru .wr-work figcaption span { display: block; margin-top: 2px; font-weight: 400; color: #6F665B; }

/* FAQ (modules/faq.twig). */
body.wiru .wr-faq details summary { list-style: none; }
body.wiru .wr-faq details summary::-webkit-details-marker { display: none; }
body.wiru .wr-faq .wr-faq__mark { transition: transform 0.3s ease; }
body.wiru .wr-faq details[open] .wr-faq__mark { transform: rotate(45deg); }
