:root {
    --bg: #f5f7fb;
    --surface: #ffffff;
    --ink: #17202f;
    --muted: #687386;
    --line: #dfe5ee;
    --primary: #126e4a;
    --primary-dark: #0d5238;
    --danger: #ba2636;
    --warning: #a66a00;
    --shadow: 0 18px 45px rgba(23, 32, 47, .12);
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    color: var(--ink);
    background: var(--bg);
    -webkit-text-size-adjust: 100%;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

.site-header {
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px clamp(16px, 4vw, 48px);
    background: rgba(255,255,255,.92);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(12px);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
}

.brand-mark {
    display: grid;
    width: 36px;
    height: 36px;
    place-items: center;
    border-radius: 8px;
    color: #fff;
    background: var(--primary);
}

.admin-link,
.admin-nav a {
    color: var(--muted);
    font-weight: 700;
}

.admin-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

.shell {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 32px 0 56px;
}

.hero {
    min-height: 260px;
    display: flex;
    align-items: end;
    padding: 36px;
    margin-bottom: 24px;
    color: #fff;
    background:
        linear-gradient(110deg, rgba(18,110,74,.95), rgba(18,110,74,.55)),
        url('https://images.unsplash.com/photo-1579952363873-27f3bade9f55?auto=format&fit=crop&w=1600&q=80') center/cover;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.hero h1 {
    max-width: 720px;
    margin: 4px 0 8px;
    font-size: clamp(34px, 6vw, 68px);
    line-height: .98;
}

.hero p { max-width: 620px; font-size: 18px; }
.eyebrow { margin: 0; font-weight: 800; text-transform: uppercase; letter-spacing: 0; }

.pack-hero {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 420px);
    gap: 28px;
    align-items: center;
    margin-bottom: 24px;
    padding: clamp(20px, 4vw, 42px);
    overflow: hidden;
    color: #fff;
    background:
        radial-gradient(circle at 20% 20%, rgba(255,255,255,.22), transparent 28%),
        linear-gradient(135deg, #114c37, #111827 68%);
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.pack-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(115deg, transparent 0 14%, rgba(255,255,255,.12) 14% 15%, transparent 15% 100%),
        radial-gradient(circle at 12% 22%, #facc15 0 4px, transparent 5px),
        radial-gradient(circle at 22% 72%, #38bdf8 0 3px, transparent 4px),
        radial-gradient(circle at 52% 18%, #ef4444 0 3px, transparent 4px),
        radial-gradient(circle at 64% 82%, #22c55e 0 4px, transparent 5px),
        radial-gradient(circle at 88% 22%, #ffffff 0 3px, transparent 4px);
    opacity: .7;
    pointer-events: none;
}

.pack-copy,
.pack-photo {
    position: relative;
    z-index: 1;
}

.pack-copy h1 {
    max-width: 720px;
    margin: 8px 0 12px;
    font-size: clamp(34px, 6vw, 68px);
    line-height: .98;
}

.pack-copy p {
    max-width: 610px;
    font-size: 18px;
}

.price-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
}

.price-strip span {
    padding: 9px 12px;
    border: 1px solid rgba(255,255,255,.24);
    border-radius: 8px;
    background: rgba(255,255,255,.12);
    font-weight: 800;
}

.pack-photo {
    position: relative;
    aspect-ratio: 4 / 5;
    max-height: 520px;
    border-radius: 8px;
    overflow: visible;
    transform: rotate(2deg);
    box-shadow: 0 24px 70px rgba(0,0,0,.38);
}

.pack-photo::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(145deg, rgba(255,255,255,.28), transparent 38%, rgba(0,0,0,.18));
    mix-blend-mode: screen;
    pointer-events: none;
}

.pack-photo::after {
    content: "";
    position: absolute;
    inset: -16px;
    z-index: 0;
    border-radius: 12px;
    background:
        radial-gradient(circle at 12% 18%, rgba(255, 220, 87, .75) 0 3px, transparent 4px),
        radial-gradient(circle at 78% 10%, rgba(59, 178, 115, .8) 0 3px, transparent 4px),
        radial-gradient(circle at 92% 44%, rgba(255, 255, 255, .8) 0 2px, transparent 3px),
        radial-gradient(circle at 16% 78%, rgba(0, 174, 239, .8) 0 3px, transparent 4px),
        radial-gradient(circle at 70% 88%, rgba(239, 68, 68, .75) 0 3px, transparent 4px);
    filter: drop-shadow(0 8px 14px rgba(0,0,0,.2));
    pointer-events: none;
}

.pack-photo img {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(1.12) contrast(1.08);
    transform: scale(1.03);
    border-radius: 8px;
}

.confetti {
    position: absolute;
    z-index: 2;
    width: 9px;
    height: 18px;
    border-radius: 2px;
    opacity: .92;
    pointer-events: none;
    animation: floatConfetti 3.6s ease-in-out infinite;
}

.c1 { top: -10px; left: 12%; background: #facc15; transform: rotate(18deg); }
.c2 { top: 9%; right: -12px; background: #22c55e; animation-delay: .4s; transform: rotate(-18deg); }
.c3 { top: 46%; left: -13px; background: #38bdf8; animation-delay: .8s; transform: rotate(34deg); }
.c4 { right: 10%; bottom: -11px; background: #ef4444; animation-delay: 1.2s; transform: rotate(-28deg); }
.c5 { top: 27%; left: -8px; background: #fff; animation-delay: 1.6s; transform: rotate(8deg); }
.c6 { right: -9px; bottom: 26%; background: #f97316; animation-delay: 2s; transform: rotate(42deg); }

@keyframes floatConfetti {
    0%, 100% { translate: 0 0; }
    50% { translate: 0 10px; }
}

.pack-panel,
.section-title {
    margin-bottom: 24px;
}

.pack-panel {
    padding: 20px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: 0 10px 28px rgba(23,32,47,.07);
}

.pack-panel h2,
.section-title h2 {
    margin: 6px 0 0;
    font-size: 30px;
}

.pack-options {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    margin-top: 16px;
}

.pack-builder {
    display: grid;
    gap: 14px;
    margin-top: 16px;
    padding: 16px;
    border: 2px solid #c4d2e3;
    border-radius: 8px;
    background:
        radial-gradient(circle at 10% 8%, rgba(250,204,21,.2), transparent 32%),
        linear-gradient(180deg, rgba(18, 110, 74, .1), rgba(255,255,255,.94)),
        #ffffff;
    box-shadow: 0 16px 36px rgba(23,32,47,.1);
}

.builder-top {
    display: grid;
    grid-template-columns: minmax(260px, 360px) 1fr;
    gap: 14px;
    align-items: stretch;
}

.qty-control {
    display: grid;
    grid-template-columns: 64px 1fr 64px;
    min-height: 136px;
    overflow: hidden;
    border: 2px solid #b8c8da;
    border-radius: 8px;
    background: #ffffff;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.7), 0 10px 24px rgba(23,32,47,.08);
}

.qty-btn {
    border: 0;
    min-height: 100%;
    color: #fff;
    font-size: 38px;
    font-weight: 800;
    cursor: pointer;
    line-height: 1;
    transition: transform .15s ease, filter .15s ease;
}

.qty-btn:active {
    transform: scale(.96);
}

.qty-btn.minus {
    background: linear-gradient(180deg, #d83b4a, #a91f2c);
}

.qty-btn.plus {
    background: linear-gradient(180deg, #17a96b, #0d7049);
}

.qty-display {
    display: grid;
    place-items: center;
    align-content: center;
    gap: 2px;
    padding: 10px;
    background:
        radial-gradient(circle at 50% 15%, rgba(18,110,74,.12), transparent 45%),
        #ffffff;
}

.qty-display strong {
    color: var(--ink);
    font-size: 56px;
    line-height: 1;
}

.qty-display span {
    color: var(--primary);
    font-size: 13px;
    font-weight: 900;
    text-transform: uppercase;
}

.qty-display em,
.tier-note {
    color: var(--muted);
    font-style: normal;
    font-weight: 700;
}

.price-summary {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.price-box {
    display: grid;
    align-content: center;
    gap: 8px;
    min-height: 136px;
    padding: 18px;
    border: 2px solid #d5dee9;
    border-radius: 8px;
    background: #f7fbff;
}

.price-box span {
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
}

.price-box strong {
    color: var(--primary);
    font-size: clamp(24px, 4vw, 34px);
    line-height: 1;
}

.price-box.total {
    color: #fff;
    border-color: var(--primary);
    background: linear-gradient(135deg, var(--primary), #0f5138);
}

.price-box.total span,
.price-box.total strong {
    color: #fff;
}

.tier-note {
    padding: 12px 14px;
    border: 1px solid #fde68a;
    border-radius: 8px;
    background: #fffbeb;
    color: #7c4a03;
}

.quick-picks {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.quick-picks button {
    min-height: 44px;
    border: 2px solid #b8c8da;
    border-radius: 8px;
    background: #ffffff;
    color: var(--ink);
    font-weight: 900;
    cursor: pointer;
}

.quick-picks button:nth-child(2) {
    border-color: #facc15;
    background: #fffbeb;
}

.quick-picks button:nth-child(3) {
    border-color: var(--primary);
    background: #e8f7ef;
    color: var(--primary);
}

.field-card {
    display: grid;
    gap: 7px;
    color: var(--ink);
    font-weight: 900;
}

.field-card input,
.field-card textarea {
    border: 2px solid #b7c7d9;
    background: #f8fbff;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.75);
}

.field-card input:focus,
.field-card textarea:focus {
    outline: 3px solid rgba(18,110,74,.16);
    border-color: var(--primary);
    background: #fff;
}

.pack-card {
    display: grid;
    gap: 10px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fbfcfe;
    align-content: start;
}

.pack-card strong {
    font-size: 24px;
}

.pack-card span {
    color: var(--primary);
    font-weight: 800;
}

.pack-card em {
    color: var(--muted);
    font-style: normal;
    font-weight: 700;
}

.filters {
    display: grid;
    grid-template-columns: 1fr 220px auto;
    gap: 10px;
    margin-bottom: 22px;
}

input,
select,
textarea {
    width: 100%;
    min-height: 44px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    color: var(--ink);
    font: inherit;
    font-size: 16px;
}

textarea { resize: vertical; }

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 10px 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    color: var(--ink);
    font-weight: 800;
    cursor: pointer;
    text-align: center;
    touch-action: manipulation;
}

.btn.primary { color: #fff; background: var(--primary); border-color: var(--primary); }
.btn.primary:hover { background: var(--primary-dark); }
.btn.dark { color: #fff; background: var(--ink); border-color: var(--ink); }
.btn.ghost { background: transparent; }
.btn.danger { color: #fff; background: var(--danger); border-color: var(--danger); }
.btn.full { width: 100%; }
.btn.small { min-height: 34px; padding: 7px 10px; font-size: 13px; }

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 18px;
}

.sticker-card,
.panel,
.auth-card,
.order-card,
.detail-image,
.detail-panel {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: 0 10px 28px rgba(23,32,47,.07);
}

.sticker-card { overflow: hidden; }

.sticker-image {
    aspect-ratio: 4 / 5;
    display: grid;
    place-items: center;
    background: #e9edf4;
    color: var(--muted);
    font-weight: 800;
}

.sticker-image img,
.detail-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sticker-body { padding: 14px; }
.sticker-body h2 { min-height: 52px; margin: 10px 0; font-size: 20px; line-height: 1.3; }

.sticker-meta,
.sticker-footer,
.buy-row,
.line-item,
.order-head,
.order-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.sticker-meta {
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.stock {
    padding: 5px 9px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 800;
}

.stock.ok { color: #0f5132; background: #d9f2e5; }
.stock.out { color: #842029; background: #f8d7da; }

.detail-layout {
    display: grid;
    grid-template-columns: minmax(280px, 480px) 1fr;
    gap: 24px;
}

.detail-image {
    aspect-ratio: 4 / 5;
    display: grid;
    place-items: center;
    overflow: hidden;
    color: var(--muted);
    font-weight: 800;
}

.detail-panel { padding: 24px; }
.detail-panel h1 { margin: 6px 0 10px; font-size: clamp(32px, 5vw, 54px); line-height: 1; }
.buy-row { padding: 16px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin: 18px 0; }
.buy-row strong { font-size: 28px; }

.order-form,
.admin-form {
    display: grid;
    gap: 14px;
}

.auth-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 20px;
}

.auth-card {
    width: min(440px, 100%);
    padding: 24px;
}

.notice {
    padding: 12px 14px;
    margin: 12px 0;
    border-radius: 8px;
    font-weight: 700;
}

.notice.success { color: #0f5132; background: #d9f2e5; }
.notice.danger { color: #842029; background: #f8d7da; }
.muted { color: var(--muted); }
.empty { padding: 36px; text-align: center; color: var(--muted); }
.page-title { margin: 0 0 18px; }

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    margin-bottom: 20px;
}

.stats-grid article {
    padding: 18px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
}

.stats-grid span { display: block; color: var(--muted); font-weight: 700; }
.stats-grid strong { display: block; margin-top: 8px; font-size: 34px; }

.admin-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}

.panel {
    padding: 18px;
    margin-bottom: 18px;
}

.admin-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.span-2 { grid-column: span 2; }
.check { display: flex; align-items: center; gap: 8px; }
.check input { width: auto; min-height: auto; }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
th { color: var(--muted); font-size: 13px; text-transform: uppercase; }
.thumb { width: 54px; height: 68px; object-fit: cover; border-radius: 6px; background: #e9edf4; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; }
.actions form { margin: 0; }

.order-card { padding: 16px; margin-top: 12px; }
.order-head p { margin: 5px 0 0; color: var(--muted); }
.status { padding: 6px 10px; background: #eef2f7; border-radius: 8px; font-weight: 800; }
.order-actions { margin-top: 14px; }
.order-actions form { display: flex; gap: 8px; }

@media (max-width: 980px) {
    .pack-hero {
        grid-template-columns: 1fr;
    }

    .pack-photo {
        width: min(420px, 100%);
        justify-self: center;
        max-height: 430px;
    }

    .pack-options {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .pack-builder {
        grid-template-columns: 1fr;
    }

    .builder-top {
        grid-template-columns: 1fr;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 760px) {
    .filters,
    .detail-layout,
    .admin-columns,
    .admin-form,
    .pack-hero,
    .pack-builder,
    .pack-options,
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .hero { padding: 24px; min-height: 230px; }
    .pack-photo { transform: none; }
    .span-2 { grid-column: auto; }
    .site-header { align-items: flex-start; }
    .admin-nav { justify-content: flex-end; }
}

@media (max-width: 560px) {
    body {
        background: #f7f9fc;
    }

    .site-header {
        position: static;
        align-items: center;
        padding: 12px 14px;
    }

    .brand {
        min-width: 0;
        font-size: 15px;
    }

    .brand-mark {
        width: 32px;
        height: 32px;
        flex: 0 0 auto;
    }

    .admin-link {
        font-size: 14px;
    }

    .shell {
        width: min(100% - 20px, 1180px);
        padding: 14px 0 34px;
    }

    .pack-hero {
        gap: 18px;
        margin-bottom: 14px;
        padding: 16px;
        border-radius: 0;
        margin-left: -10px;
        margin-right: -10px;
    }

    .pack-copy h1 {
        font-size: 34px;
        line-height: 1;
    }

    .pack-copy p {
        font-size: 16px;
    }

    .price-strip {
        display: grid;
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .price-strip span {
        width: 100%;
        text-align: center;
    }

    .pack-photo {
        aspect-ratio: 16 / 11;
        max-height: none;
        width: 100%;
        box-shadow: 0 16px 42px rgba(0,0,0,.32);
    }

    .pack-photo::after {
        inset: -8px;
        opacity: .85;
    }

    .confetti {
        width: 7px;
        height: 14px;
        animation-duration: 4.2s;
    }

    .pack-panel {
        padding: 14px;
    }

    .pack-panel h2,
    .section-title h2 {
        font-size: 24px;
    }

    .pack-options,
    .grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .pack-card {
        padding: 14px;
    }

    .pack-card strong {
        font-size: 22px;
    }

    .pack-builder {
        gap: 12px;
        padding: 12px;
        border-width: 2px;
    }

    .qty-control {
        grid-template-columns: 58px 1fr 58px;
        min-height: 116px;
    }

    .qty-display strong {
        font-size: 48px;
    }

    .price-summary {
        grid-template-columns: 1fr;
    }

    .price-box {
        min-height: 92px;
        padding: 14px;
    }

    .price-box strong {
        font-size: 30px;
    }

    .quick-picks {
        grid-template-columns: 1fr;
    }

    .quick-picks button {
        min-height: 46px;
        font-size: 15px;
    }

    .filters {
        gap: 8px;
    }

    input,
    select,
    textarea,
    .btn {
        min-height: 48px;
    }

    .sticker-body h2 {
        min-height: 0;
    }

    .detail-panel {
        padding: 18px;
    }

    .detail-panel h1 {
        font-size: 34px;
    }

    .buy-row,
    .sticker-footer,
    .order-head,
    .order-actions {
        align-items: flex-start;
        flex-direction: column;
    }

    .buy-row strong {
        font-size: 24px;
    }

    .auth-card,
    .panel,
    .order-card {
        padding: 14px;
    }

    .admin-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .admin-nav {
        width: 100%;
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .admin-nav a {
        padding: 9px 10px;
        border: 1px solid var(--line);
        border-radius: 8px;
        text-align: center;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .stats-grid strong {
        font-size: 28px;
    }

    th,
    td {
        padding: 8px;
        font-size: 14px;
    }

    .actions,
    .order-actions form {
        width: 100%;
        flex-direction: column;
    }

    .actions .btn,
    .actions form,
    .order-actions .btn {
        width: 100%;
    }
}
