/*
 * shop.css — the SnazzyPro 3D shop: catalogue, product designer, cart,
 * checkout and order pages. Uses the division tokens from site.css (.div-3d).
 */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.small { font-size: .88rem; }

/* Catalogue */
.shop-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
@media (max-width: 960px) { .shop-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .shop-grid { grid-template-columns: 1fr; } }
.shop-card { display: flex; flex-direction: column; border-radius: var(--radius); overflow: hidden; background: var(--surface); border: 1px solid var(--line); color: var(--ink); transition: transform .2s, box-shadow .2s; }
.shop-card:hover { text-decoration: none; transform: translateY(-4px); box-shadow: var(--shadow); }
.shop-card-img { aspect-ratio: 1; overflow: hidden; background: var(--surface-2); }
.shop-card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s; }
.shop-card:hover .shop-card-img img { transform: scale(1.04); }
.shop-card-body { display: grid; gap: 8px; padding: 20px; flex: 1; align-content: start; }
.shop-card-body strong { font-size: 1.2rem; }
.shop-card-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; }
.shop-price { font-weight: 800; font-size: 1.15rem; }
.shop-price small { font-weight: 500; color: var(--muted); font-size: .8rem; }
.shop-grid-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 760px) { .shop-grid-2 { grid-template-columns: 1fr; } }
.shop-card-row { flex-direction: row; }
.shop-card-row .shop-card-img { width: 42%; flex: none; aspect-ratio: auto; }
.shop-card-row .shop-card-body { align-content: center; }
@media (max-width: 480px) { .shop-card-row { flex-direction: column; } .shop-card-row .shop-card-img { width: 100%; aspect-ratio: 4 / 3; } }
.shop-card-custom { border-style: dashed; justify-content: center; background: var(--bg-alt); }
.shop-card-custom .shop-card-body { padding: 32px 26px; }

/* Designer */
.designer-section .link-back { margin-bottom: 16px; }
.designer { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(320px, .9fr); gap: 28px; align-items: start; }
@media (max-width: 900px) { .designer { grid-template-columns: 1fr; } }
.designer-stage { position: sticky; top: 130px; }
@media (max-width: 900px) { .designer-stage { position: static; } }
.designer-canvas { position: relative; width: 100%; aspect-ratio: 4 / 3; border-radius: var(--radius); overflow: hidden; cursor: grab; touch-action: none;
    background: radial-gradient(120% 90% at 50% 0%, #ffffff 0%, #f1eefc 60%, #e6e1f8 100%); border: 1px solid var(--line); }
.designer-canvas:active { cursor: grabbing; }
.designer-canvas canvas { display: block; width: 100% !important; height: 100% !important; }
.designer-stage-bar { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 10px; font-size: .88rem; }
.designer-note { font-size: .82rem; margin-top: 6px; }
.designer-no3d .designer-canvas::after { content: "Preview 3D tidak didukung di browser ini."; position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); }

.designer-panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; display: grid; gap: 4px; }
.designer-panel h1 { font-size: 1.7rem; margin: 0; }
.opt { border: 0; margin: 0; padding: 16px 0; border-top: 1px solid var(--line); display: grid; gap: 10px; min-width: 0; }
.opt:first-of-type { margin-top: 10px; }
.opt-head { font-weight: 700; font-size: .95rem; display: flex; gap: 8px; align-items: baseline; padding: 0; }
.opt-head em { font-style: normal; font-weight: 500; color: var(--muted); font-size: .88rem; }
.opt-head strong { color: var(--accent-text); }
.opt input[type="range"] { padding: 0; accent-color: var(--accent); border: 0; }
.opt-tools { display: flex; flex-wrap: wrap; gap: 6px; }

.swatches { display: flex; flex-wrap: wrap; gap: 8px; }
.sw { position: relative; cursor: pointer; }
.sw input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.sw-dot { display: block; width: 30px; height: 30px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .14); transition: transform .12s; }
.sw input:checked + .sw-dot { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--accent); transform: scale(1.05); }
.sw input:focus-visible + .sw-dot { outline: 3px solid color-mix(in srgb, var(--accent) 50%, transparent); outline-offset: 3px; }
.swatches-sm { gap: 5px; }
.swatches-sm .sw-dot { width: 20px; height: 20px; }
.swatches-sm .sw input:checked + .sw-dot { box-shadow: 0 0 0 2px var(--surface), 0 0 0 3.5px var(--accent); }

.choice-list { display: grid; gap: 8px; }
.choice { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border: 1px solid var(--line-2); border-radius: 12px; cursor: pointer; }
.choice:has(input:checked) { border-color: var(--accent); background: var(--tint-1); }
.choice input { width: auto; accent-color: var(--accent); margin: 0; }
.choice-block { align-items: flex-start; }
.choice-block span { display: grid; gap: 2px; }
.cdot { display: inline-block; width: 14px; height: 14px; border-radius: 50%; flex: none; vertical-align: -2px; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .15); }

.designer-buy { display: grid; grid-template-columns: auto 1fr; gap: 12px 16px; align-items: center; padding-top: 18px; border-top: 1px solid var(--line); }
.designer-buy .btn { grid-column: 1 / -1; justify-content: center; }
.qty { display: grid; gap: 4px; font-size: .85rem; font-weight: 600; color: var(--ink-2); }
.qty input { width: 84px; }
.designer-price { text-align: right; display: grid; }
.designer-price strong { font-size: 1.7rem; letter-spacing: -.02em; }

