:root {
    --blue: #0a3d91;
    --blue-dark: #072a66;
    --accent: #ffd000;
    --bg: #f4f6fb;
    --card: #ffffff;
    --text: #1c2430;
    --muted: #6b7280;
    --border: #e3e7ef;
    --ok: #1a7f37;
    --err: #b42318;
    --radius: 14px;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
}

.topbar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--blue);
    color: #fff;
    position: sticky;
    top: 0;
    z-index: 10;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: #fff; font-weight: 700; margin-right: auto; }
.brand-badge { background: var(--accent); color: var(--blue-dark); border-radius: 8px; padding: 4px 8px; font-size: 14px; font-weight: 800; }
.brand-text { font-size: 17px; }
.cart-link { color: #fff; text-decoration: none; font-weight: 600; background: rgba(255,255,255,.14); padding: 8px 12px; border-radius: 10px; }
.badge { background: var(--accent); color: var(--blue-dark); border-radius: 999px; padding: 1px 7px; font-size: 13px; font-weight: 800; }

.container { max-width: 720px; margin: 0 auto; padding: 16px; }

h1 { font-size: 24px; margin: 8px 0 4px; }
h2 { font-size: 19px; margin: 24px 0 8px; }
p.lead { color: var(--muted); margin-top: 0; }

.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    margin-bottom: 14px;
}

.product .photo {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    border-radius: 12px;
    background: #eef1f7;
    cursor: zoom-in;
    margin-bottom: 12px;
}
.product .body { min-width: 0; }
.product .label { font-weight: 700; font-size: 17px; }
.product .desc { color: var(--muted); font-size: 14px; margin: 2px 0 8px; }
.price-tag { font-weight: 800; color: var(--blue); }

/* Lightbox / popup fotky */
.lightbox {
    position: fixed; inset: 0; z-index: 100;
    background: rgba(0,0,0,.82);
    display: none; align-items: center; justify-content: center;
    padding: 20px;
}
.lightbox.open { display: flex; }
.lightbox img { max-width: 100%; max-height: 88vh; border-radius: 12px; box-shadow: 0 10px 40px rgba(0,0,0,.5); }
.lightbox .lb-close {
    position: absolute; top: 14px; right: 18px;
    background: rgba(255,255,255,.15); color: #fff; border: none;
    width: 42px; height: 42px; border-radius: 50%; font-size: 24px; cursor: pointer; line-height: 1;
}

.tag { display: inline-block; font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: #eaf0ff; color: var(--blue); }
.tag.fanclub { background: #fff3d6; color: #8a6d00; }

label { display: block; font-weight: 600; margin: 10px 0 4px; font-size: 14px; }
input[type=text], input[type=email], input[type=tel], select, textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 10px;
    font-size: 16px;
    background: #fff;
}
input[type=number] { padding: 10px; border: 1px solid var(--border); border-radius: 10px; font-size: 16px; width: 72px; }

.btn {
    display: inline-block;
    background: var(--blue);
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 13px 18px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
}
.btn:hover { background: var(--blue-dark); }
.btn.full { display: block; width: 100%; }
.btn.secondary { background: #fff; color: var(--blue); border: 1px solid var(--blue); }
.btn.ghost { background: transparent; color: var(--blue); padding-left: 0; }

.link-btn { background: none; border: none; color: #fff; cursor: pointer; text-decoration: underline; font-size: 14px; }
.inline { display: inline; }

.row { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; }
.row > * { flex: 1; }
.row .grow0 { flex: 0; }

.options { display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 8px; }
.options label { display: block; margin: 0; }
.options input { position: absolute; opacity: 0; }
.options span {
    display: block; text-align: center; padding: 10px 6px; border: 1px solid var(--border);
    border-radius: 10px; cursor: pointer; font-weight: 600; background: #fff;
}
.options input:checked + span { border-color: var(--blue); background: #eaf0ff; color: var(--blue); }

.cat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }

.flash { background: #eafbf0; border: 1px solid #b7e4c7; color: var(--ok); padding: 10px 14px; border-radius: 10px; margin-bottom: 14px; }
.errors { background: #fdecea; border: 1px solid #f5c2bd; color: var(--err); padding: 10px 14px; border-radius: 10px; margin-bottom: 14px; }
.errors ul { margin: 0; padding-left: 18px; }

table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 9px 8px; border-bottom: 1px solid var(--border); }
th { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .03em; }

.muted { color: var(--muted); }
.right { text-align: right; }
.total-line { display: flex; justify-content: space-between; font-size: 20px; font-weight: 800; margin-top: 10px; }

.pill { display:inline-block; padding:3px 10px; border-radius:999px; font-size:12px; font-weight:700; }
.pill.new { background:#fff3d6; color:#8a6d00; }
.pill.paid { background:#eafbf0; color:var(--ok); }

.countdown { font-size: 15px; font-weight: 700; color: var(--blue); }

.qr-box { text-align:center; }
.qr-box img, .qr-box svg { width: 220px; height: 220px; }

.pay-row { display:flex; justify-content:space-between; padding:8px 0; border-bottom:1px dashed var(--border); }
.pay-row b { font-variant-numeric: tabular-nums; }

.footer { text-align: center; color: var(--muted); font-size: 13px; padding: 24px; }

.toolbar { display:flex; gap:8px; flex-wrap:wrap; margin-bottom:12px; }
.toolbar a { font-size:14px; }

@media (max-width: 480px) {
    .cat-grid { grid-template-columns: repeat(2, 1fr); }
}
