/* =========================================================
   THEME: E-Tenun Brown
   ========================================================= */
:root {
    --bg: #4e2b20; /* latar utama (brown gelap) */
    --surface: #61382a; /* app bar / strip */
    --card: #6c3f2e; /* ubin / kartu */
    --text: #fff5e9; /* teks utama (lebih terang) */
    --muted: #f2ddc9cc; /* teks sekunder */
    --chip: #7a4734; /* elemen kecil */
    --shadow: rgba(0, 0, 0, 0.35);
    --border-ghost: #00000050;
    --paper: #fff7ef; /* skema terang opsional */
    --ink: #2b1b14;
}

/* =========================================================
   RESET & BASE
   ========================================================= */
* {
    box-sizing: border-box;
}
html {
    height: 100%;
}
body {
  min-height: 100%;
  margin: 0;
  padding: 0;
  color: var(--text);
  font: 16px/1.5 ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial;
  background:
    linear-gradient(0deg, rgba(0, 0, 0, .22), rgba(0, 0, 0, .22)),
    url("/assets/images/bg-batik.svg") center / cover no-repeat fixed,
    var(--bg);
}

/* MOBILE: hilangkan gambar batik, ganti warna cokelat solid */
@media (max-width: 768px) {
  body {
    background: var(--bg); /* pakai warna dari variabel, cokelat tua */
  }
}

/* ===== Mobile: paksa full cokelat, hilangkan bg putih/cream di section ===== */
@media (max-width:768px){
  /* body full cokelat */
  body{ background: var(--bg) !important; }

  /* transparankan semua varian bg putih/cream di landing */
  .page-landing .bg-white,
  .page-landing .bg-white\/10,
  .page-landing .bg-chocolate-50,
  .page-landing .bg-chocolate-100,
  .page-landing .bg-chocolate-200 { 
    background-color: transparent !important; 
  }

  /* kartu yg tadinya putih: ganti jadi soft-dark biar tetap kebaca */
  .page-landing .box,
  .page-landing .related-card,
  .page-landing .rounded-lg.bg-white,
  .page-landing .bg-white\/10.backdrop-blur-md {
    background-color: rgba(255,255,255,.06) !important;
    border-color: rgba(255,255,255,.12) !important;
    color: #fff !important;
  }

  /* teks cokelat → putih di mobile agar kontras */
  .page-landing .text-chocolate-700,
  .page-landing .text-chocolate-600,
  .page-landing .text-chocolate-500 {
    color:#fff !important;
  }

  /* grid galeri setelah hero yg pakai bg-chocolate-50 → transparan */
  .page-landing section[class*="bg-chocolate-500"]{ background-color: transparent !important; }
}

a {
    color: inherit;
    text-decoration: none;
}
img {
    max-width: 100%;
    height: auto;
    display: block;
    border: 0;
}

h1,
h2,
h3 {
    margin: 0 0 10px;
}
h1 {
    font-size: 32px;
    font-weight: 800;
}
h2 {
    font-size: 22px;
    font-weight: 700;
}
h3 {
    font-size: 16px;
    font-weight: 700;
}

/* =========================================================
   LAYOUT WRAPPER (header sticky aman, footer non-sticky)
   ========================================================= */
.page-wrapper {
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
}

/* NB: netralisir styling lama pada tag footer generic */
footer {
    position: static !important;
    background: transparent !important;
    box-shadow: none !important;
}

/* gunakan kelas khusus untuk header/footer */
.page-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: var(--surface);
    box-shadow: 0 2px 10px var(--shadow);
}
.page-content {
    flex: 1 0 auto;
    padding-top: 14px; /* ruang dari navbar */
    padding-bottom: 28px; /* ruang dari footer */
}

/* FOOTER BARU: solid + teks putih */
.page-footer {
    position: static;
    padding: 28px 0;
    background: #8b4513; /* palet: SaddleBrown */
    color: #fff;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
}
.page-footer h3,
.page-footer p,
.page-footer a {
    color: #fff;
}
.page-footer a:hover {
    opacity: 0.9;
    text-decoration: underline;
}
.page-footer .border-choco {
    border-color: rgba(255, 255, 255, 0.2) !important;
}