/* Cart, checkout, order */
.cart-layout, .order-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; align-items: start; }
.checkout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; align-items: start; }
@media (max-width: 900px) { .cart-layout, .order-layout, .checkout { grid-template-columns: 1fr; } }
.checkout-main { display: grid; gap: 20px; }
.cart-lines { display: grid; gap: 14px; }
.cart-line { display: grid; grid-template-columns: 150px minmax(0, 1fr) auto; gap: 18px; align-items: center; padding: 14px; }
@media (max-width: 600px) { .cart-line { grid-template-columns: 96px 1fr; } .cart-price { grid-column: 1 / -1; text-align: left !important; } }
.cart-thumb .designer-canvas { aspect-ratio: 1; border-radius: 12px; }
.cart-info h2, .cart-info h3 { font-size: 1.05rem; margin: 0 0 4px; }
.cart-info p { margin: 0 0 10px; }
.cart-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: end; }
.cart-actions .qty { grid-template-columns: auto 72px; align-items: center; gap: 8px; }
.cart-actions .qty input { width: 72px; padding: 6px 8px; }
.cart-price { text-align: right; display: grid; }
.cart-summary { position: sticky; top: 130px; display: grid; gap: 12px; }
@media (max-width: 900px) { .cart-summary { position: static; } }
.cart-summary h2 { font-size: 1.15rem; margin: 0; }
.row-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.row-list li { display: flex; justify-content: space-between; gap: 12px; }
.row-list li:last-child { border-top: 1px solid var(--line); padding-top: 10px; }
.empty-state { text-align: center; padding: 48px 24px; }
.inline-form { display: inline; margin: 0; }
.ship-fields { display: grid; gap: 16px; }
.ship-fields[hidden] { display: none; }
.checkout .card h2 { font-size: 1.15rem; margin-bottom: 4px; }

