*{box-sizing:border-box} :root{--orange:#e87522;--orange-dark:#b94f0d;--ink:#252525;--muted:#6b7280;--line:#f0dfd1;--bg:#fff8f1;--white:#fff;--green:#16794b}body{margin:0;font-family:system-ui,-apple-system,Segoe UI,Roboto,sans-serif;background:var(--bg);color:var(--ink)}a{color:inherit;text-decoration:none}button,input,select,textarea{font:inherit}button,.btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;background:var(--orange);color:white;border:0;border-radius:10px;padding:11px 15px;font-weight:700;cursor:pointer}.btn.secondary,button.secondary{background:#fff;color:var(--ink);border:1px solid var(--line)}.btn.danger,button.danger{background:#b42318}.wrap{width:min(1180px,calc(100% - 32px));margin:auto}.topbar{background:#fff;border-bottom:1px solid var(--line)}.nav{min-height:72px;display:flex;align-items:center;gap:18px;justify-content:space-between}.brand{display:flex;align-items:center;gap:10px;font-size:1.35rem;font-weight:900;color:var(--orange-dark)}.brandmark{display:grid;place-items:center;width:42px;height:42px;background:#fff0df;border-radius:13px}.navlinks{display:flex;gap:14px;align-items:center;flex-wrap:wrap}.search{display:flex;gap:8px;flex:1;max-width:460px}.search input{width:100%}.hero{margin:26px 0;background:linear-gradient(120deg,#ffeddc,#fff 60%,#fff5e9);border:1px solid var(--line);border-radius:22px;padding:clamp(24px,5vw,54px);display:flex;gap:28px;align-items:center;justify-content:space-between}.hero h1{font-size:clamp(2rem,5vw,3.5rem);line-height:1.08;margin:0 0 12px;max-width:650px}.hero p{max-width:620px;color:var(--muted);line-height:1.65}.hero-emoji{font-size:clamp(4rem,12vw,8rem)}.section-head{display:flex;justify-content:space-between;align-items:end;gap:12px;margin:28px 0 14px}.section-head h2{margin:0}.muted{color:var(--muted)}.categories{display:flex;gap:10px;overflow:auto;padding:2px 0 8px}.chip{background:white;border:1px solid var(--line);padding:9px 13px;border-radius:999px;white-space:nowrap}.chip.active{background:#fff0df;border-color:#f3bd91;color:var(--orange-dark)}.grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px}.product{background:white;border:1px solid var(--line);border-radius:16px;overflow:hidden;display:flex;flex-direction:column;min-width:0}.product img,.product .placeholder{width:100%;aspect-ratio:1.15;object-fit:cover;background:#fff0df}.product .placeholder{display:grid;place-items:center;font-size:3rem}.product-body{padding:13px;display:flex;flex-direction:column;gap:7px;flex:1}.product h3{font-size:1rem;line-height:1.35;margin:0}.price{font-weight:850;color:var(--orange-dark);font-size:1.08rem}.old-price{text-decoration:line-through;color:#8b8b8b;font-size:.85rem;font-weight:400;margin-left:5px}.small{font-size:.88rem}.layout{display:grid;grid-template-columns:230px minmax(0,1fr);gap:24px;margin:24px auto}.sidebar,.panel,.form-card{background:white;border:1px solid var(--line);border-radius:16px;padding:18px}.side-links{display:grid;gap:7px}.side-links a{padding:10px 12px;border-radius:9px}.side-links a:hover,.side-links a.active{background:#fff0df;color:var(--orange-dark)}.page{padding:26px 0}.page-title{display:flex;align-items:center;justify-content:space-between;gap:14px;margin-bottom:20px}.page-title h1{margin:0;font-size:1.8rem}.form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.field{display:grid;gap:6px}.field.full{grid-column:1/-1}.field label{font-size:.9rem;font-weight:700}.field input,.field select,.field textarea,.search input{border:1px solid #d8d8d8;border-radius:9px;padding:11px 12px;background:#fff;width:100%;min-width:0}.field textarea{min-height:105px;resize:vertical}.help{font-size:.82rem;color:var(--muted)}.table-wrap{overflow:auto}table{border-collapse:collapse;width:100%;background:white}th,td{padding:12px 10px;text-align:left;border-bottom:1px solid #eee;vertical-align:middle}th{font-size:.83rem;color:#555;background:#fffaf6}td{font-size:.93rem}.thumb{width:52px;height:52px;object-fit:cover;border-radius:8px;background:#fff0df}.badge{display:inline-block;background:#f4f4f5;border-radius:999px;padding:4px 8px;font-size:.78rem}.badge.green{background:#e8f7ee;color:#146c43}.badge.red{background:#feeceb;color:#a61b1b}.alert{padding:12px 14px;border-radius:10px;background:#fff3cd;margin:14px 0}.alert.success{background:#e8f7ee;color:#146c43}.alert.error{background:#feeceb;color:#a61b1b}.footer{margin-top:45px;background:white;border-top:1px solid var(--line);padding:26px 0;color:var(--muted)}.empty{padding:40px 18px;text-align:center;background:white;border:1px dashed #e8cdb7;border-radius:15px}.detail{display:grid;grid-template-columns: minmax(0,1fr) minmax(0,1fr);gap:28px;background:#fff;border:1px solid var(--line);border-radius:20px;padding:22px}.detail img{width:100%;max-height:520px;object-fit:contain;background:#fff7ef;border-radius:14px}.stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}.stat{background:white;border:1px solid var(--line);border-radius:14px;padding:18px}.stat strong{display:block;font-size:1.6rem;margin-top:6px}.actions{display:flex;gap:8px;flex-wrap:wrap}.inline-form{display:inline}.admin-header{background:#2e251f;color:white}.admin-header .brand{color:white}.admin-header .brandmark{color:var(--orange-dark)}.admin-header a{color:white}.pagination{display:flex;gap:8px;justify-content:center;margin:24px 0}.notice{font-size:.9rem;color:var(--muted);line-height:1.6} @media(max-width:900px){.grid{grid-template-columns:repeat(3,minmax(0,1fr))}.layout{grid-template-columns:1fr}.sidebar{padding:12px}.side-links{display:flex;overflow:auto}.stats{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:640px){.nav{padding:12px 0;align-items:flex-start;flex-wrap:wrap}.navlinks{width:100%;justify-content:space-between}.search{order:3;max-width:none;flex-basis:100%}.hero{margin:18px 0}.hero-emoji{display:none}.grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.product-body{padding:10px}.form-grid,.detail{grid-template-columns:1fr}.page-title{align-items:flex-start;flex-direction:column}.stats{grid-template-columns:1fr 1fr}.wrap{width:min(100% - 22px,1180px)}th,td{padding:10px 8px}.hide-mobile{display:none}}


/* PALUGADA category cards — desktop and mobile */
.category-section{margin:26px 0 34px}
.category-section-head{margin:0 0 14px}
.category-all-link{display:inline-flex;align-items:center;gap:7px;color:var(--orange-dark);font-weight:750;font-size:.92rem}
.category-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:14px}
.category-card{position:relative;display:flex;flex-direction:column;align-items:flex-start;min-width:0;min-height:145px;padding:16px;background:linear-gradient(145deg,#fff 0%,#fffaf5 100%);border:1px solid #f0dfd1;border-radius:17px;box-shadow:0 4px 14px rgba(75,43,20,.035);transition:transform .18s ease,border-color .18s ease,box-shadow .18s ease}
.category-card:hover{transform:translateY(-3px);border-color:#efb17f;box-shadow:0 9px 22px rgba(115,63,23,.09)}
.category-icon{display:grid;place-items:center;width:53px;height:53px;margin-bottom:13px;border-radius:16px;background:#fff0df;font-size:1.8rem;line-height:1}
.category-card-name{font-size:.96rem;font-weight:800;line-height:1.35;overflow-wrap:anywhere}
.category-card-meta{display:flex;align-items:center;justify-content:space-between;gap:8px;width:100%;margin-top:auto;padding-top:10px;color:#8a7464;font-size:.78rem}
.category-card-meta span{font-size:1.1rem;color:var(--orange-dark)}
.category-card-more{border:1px dashed #e7a875;background:#fff7ed}
.category-more-icon{background:#ffe4c7;color:#b94f0d;font-weight:800}
.category-empty{padding:18px;background:#fff;border:1px dashed var(--line);border-radius:14px;color:var(--muted)}
.categories-page{padding-top:18px;padding-bottom:18px}
.breadcrumb{display:flex;align-items:center;gap:9px;margin:8px 0 24px;color:var(--muted);font-size:.9rem}
.breadcrumb a{color:var(--orange-dark);font-weight:700}
.categories-page-intro{padding:26px 28px;margin-bottom:22px;border:1px solid var(--line);border-radius:20px;background:linear-gradient(120deg,#ffeddc,#fff 72%)}
.categories-page-intro h1{font-size:clamp(1.8rem,4vw,2.6rem);line-height:1.12;margin:10px 0}
.categories-page-intro p{margin:0}
.category-grid-all{grid-template-columns:repeat(4,minmax(0,1fr))}
.categories-page-actions{margin-top:26px}
@media(max-width:1000px){.category-grid{grid-template-columns:repeat(4,minmax(0,1fr))}.category-grid-all{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:640px){
  .category-section{margin:22px 0 28px}
  .category-section-head{align-items:flex-start}
  .category-section-head h2{font-size:1.25rem}
  .desktop-category-all{display:none}
  .category-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
  .category-grid-home .category-card:nth-child(n+5){display:none}
  .category-grid-home .category-card-more{display:flex!important;min-height:125px}
  .category-card{min-height:132px;padding:12px;border-radius:14px}
  .category-icon{width:46px;height:46px;margin-bottom:10px;border-radius:14px;font-size:1.55rem}
  .category-card-name{font-size:.88rem}
  .category-card-meta{font-size:.75rem;padding-top:8px}
  .categories-page-intro{padding:21px 18px;border-radius:16px}
  .category-grid-all{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(prefers-reduced-motion:reduce){.category-card{transition:none}.category-card:hover{transform:none}}


/* Mobile homepage: five compact circular category icon buttons */
@media(max-width:640px){
  .category-grid-home{
    display:grid;
    grid-template-columns:repeat(5,minmax(0,1fr));
    gap:5px;
    align-items:start;
  }
  .category-grid-home .category-card,
  .category-grid-home .category-card:nth-child(n+5){
    display:flex!important;
    align-items:center;
    justify-content:flex-start;
    min-width:0;
    min-height:0;
    padding:2px 0 4px;
    border:0;
    border-radius:0;
    background:transparent;
    box-shadow:none;
    text-align:center;
    transform:none;
  }
  .category-grid-home .category-icon{
    display:grid;
    place-items:center;
    width:clamp(42px,12vw,56px);
    height:clamp(42px,12vw,56px);
    flex:0 0 auto;
    margin:0 auto 7px;
    border:1px solid #f3d4b9;
    border-radius:50%;
    background:linear-gradient(145deg,#fff5e9,#ffe5c8);
    box-shadow:0 2px 7px rgba(95,54,21,.07);
    font-size:1.45rem;
  }
  .category-grid-home .category-card-name{
    display:block;
    width:100%;
    font-size:.65rem;
    line-height:1.2;
    font-weight:700;
    overflow-wrap:anywhere;
    text-align:center;
  }
  .category-grid-home .category-card-meta{display:none}
  .category-grid-home .category-card-more .category-icon{
    color:#b94f0d;
    background:#fff0df;
    border:1px dashed #e7a875;
    font-size:1.35rem;
  }
  .category-grid-home .category-card-more .category-card-name{
    font-size:.65rem;
  }
}


/* Beranda HP: tampilkan 6 produk terlebih dahulu, lalu muat 6 berikutnya. */
.home-products-more-wrap { display: flex; justify-content: center; margin: 20px 0 8px; }
.home-products-more-wrap[hidden] { display: none !important; }
.home-product-item[hidden] { display: none !important; }
@media (min-width: 641px) {
  .home-products-more-wrap { display: none !important; }
  .home-product-item[hidden] { display: revert !important; }
}

/* Checkout and cart */
.add-cart-form { margin-top: 8px; }
.add-cart-form .btn { width: 100%; }
.table-wrap { width: 100%; overflow-x: auto; }
.table-wrap table { width: 100%; border-collapse: collapse; }
.table-wrap th, .table-wrap td { padding: 10px 8px; text-align: left; border-bottom: 1px solid var(--border, #e8e8e8); }
@media (max-width: 640px) {
  .table-wrap table { min-width: 620px; }
  .cart-checkout-actions { display: grid; gap: 10px; }
}


/* PALUGADA: lebarkan sedikit kolom formulir Identitas Website */
@media (min-width: 901px) {
  .settings-layout {
    grid-template-columns: 290px minmax(0, 1fr) !important;
    align-items: start;
  }
}
@media (max-width: 900px) {
  .settings-layout {
    grid-template-columns: minmax(0, 1fr) !important;
  }
}


/* PATCH: desktop beranda hanya menampilkan 4 kategori; kategori lain melalui tautan "Lihat semua kategori". */
@media (min-width: 1001px) {
  .category-grid-home > .category-card:nth-child(n+5) {
    display: none !important;
  }
}

/* PATCH: sejajarkan tombol tambah keranjang dengan kolom jumlah pada halaman detail produk. */
.detail form.form-grid {
  align-items: end;
}
.detail form.form-grid .field .btn {
  width: 100%;
  min-height: 40px;
}

/* PALUGADA mobile navigation: keep desktop header unchanged */
.mobile-bottom-nav { display:none; }
@media (max-width:640px) {
  body { padding-bottom: calc(76px + env(safe-area-inset-bottom, 0px)); }
  .topbar:not(.admin-header) .navlinks { display:none !important; }
  .topbar:not(.admin-header) .nav { align-items:center; }
  .topbar:not(.admin-header) .brand { flex:1 1 100%; }
  .topbar:not(.admin-header) .search { order:3; flex:1 1 100%; max-width:none; }
  .mobile-bottom-nav {
    display:grid;
    grid-template-columns:repeat(3,minmax(0,1fr));
    position:fixed;
    z-index:9999;
    left:0; right:0; bottom:0;
    padding:8px 10px calc(8px + env(safe-area-inset-bottom, 0px));
    background:#fff;
    border-top:1px solid var(--line);
    box-shadow:0 -4px 16px rgba(60,35,15,.08);
  }
  .mobile-bottom-nav a {
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    gap:3px;
    min-height:48px;
    color:var(--orange-dark);
    font-size:.78rem;
    font-weight:750;
  }
  .mobile-bottom-nav .mobile-nav-icon {
    display:block;
    font-size:1.25rem;
    line-height:1.2;
  }
}


/* PALUGADA mobile polish: compact, consistent product actions; desktop unchanged */
@media (max-width: 640px) {
  .home-product-item .btn,
  .product-card .btn,
  .product-item .btn,
  .add-cart-form .btn,
  .product-actions .btn {
    min-height: 44px;
    padding: 10px 12px;
    border-radius: 10px;
    font-size: 0.92rem;
    line-height: 1.25;
    font-weight: 650;
    white-space: normal;
    box-shadow: none;
  }
  .home-product-item .btn + .btn,
  .product-card .btn + .btn,
  .product-item .btn + .btn {
    margin-top: 8px;
  }
  .home-product-item .btn-primary,
  .product-card .btn-primary,
  .product-item .btn-primary,
  .add-cart-form .btn {
    padding-left: 10px;
    padding-right: 10px;
  }
  .home-product-item .btn:hover,
  .product-card .btn:hover,
  .product-item .btn:hover,
  .add-cart-form .btn:hover {
    transform: none;
  }
}


/* PALUGADA: admin navigation collapses to a burger menu on phones only. */
.admin-menu-toggle { display:none; }
@media (max-width:640px) {
  .admin-header .nav { flex-wrap:wrap; gap:10px; padding-top:10px; padding-bottom:10px; }
  .admin-header .brand { flex:1 1 auto; min-width:0; }
  .admin-menu-toggle {
    display:inline-flex;
    align-items:center;
    justify-content:center;
    min-height:42px;
    padding:9px 13px;
    border:1px solid #4a382c;
    border-radius:10px;
    background:#30251e;
    color:#fff;
    font-size:.92rem;
    font-weight:700;
    white-space:nowrap;
  }
  .admin-header .admin-mobile-menu { display:none !important; }
  .admin-header .admin-mobile-menu.is-open {
    display:flex !important;
    flex:1 0 100%;
    flex-direction:column;
    align-items:stretch;
    gap:0;
    width:100%;
    padding:6px;
    border:1px solid #ead7c7;
    border-radius:12px;
    background:#fff;
    box-shadow:0 8px 22px rgba(40,25,12,.10);
  }
  .admin-header .admin-mobile-menu a {
    display:block;
    padding:12px 10px;
    border-bottom:1px solid #f1e6dc;
    color:var(--ink);
    font-size:.95rem;
    line-height:1.3;
  }
  .admin-header .admin-mobile-menu a:last-child { border-bottom:0; }
}

/* PALUGADA preset theme selector — compact and readable inside the admin settings column */
.theme-palette-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:8px;
  margin-top:10px;
  width:100%;
}
.theme-palette-option{
  display:grid;
  grid-template-columns:16px 28px minmax(0,1fr);
  align-items:center;
  gap:7px;
  min-width:0;
  min-height:54px;
  padding:8px;
  border:1px solid var(--line);
  border-radius:12px;
  background:#fff;
  cursor:pointer;
  overflow:hidden;
}
.field .theme-palette-option input{
  display:block;
  width:15px;
  min-width:15px;
  height:15px;
  margin:0;
  padding:0;
  border:0;
  background:transparent;
  accent-color:var(--orange);
}
.theme-palette-preview{
  display:block;
  width:28px;
  height:28px;
  min-width:28px;
  border-radius:8px;
  background:linear-gradient(135deg,var(--palette-primary) 0 50%,var(--palette-bg) 50%);
  border:1px solid rgba(0,0,0,.12);
}
.theme-palette-name{
  display:block;
  min-width:0;
  overflow-wrap:anywhere;
  font-size:.78rem;
  font-weight:750;
  line-height:1.2;
}
.theme-palette-option:has(input:checked){
  border-color:var(--orange);
  box-shadow:0 0 0 2px color-mix(in srgb,var(--orange) 22%,transparent);
  background:#fffaf6;
}
@media(max-width:760px){
  .theme-palette-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
  .theme-palette-option{padding:7px;grid-template-columns:15px 24px minmax(0,1fr);gap:5px;min-height:50px}
  .theme-palette-preview{width:24px;height:24px;min-width:24px}
  .theme-palette-name{font-size:.76rem}
}
@media(min-width:1001px){.category-grid-home .category-card:nth-child(n+5):not(.category-card-more){display:none!important}.category-grid-home{grid-template-columns:repeat(4,minmax(0,1fr))}}
body.theme-dark-premium{color:var(--ink)}
body.theme-dark-premium .topbar,body.theme-dark-premium .form-card,body.theme-dark-premium .product-card,body.theme-dark-premium .category-card,body.theme-dark-premium .detail-card,body.theme-dark-premium .cart-card,body.theme-dark-premium .order-card,body.theme-dark-premium .settings-card{background:#252832;color:var(--ink);border-color:var(--line)}
body.theme-dark-premium input,body.theme-dark-premium textarea,body.theme-dark-premium select{background:#202229;color:var(--ink);border-color:var(--line)}
body.theme-dark-premium .hero{background:linear-gradient(120deg,#252832,#1b1d24);border-color:var(--line)}
body.theme-dark-premium .brand,body.theme-dark-premium .navlinks a{color:var(--ink)}


/* PALUGADA checkout: prioritize the customer input form over the shopping summary */
.layout:has(> section.panel form[action="/checkout-submit.php"]) {
  grid-template-columns: minmax(0, 1.35fr) minmax(300px, .9fr);
  align-items: start;
  gap: 20px;
}
.layout:has(> section.panel form[action="/checkout-submit.php"]) > section.panel {
  min-width: 0;
}
.layout:has(> section.panel form[action="/checkout-submit.php"]) > aside.panel {
  min-width: 0;
  padding: 20px;
}
.layout:has(> section.panel form[action="/checkout-submit.php"]) .form-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 16px;
}
.layout:has(> section.panel form[action="/checkout-submit.php"]) .field label {
  line-height: 1.35;
  overflow-wrap: anywhere;
}
.layout:has(> section.panel form[action="/checkout-submit.php"]) .field input,
.layout:has(> section.panel form[action="/checkout-submit.php"]) .field select,
.layout:has(> section.panel form[action="/checkout-submit.php"]) .field textarea {
  box-sizing: border-box;
  min-width: 0;
}
@media (max-width: 900px) {
  .layout:has(> section.panel form[action="/checkout-submit.php"]) {
    grid-template-columns: minmax(0, 1fr);
  }
}
@media (max-width: 640px) {
  .layout:has(> section.panel form[action="/checkout-submit.php"]) .form-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Account entry added without removing existing mobile navigation items */
@media (max-width:640px){.mobile-bottom-nav{grid-template-columns:repeat(4,minmax(0,1fr));}}

/* Minimal regression fix: restore the approved compact cart label on the mobile homepage only. */
@media (max-width: 640px) {
  .home-product-item .add-cart-form > button[type="submit"] {
    font-size: 0;
    white-space: nowrap;
    min-height: 44px;
  }
  .home-product-item .add-cart-form > button[type="submit"]::after {
    content: "+ Keranjang";
    font-size: 14px;
    line-height: 1.2;
  }
}


/* PALUGADA: overlay diskon dan favorit hanya pada gambar card produk beranda. */
.product-image-wrap{position:relative;width:100%;background:#fff0df;overflow:hidden;aspect-ratio:1.15}
.product-image-wrap .product-image-link{display:block;width:100%;height:100%}
.product-image-wrap .product-image-link img,
.product-image-wrap .product-image-placeholder{display:block;width:100%;height:100%;aspect-ratio:auto;object-fit:cover;background:#fff0df}
.product-discount-badge{position:absolute;z-index:2;top:10px;left:10px;background:#e84b2c;color:#fff;padding:5px 8px;border-radius:7px;font-size:.78rem;font-weight:800;line-height:1}
.product-favorite-btn{position:absolute;z-index:3;top:8px;right:8px;width:34px;height:34px;display:grid;place-items:center;border:1px solid #eee;background:rgba(255,255,255,.96);border-radius:50%;color:#df3b3b;font-size:24px;line-height:1;cursor:pointer;padding:0}
.product-favorite-btn[aria-pressed="true"]{background:#fff0f0;border-color:#f2a0a0}
.product-favorite-btn[aria-pressed="true"] span{font-weight:800}

/* ISTANA BATIK SULTAN */
:root{--orange:#b18a4b;--orange-dark:#80602e;--bg:#faf7f0;--ink:#28231d;--line:#e7dcc9}
body{font-family:Georgia,"Times New Roman",serif;background:#faf7f0;color:#28231d}
.topbar{background:#211c18;color:#f8f0df;border-bottom:1px solid #b18a4b}.topbar a{color:#f8f0df}.brandmark{color:#d8b56f}.hero{background:linear-gradient(110deg,#211c18,#493723);color:#fff4df;border:1px solid #b18a4b}.hero .badge{background:#b18a4b;color:#211c18}.btn,button{background:#9b743c;border-color:#9b743c;color:#fff}.btn:hover,button:hover{background:#76572e}.category-card,.product,.panel,.form-card{border-color:#e1d3bd;background:#fffdf9}.product{border-radius:12px}.product h3,.section-head h2{font-family:Georgia,serif}.price{color:#916a32}.mobile-bottom-nav{background:#211c18;border-color:#b18a4b}.mobile-bottom-nav a{color:#f8f0df}


/* Istana Batik Sultan: readable admin workspace */
.admin-header { background:#211c18; color:#f8f0df; }
body:has(.admin-header) { color:#28231d; background:#faf7f0; }
body:has(.admin-header) main, body:has(.admin-header) main h1, body:has(.admin-header) main h2, body:has(.admin-header) main h3, body:has(.admin-header) main p, body:has(.admin-header) main label, body:has(.admin-header) main a:not(.btn) { color:#28231d; }
body:has(.admin-header) main .muted, body:has(.admin-header) main .help, body:has(.admin-header) main .notice { color:#62584b; }
body:has(.admin-header) .sidebar, body:has(.admin-header) .panel, body:has(.admin-header) .form-card, body:has(.admin-header) .stat { background:#fffdf9; color:#28231d; border-color:#dfd1bb; }
body:has(.admin-header) .side-links a.active, body:has(.admin-header) .side-links a:hover { color:#704f22; background:#f7ead6; }
body:has(.admin-header) .admin-shortcuts { display:flex; flex-wrap:wrap; gap:10px; margin-top:18px; }
body:has(.admin-header) .admin-shortcuts .btn.secondary { color:#4b3a24; background:#fff; border-color:#cbb894; }
body:has(.admin-header) table { color:#28231d; }


/* Batik Sultan admin: high-contrast controls and text */
body:has(.admin-header) { color:#28231d !important; }
body:has(.admin-header) main,
body:has(.admin-header) main *:not(.btn):not(button):not(input[type="submit"]) {
  color:#28231d;
}
body:has(.admin-header) main .muted,
body:has(.admin-header) main .help,
body:has(.admin-header) main .notice { color:#62584b !important; }
body:has(.admin-header) .side-links a { color:#3d3327 !important; }
body:has(.admin-header) .side-links a.active,
body:has(.admin-header) .side-links a:hover { color:#704f22 !important; background:#f7ead6 !important; }
body:has(.admin-header) a.btn.secondary,
body:has(.admin-header) button.secondary,
body:has(.admin-header) .btn.secondary:visited {
  color:#4b3a24 !important;
  background:#fffdf9 !important;
  border:1px solid #bda77f !important;
  opacity:1 !important;
}
body:has(.admin-header) .alert { color:#3d3327 !important; }
body:has(.admin-header) .stat,
body:has(.admin-header) .panel,
body:has(.admin-header) .sidebar,
body:has(.admin-header) .form-card { color:#28231d !important; }
body:has(.admin-header) input,
body:has(.admin-header) select,
body:has(.admin-header) textarea { color:#28231d !important; background:#fff !important; }


/* ISTANA BATIK SULTAN — storefront desktop redesign; admin and mobile workflows remain intact. */
body.storefront{--ink:#2c1b0d!important;--muted:#74685c!important;--bg:#fbf7ef!important;--line:#eadcc9!important;--orange:#a66e2c!important;--orange-dark:#874f18!important;background:#fbf7ef!important;color:#2c1b0d!important}
body.storefront .topbar.store-header{background:#321b0b!important;color:#fff;border:0;box-shadow:0 3px 14px rgba(30,15,5,.18)}
.store-header .nav{width:min(1600px,calc(100% - 52px));min-height:72px;gap:22px}
.store-header .brand{color:#f8e9ca!important;gap:10px;font-family:Georgia,serif;font-size:1.05rem;letter-spacing:.13em;line-height:1.05;max-width:240px}
.store-header .brand>span:last-child{max-width:150px}
.brand-crown{font-size:2.35rem;line-height:1;color:#d5a94e;text-shadow:0 1px 8px #9d6c24}
.store-main-nav{display:flex;align-items:center;justify-content:center;gap:clamp(12px,1.7vw,28px);flex:1;white-space:nowrap}
.store-main-nav a{color:#f8eddb;font-size:.88rem;font-weight:650;padding:25px 0 22px;border-bottom:3px solid transparent}
.store-main-nav a:hover,.store-main-nav a.is-current{color:#f3c66f;border-color:#c18b37}
.store-search{flex:0 1 290px;max-width:290px;gap:0;border:1px solid #9a774b;border-radius:8px;overflow:hidden;background:#fff}
.store-search input{border:0!important;border-radius:0!important;min-width:0;padding:11px 13px!important;font-size:.86rem}
.store-search button{border-radius:0;padding:0 17px;background:#a66e2c;color:#fff;font-size:1.5rem}
.store-header-actions{display:flex;align-items:center;gap:12px}
.store-icon-link{display:grid;place-items:center;width:38px;height:42px;color:#fff!important;font-size:1.8rem;position:relative}
.store-icon-link:hover{color:#f2c66f!important}
.storefront-main{width:min(1600px,calc(100% - 52px));margin:0 auto;padding-bottom:28px}
.batik-hero{display:grid;grid-template-columns:minmax(0,1.05fr) minmax(330px,.95fr);min-height:235px;margin:0 -26px 12px;background:#f6eddd;overflow:hidden;position:relative}
.batik-hero-copy{padding:27px 0 22px 5.8%;position:relative;z-index:1;display:flex;flex-direction:column;justify-content:center;background:linear-gradient(90deg,#fbf5e9 0%,#fbf5e9 78%,rgba(251,245,233,.78) 100%)}
.hero-kicker{font-size:.68rem;font-weight:800;letter-spacing:.18em;color:#a36b29;margin-bottom:5px}
.batik-hero h1{font-family:Georgia,'Times New Roman',serif;font-size:clamp(2.2rem,4vw,3.55rem);line-height:1.02;letter-spacing:-.035em;margin:0 0 7px;color:#241408!important;max-width:760px}
.batik-hero-copy>p{font-size:clamp(1rem,1.5vw,1.3rem);color:#9b6427!important;margin:0 0 18px;line-height:1.35}
.hero-benefits{display:flex;gap:clamp(12px,2vw,30px);flex-wrap:wrap}
.hero-benefits>div{display:flex;align-items:center;gap:9px;min-width:0}
.benefit-icon{display:grid;place-items:center;width:34px;height:34px;background:#a66e2c;color:#fff;border-radius:7px;font-size:1.25rem;font-style:normal}
.hero-benefits span{display:flex;flex-direction:column;gap:2px}
.hero-benefits strong{font-size:.78rem;color:#88531c}
.hero-benefits small{font-size:.69rem;color:#877969}
.batik-hero-photo{min-height:235px;background-image:linear-gradient(90deg,rgba(246,237,221,.1),transparent 18%),url('/uploads/products/ibs-hero.webp');background-size:cover;background-position:center}
.batik-category-strip{display:grid;grid-template-columns:repeat(8,minmax(0,1fr));gap:10px;padding:0 0 4px;margin:10px 0 15px}
.batik-category-pill{min-height:68px;background:#fff;border:1px solid #f0e7db;border-radius:9px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;color:#684018;padding:6px 5px;box-shadow:0 2px 8px rgba(71,43,17,.035);text-align:center}
.batik-category-pill span{font-size:1.55rem;line-height:1.1;color:#82501e}
.batik-category-pill strong{font-size:.74rem;line-height:1.2;font-weight:650}
.batik-category-pill:hover,.batik-category-pill.active{background:#a66e2c;color:#fff;border-color:#a66e2c}
.batik-category-pill:hover span,.batik-category-pill.active span{color:#fff}
.batik-catalog-head{display:flex;align-items:end;justify-content:space-between;gap:15px;margin:8px 0 12px}
.batik-catalog-head h2{font-family:Georgia,'Times New Roman',serif;font-size:1.55rem;margin:0;color:#21150d!important}
.batik-catalog-head p{margin:3px 0 0;color:#6c6259!important;font-size:.78rem}
.batik-sort select{min-width:175px;padding:9px 12px;border:1px solid #d9d4cd;border-radius:7px;background:#fff;color:#30261e;font-size:.78rem}
.batik-product-grid{display:grid;grid-template-columns:repeat(10,minmax(0,1fr));gap:12px;align-items:stretch}
.batik-product-card{min-width:0;background:#fff;border:1px solid #e8e0d5;border-radius:9px;overflow:hidden;display:flex;flex-direction:column;box-shadow:0 2px 6px rgba(42,26,11,.06)}
.batik-product-photo{height:auto;aspect-ratio:1.08/1;position:relative;background:#f4e8d5;overflow:hidden}
.batik-product-photo>a{display:block;width:100%;height:100%}
.batik-product-photo img{display:block;width:100%;height:100%;object-fit:cover;transition:transform .25s ease}
.batik-product-card:hover .batik-product-photo img{transform:scale(1.035)}
.product-favorite-btn{position:absolute;z-index:2;right:7px;top:7px;width:27px;height:27px;padding:0;border:0;border-radius:50%;background:#fff;color:#e33b39;font-size:1.15rem;line-height:1;box-shadow:0 1px 5px #0002}
.product-favorite-btn[aria-pressed=true]{color:#d52e2e}
.batik-photo-fallback{display:grid;place-items:center;width:100%;height:100%;color:#79572e;font-size:.8rem}
.batik-product-info{padding:7px 7px 8px;display:flex;flex-direction:column;gap:3px;flex:1}
.batik-product-info h3{font-size:.72rem;line-height:1.22;margin:0;color:#29221b!important;font-weight:750;min-height:2.35em}
.batik-product-info h3 a{color:inherit!important}
.batik-origin{font-size:.68rem;line-height:1.2;color:#777!important;margin:0;min-height:1.1em}
.batik-price{font-size:.77rem;font-weight:850;color:#a65e0d;line-height:1.25;white-space:nowrap}
.batik-price span{font-size:.66rem;font-weight:650;color:#66584a}
.batik-stock{font-size:.66rem;color:#68615a!important;margin:0 0 3px}
.batik-detail-btn,.batik-cart-form button{width:100%;min-height:28px;border-radius:5px;display:flex;align-items:center;justify-content:center;font-size:.67rem;font-weight:750;padding:5px 4px}
.batik-detail-btn{border:1px solid #b57a35;color:#8b541d!important;background:#fff;margin-top:auto}
.batik-detail-btn:hover{background:#fff5e7}
.batik-cart-form{margin-top:3px}
.batik-cart-form button{background:#a66e2c;color:#fff;border:1px solid #a66e2c}
.batik-cart-form button:hover{background:#86531f}
.batik-service-note{display:flex;gap:10px;align-items:center;margin:24px 0 0;padding:15px 18px;border-radius:9px;background:#f3eadb;color:#6b4a26;font-size:.82rem}
.batik-service-note strong{white-space:nowrap;color:#593713}
.storefront .footer{background:#321b0b;color:#ead9bd;border:0;margin-top:0}
.storefront .footer strong{color:#f6e5c7}
.storefront .footer p,.storefront .footer span{color:#d3c0a3}
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
@media(max-width:1450px){.batik-product-grid{grid-template-columns:repeat(8,minmax(0,1fr))}.store-header .nav{gap:14px}.store-main-nav{gap:14px}}
@media(max-width:1150px){.store-header .nav{flex-wrap:wrap;padding:10px 0}.store-main-nav{order:4;flex-basis:100%;justify-content:flex-start}.store-main-nav a{padding:8px 0}.store-search{margin-left:auto}.batik-product-grid{grid-template-columns:repeat(6,minmax(0,1fr))}.batik-category-strip{grid-template-columns:repeat(4,minmax(0,1fr))}}
@media(max-width:800px){.storefront-main{width:min(100% - 28px,720px)}.batik-hero{grid-template-columns:1fr;margin:0 -14px 12px}.batik-hero-copy{padding:26px 22px 20px}.batik-hero-photo{min-height:150px;background-position:center 46%}.hero-benefits{gap:12px 18px}.batik-product-grid{grid-template-columns:repeat(4,minmax(0,1fr))}}
@media(max-width:640px){.store-header .nav{width:calc(100% - 22px);gap:9px}.store-header .brand{font-size:.9rem;max-width:none;flex:1}.brand-crown{font-size:1.8rem}.store-main-nav{display:none}.store-search{order:5;flex:1 0 100%;max-width:none;margin:0}.store-header-actions{gap:4px}.store-icon-link{width:30px;font-size:1.45rem}.storefront-main{width:calc(100% - 22px)}.batik-hero{margin:0 -11px 10px}.batik-hero-copy{padding:23px 17px 17px}.batik-hero h1{font-size:2rem}.batik-hero-copy>p{font-size:.95rem}.hero-benefits{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.hero-benefits strong{font-size:.7rem}.hero-benefits small{font-size:.62rem}.benefit-icon{width:29px;height:29px;font-size:1rem}.batik-hero-photo{min-height:115px}.batik-category-strip{display:flex;overflow-x:auto;gap:8px;padding:2px 0 9px;scrollbar-width:thin}.batik-category-pill{flex:0 0 105px;min-height:64px}.batik-category-pill span{font-size:1.35rem}.batik-category-pill strong{font-size:.67rem}.batik-catalog-head{align-items:center}.batik-catalog-head h2{font-size:1.25rem}.batik-sort select{min-width:0;max-width:135px;font-size:.68rem;padding:8px 5px}.batik-product-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}.batik-product-photo{aspect-ratio:1/1}.batik-product-info{padding:8px;gap:4px}.batik-product-info h3{font-size:.78rem;min-height:0}.batik-origin{font-size:.69rem}.batik-price{font-size:.8rem}.batik-stock{font-size:.68rem}.batik-detail-btn,.batik-cart-form button{min-height:36px;font-size:.72rem}.batik-service-note{align-items:flex-start;flex-direction:column;font-size:.76rem}.batik-service-note strong{white-space:normal}.storefront .footer{padding-bottom:95px}}
@media(prefers-reduced-motion:reduce){.batik-product-photo img{transition:none}}

/* Istana Batik Sultan: center the three mobile bottom navigation items as one group. */
@media (max-width:640px) {
  .mobile-bottom-nav {
    width:100%;
    max-width:520px;
    left:50%;
    right:auto;
    transform:translateX(-50%);
    margin:0;
    box-sizing:border-box;
    grid-template-columns:repeat(3,minmax(0,1fr));
    justify-items:stretch;
  }
  .mobile-bottom-nav a {
    width:100%;
    min-width:0;
    text-align:center;
  }
}