/* container util */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 18px;
}

/* =========================================================
   TOPBAR / NAV
   ========================================================= */
.topbar {
    display: grid;
    grid-template-columns: auto minmax(260px, 1fr) auto; /* brand | search fleksibel | nav */
    gap: 16px;
    align-items: center;
    padding: 14px 18px;
}
.brand {
    font-family: ui-serif, Georgia, "Times New Roman", serif;
    font-weight: 800;
    font-size: 28px;
    letter-spacing: 0.5px;
}
.navlinks {
    display: flex;
    gap: 18px;
    justify-content: flex-end;
    align-items: center;
    white-space: nowrap;
}
.navlinks a {
    opacity: 0.95;
}
.navlinks a:hover {
    opacity: 1;
    text-decoration: underline;
}
.navlinks form {
    margin: 0;
    display: inline;
}

.icon-btn {
    width: 36px;
    height: 36px;
    border-radius: 9px;
    background: var(--chip);
    display: grid;
    place-items: center;
    box-shadow: 0 2px 6px var(--shadow);
}

/* search */
.searchwrap {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #00000022;
    border: 1px solid #00000045;
    border-radius: 999px;
    padding: 8px 14px;
    min-width: 0;
    max-width: 760px;
    width: 100%;
}
.searchwrap svg {
    opacity: 0.9;
}
.searchwrap input {
    flex: 1;
    background: transparent;
    border: 0;
    outline: none;
    color: var(--text);
    font-size: 15px;
}
.searchwrap input::placeholder {
    color: var(--muted);
}

@media (max-width: 1100px) {
    .searchwrap {
        max-width: 600px;
    }
}
@media (max-width: 900px) {
    .topbar {
        grid-template-columns: auto 1fr auto;
    }
}

/* =========================================================
   FLASH
   ========================================================= */
.flash {
    margin: 16px 0;
    padding: 12px 14px;
    border-radius: 10px;
    font-weight: 500;
    box-shadow: 0 2px 10px var(--shadow);
    border: 1px solid #00000030;
}
.flash.success {
    background: #1a7f37;
    color: #fff;
    border-color: #0e5d2a;
}
.flash.error {
    background: #a42828;
    color: #fff;
    border-color: #7a1e1e;
}

/* =========================================================
   KATALOG (Masonry ala Pinterest)
   ========================================================= */
.masonry-wrap {
    max-width: 1320px;
    margin: 0 auto;
    padding: 12px clamp(10px, 4vw, 26px) 40px;
}
.page-katalog {
    padding-top: 6px;
}

.masonry {
    column-gap: 16px;
}
@media (min-width: 540px) {
    .masonry {
        columns: 2;
    }
}
@media (min-width: 760px) {
    .masonry {
        columns: 3;
    }
}
@media (min-width: 1100px) {
    .masonry {
        columns: 4;
    }
}
@media (min-width: 1500px) {
    .masonry {
        columns: 5;
    }
}

.pin {
    break-inside: avoid;
    display: block;
    margin: 0 0 16px;
    background: transparent;
    border: 0;
    box-shadow: none;
    border-radius: 18px;
    transform: translateZ(0);
    transition: transform 0.15s ease;
}
.pin img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 18px;
    background: transparent;
    padding: 0;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.28);
    transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}
.pin:hover img {
    transform: translateY(-2px) scale(1.01);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.34);
    filter: brightness(1.03);
}
.pin .meta {
    padding: 8px 2px 0;
    color: var(--muted);
    font-size: 12px;
}

.masonry-sentinel {
    text-align: center;
    margin: 22px 0 10px;
    color: var(--muted);
}

@media (max-width: 540px) {
    .masonry {
        column-gap: 14px;
    }
    .pin {
        margin-bottom: 14px;
    }
}

/* =========================================================
   GRID & BOX (umum)
   ========================================================= */
.grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 22px;
}
@media (min-width: 900px) {
    .grid {
        grid-template-columns: 1fr 1fr;
    }
}