.pay-badge { display: inline-block; padding: 2px 12px; border-radius: 999px; font-size: .88rem; font-weight: 700; background: var(--tint-2); color: var(--ink); }
.pay-paid { background: #dcfce7; color: #166534; }
.pay-pending { background: #fef9c3; color: #854d0e; }
.pay-expired, .pay-cancelled, .pay-failed { background: #f1f1f4; color: #6b6b7b; }
.pay-box { border-color: color-mix(in srgb, var(--accent) 45%, transparent); display: grid; gap: 10px; margin-bottom: 20px; }
.pay-box h2 { margin: 0; font-size: 1.2rem; }
code.va { font-size: 1.2rem; font-weight: 800; padding: 4px 10px; border-radius: 8px; background: var(--tint-2); }
.order-h { font-size: 1.15rem; margin: 26px 0 12px; }
.order-layout .cart-line + .cart-line { margin-top: 12px; }
.order-meta { display: grid; gap: 4px; margin: 4px 0 0; }
.order-meta dt { color: var(--muted); font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; margin-top: 8px; }
.order-meta dd { margin: 0; }

/* Admin order detail (superuser/manage_orders.php) */
.admin-designs { display: grid; gap: 18px; }
.admin-design { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 18px; align-items: start; }
@media (max-width: 760px) { .admin-design { grid-template-columns: 1fr; } }
.admin-thumb .designer-canvas { aspect-ratio: 4 / 3; border-radius: 12px; }

.timeline { list-style: none; margin: 14px 0; padding: 0; display: grid; gap: 0; }
.timeline li { position: relative; padding: 0 0 18px 30px; color: var(--muted); }
.timeline li span { position: absolute; left: 0; top: 3px; width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--line-2); background: var(--surface); }
.timeline li::after { content: ""; position: absolute; left: 7px; top: 21px; bottom: 0; width: 2px; background: var(--line); }
.timeline li:last-child::after { display: none; }
.timeline li.done { color: var(--ink-2); }
.timeline li.done span { background: var(--accent); border-color: var(--accent); }
.timeline li.now { color: var(--ink); font-weight: 700; }
.timeline li.now span { border-color: var(--accent); box-shadow: 0 0 0 4px var(--tint-2); }

/* Ready-made catalogue (3d/shop.php #katalog, 3d/product.php) */
.shop-grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 1100px) { .shop-grid-4 { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 760px) { .shop-grid-4 { grid-template-columns: repeat(2, 1fr); gap: 14px; } }
.catalog-grid .shop-card-body { padding: 14px 16px 16px; gap: 6px; }
.catalog-grid .cat-name { font-size: 1rem; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.catalog-grid .shop-card-foot { flex-wrap: wrap; gap: 4px 10px; margin-top: auto; }
.catalog-grid .shop-price { font-size: 1.02rem; }
.catalog-grid .shop-price s { font-weight: 500; font-size: .8rem; }
.catalog-layout { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: 36px; align-items: start; margin-top: 14px; }
@media (max-width: 900px) { .catalog-layout { grid-template-columns: 1fr; } }
.catalog-gallery { position: sticky; top: 130px; display: grid; gap: 10px; }
@media (max-width: 900px) { .catalog-gallery { position: static; } }
.catalog-main { display: block; border-radius: var(--radius); overflow: hidden; background: var(--surface-2); aspect-ratio: 1; }
.catalog-main img { width: 100%; height: 100%; object-fit: cover; }
.catalog-thumbs { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.catalog-thumbs a { display: block; aspect-ratio: 1; border-radius: 10px; overflow: hidden; background: var(--surface-2); }
.catalog-thumbs img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.catalog-thumbs a:hover img { transform: scale(1.06); }
.catalog-panel { display: grid; gap: 12px; align-content: start; }
.catalog-panel h1 { font-size: clamp(1.6rem, 3vw, 2.3rem); margin: 0; }
.catalog-price { font-size: 1.6rem; margin: 0; display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.catalog-price s { font-size: 1rem; }
.catalog-buy { display: grid; gap: 12px; }
.catalog-buy .designer-buy { border-top: 0; padding-top: 0; }
.btn-shopee { justify-content: center; border-color: #ee4d2d; color: #d73211; }
.btn-shopee:hover { background: #fff3f0; }
.catalog-desc { border-top: 1px solid var(--line); padding-top: 16px; }
.catalog-desc p { font-size: .97rem; }
.catalog-thumb { aspect-ratio: 1; border-radius: 12px; overflow: hidden; background: var(--surface-2); display: grid; place-items: center; color: var(--muted); }
.catalog-thumb img { width: 100%; height: 100%; object-fit: cover; }

/* Promo code (cart, checkout) */
.voucher-form { display: flex; gap: 8px; }
.voucher-form input { padding: 8px 12px; text-transform: uppercase; }
.voucher-line strong { color: var(--success); }
.voucher-line code { font-size: .85rem; padding: 1px 6px; border-radius: 6px; background: var(--tint-2); }
.voucher-ok { color: var(--success); display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 0; }
.voucher-err { color: var(--danger); margin: 0; }
.link-btn { background: none; border: 0; padding: 0; color: var(--muted); text-decoration: underline; cursor: pointer; font: inherit; }

/* Catalogue gallery with videos, and Shopee-style variant buttons (3d/product.php, site.js) */
.catalog-main video { width: 100%; height: 100%; object-fit: contain; background: #000; }
.catalog-main > a { display: block; width: 100%; height: 100%; }
.catalog-thumbs { grid-template-columns: repeat(6, 1fr); }
.catalog-thumb-btn { position: relative; display: block; aspect-ratio: 1; padding: 0; border: 2px solid transparent; border-radius: 10px; overflow: hidden;
    background: #111; cursor: pointer; }
.catalog-thumb-btn img { width: 100%; height: 100%; object-fit: cover; }
.catalog-thumb-btn.active { border-color: var(--accent); }
.catalog-thumb-btn:hover img { opacity: .85; }
.thumb-play { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; }
.thumb-play .icon { width: 26px; height: 26px; filter: drop-shadow(0 1px 3px rgba(0, 0, 0, .6)); }
.variant-picker { display: grid; gap: 14px; }
.variant-row { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 12px; align-items: start; }
@media (max-width: 520px) { .variant-row { grid-template-columns: 1fr; gap: 6px; } }
.variant-name { color: var(--muted); font-size: .92rem; padding-top: 9px; }
.variant-opts { display: flex; flex-wrap: wrap; gap: 8px; }
.variant-btn { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 6px 14px; border: 1px solid var(--line-2); border-radius: 8px;
    background: var(--surface); color: var(--ink); font: inherit; font-size: .93rem; cursor: pointer; transition: border-color .12s, color .12s; }
.variant-btn img { width: 28px; height: 28px; border-radius: 4px; object-fit: cover; margin-left: -6px; }
.variant-btn:hover:not(:disabled) { border-color: var(--accent); color: var(--accent-text); }
.variant-btn.active { border-color: var(--accent); color: var(--accent-text); box-shadow: inset 0 0 0 1px var(--accent); background: var(--tint-1); }
.variant-btn:disabled { opacity: .4; cursor: not-allowed; background: var(--surface-2); }
.variant-missing .variant-opts { animation: variant-shake .35s; }
@keyframes variant-shake { 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }
.variant-hint { color: var(--danger); margin: 0; }
.catalog-qty { display: flex; gap: 16px; align-items: end; flex-wrap: wrap; }
.catalog-qty .qty input { width: 90px; }
.catalog-qty p { margin: 0 0 6px; flex: 1; min-width: 180px; }
.variant-fallback[hidden], .variant-picker[hidden], .variant-hint[hidden] { display: none; }
.catalog-zoom { cursor: zoom-in; }
.qty-note { margin: 0; color: var(--ink-2); display: flex; gap: 6px; align-items: baseline; }
.qty-note .icon { color: var(--accent-text); flex: none; }


/* Header: account link next to the cart (3D) */
.nav-account { order: 3; margin-left: 0; }

/* Member area (lib/akun.php, 3d/akun/) */
.page-hero-sm { padding: 44px 0 22px; }
.page-hero-sm h1 { font-size: clamp(1.8rem, 3.4vw, 2.4rem); }
.akun-tabs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 22px; border-bottom: 1px solid var(--line); padding-bottom: 10px; }
.akun-tabs a { padding: 8px 14px; border-radius: 999px; color: var(--ink-2); font-weight: 600; }
.akun-tabs a:hover { background: var(--tint-1); text-decoration: none; }
.akun-tabs a.active { background: var(--accent); color: var(--accent-ink); }
.akun-logout { margin-left: auto; }
.akun-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 22px; align-items: start; }
.akun-grid > div { display: grid; gap: 18px; }
@media (max-width: 860px) { .akun-grid { grid-template-columns: 1fr; } .akun-logout { margin-left: 0; } }
.akun-balance { display: block; font-size: 2rem; font-weight: 850; margin: 4px 0 8px; }
.akun-side { display: grid; gap: 10px; align-content: start; }
.akun-orders { display: grid; gap: 10px; }
.akun-order { display: grid; grid-template-columns: minmax(0, 1.6fr) auto minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 16px 20px; color: inherit; }
.akun-order:hover { text-decoration: none; border-color: var(--accent); }
.akun-order-no { display: grid; }
.akun-order-total { text-align: right; white-space: nowrap; }
@media (max-width: 640px) { .akun-order { grid-template-columns: 1fr auto; } }
.akun-ledger li { align-items: flex-start; }
.akun-ledger small { display: block; }
.akun-plus { color: #15803d; font-weight: 700; white-space: nowrap; }
.akun-minus { white-space: nowrap; }
.wd-requested { color: #b45309; font-weight: 700; } .wd-paid { color: #15803d; font-weight: 700; } .wd-rejected { color: var(--muted); }
.akun-narrow { max-width: 480px; }
.akun-card h1 { font-size: 1.8rem; margin-bottom: 4px; }
.akun-card form { display: grid; gap: 14px; margin-top: 8px; }
.akun-aside { margin: -4px 0 0; text-align: right; font-size: .9rem; }
.akun-foot { text-align: center; margin-top: 16px; }
.btn-google { display: inline-flex; justify-content: center; align-items: center; gap: 10px; margin-top: 14px; background: #fff; color: #1f1f1f; border-color: #dadce0; }
.btn-google:hover { background: #f8f9fa; }
.akun-or { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: .85rem; margin: 14px 0 0; }
.akun-or::before, .akun-or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.empty-state { display: grid; justify-items: start; gap: 12px; }

/* Checkout: member box, credit */
.checkout-member { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; padding: 18px 22px; }
.checkout-member small { display: block; max-width: 46ch; }
.checkout-member-actions { display: flex; gap: 8px; }
.wallet-choice { display: flex; gap: 10px; align-items: center; margin: 4px 0 12px; }

/* Order page: cancelled */
.order-cancelled { border-color: #fecaca; }
.row-list li[hidden] { display: none; }

/* ---- Designer controls for the lithophane / medal / sign (3d/design.php) ---- */
.opt-step { display: flex; align-items: center; gap: 10px; font-size: 1.02rem; margin: 0; padding: 0; font-weight: 750; }
.opt-step span { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); font-size: .82rem; flex: none; }
.opt-sub { font-size: .85rem; font-weight: 650; color: var(--ink-2); }
.opt [hidden], .designer [hidden] { display: none !important; }
.ochips { display: flex; flex-wrap: wrap; gap: 8px; }
.ochips-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.ochips-list { display: grid; grid-template-columns: 1fr; }
@media (max-width: 420px) { .ochips-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.ochip { position: relative; cursor: pointer; }
.ochip input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.ochip > span { display: grid; gap: 1px; justify-items: center; text-align: center; padding: 8px 14px; border: 1px solid var(--line-2); border-radius: 12px;
    background: var(--surface); font-weight: 600; font-size: .92rem; line-height: 1.25; transition: border-color .12s, background .12s; }
.ochips-list .ochip > span { justify-items: start; text-align: left; grid-template-columns: 1fr auto; align-items: center; gap: 10px; }
.ochip > span small { font-weight: 500; color: var(--muted); font-size: .78rem; }
.ochip:hover > span { border-color: var(--accent); }
.ochip input:checked + span { border-color: var(--accent); background: var(--tint-1); box-shadow: inset 0 0 0 1px var(--accent); color: var(--accent-text); }
.ochip input:checked + span small { color: var(--accent-text); }
.ochip input:focus-visible + span { outline: 3px solid color-mix(in srgb, var(--accent) 45%, transparent); outline-offset: 2px; }
.ochips-shape .ochip > span { min-width: 78px; padding: 8px 10px 7px; font-size: .8rem; color: var(--ink-2); }
.ochips-shape .ochip > span svg { color: var(--accent-text); }
.ochips-font .ochip > span { min-width: 92px; }

.check { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; font-weight: 600; font-size: .95rem; }
.check input[type="checkbox"] { width: 20px; height: 20px; margin: 2px 0 0; padding: 0; accent-color: var(--accent); flex: none; }
.check small { font-weight: 500; }

.slider { display: grid; gap: 2px; }
.slider-head { display: flex; justify-content: space-between; gap: 10px; font-size: .88rem; font-weight: 600; color: var(--ink-2); }
.slider output { font-variant-numeric: tabular-nums; color: var(--accent-text); font-weight: 700; }
.slider input[type="range"] { padding: 0; border: 0; accent-color: var(--accent); background: transparent; }
details.more, details.help { border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; background: var(--bg-alt); }
details.more > summary, details.help > summary { cursor: pointer; font-weight: 650; font-size: .9rem; display: flex; gap: 8px; align-items: center; }
details.more[open] > summary, details.help[open] > summary { margin-bottom: 10px; }
details.more { display: grid; gap: 12px; }
details.help ol { margin: 0 0 8px; padding-left: 20px; font-size: .9rem; display: grid; gap: 4px; }
details.help p { margin: 0; }

.dropzone { position: relative; display: flex; align-items: center; gap: 14px; padding: 18px; border: 2px dashed color-mix(in srgb, var(--accent) 45%, transparent);
    border-radius: 14px; background: var(--tint-1); cursor: pointer; transition: background .15s, border-color .15s; }
.dropzone:hover, .dropzone:focus-within { background: var(--tint-2); border-color: var(--accent); }
.dropzone input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; padding: 0; }
.dropzone > .icon { width: 30px; height: 30px; color: var(--accent-text); flex: none; }
.dropzone > span { display: grid; gap: 2px; }
.dropzone-sm { padding: 12px 14px; }
.upload-note { margin: 0; padding: 8px 12px; border-radius: 10px; background: #ecfdf5; color: #065f46; }
.upload-note.is-bad { background: #fef2f2; color: #991b1b; }
.designer-hint { grid-column: 1 / -1; margin: 0; padding: 8px 12px; border-radius: 10px; background: #fef2f2; color: #991b1b; }

.crop { display: grid; gap: 10px; }
.crop-canvas { display: block; width: 100%; margin: 0 auto; border-radius: 12px; background: #fff; cursor: grab; touch-action: none;
    box-shadow: inset 0 0 0 1px var(--line-2); }
.crop-canvas:active { cursor: grabbing; }
.material-note { margin: 0; font-size: .88rem; color: var(--ink-2); display: flex; gap: 8px; align-items: center; }

.field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 12px; }
@media (max-width: 420px) { .field-grid { grid-template-columns: 1fr; } }
.field { display: grid; gap: 4px; font-size: .85rem; font-weight: 600; color: var(--ink-2); }
.field-wide { grid-column: 1 / -1; }
.field input { padding: 9px 12px; }
.field em { font-style: normal; font-weight: 500; font-size: .78rem; }

.designer-stage-tools { display: inline-flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.glow-btn[aria-pressed="true"] { background: linear-gradient(135deg, #f59e0b, #f97316); color: #1c1306; }
.designer-canvas.is-glow { background: radial-gradient(120% 90% at 50% 20%, #2a2338 0%, #120f19 70%, #0b0910 100%); }
.designer-empty { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 10px; padding: 24px; text-align: center;
    color: var(--muted); pointer-events: none; z-index: 1; }
.designer-empty .icon { width: 42px; height: 42px; color: var(--accent-text); opacity: .6; }
.designer-busy { position: absolute; top: 12px; right: 12px; z-index: 2; }
.designer-busy span { display: block; width: 22px; height: 22px; border-radius: 50%; border: 3px solid color-mix(in srgb, var(--accent) 25%, transparent);
    border-top-color: var(--accent); animation: designer-spin .8s linear infinite; }
@keyframes designer-spin { to { transform: rotate(360deg); } }
.designer-dims { margin: 2px 0 0; font-variant-numeric: tabular-nums; }
.designer-stl { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
@media (max-width: 900px) {
    .designer-lithophane .designer-canvas, .designer-medal .designer-canvas, .designer-sign .designer-canvas { aspect-ratio: 1 / 1; max-height: 62vh; }
}
@media (max-width: 900px) {
    /* the long forms keep the price and the button in view while scrolling */
    .designer-lithophane .designer-buy, .designer-medal .designer-buy, .designer-sign .designer-buy {
        position: sticky; bottom: 0; z-index: 5; background: var(--surface); padding-bottom: 12px; margin: 0 -8px; padding-left: 8px; padding-right: 8px;
        box-shadow: 0 -12px 18px -14px rgba(40, 20, 80, .35); }
    .designer-lithophane .designer-buy .btn, .designer-medal .designer-buy .btn, .designer-sign .designer-buy .btn { padding: 11px 20px; }
}
@media (max-width: 600px) {
    .designer-panel { padding: 18px 16px; }
    .designer-stage-bar { flex-wrap: wrap; }
    .designer-stage-bar > .muted { font-size: .8rem; }
}

/* Rancang: product cards (3d/rancang.php) */
.rancang-grid .shop-card { position: relative; }
.shop-card-badge { position: absolute; top: 14px; left: 14px; z-index: 1; padding: 4px 12px; border-radius: 999px; background: var(--accent); color: var(--accent-ink);
    font-size: .75rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; box-shadow: 0 6px 18px -6px rgba(0, 0, 0, .4); }
.shop-card-badge.is-off { background: #6b7280; }
.shop-card-pitch { font-size: .9rem; color: var(--ink-2); display: flex; gap: 6px; align-items: baseline; }
.shop-card-pitch .icon { color: var(--accent-text); flex: none; width: 15px; height: 15px; position: relative; top: 2px; }
.shop-card.is-off { opacity: .75; }

/* "Pesan banyak nama" (design.php) */
.batch-box > summary { cursor: pointer; display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: baseline; }
.batch-box[open] > summary { margin-bottom: 10px; }

/* Digital files: "Cetak & kirim" / "File digital saja" (design.php), the badge (cart, checkout, order)
   and the buyer's download box on a paid order (3d/order.php: STL buttons + sd-3mf.js tools). */
.buy-kind { display: grid; gap: 10px; border: 0; padding: 14px; margin: 4px 0 18px; min-width: 0; border-radius: 16px;
    background: var(--tint-1); box-shadow: inset 0 0 0 1px var(--line); }
.buy-kind-h { float: left; width: 100%; padding: 0; margin: 0 0 2px; font-weight: 800; font-size: 1.02rem; }
.buy-kind-h + * { clear: both; }
.kind-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; }
.kind-opt { position: relative; display: block; cursor: pointer; min-width: 0; }
.kind-opt > input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.kind-card { display: grid; gap: 5px; align-content: start; height: 100%; padding: 12px 13px 13px; border: 1px solid var(--line-2); border-radius: 14px;
    background: var(--surface); transition: border-color .15s, box-shadow .15s, transform .15s; }
.kind-opt:hover .kind-card { border-color: color-mix(in srgb, var(--accent) 55%, var(--line-2)); }
.kind-opt > input:checked + .kind-card { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent), 0 6px 18px -10px color-mix(in srgb, var(--accent) 70%, transparent); }
.kind-opt > input:focus-visible + .kind-card { outline: 3px solid color-mix(in srgb, var(--accent) 50%, transparent); outline-offset: 2px; }
.kind-opt > input:checked + .kind-card::after { content: '\2713'; position: absolute; top: 9px; right: 10px; width: 20px; height: 20px; border-radius: 50%;
    display: grid; place-items: center; font-size: .72rem; font-weight: 900; background: var(--accent); color: var(--accent-ink, #fff); }
.kind-ico { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--tint-2); color: var(--accent-text); }
.kind-ico .icon { width: 19px; height: 19px; }
.kind-top { display: grid; gap: 1px; }
.kind-top strong { font-size: .98rem; padding-right: 22px; }
.kind-top em { font-style: normal; font-weight: 800; color: var(--accent-text); white-space: nowrap; font-variant-numeric: tabular-nums; }
.kind-card small { line-height: 1.45; }
.kind-tag { justify-self: start; margin-top: 2px; padding: 2px 9px; border-radius: 999px; font-size: .74rem; font-weight: 700; background: var(--tint-2); color: var(--ink-2); }
.kind-tag-free { background: linear-gradient(90deg, rgba(255, 92, 92, .16), rgba(255, 196, 0, .16), rgba(64, 196, 120, .16), rgba(64, 140, 255, .16), rgba(180, 90, 255, .16)); }
.kind-price-now { display: grid; justify-items: center; gap: 2px; padding: 12px 14px 13px; border-radius: 14px; text-align: center;
    background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.kind-price-label { font-size: .78rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-2); }
.kind-price-now strong { font-size: clamp(1.9rem, 6vw, 2.5rem); line-height: 1.1; font-weight: 900; letter-spacing: -.01em;
    font-variant-numeric: tabular-nums; color: var(--accent-text); }
.kind-price-now small:empty { display: none; }
.kind-notice { margin: 0; padding: 8px 11px; border-radius: 10px; background: color-mix(in srgb, var(--accent) 12%, transparent); color: var(--ink); line-height: 1.45; }
.kind-licence { display: block; font-size: .78rem; color: var(--ink-2); border-left: 3px solid var(--line-2); padding-left: 8px; }
@media (max-width: 440px) {
    .buy-kind { padding: 11px; }
    .kind-cards { grid-template-columns: 1fr 1fr; gap: 8px; }
    .kind-card { padding: 10px; }
    .kind-card > small.muted { display: none; }   /* the tag says what matters; the long text is under the form */
    .kind-ico { width: 30px; height: 30px; }
}

/* Colour swatches: colours not in stock (data-stock="0") and "Warna custom" only for digital files / admin
   (lib/shop.php shop_swatches(), designer.js colour mode). The custom swatch is a native colour picker. */
.sw[hidden], .sw-hex[hidden] { display: none !important; }
.sw-dot { position: relative; }
.sw-custom .sw-dot { background: conic-gradient(#ff4d4d, #ffc400, #3ccf6e, #2ec5e8, #3d6dff, #b25bff, #ff4d4d); }
.sw-custom.is-set .sw-dot { background-image: none; }
.sw-custom.is-set .sw-dot::after { content: ''; position: absolute; right: -3px; bottom: -3px; width: 12px; height: 12px; border-radius: 50%;
    background: conic-gradient(#ff4d4d, #ffc400, #3ccf6e, #2ec5e8, #3d6dff, #b25bff, #ff4d4d); box-shadow: 0 0 0 2px var(--surface); }
.swatches-sm .sw-custom.is-set .sw-dot::after { width: 9px; height: 9px; right: -2px; bottom: -2px; }
.sw-custom .sw-pick { z-index: 1; padding: 0; border: 0; }
.sw-custom.is-on .sw-dot { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--accent); transform: scale(1.05); }
.swatches-sm .sw-custom.is-on .sw-dot { box-shadow: 0 0 0 2px var(--surface), 0 0 0 3.5px var(--accent); }
.clk-colors .sw-custom .sw-dot, .clk-sws .sw-custom .sw-dot { width: 28px; height: 28px; }
.sw-hex { width: 86px; height: 30px; padding: 2px 8px; border-radius: 8px; font: 600 .82rem/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; align-self: center; }
.swatches-sm .sw-hex { width: 78px; height: 24px; font-size: .76rem; }
.sw-hex.is-bad { border-color: #d62e2e; }
.kind-badge { display: inline-flex; gap: 6px; align-items: center; margin: 0 0 6px !important; padding: 3px 10px; border-radius: 999px; font-size: .8rem; font-weight: 700;
    background: var(--tint-2); color: var(--accent-text); }
.kind-badge .icon { width: 15px; height: 15px; flex: none; }
.files-ready { display: grid; gap: 6px; margin-bottom: 20px; border-color: color-mix(in srgb, var(--accent) 45%, transparent); }
.files-ready h2 { margin: 0; font-size: 1.2rem; display: flex; gap: 8px; align-items: center; }
.files-ready p { margin: 0; }
.cart-line.dl-line { grid-template-columns: minmax(0, 1fr) auto; align-items: start; }
.dl-box { grid-column: 1 / -1; display: grid; gap: 10px; margin: 0; padding: 14px; border: 1px dashed var(--line-2); border-radius: 12px; background: var(--bg-alt, transparent); }
.dl-box h4 { margin: 0; font-size: 1rem; display: flex; gap: 8px; align-items: center; }
.dl-box p { margin: 0; }
.dl-locked { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; }
.dl-view { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 16px; align-items: start; }
.dl-view .designer-canvas { aspect-ratio: 1; border-radius: 12px; }
.dl-tools { display: grid; gap: 4px; min-width: 0; }
.dl-tools-h { margin: 0; font-size: .8rem; font-weight: 700; color: var(--ink-2); text-transform: uppercase; letter-spacing: .06em; }
.dl-tools-h + .designer-stl, .dl-tools-h + .designer-3mf .tmf { margin-top: 2px; }
.dl-tools .designer-stl + .dl-tools-h, .dl-tools .pl-png + .dl-tools-h { margin-top: 10px; }
.dl-tools .btn { white-space: normal; text-align: left; border-radius: 12px; }
.tmf { display: grid; gap: 6px; margin-top: 8px; }
.tmf-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.tmf-field { display: inline-flex; align-items: center; gap: 6px; font-size: .84rem; font-weight: 600; }
.tmf-field select, .tmf-field input { width: auto; padding: 4px 8px; font-size: .84rem; }
.tmf-status { margin: 0; word-break: break-word; }
.tmf-printer { margin: 0; }
.tmf-field[hidden] { display: none; }
/* plate preview (assets/js/sd-3mf.js): a card per plate of the 3MF, a larger view in a dialog */
.tmf-pv { display: grid; gap: 8px; margin-top: 4px; padding-top: 10px; border-top: 1px dashed var(--line-2, rgba(0,0,0,.15)); min-width: 0; }
.tmf-pv-head { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; }
.tmf-pv-title { font-size: .9rem; }
.tmf-pv-sum { flex: 1 1 200px; }
.tmf-seg { display: inline-flex; border: 1px solid var(--line-2, rgba(0,0,0,.18)); border-radius: 999px; overflow: hidden; }
.tmf-seg button { border: 0; background: transparent; color: inherit; font: inherit; font-size: .8rem; font-weight: 600; padding: 4px 12px; cursor: pointer; }
.tmf-seg button[aria-pressed="true"] { background: var(--accent, #6d28d9); color: var(--accent-ink, #fff); }
.tmf-plates { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; transition: opacity .2s; }
.tmf-pv.is-busy .tmf-plates { opacity: .55; }
.tmf-card { display: grid; gap: 6px; align-content: start; padding: 8px; border: 1px solid var(--line-2, rgba(0,0,0,.15)); border-radius: 12px; background: var(--surface, #fff);
            color: inherit; font: inherit; text-align: left; cursor: zoom-in; min-width: 0; transition: border-color .15s, box-shadow .15s, transform .15s; }
.tmf-card:hover, .tmf-card:focus-visible { border-color: var(--accent, #6d28d9); box-shadow: 0 6px 18px -10px rgba(40, 20, 90, .45); transform: translateY(-1px); }
.tmf-card.is-over { border-color: #c62828; }
.tmf-card-cv { width: 100%; height: auto; display: block; border-radius: 6px; }
.tmf-card-body { display: grid; gap: 2px; min-width: 0; }
.tmf-card-name { display: flex; gap: 5px; align-items: center; font-size: .82rem; font-weight: 700; line-height: 1.25; min-width: 0; }
.tmf-card-name { flex-wrap: wrap; }
.tmf-card-name > span { flex: 1 1 64px; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.tmf-card-meta { font-size: .76rem; color: var(--ink-2, #555); }
.tmf-dot { flex: none; width: 11px; height: 11px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .28); display: inline-block; }
.tmf-badge-over { justify-self: start; font-size: .72rem; font-weight: 700; color: #fff; background: #c62828; border-radius: 999px; padding: 1px 8px; }
.tmf-pv-note { margin: 0; }
.tmf-wait { grid-column: 1 / -1; margin: 0; }
.tmf-lb { border: 0; padding: 0; border-radius: 16px; max-width: min(820px, calc(100vw - 16px)); width: 100%; max-height: calc(100vh - 16px);
          background: var(--surface, #fff); color: var(--ink, #1b1830); box-shadow: 0 24px 60px -20px rgba(20, 10, 60, .55); }
.tmf-lb::backdrop { background: rgba(18, 12, 40, .6); }
.tmf-lb-in { display: grid; gap: 10px; padding: 14px; }
.tmf-lb-head { display: flex; gap: 8px; align-items: center; }
.tmf-lb-title { flex: 1; display: grid; gap: 2px; min-width: 0; text-align: center; }
.tmf-lb-title strong { font-size: 1rem; }
.tmf-lb-nav, .tmf-lb-x { flex: none; width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line-2, rgba(0,0,0,.15)); background: transparent;
                        color: inherit; font-size: 1.2rem; line-height: 1; cursor: pointer; }
.tmf-lb-nav:disabled { opacity: .3; cursor: default; }
.tmf-lb-x { font-size: 1rem; }
.tmf-lb-stage { position: relative; display: flex; justify-content: center; }
.tmf-lb-cv { display: block; max-width: 100%; touch-action: manipulation; }
.tmf-tip { position: absolute; max-width: 220px; padding: 5px 9px; border-radius: 8px; background: rgba(20, 14, 44, .92); color: #fff; font-size: .78rem;
           line-height: 1.35; pointer-events: none; }
.tmf-lb-list { margin: 0; padding: 0 0 0 22px; display: grid; gap: 4px; font-size: .84rem; max-height: 30vh; overflow: auto; }
.tmf-lb-list li { line-height: 1.4; }
.tmf-lb-list li .tmf-dot { vertical-align: -1px; margin-right: 5px; }
.tmf-lb-list li .tmf-li-name { margin-right: 6px; }
.tmf-lb-list li.is-over .tmf-li-name { color: #c62828; }
.tmf-li-name { font-weight: 600; }
.designer-stl { align-items: flex-start; }
.stl-item { display: inline-grid; gap: 2px; max-width: 100%; }
.stl-hint { font-size: .74rem; color: var(--ink-2, #555); line-height: 1.3; padding-left: 4px; }
/* the larger plate view in 3D (sd-3mf.js Plate3D): a 2D / 3D switch, reset view, the WebGL stage */
.tmf-lb-bar { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; justify-content: center; }
.tmf-lb-bar[hidden], .tmf-lb-reset[hidden], .tmf-lb-cv[hidden], .tmf-lb-3d[hidden] { display: none; }
.tmf-lb-bar .tmf-seg button { padding: 5px 16px; }
.tmf-lb-reset { border: 1px solid var(--line-2, rgba(0,0,0,.18)); border-radius: 999px; background: transparent; color: inherit; font: inherit; font-size: .8rem;
                font-weight: 600; padding: 4px 12px; cursor: pointer; }
.tmf-lb-reset:hover { border-color: var(--accent, #6d28d9); }
.tmf-lb-hint { font-size: .76rem; color: var(--ink-2, #555); }
.tmf-lb-3d { width: 100%; min-height: 220px; border-radius: 12px; overflow: hidden; background: radial-gradient(ellipse at 50% 30%, #ffffff, #e8e4f7 78%);
             box-shadow: inset 0 0 0 1px rgba(40, 32, 90, .1); }
.tmf-3d-cv { display: block; width: 100%; height: 100%; cursor: grab; touch-action: none; }
.tmf-3d-cv:active { cursor: grabbing; }

/* ---- download buttons: STL per part, the 3MF projects, the piagam poster PNGs ---------------------------------
   Coloured so they stand out from the other buttons: 3MF = the SnazzyPro 3D gradient (violet → cyan), STL = solid
   orange, PNG = solid magenta; a download icon (CSS mask, a data: SVG; img-src allows data:) and one size everywhere
   (admin order page, admin designer, the buyer's download box). The PNG buttons (designer-piagam_lari.js) carry
   their own "⬇" in the label, so they get the colour but no second icon. */
.btn.btn-dl, .pl-png .btn { display: inline-flex; align-items: center; gap: 7px; min-height: 36px; padding: 7px 14px; border: 0; border-radius: 10px;
    font-size: .86rem; font-weight: 700; line-height: 1.25; color: #fff; text-align: left; white-space: normal; letter-spacing: .005em;
    box-shadow: 0 1px 0 rgba(255, 255, 255, .18) inset, 0 4px 12px -6px rgba(30, 16, 70, .55); transition: transform .12s, box-shadow .12s, filter .12s; }
.btn.btn-dl::before { content: ""; flex: none; width: 16px; height: 16px; background: currentColor;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3.5v11.5M6.8 9.8 12 15l5.2-5.2M4.5 19.5h15'/%3E%3C/svg%3E") center / contain no-repeat;
            mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3.5v11.5M6.8 9.8 12 15l5.2-5.2M4.5 19.5h15'/%3E%3C/svg%3E") center / contain no-repeat; }
.btn.btn-dl-3mf { background: linear-gradient(135deg, #7c3aed, #0891b2); }
.btn.btn-dl-3mf.btn-dl-multi { background: linear-gradient(135deg, #0891b2, #7c3aed); }
.btn.btn-dl-stl { background: #c2410c; }
.pl-png .btn { background: #be185d; }
.btn.btn-dl:hover, .pl-png .btn:hover { color: #fff; filter: brightness(1.1); transform: translateY(-1px); text-decoration: none;
    box-shadow: 0 1px 0 rgba(255, 255, 255, .18) inset, 0 8px 18px -8px rgba(30, 16, 70, .6); }
.btn.btn-dl:focus-visible, .pl-png .btn:focus-visible { outline: 3px solid color-mix(in srgb, #7c3aed 45%, transparent); outline-offset: 2px; }
.btn.btn-dl:disabled, .pl-png .btn:disabled { opacity: .72; cursor: progress; transform: none; filter: none; }
.designer-stl, .pl-png { display: flex; flex-wrap: wrap; gap: 8px; }
.designer-stl .stl-item { max-width: 100%; }
@media (max-width: 600px) {
    .tmf-plates { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
    .tmf-lb-in { padding: 10px; }
    .tmf-pv-sum { flex-basis: 100%; }
    .tmf-lb-hint { flex-basis: 100%; text-align: center; }
    /* phones: the two 3MF buttons share a row, the other download buttons take what they need and wrap */
    .tmf-row .btn-dl-3mf { flex: 1 1 140px; justify-content: center; white-space: nowrap; }
    .btn.btn-dl, .pl-png .btn { font-size: .84rem; padding: 7px 12px; }
}
@media (max-width: 600px) {
    .dl-view { grid-template-columns: 1fr; }
    .dl-view .designer-canvas { max-width: 260px; }
    .cart-line.dl-line .cart-price { grid-column: auto; text-align: right !important; }
}
.designer-as-file .designer-buy .designer-price { grid-column: 1 / -1; }
.kind-badge { justify-self: start; }
/* plate preview: bed colour swatches (sd-3mf.js BEDS; preview only, remembered per browser) */
.tmf-bedc { display: inline-flex; gap: 6px; align-items: center; }
.tmf-bed-sw { width: 22px; height: 22px; padding: 0; border-radius: 50%; border: 1px solid rgba(0, 0, 0, .25); cursor: pointer;
              box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .35); }
.tmf-bed-sw[aria-pressed="true"] { outline: 2px solid var(--accent, #6d28d9); outline-offset: 2px; }
.tmf-bed-sw:focus-visible { outline: 3px solid var(--accent, #6d28d9); outline-offset: 2px; }
.tmf-seg[hidden] { display: none; }
