/* ==========================================================
   DIGIZ 3D — DIGITAL PRODUCTS STORE STYLESHEET
   Dark neon theme + admin panel styles
========================================================== */
:root {
    --bg: #0a0a14;
    --bg2: #12121f;
    --card: #16162430;
    --glass: rgba(22, 22, 36, 0.72);
    --line: rgba(255, 255, 255, 0.09);
    --txt: #eef0f6;
    --muted: #9aa0b5;
    --accent: #22d3ee;
    --accent2: #8b5cf6;
    --ok: #22c55e;
    --warn: #f59e0b;
    --bad: #ef4444;
    --info: #3b82f6;
    --radius: 16px;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    background: var(--bg);
    color: var(--txt);
    font-family: 'Inter', system-ui, sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
}
body.store {
    background:
        radial-gradient(1000px 500px at 85% -5%, rgba(139, 92, 246, 0.13), transparent 60%),
        radial-gradient(900px 500px at -10% 30%, rgba(34, 211, 238, 0.10), transparent 60%),
        var(--bg);
}
h1, h2, h3, h4 { font-family: 'Poppins', sans-serif; line-height: 1.2; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
.muted { color: var(--muted); }
.small { font-size: 0.85rem; }
.mono { font-family: ui-monospace, 'Courier New', monospace; }
.mt { margin-top: 18px; }
.tl { text-align: left; }

/* ---------- top nav ---------- */
.topnav {
    position: sticky; top: 0; z-index: 50;
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px 6vw;
    background: rgba(10, 10, 20, 0.82);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--line);
}
.brand {
    font-family: 'Poppins', sans-serif; font-weight: 800; font-size: 1.35rem;
    letter-spacing: 1px;
}
.brand span {
    background: linear-gradient(90deg, var(--accent), var(--accent2));
    -webkit-background-clip: text; background-clip: text; color: transparent;
}
.brand em { font-style: normal; font-size: 0.65rem; color: var(--muted); margin-left: 6px; letter-spacing: 2px; }
.navlinks { display: flex; gap: 26px; align-items: center; font-weight: 500; }
.navlinks a:hover { color: var(--accent); }
.cart-link { position: relative; }
.cart-badge {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 22px; height: 22px; padding: 0 6px; margin-left: 4px;
    background: linear-gradient(90deg, var(--accent), var(--accent2));
    border-radius: 999px; font-size: 0.78rem; font-weight: 700;
}
.nav-burger { display: none; background: none; border: 0; color: var(--txt); font-size: 1.6rem; cursor: pointer; }
.mobile-menu {
    display: none; flex-direction: column; gap: 14px; padding: 18px 6vw;
    background: var(--bg2); border-bottom: 1px solid var(--line);
}
.mobile-menu.open { display: flex; }

/* ---------- buttons ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 12px 26px; border-radius: 999px; border: 1px solid transparent;
    font-weight: 600; font-size: 0.95rem; cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
    font-family: 'Inter', sans-serif;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary {
    background: linear-gradient(90deg, var(--accent), var(--accent2));
    color: #fff; box-shadow: 0 8px 26px rgba(34, 211, 238, 0.35);
}
.btn-accent { background: var(--accent2); color: #fff; box-shadow: 0 8px 26px rgba(139, 92, 246, 0.3); }
.btn-ghost { background: transparent; border-color: var(--line); color: var(--txt); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn-wa { background: #25d366; color: #fff; box-shadow: 0 8px 26px rgba(37, 211, 102, 0.3); }
.btn-danger { background: var(--bad); color: #fff; }
.btn-sm { padding: 8px 16px; font-size: 0.85rem; }
.btn-xs { padding: 5px 10px; font-size: 0.75rem; }
.btn-lg { padding: 15px 34px; font-size: 1.05rem; }

/* ---------- hero ---------- */
.hero { position: relative; min-height: 58vh; display: flex; align-items: center; padding: 60px 6vw 46px; overflow: hidden; }
#heroCanvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-content { position: relative; z-index: 2; max-width: 640px; }
.hero-tag {
    display: inline-block; padding: 6px 16px; margin-bottom: 14px;
    border: 1px solid var(--line); border-radius: 999px;
    font-size: 0.8rem; letter-spacing: 2px; text-transform: uppercase; color: var(--muted);
    background: rgba(255, 255, 255, 0.04);
}
.hero h1 {
    font-size: clamp(2rem, 4.6vw, 3.2rem); font-weight: 800; letter-spacing: 2px; line-height: 1.05;
}
.hero h1 span {
    background: linear-gradient(90deg, var(--accent), var(--accent2));
    -webkit-background-clip: text; background-clip: text; color: transparent;
    text-shadow: 0 0 40px rgba(34, 211, 238, 0.25);
}
.hero p { margin: 14px 0 24px; color: var(--muted); font-size: 0.98rem; max-width: 500px; }
.hero p b { color: var(--txt); }
.hero-btns { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-stats { display: flex; gap: 30px; margin-top: 28px; }
.hero-stats div { display: flex; flex-direction: column; }
.hero-stats b { font-family: 'Poppins'; font-size: 1.05rem; color: var(--accent); }
.hero-stats span { font-size: 0.72rem; color: var(--muted); text-transform: uppercase; letter-spacing: 1px; }
/* compact hero keeps the 3D scene present but never dominates the fold */
.hero-compact { min-height: 52vh; }
.hero-compact .hero-content { max-width: 700px; }
.hero-compact #heroCanvas { opacity: 0.85; }
.scroll-hint {
    position: absolute; bottom: 26px; left: 50%; transform: translateX(-50%);
    color: var(--muted); font-size: 1.3rem; animation: bob 1.6s infinite ease-in-out; z-index: 2;
}
@keyframes bob { 0%, 100% { transform: translate(-50%, 0); } 50% { transform: translate(-50%, 8px); } }

/* ---------- sections ---------- */
.section { padding: 80px 6vw; }
.section-title { font-size: clamp(1.6rem, 3.5vw, 2.3rem); margin-bottom: 40px; position: relative; padding-left: 18px; }
.section-title::before {
    content: ''; position: absolute; left: 0; top: 6px; bottom: 6px; width: 5px;
    background: linear-gradient(180deg, var(--accent), var(--accent2)); border-radius: 4px;
}
.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; }
.feature-card {
    background: var(--glass); border: 1px solid var(--line); border-radius: var(--radius);
    padding: 28px 22px; transition: border-color 0.25s, transform 0.25s;
}
.feature-card:hover { border-color: var(--accent); }
.feature-icon { font-size: 1.9rem; margin-bottom: 14px; }
.feature-card h3 { font-size: 1.05rem; margin-bottom: 8px; }
.feature-card p { color: var(--muted); font-size: 0.9rem; }