.box {
    background: var(--card);
    border-radius: 14px;
    padding: 14px;
    box-shadow: 0 6px 16px var(--shadow);
    color: var(--text);
}
.box h3,
.box .heading {
    color: var(--text);
    opacity: 0.98;
}

.thumbs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.thumbs img {
    width: 86px;
    height: 86px;
    object-fit: cover;
    border-radius: 10px;
    box-shadow: 0 4px 10px var(--shadow);
}

.detail-info {
    color: var(--text) !important;
    opacity: 0.92;
}

.card-body {
    padding: 10px 12px;
}
.title {
    font-weight: 600;
    font-size: 15px;
    line-height: 1.3;
    color: var(--text);
}
.meta {
    color: var(--muted);
}
#sentinel {
    color: var(--muted);
}

/* =========================================================
   FORMS
   ========================================================= */
.field {
    margin-bottom: 12px;
}
.field label {
    display: block;
    font-size: 13px;
    margin-bottom: 6px;
    color: var(--text);
    opacity: 0.9;
}
.field input,
.field textarea,
.field select {
    width: 100%;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid var(--border-ghost);
    background: #00000028;
    color: var(--text);
}
.field input::placeholder,
.field textarea::placeholder {
    color: var(--muted);
}

.actions {
    margin-top: 10px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.btn {
    display: inline-block;
    padding: 9px 14px;
    border-radius: 10px;
    background: var(--chip);
    border: 1px solid #00000040;
    color: var(--text);
}
.btn.primary {
    background: #000;
    border-color: #000;
    color: #fff;
}
.btn:hover {
    filter: brightness(1.05);
}
.btn:active {
    transform: translateY(1px);
}

.field input:focus,
.field textarea:focus,
.field select:focus,
.searchwrap:focus-within {
    outline: 2px solid #ffd7a1;
    outline-offset: 2px;
}

/* =========================================================
   SCROLLBAR (WebKit)
   ========================================================= */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}
::-webkit-scrollbar-track {
    background: #00000022;
}
::-webkit-scrollbar-thumb {
    background: #00000055;
    border-radius: 8px;
}
::-webkit-scrollbar-thumb:hover {
    background: #00000070;
}

/* =========================================================
   Related products
   ========================================================= */
.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 14px;
}
.related-card {
    background: var(--card);
    border: 1px solid #00000020;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 6px 16px var(--shadow);
    color: var(--text);
}
.related-card img {
    width: 100%;
    height: 140px;
    object-fit: cover;
}
.related-card .card-body {
    padding: 10px 12px;
    color: var(--text);
}
.related-card .name {
    font-weight: 600;
    font-size: 14px;
    line-height: 1.35;
}

/* =========================================================
   Admin: table
   ========================================================= */
.table {
    width: 100%;
    border-collapse: collapse;
}
.table th,
.table td {
    padding: 10px 12px;
    vertical-align: middle;
    border-top: 1px solid #00000033;
}
.table thead th {
    border-top: 0;
    text-align: left;
    font-size: 12px;
    color: var(--muted);
    letter-spacing: 0.02em;
}
.table tbody tr:hover {
    background: #00000012;
}
.table td.actions {
    white-space: nowrap;
    text-align: right;
}

/* Thumbnail kecil di kolom cover */
.thumb-sm {
    width: 72px;
    height: 72px;
    object-fit: cover;
    border-radius: 10px;
    border: 1px solid #00000033;
    background: #00000018;
}

/* Pagination Laravel (Tailwind template icons) */
.pagination {
    display: flex;
    gap: 6px;
    list-style: none;
    margin: 12px 0 0;
    padding: 0;
}
.pagination a,
.pagination span {
    display: inline-block;
    padding: 6px 10px;
    border: 1px solid #00000033;
    border-radius: 8px;
    background: #00000018;
    color: var(--text);
    text-decoration: none;
    font-size: 14px;
}
.pagination .active span {
    background: #000;
    color: #fff;
    border-color: #000;
}
.pagination a:hover {
    filter: brightness(1.05);
}
nav[role="navigation"] svg {
    width: 20px;
    height: 20px;
    vertical-align: middle;
}

