/* ===================================================================
   SUNCRAVE Shop — storefront, product, cart, checkout, admin, widgets
   Uses design tokens from styles.css (:root)
   =================================================================== */

/* ---------- page header ---------- */
.shop-head { position: relative; padding: 62px 0 34px; text-align: center; background: linear-gradient(180deg, #FDF3E3 0%, #FFFBF4 100%); border-bottom: 1px solid var(--line); }
.shop-head .section-tag { margin-bottom: 14px; }
.shop-head h1 { font-family: var(--font-head); font-size: clamp(2.2rem, 5vw, 3.3rem); font-weight: 600; color: var(--brown); letter-spacing: -.6px; line-height: 1.08; }
.shop-head h1 span { color: var(--orange-deep); font-style: italic; }
.shop-head p { color: var(--brown-soft); font-size: 1.06rem; margin: 14px auto 0; max-width: 540px; line-height: 1.6; }
.shop-trust { display: flex; gap: 24px; justify-content: center; flex-wrap: wrap; margin-top: 22px; }
.shop-trust span { display: inline-flex; align-items: center; gap: 7px; font-size: .84rem; font-weight: 600; color: var(--brown-soft); }
.shop-trust svg { width: 16px; height: 16px; stroke: var(--orange-deep); fill: none; stroke-width: 2; }

/* ---------- product grid ---------- */
.prod-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; padding: 46px 0 86px; }
.prod-card { position: relative; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); display: flex; flex-direction: column; transition: transform .22s ease, box-shadow .22s ease, border-color .22s; }
.prod-card:hover { transform: translateY(-8px); box-shadow: 0 22px 50px rgba(180,120,30,.18); border-color: #F0D9B3; }
.prod-card .pc-img { position: relative; display: block; aspect-ratio: 1/1; background: linear-gradient(160deg, #FFFBF4, #FBEAD0); overflow: hidden; }
.prod-card .pc-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.prod-card:hover .pc-img img { transform: scale(1.06); }
.pc-pill { position: absolute; top: 12px; left: 12px; background: rgba(255,251,244,.92); color: var(--orange-dark); font-size: .64rem; font-weight: 800; text-transform: uppercase; letter-spacing: .07em; padding: 5px 11px; border-radius: 999px; box-shadow: 0 3px 10px rgba(150,90,20,.14); }
.pc-off { position: absolute; top: 12px; right: 12px; background: var(--red-accent); color: #fff; font-size: .68rem; font-weight: 800; padding: 5px 9px; border-radius: 8px; letter-spacing: .02em; }
.prod-card .pc-body { padding: 16px 18px 18px; display: flex; flex-direction: column; flex: 1; }
.prod-card h3 { font-family: var(--font-head); font-size: 1.16rem; font-weight: 600; color: var(--brown); margin: 0 0 4px; line-height: 1.25; letter-spacing: -.2px; }
.prod-card h3 a { color: inherit; }
.prod-card h3 a:hover { color: var(--orange-deep); }
.prod-card .pc-desc { font-size: .84rem; color: var(--brown-soft); line-height: 1.45; margin-bottom: 14px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.4em; }
.prod-card .pc-foot { margin-top: auto; display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; }
.prod-card .pc-price b { font-family: var(--font-head); font-size: 1.4rem; color: var(--brown); font-weight: 700; }
.prod-card .pc-price s { font-size: .84rem; color: #bcae9a; margin-left: 6px; }
.prod-card .pc-price .pc-wt { display: block; font-size: .76rem; color: var(--brown-soft); margin-top: 3px; font-weight: 500; }
.pc-add { flex-shrink: 0; display: inline-flex; align-items: center; gap: 7px; border: none; cursor: pointer; background: linear-gradient(135deg, var(--orange), var(--orange-deep)); color: #fff; font-family: inherit; font-weight: 700; font-size: .86rem; padding: 11px 16px; border-radius: 12px; box-shadow: 0 8px 20px rgba(232,130,14,.32); transition: transform .15s, box-shadow .15s; }
.pc-add:hover { transform: translateY(-2px); box-shadow: 0 12px 26px rgba(232,130,14,.45); }
.pc-add svg { width: 16px; height: 16px; stroke: #fff; fill: none; stroke-width: 2.2; }

/* ---------- product detail ---------- */
.pd { padding: 34px 0 80px; }
.pd-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
.pd-gallery .pd-main { background: var(--cream-2); border: 1px solid var(--line); border-radius: var(--radius); aspect-ratio: 1/1; overflow: hidden; display: flex; align-items: center; justify-content: center; }
.pd-gallery .pd-main img { width: 100%; height: 100%; object-fit: cover; }
.pd-thumbs { display: flex; gap: 12px; margin-top: 14px; flex-wrap: wrap; }
.pd-thumbs button { width: 74px; height: 74px; border-radius: 12px; overflow: hidden; border: 2px solid var(--line); background: var(--cream-2); cursor: pointer; padding: 0; transition: border-color .15s; }
.pd-thumbs button.active { border-color: var(--orange); }
.pd-thumbs img { width: 100%; height: 100%; object-fit: cover; }
.pd-info .pd-cat { font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; color: var(--orange-dark); font-weight: 700; }
.pd-info h1 { font-family: var(--font-head); font-size: clamp(1.8rem, 3.5vw, 2.5rem); font-weight: 600; color: var(--brown); margin: 8px 0 6px; letter-spacing: -.5px; }
.pd-info .pd-wt { color: var(--brown-soft); font-size: .95rem; }
.pd-price { display: flex; align-items: baseline; gap: 12px; margin: 18px 0; }
.pd-price b { font-size: 2rem; font-weight: 800; color: var(--brown); }
.pd-price s { font-size: 1.1rem; color: #b6a894; }
.pd-price .save { background: #E9F7EF; color: #1E7D45; font-size: .8rem; font-weight: 700; padding: 4px 10px; border-radius: 999px; }
.pd-desc { color: var(--brown-soft); font-size: 1rem; line-height: 1.7; margin-bottom: 22px; }
.pd-buy { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.qty { display: inline-flex; align-items: center; border: 1.5px solid var(--line); border-radius: 12px; overflow: hidden; }
.qty button { width: 42px; height: 46px; border: none; background: var(--cream); font-size: 1.3rem; color: var(--brown); cursor: pointer; }
.qty button:hover { background: var(--cream-2); }
.qty span { width: 46px; text-align: center; font-weight: 700; color: var(--brown); }
.pd-meta { margin-top: 26px; border-top: 1px solid var(--line); padding-top: 20px; display: grid; gap: 12px; }
.pd-meta div { display: flex; gap: 10px; align-items: center; color: var(--brown-soft); font-size: .92rem; }
.pd-meta svg { width: 20px; height: 20px; stroke: var(--orange-deep); fill: none; stroke-width: 2; }

/* ---------- cart ---------- */
.cart-wrap { display: grid; grid-template-columns: 1.6fr 1fr; gap: 36px; padding: 30px 0 80px; align-items: start; }
.cart-list { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); overflow: hidden; }
.cart-item { display: grid; grid-template-columns: 84px 1fr auto; gap: 16px; padding: 18px; border-bottom: 1px solid var(--line); align-items: center; }
.cart-item:last-child { border-bottom: none; }
.cart-item img { width: 84px; height: 84px; object-fit: cover; border-radius: 12px; background: var(--cream-2); }
.cart-item h4 { font-family: var(--font-head); font-weight: 600; color: var(--brown); font-size: 1.05rem; }
.cart-item .ci-wt { font-size: .82rem; color: var(--brown-soft); margin-top: 2px; }
.cart-item .ci-price { font-weight: 700; color: var(--brown); margin-top: 6px; }
.cart-item .ci-right { text-align: right; display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
.ci-remove { background: none; border: none; color: var(--red-accent); font-size: .84rem; cursor: pointer; }
.ci-remove:hover { text-decoration: underline; }

.cart-summary { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 26px; position: sticky; top: 100px; }
.cart-summary h3 { font-family: var(--font-head); font-size: 1.3rem; font-weight: 600; color: var(--brown); margin-bottom: 18px; }
.sum-row { display: flex; justify-content: space-between; padding: 9px 0; color: var(--brown-soft); font-size: .96rem; }
.sum-row.total { border-top: 1px solid var(--line); margin-top: 8px; padding-top: 16px; font-size: 1.2rem; font-weight: 800; color: var(--brown); }
.cart-summary .btn { width: 100%; justify-content: center; margin-top: 18px; }
.ship-note { font-size: .82rem; color: var(--brown-soft); margin-top: 10px; text-align: center; }

.cart-empty { text-align: center; padding: 80px 20px; }
.cart-empty svg { width: 64px; height: 64px; stroke: var(--orange); fill: none; stroke-width: 1.5; margin-bottom: 18px; }
.cart-empty h2 { font-family: var(--font-head); color: var(--brown); font-weight: 600; margin-bottom: 10px; }
.cart-empty p { color: var(--brown-soft); margin-bottom: 22px; }

/* ---------- checkout form ---------- */
.checkout-form { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 4px; }
.checkout-form .full { grid-column: 1 / -1; }
.checkout-form input, .checkout-form textarea { width: 100%; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 10px; font-family: inherit; font-size: .95rem; color: var(--brown); background: var(--cream); outline: none; box-sizing: border-box; }
.checkout-form input:focus, .checkout-form textarea:focus { border-color: var(--orange); background: #fff; }

/* ---------- floating widgets ---------- */
.wa-float { position: fixed; right: 20px; bottom: 20px; z-index: 60; width: 58px; height: 58px; border-radius: 50%; background: #25D366; box-shadow: 0 10px 26px rgba(37,211,102,.45); display: flex; align-items: center; justify-content: center; transition: transform .15s; }
.wa-float:hover { transform: scale(1.08); }
.wa-float svg { width: 32px; height: 32px; fill: #fff; }

.cart-count { position: absolute; top: -7px; right: -7px; min-width: 18px; height: 18px; padding: 0 5px; background: var(--red-accent); color: #fff; font-size: .7rem; font-weight: 800; border-radius: 999px; display: none; align-items: center; justify-content: center; }
.nav-cart { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; border-radius: 12px; color: var(--brown); }
.nav-cart:hover { background: var(--cream-2); }
.nav-cart svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 2; }

/* ---------- toast ---------- */
.sc-toast { position: fixed; left: 50%; bottom: 90px; transform: translate(-50%, 20px); background: var(--brown); color: #fff; padding: 12px 22px; border-radius: 999px; font-size: .92rem; font-weight: 600; box-shadow: var(--shadow); opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 80; }
.sc-toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- responsive ---------- */
@media (max-width: 980px) {
    .prod-grid { grid-template-columns: repeat(2, 1fr); gap: 18px; }
    .pd-grid { grid-template-columns: 1fr; gap: 28px; }
    .cart-wrap { grid-template-columns: 1fr; }
    .cart-summary { position: static; }
}
@media (max-width: 520px) {
    .prod-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .checkout-form { grid-template-columns: 1fr; }
    .cart-item { grid-template-columns: 64px 1fr; }
    .cart-item .ci-right { grid-column: 1 / -1; flex-direction: row; justify-content: space-between; align-items: center; }
}

/* ===================================================================
   ADMIN PANEL — clean enterprise UI (design system)
   Scoped tokens keep the panel minimal, consistent and readable.
   =================================================================== */
.adm-body {
    --a-bg: #F6F5F2;
    --a-surface: #FFFFFF;
    --a-header: #FBFAF8;
    --a-border: #E7E4DE;
    --a-text: #22201C;
    --a-muted: #6B655E;
    --a-faint: #9A938B;
    --a-accent: #D9770C;
    --a-accent-ink: #B8620A;
    --a-accent-weak: #FDF0E1;
    --a-sidebar: #211E1A;
    --a-radius: 8px;
    --a-radius-sm: 6px;
    background: var(--a-bg); min-height: 100vh; font-family: var(--font-body); color: var(--a-text);
    -webkit-font-smoothing: antialiased;
}

/* ---- login ---- */
.adm-login { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; background: var(--a-bg); }
.adm-login-card { background: var(--a-surface); border: 1px solid var(--a-border); border-radius: var(--a-radius); box-shadow: 0 1px 3px rgba(0,0,0,.04); padding: 36px 32px; width: 100%; max-width: 360px; text-align: center; }
.adm-login-card img { height: 40px; margin-bottom: 18px; }
.adm-login-card h1 { font-size: 1.2rem; font-weight: 700; margin-bottom: 4px; letter-spacing: -.2px; }
.adm-login-card p { color: var(--a-muted); font-size: .875rem; margin-bottom: 22px; }
.adm-login-card input { width: 100%; padding: 10px 12px; border: 1px solid var(--a-border); border-radius: var(--a-radius-sm); font-family: inherit; font-size: .9rem; margin-bottom: 10px; background: var(--a-surface); box-sizing: border-box; color: var(--a-text); }
.adm-login-card input:focus { border-color: var(--a-accent); outline: none; box-shadow: 0 0 0 3px var(--a-accent-weak); }
.adm-login-card .btn { width: 100%; justify-content: center; margin-top: 6px; }
.adm-err { color: #C0392B; font-size: .84rem; margin-bottom: 10px; min-height: 1em; }

/* ---- shell: sidebar + main ---- */
.adm-shell { display: flex; min-height: 100vh; }
.adm-side { width: 232px; flex-shrink: 0; background: var(--a-sidebar); color: rgba(255,255,255,.6); display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; }
.adm-logo { display: flex; align-items: center; gap: 10px; padding: 18px 20px; font-weight: 700; font-size: 1rem; letter-spacing: .3px; color: #fff; border-bottom: 1px solid rgba(255,255,255,.08); }
.adm-logo img { height: 26px; background: #fff; padding: 3px 5px; border-radius: 5px; }
.adm-nav { display: flex; flex-direction: column; padding: 12px 10px; gap: 2px; flex: 1; }
.adm-nav-item { display: flex; align-items: center; gap: 11px; padding: 9px 12px; border: none; border-left: 2px solid transparent; background: none; color: rgba(255,255,255,.62); font-family: inherit; font-size: .9rem; font-weight: 500; cursor: pointer; border-radius: var(--a-radius-sm); text-align: left; transition: background .12s, color .12s; }
.adm-nav-item:hover { background: rgba(255,255,255,.06); color: #fff; }
.adm-nav-item.active { background: rgba(255,255,255,.09); color: #fff; border-left-color: var(--a-accent); border-radius: 0 var(--a-radius-sm) var(--a-radius-sm) 0; }
.adm-nav-item svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.75; flex-shrink: 0; }
.adm-nav-item .nav-badge { margin-left: auto; background: var(--a-accent); color: #fff; font-size: .68rem; font-weight: 700; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; display: none; align-items: center; justify-content: center; }
.adm-logout { margin: 8px 10px 12px; color: rgba(255,255,255,.5); }
.adm-logout:hover { background: rgba(255,255,255,.06); color: #fff; }

.adm-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.adm-header { background: var(--a-header); border-bottom: 1px solid var(--a-border); padding: 0 24px; height: 56px; display: flex; align-items: center; justify-content: space-between; position: sticky; top: 0; z-index: 10; }
.adm-header h1 { font-size: 1.15rem; font-weight: 700; color: var(--a-text); letter-spacing: -.2px; }
.adm-user { font-size: .84rem; color: var(--a-muted); font-weight: 500; display: inline-flex; align-items: center; gap: 7px; }
.adm-user .dot { width: 7px; height: 7px; border-radius: 50%; background: #2E9E5B; }
.adm-content { padding: 24px; max-width: 1200px; width: 100%; }
.adm-panel { display: none; }
.adm-panel.active { display: block; }

.adm-bar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; gap: 12px; flex-wrap: wrap; }
.adm-bar h2 { font-size: 1rem; font-weight: 700; letter-spacing: -.1px; }

/* ---- stat cards (simple, monochrome) ---- */
.adm-stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; }
.stat-card { background: var(--a-surface); border: 1px solid var(--a-border); border-radius: var(--a-radius); padding: 16px 18px; display: flex; align-items: center; gap: 14px; }
.stat-card .sc-ic { width: 38px; height: 38px; border-radius: var(--a-radius-sm); display: flex; align-items: center; justify-content: center; flex-shrink: 0; background: #F2F0EC; }
.stat-card .sc-ic svg { width: 19px; height: 19px; stroke: var(--a-muted); fill: none; stroke-width: 1.75; }
.stat-card .sc-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.stat-card .sc-value { font-size: 1.45rem; font-weight: 700; color: var(--a-text); line-height: 1.1; letter-spacing: -.4px; }
.stat-card .sc-label { font-size: .72rem; color: var(--a-muted); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
/* meaningful accents kept subtle, on the icon only */
.stat-card.green .sc-ic svg { stroke: #2E9E5B; }
.stat-card.amber .sc-ic svg { stroke: #C08416; }
.stat-card.red   .sc-ic svg { stroke: #C0392B; }

/* ---- tables (compact, readable) ---- */
.adm-table { width: 100%; border-collapse: collapse; background: var(--a-surface); border: 1px solid var(--a-border); border-radius: var(--a-radius); overflow: hidden; }
.adm-table th, .adm-table td { text-align: left; padding: 11px 16px; border-bottom: 1px solid var(--a-border); font-size: .875rem; vertical-align: middle; }
.adm-table th { background: var(--a-header); font-weight: 600; color: var(--a-muted); font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; }
.adm-table tr:last-child td { border-bottom: none; }
.adm-table tbody tr:hover { background: #FAFAF8; }
.adm-table td[colspan] { text-align: center; color: var(--a-muted); padding: 40px 16px; font-size: .9rem; }
.adm-table img { width: 42px; height: 42px; object-fit: cover; border-radius: var(--a-radius-sm); background: #F2F0EC; border: 1px solid var(--a-border); }
.adm-table b { font-weight: 600; }
.adm-table .row-actions { display: flex; gap: 6px; }
.adm-table select.btn-mini { padding: 5px 8px; }

.adm-card { background: var(--a-surface); border: 1px solid var(--a-border); border-radius: var(--a-radius); padding: 20px 22px; max-width: 560px; }
.adm-card h3 { font-size: .95rem; font-weight: 700; margin-bottom: 14px; }

/* ---- status chips ---- */
.chip { font-size: .72rem; font-weight: 600; padding: 2px 9px; border-radius: 4px; display: inline-block; line-height: 1.5; }
.chip.on, .chip.paid { background: #E7F4EC; color: #1E7D45; }
.chip.off, .chip.failed, .chip.cancelled { background: #FBEAE8; color: #B23A2C; }
.chip.pending { background: #FBF1DF; color: #A9740E; }
.chip.shipped { background: #E9F0FA; color: #2B5B9C; }
.chip.delivered { background: #EEEAF8; color: #5B4499; }

/* ---- buttons (flat, one accent) ---- */
.adm-body .btn { border-radius: var(--a-radius-sm); font-weight: 600; box-shadow: none; }
.adm-body .btn-primary { background: var(--a-accent); color: #fff; }
.adm-body .btn-primary:hover { background: var(--a-accent-ink); transform: none; box-shadow: none; }
.adm-body .btn-sm { padding: 9px 16px; font-size: .875rem; }
.btn-mini { padding: 6px 12px; border-radius: var(--a-radius-sm); border: 1px solid var(--a-border); background: var(--a-surface); font-size: .82rem; font-weight: 600; cursor: pointer; color: var(--a-text); font-family: inherit; transition: border-color .12s, background .12s; }
.btn-mini:hover { border-color: var(--a-faint); background: #FAF9F7; }
.btn-mini.danger { color: #B23A2C; }
.btn-mini.danger:hover { border-color: #B23A2C; background: #FBEAE8; }

/* ---- modal + forms ---- */
.adm-modal { position: fixed; inset: 0; background: rgba(30,26,22,.45); display: none; align-items: flex-start; justify-content: center; padding: 40px 16px; z-index: 60; overflow-y: auto; }
.adm-modal.open { display: flex; }
.adm-modal-card { background: var(--a-surface); border: 1px solid var(--a-border); border-radius: var(--a-radius); width: 100%; max-width: 620px; padding: 24px; box-shadow: 0 12px 32px rgba(0,0,0,.14); }
.adm-modal-card h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: 18px; }
.adm-form { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.adm-form .full { grid-column: 1 / -1; }
.adm-form label { font-size: .78rem; font-weight: 600; color: var(--a-muted); display: block; margin-bottom: 5px; }
.adm-form input, .adm-form textarea, .adm-form select { width: 100%; padding: 9px 11px; border: 1px solid var(--a-border); border-radius: var(--a-radius-sm); font-family: inherit; font-size: .9rem; background: var(--a-surface); box-sizing: border-box; color: var(--a-text); }
.adm-form input:focus, .adm-form textarea:focus, .adm-form select:focus { border-color: var(--a-accent); outline: none; box-shadow: 0 0 0 3px var(--a-accent-weak); }
.adm-imgs { display: flex; gap: 10px; flex-wrap: wrap; }
.adm-imgs .thumb { position: relative; width: 68px; height: 68px; border-radius: var(--a-radius-sm); overflow: hidden; border: 1px solid var(--a-border); }
.adm-imgs .thumb img { width: 100%; height: 100%; object-fit: cover; }
.adm-imgs .thumb button { position: absolute; top: 2px; right: 2px; width: 19px; height: 19px; border-radius: 50%; border: none; background: rgba(178,58,44,.92); color: #fff; cursor: pointer; font-size: .78rem; line-height: 1; }
.adm-modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; }
.adm-card code { background: #F2F0EC; padding: 1px 5px; border-radius: 3px; font-size: .82em; }

/* ---- responsive ---- */
@media (max-width: 820px) {
  .adm-shell { flex-direction: column; }
  .adm-side { width: 100%; height: auto; position: sticky; top: 0; z-index: 30; flex-direction: row; align-items: center; overflow-x: auto; padding: 0 4px; }
  .adm-logo { border-bottom: none; padding: 12px 14px; white-space: nowrap; }
  .adm-nav { flex-direction: row; padding: 6px 4px; gap: 2px; }
  .adm-nav-item { padding: 8px 11px; white-space: nowrap; border-left: none; border-bottom: 2px solid transparent; }
  .adm-nav-item.active { border-radius: var(--a-radius-sm); border-left: none; border-bottom-color: var(--a-accent); }
  .adm-nav-item span.lbl { display: none; }
  .adm-logout span.lbl { display: none; }
  .adm-content { padding: 18px 16px; }
}
@media (max-width: 600px) {
  .adm-form { grid-template-columns: 1fr; }
  .adm-table thead { display: none; }
  .adm-table, .adm-table tbody, .adm-table tr, .adm-table td { display: block; width: 100%; box-sizing: border-box; }
  .adm-table tr { border-bottom: 6px solid var(--a-bg); }
  .adm-table td { border: none; padding: 5px 14px; }
  .adm-table td[colspan] { padding: 30px 14px; }
}

/* ---- admin: toolbar / search ---- */
.adm-toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.adm-search { padding: 8px 12px; border: 1px solid var(--a-border); border-radius: var(--a-radius-sm); font-family: inherit; font-size: .88rem; background: var(--a-surface); color: var(--a-text); min-width: 200px; }
.adm-search:focus { border-color: var(--a-accent); outline: none; box-shadow: 0 0 0 3px var(--a-accent-weak); }

/* ---- admin: dashboard widgets ---- */
.adm-widgets { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; margin-top: 20px; }
.adm-widget { background: var(--a-surface); border: 1px solid var(--a-border); border-radius: var(--a-radius); overflow: hidden; }
.wg-head { padding: 13px 16px; border-bottom: 1px solid var(--a-border); font-weight: 700; font-size: .9rem; background: var(--a-header); }
.wg-body { padding: 4px 16px; }
.wg-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--a-border); font-size: .875rem; }
.wg-row:last-child { border-bottom: none; }
.wg-row b { font-weight: 600; }
.wg-sub { display: block; font-size: .78rem; color: var(--a-muted); margin-top: 2px; }
.wg-row .chip { margin-left: 8px; }
.wg-rank { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; background: var(--a-header); border: 1px solid var(--a-border); border-radius: 4px; font-size: .72rem; font-weight: 700; margin-right: 8px; color: var(--a-muted); }
.wg-empty { padding: 26px 8px; text-align: center; color: var(--a-muted); font-size: .86rem; }

/* ---- admin: order detail ---- */
.od-head { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 18px; }
.od-head h3 { font-size: 1.15rem; font-weight: 700; margin-bottom: 4px; }
.od-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 16px; }
.od-box { background: var(--a-header); border: 1px solid var(--a-border); border-radius: var(--a-radius-sm); padding: 13px 15px; }
.od-box h4 { font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; color: var(--a-muted); margin-bottom: 6px; }
.od-box p { font-size: .88rem; line-height: 1.5; }
.od-items { margin: 0 0 16px; }
.od-items th, .od-items td { padding: 8px 12px; font-size: .85rem; }
.od-totals { max-width: 300px; margin-left: auto; }
.od-row, .od-total { display: flex; justify-content: space-between; padding: 5px 0; font-size: .9rem; color: var(--a-muted); }
.od-total { border-top: 1px solid var(--a-border); margin-top: 6px; padding-top: 10px; font-size: 1.1rem; font-weight: 700; color: var(--a-text); }
.od-pay { margin-top: 12px; font-size: .88rem; text-align: right; }

/* ---- cart: coupon box ---- */
.coupon-box { display: flex; gap: 8px; margin: 6px 0 4px; }
.coupon-box input { flex: 1; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: 10px; font-family: inherit; font-size: .9rem; background: var(--cream); text-transform: uppercase; box-sizing: border-box; }
.coupon-box input:focus { border-color: var(--orange); outline: none; background: #fff; }
.coupon-box button { padding: 10px 16px; border: 1.5px solid var(--orange-deep); background: #fff; color: var(--orange-deep); font-weight: 700; border-radius: 10px; cursor: pointer; font-family: inherit; font-size: .88rem; }
.coupon-box button:hover { background: var(--cream-2); }
.coupon-msg { font-size: .82rem; margin: 2px 0 6px; }
.coupon-msg.ok { color: #1E7D45; }
.coupon-msg.err { color: var(--red-accent); }
.sum-row.discount span:last-child { color: #1E7D45; font-weight: 700; }

@media (max-width: 600px) { .od-grid { grid-template-columns: 1fr; } .adm-search { min-width: 0; flex: 1; } }

/* ===================================================================
   PRODUCT PAGE ENHANCEMENTS + REVIEWS
   =================================================================== */
.stars { display: inline-flex; gap: 1px; vertical-align: middle; }
.stars .st { color: #E2D6C2; font-size: 1rem; line-height: 1; }
.stars .st.on { color: #F5A623; }
.stars.sm .st { font-size: .85rem; }

.pd-rate { display: flex; align-items: center; gap: 8px; margin: 8px 0 4px; }
.pd-rate b { color: var(--brown); font-size: .95rem; }
.rate-link { color: var(--orange-deep); font-size: .88rem; cursor: pointer; }
.rate-link:hover { text-decoration: underline; }
.pd-tax { font-size: .8rem; color: var(--brown-soft); margin-top: -8px; margin-bottom: 4px; }

.pd-delivery { margin-top: 22px; border: 1px solid var(--line); border-radius: 12px; padding: 16px; background: var(--cream); }
.pd-delivery label { font-size: .82rem; font-weight: 700; color: var(--brown); display: block; margin-bottom: 8px; }
.pin-row { display: flex; gap: 8px; }
.pin-row input { flex: 1; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: 10px; font-family: inherit; font-size: .9rem; background: #fff; box-sizing: border-box; }
.pin-row input:focus { border-color: var(--orange); outline: none; }
.pin-row button { padding: 10px 18px; border: none; background: var(--brown); color: #fff; font-weight: 600; border-radius: 10px; cursor: pointer; font-family: inherit; }
.pin-result { font-size: .86rem; margin-top: 10px; line-height: 1.5; }
.pin-result.ok { color: #1E7D45; }
.pin-result.err { color: var(--red-accent); }

.trust-badges { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 22px; }
.trust-badges .tb { display: flex; align-items: center; gap: 8px; font-size: .86rem; color: var(--brown); font-weight: 500; }
.trust-badges .tb svg { width: 18px; height: 18px; stroke: #1E7D45; fill: none; stroke-width: 2.5; background: #E9F7EF; border-radius: 50%; padding: 3px; box-sizing: border-box; }
.pd-price .save { background: #E9F7EF; color: #1E7D45; font-size: .78rem; font-weight: 700; padding: 3px 9px; border-radius: 6px; }

/* accordion */
.pd-accordion { margin-top: 50px; border-top: 1px solid var(--line); }
.acc { border-bottom: 1px solid var(--line); }
.acc-head { width: 100%; text-align: left; background: none; border: none; padding: 18px 2px; font-family: var(--font-head); font-size: 1.05rem; font-weight: 600; color: var(--brown); cursor: pointer; display: flex; justify-content: space-between; align-items: center; }
.acc-ic { font-size: 1.4rem; color: var(--orange-deep); font-weight: 400; transition: transform .2s; }
.acc.open .acc-ic { transform: rotate(45deg); }
.acc-body { max-height: 0; overflow: hidden; transition: max-height .28s ease; }
.acc.open .acc-body { max-height: 600px; }
.acc-body p { color: var(--brown-soft); line-height: 1.7; padding: 0 2px 20px; font-size: .95rem; }
.spec-table { width: 100%; margin: 0 2px 20px; border-collapse: collapse; }
.spec-table td { padding: 9px 0; border-bottom: 1px solid var(--line); font-size: .9rem; color: var(--brown-soft); }
.spec-table td:first-child { font-weight: 600; color: var(--brown); width: 42%; }

/* reviews */
.reviews-section { margin-top: 54px; }
.rv-h2 { font-family: var(--font-head); font-size: 1.5rem; font-weight: 600; color: var(--brown); margin-bottom: 22px; }
.rv-summary { display: grid; grid-template-columns: auto 1fr auto; gap: 34px; align-items: center; background: var(--cream); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px 30px; }
.rv-score { text-align: center; }
.rv-big { font-family: var(--font-head); font-size: 3rem; font-weight: 700; color: var(--brown); line-height: 1; }
.rv-score .stars .st { font-size: 1.1rem; }
.rv-count { font-size: .85rem; color: var(--brown-soft); margin-top: 6px; }
.rv-dist { display: flex; flex-direction: column; gap: 6px; }
.dist-row { display: flex; align-items: center; gap: 10px; font-size: .82rem; color: var(--brown-soft); }
.dist-row > span:first-child { width: 30px; }
.dist-bar { flex: 1; height: 8px; background: #EFE2CE; border-radius: 999px; overflow: hidden; }
.dist-bar i { display: block; height: 100%; background: #F5A623; }
.dist-n { width: 28px; text-align: right; }
.rv-cta { text-align: center; }

.rv-controls { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 24px 0 4px; flex-wrap: wrap; }
.rv-filters { display: flex; gap: 8px; flex-wrap: wrap; }
.rv-chip { padding: 7px 14px; border: 1.5px solid var(--line); background: #fff; border-radius: 999px; font-size: .84rem; font-weight: 600; color: var(--brown-soft); cursor: pointer; font-family: inherit; }
.rv-chip.active { border-color: var(--orange-deep); color: var(--orange-deep); background: var(--cream-2); }
.rv-sort { padding: 8px 12px; border: 1.5px solid var(--line); border-radius: 10px; font-family: inherit; font-size: .86rem; background: #fff; color: var(--brown); }

.rv-list { margin-top: 8px; }
.rv-item { padding: 22px 0; border-bottom: 1px solid var(--line); }
.rv-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.rv-name { font-weight: 700; color: var(--brown); font-size: .95rem; }
.rv-verified { font-size: .74rem; color: #1E7D45; background: #E9F7EF; padding: 2px 8px; border-radius: 999px; font-weight: 600; }
.rv-date { font-size: .8rem; color: var(--brown-soft); margin-left: auto; }
.rv-title { font-weight: 600; color: var(--brown); margin: 8px 0 4px; }
.rv-text { color: var(--brown-soft); line-height: 1.65; font-size: .93rem; }
.rv-photos { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.rv-photo { width: 68px; height: 68px; object-fit: cover; border-radius: 8px; cursor: pointer; border: 1px solid var(--line); }
.rv-helpful { margin-top: 12px; background: none; border: 1.5px solid var(--line); border-radius: 999px; padding: 6px 14px; font-size: .82rem; font-weight: 600; color: var(--brown-soft); cursor: pointer; font-family: inherit; }
.rv-helpful:hover { border-color: var(--orange); color: var(--orange-deep); }
.rv-helpful.done { border-color: #1E7D45; color: #1E7D45; cursor: default; }

/* write review modal */
.rv-modal { position: fixed; inset: 0; background: rgba(58,42,26,.55); display: none; align-items: flex-start; justify-content: center; padding: 34px 16px; z-index: 90; overflow-y: auto; }
.rv-modal.open { display: flex; }
.rv-modal-card { background: #fff; border-radius: var(--radius); width: 100%; max-width: 520px; padding: 26px; box-shadow: var(--shadow); }
.rv-modal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.rv-modal-head h3 { font-family: var(--font-head); font-size: 1.3rem; font-weight: 600; color: var(--brown); }
.rv-close { background: none; border: none; font-size: 1.6rem; color: var(--brown-soft); cursor: pointer; line-height: 1; }
.rv-field { margin-bottom: 14px; }
.rv-field label { display: block; font-size: .82rem; font-weight: 600; color: var(--brown-soft); margin-bottom: 6px; }
.rv-field input, .rv-field textarea { width: 100%; padding: 11px 13px; border: 1.5px solid var(--line); border-radius: 10px; font-family: inherit; font-size: .92rem; background: var(--cream); box-sizing: border-box; color: var(--brown); }
.rv-field input:focus, .rv-field textarea:focus { border-color: var(--orange); outline: none; background: #fff; }
.star-pick { display: flex; gap: 4px; }
.star-pick .st { font-size: 2rem; color: #E2D6C2; cursor: pointer; line-height: 1; }
.star-pick .st.on { color: #F5A623; }
.rv-imgs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.rv-thumb { position: relative; width: 60px; height: 60px; border-radius: 8px; overflow: hidden; border: 1px solid var(--line); }
.rv-thumb img { width: 100%; height: 100%; object-fit: cover; }
.rv-thumb button { position: absolute; top: 1px; right: 1px; width: 18px; height: 18px; border: none; border-radius: 50%; background: rgba(192,57,43,.9); color: #fff; font-size: .75rem; cursor: pointer; line-height: 1; }
.rv-thanks { text-align: center; padding: 20px 0; }
.rv-check { width: 56px; height: 56px; border-radius: 50%; background: #E9F7EF; color: #1E7D45; font-size: 1.8rem; display: flex; align-items: center; justify-content: center; margin: 0 auto 16px; }
.rv-thanks h3 { font-family: var(--font-head); color: var(--brown); font-weight: 600; margin-bottom: 8px; }
.rv-thanks p { color: var(--brown-soft); font-size: .92rem; margin-bottom: 20px; }

/* lightbox */
.lightbox { position: fixed; inset: 0; background: rgba(20,14,8,.9); display: none; align-items: center; justify-content: center; z-index: 100; padding: 30px; cursor: zoom-out; }
.lightbox.open { display: flex; }
.lightbox img { max-width: 92%; max-height: 92%; border-radius: 10px; }
.lb-close { position: absolute; top: 18px; right: 26px; color: #fff; font-size: 2.2rem; cursor: pointer; }

@media (max-width: 760px) {
    .rv-summary { grid-template-columns: 1fr; gap: 20px; text-align: center; }
    .rv-cta .btn { width: 100%; justify-content: center; }
    .trust-badges { grid-template-columns: 1fr; }
    .rv-controls { flex-direction: column; align-items: stretch; }
}

/* ===================================================================
   CMS PAGES (page.php) + footer policy links
   =================================================================== */
.page-wrap { padding: 42px 0 72px; }
.page-content { max-width: 820px; margin: 0 auto; }
.page-content h1 { font-family: var(--font-head); font-size: clamp(1.8rem, 4vw, 2.6rem); color: var(--brown); font-weight: 600; margin-bottom: 10px; letter-spacing: -.5px; }
.page-content h2 { font-family: var(--font-head); font-size: 1.4rem; color: var(--brown); font-weight: 600; margin: 28px 0 12px; }
.page-content h3 { font-size: 1.1rem; color: var(--brown); font-weight: 700; margin: 22px 0 8px; }
.page-content p { color: var(--brown-soft); line-height: 1.75; margin-bottom: 14px; }
.page-content ul { margin: 0 0 16px 20px; color: var(--brown-soft); line-height: 1.8; }
.page-content li { margin-bottom: 4px; }
.page-content a { color: var(--orange-deep); }
.page-content a:hover { text-decoration: underline; }
.page-content strong { color: var(--brown); }

.footer-policy { display: flex; gap: 22px; flex-wrap: wrap; justify-content: center; padding: 6px 22px 18px; border-bottom: 1px solid rgba(255,255,255,.08); margin-bottom: 18px; }
.footer-policy a { color: rgba(255,255,255,.72); font-size: .85rem; transition: color .15s; }
.footer-policy a:hover { color: var(--orange); }

/* ===================================================================
   MOBILE POLISH — storefront (shop / product / cart)
   =================================================================== */
@media (max-width: 560px) {
    /* shop hero */
    .shop-head { padding: 38px 0 22px; }
    .shop-head h1 { font-size: 1.95rem; }
    .shop-head p { font-size: .96rem; }
    .shop-trust { gap: 14px; margin-top: 16px; }
    .shop-trust span { font-size: .8rem; }

    /* product cards — stack price + full-width add button */
    .prod-grid { gap: 12px; padding: 24px 0 56px; }
    .prod-card .pc-body { padding: 12px 12px 14px; }
    .prod-card h3 { font-size: 1rem; margin-bottom: 3px; }
    .prod-card .pc-desc { font-size: .8rem; margin-bottom: 10px; min-height: 0; }
    .prod-card .pc-foot { flex-direction: column; align-items: stretch; gap: 8px; }
    .prod-card .pc-price b { font-size: 1.2rem; }
    .pc-add { width: 100%; justify-content: center; padding: 10px; }
    .pc-pill { display: none; } /* hide category chip on small cards to avoid truncation */

    /* product detail */
    .pd { padding: 16px 0 56px; }
    .pd-grid { gap: 20px; }
    .pd-info h1 { font-size: 1.55rem; }
    .pd-price b { font-size: 1.6rem; }
    .pd-buy { gap: 10px; }
    .pd-buy .qty { flex: 1 1 100%; justify-content: space-between; }
    .pd-buy .btn { flex: 1 1 45%; justify-content: center; padding: 12px 10px; }
    .pd-delivery { padding: 14px; }
    .pd-accordion { margin-top: 32px; }
    .acc-head { font-size: 1rem; padding: 16px 2px; }
    .reviews-section { margin-top: 36px; }
    .rv-h2 { font-size: 1.3rem; margin-bottom: 16px; }
    .rv-summary { padding: 20px 18px; }
    .rv-big { font-size: 2.4rem; }
    .rv-modal-card { padding: 22px 18px; }
    .star-pick .st { font-size: 1.8rem; }

    /* cart */
    .cart-wrap { padding: 20px 0 60px; gap: 20px; }
    .cart-summary { padding: 20px; }
    .cart-summary h3 { font-size: 1.15rem; }
    .checkout-form { gap: 10px; }
}

/* prevent any accidental horizontal scroll on phones */
@media (max-width: 560px) {
    html, body { overflow-x: hidden; }
    .wrap { padding: 0 16px; }
}