/* ---------- product cards ---------- */
.products-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 24px;
}
.product-card {
    background: var(--glass); border: 1px solid var(--line); border-radius: var(--radius);
    overflow: hidden; transform-style: preserve-3d; will-change: transform;
    transition: border-color 0.25s, box-shadow 0.25s;
}
.product-card:hover { border-color: rgba(34, 211, 238, 0.5); box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45); }
.card-img { position: relative; aspect-ratio: 1 / 1; overflow: hidden; background: #0d0d18; }
.card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s; }
.product-card:hover .card-img img { transform: scale(1.07); }
.off-badge, .hot-badge {
    position: absolute; top: 12px; padding: 4px 10px; border-radius: 999px;
    font-size: 0.72rem; font-weight: 700; letter-spacing: 1px;
}
.off-badge { left: 12px; background: var(--accent); color: #fff; }
.hot-badge { right: 12px; background: linear-gradient(90deg, var(--accent2), var(--accent)); color: #fff; }
.card-body { padding: 16px; }
.card-body h3 { font-size: 0.98rem; font-weight: 600; margin-bottom: 10px; min-height: 2.4em; }
.card-body h3 a:hover { color: var(--accent); }
.card-price { display: flex; align-items: baseline; gap: 10px; margin-bottom: 14px; }
.price {
    font-family: 'Poppins'; font-weight: 700; font-size: 1.2rem;
    background: linear-gradient(90deg, var(--accent), var(--accent2));
    -webkit-background-clip: text; background-clip: text; color: transparent;
}
.old-price { color: var(--muted); text-decoration: line-through; font-size: 0.9rem; }
.card-actions { display: flex; gap: 8px; }

/* ---------- pay strip ---------- */
.pay-strip { padding: 0 6vw 70px; }
.pay-inner {
    display: flex; align-items: center; justify-content: center; gap: 30px; flex-wrap: wrap;
    border: 1px solid var(--line); border-radius: var(--radius);
    background: var(--glass); padding: 26px;
}
.pay-inner div b { font-family: 'Poppins'; font-size: 1.05rem; display: block; }
.pay-inner div span { color: var(--muted); font-size: 0.85rem; }
.pay-sep { width: 1px; height: 34px; background: var(--line); }

/* ---------- product page ---------- */
.pp-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 46px; align-items: start; }
.pp-img {
    position: relative; border-radius: var(--radius); overflow: hidden;
    border: 1px solid var(--line); transform-style: preserve-3d;
}
.pp-img img { width: 100%; transition: transform 0.4s; }
.cat-chip {
    display: inline-block; padding: 5px 14px; margin-bottom: 14px; border-radius: 999px;
    border: 1px solid rgba(34, 211, 238, 0.4); color: var(--accent); font-size: 0.8rem; letter-spacing: 1px;
}
.pp-info h1 { font-size: clamp(1.5rem, 3vw, 2.1rem); margin-bottom: 14px; }
.pp-price .price { font-size: 1.8rem; }
.pp-desc { color: var(--muted); margin: 18px 0 24px; }
.pp-row { margin-bottom: 16px; max-width: 260px; }
.pp-row label { display: block; font-size: 0.85rem; color: var(--muted); margin-bottom: 6px; }
.pp-row select, .pp-row input {
    width: 100%; padding: 12px 14px; background: var(--bg2); color: var(--txt);
    border: 1px solid var(--line); border-radius: 10px; font-family: inherit;
}
.pp-btns { display: flex; gap: 12px; flex-wrap: wrap; margin: 22px 0; }
.pp-meta { list-style: none; color: var(--muted); font-size: 0.9rem; }
.pp-meta li { padding: 7px 0; border-bottom: 1px dashed var(--line); }
.pp-meta li:last-child { border-bottom: 0; }
.pp-meta b { color: var(--txt); }
.pp-video { margin-top: 60px; }
.pp-video h2 { margin-bottom: 18px; font-size: 1.4rem; }
.video-frame { position: relative; padding-top: 56.25%; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: #000; }
.video-frame iframe, .video-frame video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-frame.small { margin-top: 14px; }

/* ---------- cart / checkout ---------- */
.cart-list { margin-bottom: 18px; }
.cart-row {
    display: flex; align-items: center; gap: 16px; padding: 14px;
    background: var(--glass); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 12px;
    flex-wrap: wrap;
}
.cart-thumb { width: 74px; height: 74px; border-radius: 10px; overflow: hidden; flex-shrink: 0; background: #0d0d18; }
.cart-thumb img { width: 100%; height: 100%; object-fit: cover; }
.cart-info { flex: 1; min-width: 180px; }
.cart-info h4 { font-size: 0.95rem; }
.cart-info .muted { display: block; font-size: 0.82rem; }
.cart-qty {
    width: 70px; padding: 9px; background: var(--bg2); color: var(--txt);
    border: 1px solid var(--line); border-radius: 8px; text-align: center;
}
.cart-line { font-weight: 700; min-width: 90px; text-align: right; }
.cart-del {
    background: none; border: 1px solid var(--line); color: var(--bad); width: 34px; height: 34px;
    border-radius: 8px; cursor: pointer; font-weight: 700;
}
.cart-del:hover { background: var(--bad); color: #fff; }
.cart-total {
    display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap;
    padding: 22px; margin-top: 22px; border: 1px solid var(--line); border-radius: var(--radius);
    background: var(--glass); font-size: 1.15rem;
}
.co-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 34px; align-items: start; }
.co-form, .co-summary, .pay-box, .pay-method, .ref-form, .pay-summary {
    background: var(--glass); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px;
}
.co-form h3, .co-summary h3 { margin: 10px 0 16px; font-size: 1.1rem; }
.form-row { margin-bottom: 16px; }
.form-row label { display: block; font-size: 0.85rem; color: var(--muted); margin-bottom: 6px; }
.form-row input, .form-row textarea, .form-row select {
    width: 100%; padding: 12px 14px; background: var(--bg2); color: var(--txt);
    border: 1px solid var(--line); border-radius: 10px; font-family: inherit; font-size: 0.95rem;
}
.form-row input:focus, .form-row textarea:focus, .form-row select:focus { outline: none; border-color: var(--accent); }
.form-row textarea.code {
    font-family: Consolas, Monaco, 'Courier New', monospace; font-size: 0.85rem; line-height: 1.5;
    resize: vertical; min-height: 120px; white-space: pre; color: var(--accent);
}
.form-row.two { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.method-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 22px; }
.method-card {
    display: flex; gap: 12px; align-items: flex-start; padding: 16px; cursor: pointer;
    border: 1px solid var(--line); border-radius: 12px; transition: border-color 0.2s;
}
.method-card:hover { border-color: var(--accent2); }
.method-card input { margin-top: 4px; accent-color: var(--accent); }
.method-card b { display: block; font-family: 'Poppins'; }
.method-card span { color: var(--muted); font-size: 0.82rem; }
.sum-row { display: flex; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px dashed var(--line); }
.sum-row img { width: 52px; height: 52px; object-fit: cover; border-radius: 8px; background: #0d0d18; }
.sum-row div { flex: 1; }
.sum-row b { display: block; font-size: 0.9rem; }
.sum-row .muted { font-size: 0.8rem; }
.sum-total { padding-top: 16px; font-size: 1.15rem; text-align: right; }

/* ---------- payment page ---------- */
.pay-page { max-width: 760px; margin: 0 auto; }
.pay-order-tag {
    display: inline-block; padding: 6px 16px; border-radius: 999px; margin-bottom: 16px;
    background: rgba(34, 211, 238, 0.12); color: var(--accent); font-size: 0.9rem; letter-spacing: 1px;
}
.pay-box h2 { margin-bottom: 8px; }
.pay-box .amount { color: var(--accent); font-size: 1.3rem; font-family: 'Poppins'; }
.pay-method { margin: 22px 0; }
.pay-method h3 { margin-bottom: 16px; font-size: 1.05rem; }
.pay-qr { background: #fff; padding: 12px; width: 204px; border-radius: 12px; margin-bottom: 16px; }
.pay-address {
    font-family: ui-monospace, monospace; font-size: 0.95rem; word-break: break-all;
    background: var(--bg2); border: 1px dashed var(--line); border-radius: 10px; padding: 14px; margin-bottom: 12px;
}
.bank-table { width: 100%; border-collapse: collapse; margin-bottom: 14px; }
.bank-table th, .bank-table td { text-align: left; padding: 9px 10px; border-bottom: 1px dashed var(--line); font-size: 0.92rem; }
.bank-table th { color: var(--muted); font-weight: 500; width: 40%; }
.pay-success { text-align: center; padding: 20px 6px 26px; }
.success-icon {
    width: 74px; height: 74px; margin: 0 auto 18px; display: flex; align-items: center; justify-content: center;
    border-radius: 50%; background: rgba(34, 197, 94, 0.15); color: var(--ok); font-size: 2rem; font-weight: 800;
    border: 2px solid var(--ok);
}
.pay-success h2 { margin-bottom: 10px; }
.pay-success p { max-width: 480px; margin: 0 auto 22px; }
.pay-summary { margin-top: 22px; }

/* ---------- static info pages (about / delivery / privacy / terms) ---------- */
.info-page { max-width: 860px; margin: 0 auto; }
.info-page p { color: #b7bccc; font-size: 0.95rem; line-height: 1.8; margin: 12px 0; }
.info-page h3 { margin: 26px 0 8px; font-size: 1.12rem; color: var(--txt); font-family: Poppins, sans-serif; }
.info-page ul { padding-left: 22px; margin: 10px 0; }
.info-page ul li { color: #b7bccc; font-size: 0.95rem; line-height: 1.8; margin: 6px 0; }
.info-page a { color: var(--accent); }
.info-page table { width: 100%; border-collapse: collapse; margin: 18px 0; }
.info-page th, .info-page td { border: 1px solid var(--line); padding: 12px 16px; text-align: left; font-size: 0.92rem; color: #b7bccc; }
.info-page th { background: rgba(255, 255, 255, 0.04); color: var(--txt); font-family: Poppins, sans-serif; }
.info-page td b { color: var(--accent); font-size: 1rem; }
.info-page .btn { margin-top: 10px; }

/* ---------- footer ---------- */
.footer { border-top: 1px solid var(--line); background: rgba(10, 10, 20, 0.6); margin-top: 40px; }
.footer-inner {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 30px; padding: 50px 6vw 30px;
}
.footer-col p { color: var(--muted); font-size: 0.88rem; margin-top: 12px; }
.footer-col h4 { margin-bottom: 12px; font-size: 0.95rem; }
.footer-col a { display: block; color: var(--muted); font-size: 0.88rem; padding: 4px 0; }
.footer-col a:hover { color: var(--accent); }
.footer-bottom { text-align: center; color: var(--muted); font-size: 0.8rem; padding: 16px; border-top: 1px solid var(--line); }
.wa-float {
    position: fixed; right: 22px; bottom: 22px; z-index: 60;
    width: 58px; height: 58px; border-radius: 50%; background: #25d366;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 10px 30px rgba(37, 211, 102, 0.4); transition: transform 0.2s;
    animation: waPulse 2.4s infinite;
}
.wa-float:hover { transform: scale(1.1); }
@keyframes waPulse {
    0%, 100% { box-shadow: 0 10px 30px rgba(37, 211, 102, 0.4), 0 0 0 0 rgba(37, 211, 102, 0.35); }
    50% { box-shadow: 0 10px 30px rgba(37, 211, 102, 0.4), 0 0 0 14px rgba(37, 211, 102, 0); }
}

/* ---------- empty state / flash ---------- */
.empty-state {
    text-align: center; padding: 70px 20px; border: 1px dashed var(--line); border-radius: var(--radius);
    background: var(--glass);
}
.empty-state h3 { margin-bottom: 8px; }
.empty-state a { color: var(--accent); }
.flash {
    padding: 12px 18px; border-radius: 10px; margin: 14px 0; font-size: 0.92rem;
    border: 1px solid var(--line);
}
.flash-ok { background: rgba(34, 197, 94, 0.1); border-color: rgba(34, 197, 94, 0.4); color: #4ade80; }
.flash-bad { background: rgba(239, 68, 68, 0.1); border-color: rgba(239, 68, 68, 0.4); color: #f87171; }
.flash-warn { background: rgba(245, 158, 11, 0.1); border-color: rgba(245, 158, 11, 0.4); color: #fbbf24; }

/* ---------- admin diagnostics page ---------- */
.diag-dot {
    display: inline-block; width: 12px; height: 12px; border-radius: 50%; vertical-align: middle;
}
.diag-ok   { background: var(--ok);   box-shadow: 0 0 8px rgba(34, 197, 94, 0.6); }
.diag-warn { background: var(--warn); box-shadow: 0 0 8px rgba(245, 158, 11, 0.6); }
.diag-bad  { background: var(--bad);  box-shadow: 0 0 8px rgba(239, 68, 68, 0.7); }
.diag-info { background: var(--info); box-shadow: 0 0 8px rgba(59, 130, 246, 0.6); }
.diag-t-bad { color: var(--bad); font-weight: 600; }
.diag-t-warn { color: var(--warn); }
.diag-detail { font-size: 0.85rem; color: var(--muted); }
.diag-box {
    width: 100%; min-height: 220px; background: var(--bg2); color: var(--txt);
    border: 1px solid var(--line); border-radius: 12px; padding: 14px;
    font-family: Consolas, Menlo, monospace; font-size: 0.78rem; line-height: 1.5;
    margin-bottom: 14px; white-space: pre;
}

.badge { padding: 4px 10px; border-radius: 999px; font-size: 0.72rem; font-weight: 700; white-space: nowrap; }
.badge-warn { background: rgba(245, 158, 11, 0.15); color: var(--warn); }
.badge-ok { background: rgba(34, 197, 94, 0.15); color: var(--ok); }
.badge-info { background: rgba(59, 130, 246, 0.15); color: var(--info); }
.badge-done { background: rgba(34, 197, 94, 0.25); color: #86efac; }
.badge-bad { background: rgba(239, 68, 68, 0.15); color: var(--bad); }

/* ---------- reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ==========================================================
   ADMIN PANEL
========================================================== */
body.admin { background: #0c0c16; }
.admin-wrap { display: flex; min-height: 100vh; }
.admin-side {
    width: 230px; flex-shrink: 0; background: #10101c; border-right: 1px solid var(--line);
    padding: 22px 14px; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh;
}
.admin-side .brand { display: block; padding: 6px 10px 20px; }
.admin-nav { display: flex; flex-direction: column; gap: 4px; }
.admin-nav a {
    padding: 11px 14px; border-radius: 10px; color: var(--muted); font-weight: 500; font-size: 0.92rem;
    transition: background 0.2s, color 0.2s;
}
.admin-nav a:hover { background: rgba(255, 255, 255, 0.05); color: var(--txt); }
.admin-side-foot { margin-top: auto; color: var(--muted); font-size: 0.75rem; padding: 10px; }
.admin-main { flex: 1; padding: 26px 32px 60px; min-width: 0; }
.admin-top h1 { font-size: 1.5rem; margin-bottom: 24px; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 16px; margin-bottom: 26px; }
.stat-card {
    background: var(--glass); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px;
}
.stat-card b { font-family: 'Poppins'; font-size: 1.7rem; display: block; }
.stat-card span { color: var(--muted); font-size: 0.82rem; }
.stat-card.ok b { color: var(--ok); }
.stat-card.warn b { color: var(--warn); }
.admin-quick { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 30px; }
.admin-table { width: 100%; border-collapse: collapse; background: var(--glass); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.admin-table th, .admin-table td { padding: 11px 12px; border-bottom: 1px solid var(--line); font-size: 0.88rem; text-align: center; vertical-align: middle; }
.admin-table th { background: rgba(255, 255, 255, 0.04); color: var(--muted); font-weight: 600; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 1px; }
.admin-table .actions { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; }
.thumb { width: 46px; height: 46px; object-fit: cover; border-radius: 8px; margin: 0 auto; }
.details-row td { background: rgba(255, 255, 255, 0.02); }
.status-form { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.status-form select {
    padding: 8px 12px; background: var(--bg2); color: var(--txt); border: 1px solid var(--line); border-radius: 8px;
}
.order-detail { color: var(--muted); font-size: 0.85rem; text-align: left; }
.order-detail ul { margin: 6px 0 8px 20px; }
.order-detail a { color: var(--accent); }
.filter-row { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }

/* login */
.login-body { display: flex; align-items: center; justify-content: center; min-height: 100vh;
    background: radial-gradient(700px 400px at 20% 10%, rgba(34,211,238,0.12), transparent), #0a0a14; }
.login-box {
    width: 380px; max-width: 92vw; background: var(--glass); border: 1px solid var(--line);
    border-radius: 18px; padding: 34px; backdrop-filter: blur(10px);
}
.login-box .brand { font-size: 1.5rem; display: block; margin-bottom: 22px; }

/* import + edit forms */
.import-hero { max-width: 640px; }
.import-form { display: flex; gap: 10px; margin: 20px 0 10px; }
.import-form input {
    flex: 1; padding: 13px 16px; background: var(--bg2); color: var(--txt);
    border: 1px solid var(--line); border-radius: 12px; font-family: inherit;
}
.import-form input:focus { outline: none; border-color: var(--accent); }
.edit-form, .settings-form { max-width: 100%; }
.settings-form { max-width: 560px; }
.ef-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 30px; align-items: start; }
.ef-preview {
    background: var(--glass); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px;
}
.ef-preview img { border-radius: 10px; width: 100%; }
.ef-preview h3 { margin-bottom: 12px; }
.checks { display: flex; gap: 20px; flex-wrap: wrap; }
.checks label { display: flex; align-items: center; gap: 8px; color: var(--txt); font-size: 0.92rem; cursor: pointer; }
.checks input { width: auto; accent-color: var(--accent); }
.help-box {
    margin-top: 30px; max-width: 640px; background: var(--glass); border: 1px solid var(--line);
    border-radius: var(--radius); padding: 22px; color: var(--muted); font-size: 0.9rem;
}
.help-box h3 { color: var(--txt); margin-bottom: 10px; }
.help-box ul { margin-left: 18px; }
.help-box li { padding: 5px 0; }
.help-box code { background: var(--bg2); padding: 2px 6px; border-radius: 6px; color: var(--accent); }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
    .pp-grid, .co-grid, .ef-grid { grid-template-columns: 1fr; }
    .navlinks { display: none; }
    .nav-burger { display: block; }
    .admin-side { position: fixed; left: -240px; z-index: 90; transition: left 0.3s; }
    .admin-side.open { left: 0; }
    .admin-main { padding: 20px 16px 60px; }
    .admin-table { display: block; overflow-x: auto; }
}

/* ==========================================================
   v1.6 — GALLERY MANAGER / AI CONTROL / PRODUCT GALLERY / SEO
========================================================== */

/* ---- admin: gallery picker on Import ---- */
.gal-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 10px; margin: 10px 0 12px; }
.gal-item { position: relative; border: 2px solid var(--line); border-radius: 10px; overflow: hidden; cursor: pointer; background: var(--bg2); transition: border-color .15s, box-shadow .15s; }
.gal-item img { width: 100%; height: 92px; object-fit: cover; display: block; }
.gal-item:hover { border-color: var(--accent); }
.gal-item.on { border-color: var(--ok); }
.gal-item.off img { opacity: .3; }
.gal-item.main { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(34, 211, 238, .35); }
.gal-item .gal-main { position: absolute; opacity: 0; width: 1px; height: 1px; }
.gal-item .gal-keep { position: absolute; top: 4px; left: 4px; background: rgba(10, 10, 20, .78); border-radius: 6px; padding: 2px 6px; font-size: .68rem; display: flex; gap: 4px; align-items: center; cursor: pointer; }
.gal-item .gal-keep input { accent-color: var(--ok); }
.gal-item .gal-cover { position: absolute; top: 4px; right: 4px; background: var(--accent); color: #fff; font-size: .6rem; font-weight: 700; padding: 2px 7px; border-radius: 6px; letter-spacing: 1px; display: none; }
.gal-item.main .gal-cover { display: block; }
.edit-form textarea { margin-top: 6px; }

/* ---- admin: video rows ---- */
.vid-list { margin: 10px 0; }
.vid-row { display: flex; gap: 10px; align-items: center; background: var(--glass); border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; margin-bottom: 8px; flex-wrap: wrap; }
.vid-row.on { border-color: var(--ok); }
.vid-row .vid-url { font-size: .78rem; color: var(--muted); word-break: break-all; flex: 1; min-width: 180px; }
.vid-radio { display: flex; gap: 5px; align-items: center; font-size: .8rem; color: var(--txt); white-space: nowrap; cursor: pointer; }
.vid-radio input { accent-color: var(--accent); }

/* ---- admin: Gemini Platform Control ---- */
.ai-cards { margin-bottom: 24px; }
.ai-feature { display: flex; gap: 14px; align-items: flex-start; background: var(--glass); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; margin-bottom: 10px; max-width: 720px; }
.ai-feature input[type="checkbox"] { margin-top: 5px; transform: scale(1.35); accent-color: var(--accent); }
.ai-feature b { display: block; margin-bottom: 3px; }
.ai-feature span { color: var(--muted); font-size: .85rem; line-height: 1.5; }
.help-box a { color: var(--accent); }
.import-form-v { max-width: 640px; }

/* ---- storefront: product page gallery ---- */
.pp-thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(62px, 1fr)); gap: 8px; margin-top: 14px; }
.pp-thumbs img { width: 100%; height: 62px; object-fit: cover; border-radius: 8px; border: 2px solid var(--line); cursor: pointer; opacity: .7; transition: opacity .15s, border-color .15s; }
.pp-thumbs img:hover { opacity: 1; }
.pp-thumbs img.on { border-color: var(--accent); opacity: 1; }
.pp-gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; margin-top: 16px; }
.pp-gallery-grid img { width: 100%; border-radius: var(--radius); border: 1px solid var(--line); aspect-ratio: 1; object-fit: cover; }
.pp-videos { display: grid; gap: 18px; max-width: 760px; }

/* ==========================================================
   DIGIZ 3D — DIGITAL PRODUCTS EXTRAS
========================================================== */

/* instant-download badge on store cards */
.dl-badge {
    position: absolute;
    right: 12px;
    bottom: 12px;
    padding: 5px 12px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.4px;
    color: #062027;
    background: var(--accent);
    box-shadow: 0 4px 14px rgba(34, 211, 238, 0.35);
}

/* download list on the paid order page */
.dl-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 20px 0;
}
.dl-row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.03);
}
.dl-row img {
    width: 64px;
    height: 64px;
    object-fit: cover;
    border-radius: 10px;
    flex-shrink: 0;
}
.dl-row .btn { flex-shrink: 0; margin-left: auto; }
.dl-meta { min-width: 0; }
.dl-meta b { display: block; margin-bottom: 2px; }

/* one-time download states (v1.1) */
.dl-once {
    font-size: 0.72rem;
    opacity: 0.85;
    font-weight: 600;
}
.dl-used {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
    margin-left: auto;
    padding: 8px 16px;
    border-radius: 999px;
    border: 1px solid rgba(74, 222, 128, 0.45);
    background: rgba(74, 222, 128, 0.1);
    color: #4ade80;
    font-size: 0.82rem;
    font-weight: 600;
    white-space: nowrap;
}
@media (max-width: 640px) {
    .dl-used { margin-left: 0; width: 100%; justify-content: center; }
}

/* admin: one-time delivery chips + inline issue buttons (v1.1) */
.issue-list { margin: 6px 0 10px; padding-left: 18px; }
.issue-list li { margin-bottom: 6px; line-height: 1.7; }
.chip {
    display: inline-block;
    padding: 3px 10px;
    margin: 0 6px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    vertical-align: middle;
    white-space: nowrap;
}
.chip-ok   { background: rgba(74, 222, 128, 0.14);  border: 1px solid rgba(74, 222, 128, 0.5);  color: #4ade80; }
.chip-used { background: rgba(148, 163, 184, 0.14); border: 1px solid rgba(148, 163, 184, 0.5); color: #94a3b8; }
.chip-warn { background: rgba(251, 191, 36, 0.14);  border: 1px solid rgba(251, 191, 36, 0.5);  color: #fbbf24; }
.inline-form { display: inline-block; margin: 0; vertical-align: middle; }

@media (max-width: 640px) {
    .dl-row { flex-wrap: wrap; }
    .dl-row .btn { margin-left: 0; width: 100%; }
}

/* product page file hint */
.file-hint {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 14px;
    margin-bottom: 12px;
    border-radius: 999px;
    border: 1px solid rgba(34, 211, 238, 0.4);
    background: rgba(34, 211, 238, 0.08);
    color: var(--accent);
    font-size: 0.82rem;
    font-weight: 600;
}

/* ==========================================================
   v1.2 — MARKETPLACE EDITION
   branding, accounts, seller studio, promoted ads, sell CTA
========================================================== */

/* header brand logo + account links */
.brand-logo { max-height: 30px; width: auto; max-width: 150px; display: block; }
.brand { display: flex; align-items: center; }
.nav-cta {
    border: 1px solid var(--accent);
    color: var(--accent) !important;
    padding: 7px 14px !important;
    border-radius: 999px;
    font-weight: 600 !important;
}
.nav-cta:hover { background: var(--accent); color: #fff !important; }
.nav-account { font-weight: 600; }

/* promoted (paid ads) strip — always on top */
.promoted-section { padding-top: 26px; }
.promoted-head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 4px; }
.promoted-head .section-title { margin-bottom: 0; }
.promoted-tag {
    padding: 4px 12px; border-radius: 999px; font-size: 0.72rem; font-weight: 700;
    letter-spacing: 1px; text-transform: uppercase;
    color: #fbbf24; background: rgba(251, 191, 36, 0.12);
    border: 1px solid rgba(251, 191, 36, 0.4);
}
.promo-badge {
    position: absolute; top: 12px; left: 12px; z-index: 2;
    padding: 4px 10px; border-radius: 999px; font-size: 0.68rem; font-weight: 800;
    letter-spacing: 0.5px; color: #0a0a14;
    background: linear-gradient(90deg, #fbbf24, #f59e0b);
    box-shadow: 0 0 18px rgba(251, 191, 36, 0.45);
}
.promoted-card { border-color: rgba(251, 191, 36, 0.45); }
.promoted-card:hover { box-shadow: 0 14px 40px rgba(251, 191, 36, 0.12); }

/* sell with us CTA */
.sell-section { padding-top: 20px; }
.sell-box {
    display: grid; grid-template-columns: 1.4fr 1fr; gap: 40px; align-items: center;
    background: linear-gradient(135deg, rgba(34, 211, 238, 0.06), rgba(139, 92, 246, 0.08));
    border: 1px solid var(--line); border-radius: 22px; padding: 42px;
}
.sell-box h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); margin-bottom: 12px; }
.sell-points { list-style: none; margin: 16px 0 24px; padding: 0; }
.sell-points li { margin: 8px 0; color: #b7bccc; font-size: 0.95rem; }
.sell-visual { display: flex; flex-direction: column; gap: 14px; }
.sell-card {
    display: flex; align-items: center; gap: 12px;
    background: rgba(255, 255, 255, 0.04); border: 1px solid var(--line);
    border-radius: 14px; padding: 16px 20px; font-size: 0.95rem; color: var(--txt);
}
.sell-card b { font-size: 1.4rem; }
.sell-card span { color: var(--muted); font-weight: 600; }
.sc2 { margin-left: 26px; }
.sc3 { margin-left: 52px; }
@media (max-width: 860px) {
    .sell-box { grid-template-columns: 1fr; padding: 28px; }
    .sell-visual { display: none; }
}

/* auth (login / register) */
.auth-section { display: flex; justify-content: center; }
.auth-box {
    width: 100%; max-width: 560px; background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--line); border-radius: 20px; padding: 34px;
}
.auth-box h2 { margin-bottom: 6px; }
.auth-form { margin-top: 14px; }
.auth-switch { margin-top: 16px; }
.auth-switch a { color: var(--accent); font-weight: 600; }
.role-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 18px 0 4px; }
.role-card {
    display: flex; flex-direction: column; gap: 6px;
    border: 1px solid var(--line); border-radius: 14px; padding: 16px;
    text-decoration: none; color: var(--txt); transition: border-color 0.2s, background 0.2s;
}
.role-card span { color: var(--muted); font-size: 0.82rem; line-height: 1.5; }
.role-card:hover { border-color: var(--accent); }
.role-card.sel { border-color: var(--accent); background: rgba(34, 211, 238, 0.08); }
.role-card b { font-size: 1rem; }

/* my account / seller studio */
.account-grid { display: grid; grid-template-columns: 300px 1fr; gap: 24px; align-items: start; }
.account-card {
    background: rgba(255, 255, 255, 0.03); border: 1px solid var(--line);
    border-radius: 18px; padding: 24px; margin-bottom: 20px;
}
.account-card h3 { margin-bottom: 12px; }
.account-card .btn { margin-top: 10px; }
.account-main { min-width: 0; }
.account-avatar {
    width: 64px; height: 64px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
    font-family: 'Poppins'; font-size: 1.6rem; font-weight: 700; color: #fff;
    background: linear-gradient(135deg, var(--accent), var(--accent2)); margin-bottom: 14px;
}
@media (max-width: 900px) { .account-grid { grid-template-columns: 1fr; } }
.card-head-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 14px; }
.card-head-row .section-title { margin-bottom: 0; }
.ok-txt { color: var(--ok); }
.badge-muted { background: rgba(148, 163, 184, 0.15); color: #94a3b8; }

/* admin table inside storefront account pages */
.admin-table.flat { background: none; border: 0; }
.admin-table.flat th, .admin-table.flat td { border-color: rgba(255,255,255,0.06); }

/* seller studio promote form */
.promote-row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.promote-row select { min-width: 220px; }
.seller-stats { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.seller-product-form .form-row.three { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; }
.seller-product-form .form-row.three > div { display: flex; flex-direction: column; gap: 6px; }
.form-preview { width: 120px; height: 90px; object-fit: cover; border-radius: 10px; margin-top: 10px; border: 1px solid var(--line); }
.save-row { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: 8px; }
.rate-form { display: inline-flex; align-items: center; gap: 6px; }
.rate-form input[type="number"] { width: 58px; padding: 4px 8px; font-size: 0.8rem; }
.ad-pay-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* admin branding previews */
.branding-preview { display: flex; align-items: center; gap: 14px; margin: 8px 0; }
.branding-preview img { max-height: 46px; max-width: 160px; border-radius: 8px; border: 1px solid var(--line); background: #0d0d18; }

/* settings textarea for site description */
textarea[name="site_description"] {
    width: 100%; background: #0d0d18; border: 1px solid var(--line); border-radius: 10px;
    color: var(--txt); padding: 12px 14px; font: inherit; resize: vertical;
}

/* seller chip on product page */
.seller-chip { border-color: rgba(139, 92, 246, 0.5); color: #c4b5fd; background: rgba(139, 92, 246, 0.1); }