/* =========================================================
   Admin: form product
   ========================================================= */
.form-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}
@media (min-width: 900px) {
    .form-grid {
        grid-template-columns: 1fr 1fr;
    }
}
.inline-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}
.inline-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}
@media (max-width: 680px) {
    .inline-2,
    .inline-3 {
        grid-template-columns: 1fr;
        gap: 10px;
    }
}

.preview-grid {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 8px;
}
.thumb-xs {
    width: 84px;
    height: 84px;
    object-fit: cover;
    border-radius: 10px;
    border: 1px solid #00000033;
    background: #00000018;
}
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 10px;
}
.gallery-item {
    background: #00000018;
    border: 1px solid #00000033;
    border-radius: 10px;
    padding: 8px;
}
.thumb-md {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid #00000033;
    background: #00000018;
}
.radio {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 6px;
}
.radio input[type="radio"] {
    accent-color: #000;
}

/* =========================================================
   Page overrides
   ========================================================= */
/* Katalog: agar look pinterest (tanpa frame) */
.page-katalog .box {
    background: transparent;
    border: 0;
    box-shadow: none;
}
.page-katalog .pin {
    background: transparent;
    border: 0;
    backdrop-filter: none;
}
.page-katalog .pin .meta {
    background: transparent;
    border-top: 0;
}

/* Product detail */
.page-product main .grid {
    gap: 32px;
    align-items: start;
}
@media (min-width: 900px) {
    .page-product main .grid {
        grid-template-columns: 0.9fr 1.1fr;
    }
}
.page-product main .grid > :first-child {
    display: flex;
    justify-content: center;
}
.page-product .box.soft {
    background: rgba(108, 63, 46, 0.16);
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 6px 16px var(--shadow);
    backdrop-filter: saturate(105%) blur(1px);
}
.title-xl {
    font-size: 28px;
    font-weight: 700;
    margin: 0 0 8px;
}
.page-product .hero-img {
    width: auto;
    max-width: 100%;
    height: auto;
    max-height: 70vh;
    display: block;
    object-fit: contain;
    margin: 0 auto 16px;
    border: none;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}
.page-product .thumbs {
    justify-content: center;
    margin-top: 8px;
    gap: 10px;
    flex-wrap: wrap;
}
.page-product .thumbs img {
    width: 90px;
    height: 90px;
    object-fit: cover;
    border: 1px solid rgba(0, 0, 0, 0.18);
    border-radius: 10px;
    background: #00000018;
    transition: transform 0.15s;
}
.page-product .thumbs img:hover {
    transform: scale(1.05);
}
.heading-related {
    font-size: 18px;
    font-weight: 700;
    margin: 20px 0 10px;
}
.related-card.soft {
    background: rgba(108, 63, 46, 0.14);
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 6px 16px var(--shadow);
}
.page-product .detail-info {
    opacity: 0.95;
}

/* ==== FIX: keep white cards & dark text for ALUR on mobile ==== */
@media (max-width: 768px) {
  /* paksa latar section Alur tetap putih & di atas layer lain */
  .page-landing #alur{
    position: relative;
    z-index: 30;
    background: #fff !important;
    color: #1f2937 !important; /* slate-800 */
    isolation: isolate;
  }

  /* kartu di dalam Alur tetap putih (mengalahkan .bg-white transparan) */
  .page-landing #alur .bg-white,
  .page-landing #alur [class*="bg-white"]{
    background-color: #fff !important;
  }

  /* teks di Alur kembali gelap */
  .page-landing #alur .text-slate-700,
  .page-landing #alur .text-slate-800,
  .page-landing #alur p{
    color: #374151 !important; /* slate-700 */
  }

  /* judul Alur tetap cokelat (bukan putih) */
  .page-landing #alur h2,
  .page-landing #alur h3,
  .page-landing #alur .text-chocolate-700{
    color: #8B4513 !important; /* chocolate-600 */
  }

  /* border kartu tetap terlihat di atas latar putih */
  .page-landing #alur .border-slate-200\/70{
    border-color: rgba(148,163,184,.7) !important;
  }
}
