:root {
    --cream: #fff6ec;
    --paper: #fffdfb;
    --ink: #5a3b32;
    --ink-soft: #8d6a60;
    --coral: #ff8b7a;
    --coral-deep: #ef6f5e;
    --line: #f6d7cb;
    --shadow: #f3c7b8;
    --mint: #b7efd4;
    --sun: #ffe3a3;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: "Nunito", "Segoe UI", sans-serif;
    color: var(--ink);
    background-color: var(--cream);
    background-image: radial-gradient(#ffd9c8 1.15px, transparent 1.15px);
    background-size: 22px 22px;
    line-height: 1.5;
}

body.shop-body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

img { max-width: 100%; display: block; }
h1, h2, h3 { font-family: "Fredoka", "Nunito", sans-serif; line-height: 1.12; margin: 0 0 8px; }
p { margin: 0 0 10px; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }

::selection { background: #ffd0c4; }

.skip {
    position: absolute;
    left: -999px;
    top: 8px;
    background: #fff;
    padding: 8px 12px;
    border-radius: 12px;
    z-index: 100;
}
.skip:focus { left: 8px; }

@media (hover: hover) and (pointer: fine) {
    body.shop-body,
    body.admin-body { cursor: url("../img/paw.png") 24 10, auto; }
    input, textarea, select { cursor: text; }
}

.topbar {
    text-align: center;
    padding: 8px 14px;
    background: #ffe1d6;
    color: #7a463c;
    font-weight: 800;
    font-size: 13.5px;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 30;
    background: rgba(255, 246, 236, 0.94);
    backdrop-filter: blur(10px);
    border-bottom: 3px solid var(--line);
}

.header-inner,
.footer-inner,
main.wrap {
    width: min(1180px, calc(100% - 32px));
    margin-left: auto;
    margin-right: auto;
}

.header-inner {
    display: flex;
    align-items: center;
    gap: 14px;
    min-height: 78px;
}

.logo { display: flex; align-items: center; gap: 8px; text-decoration: none; }
.logo img {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    object-fit: cover;
    object-position: center 18%;
    border: 3px solid #fff;
    box-shadow: 0 4px 0 var(--shadow);
}
.logo-name {
    font-family: "Fredoka", sans-serif;
    font-weight: 700;
    font-size: 26px;
    letter-spacing: 0.04em;
    color: var(--ink);
}
.logo-name small { color: var(--coral-deep); font-size: 0.92em; }

.nav { display: flex; flex-wrap: wrap; gap: 4px; }
.nav-link {
    text-decoration: none;
    font-weight: 800;
    padding: 6px 10px;
    border-radius: 999px;
}
.nav-link:hover,
.nav-link.is-active { background: #ffe4da; }

.header-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.nav-toggle {
    display: none;
    border: 2px solid var(--line);
    background: #fff;
    border-radius: 999px;
    padding: 8px 12px;
    font-weight: 800;
}
.dealer-chip {
    max-width: 160px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    background: #fff;
    border: 2px solid var(--line);
    border-radius: 999px;
    padding: 6px 10px;
    font-weight: 800;
    font-size: 14px;
}
.text-link { font-weight: 800; text-decoration: none; }

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 0;
    border-radius: 999px;
    padding: 12px 18px;
    font-weight: 800;
    text-decoration: none;
    box-shadow: 0 4px 0 rgba(180, 100, 80, 0.18);
    transition: transform 0.15s ease, background 0.15s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--coral); color: #3f241f; }
.btn-mint { background: var(--mint); color: #1d4a36; }
.btn-ghost { background: #fff; color: var(--ink); border: 2px solid #f0cfc3; box-shadow: none; }
.btn-danger { background: #fff; color: #b94b42; border: 2px solid #f0b2aa; box-shadow: none; }
.btn-block { width: 100%; }
.btn-small { padding: 8px 12px; font-size: 14px; }
.bubble {
    background: #3f241f;
    color: #fff;
    border-radius: 99px;
    min-width: 20px;
    height: 20px;
    display: inline-grid;
    place-items: center;
    font-size: 12px;
    padding: 0 6px;
}

main.wrap { flex: 1; position: relative; z-index: 1; padding-bottom: 28px; min-width: 0; }
body.shop-body { overflow-x: clip; }
main.wrap, .site-footer { position: relative; z-index: 1; }
.site-header { z-index: 30; }

.flash {
    margin: 14px 0;
    padding: 12px 16px;
    border-radius: 16px;
    font-weight: 800;
}
.flash-ok { background: #e5f8ee; }
.flash-error { background: #ffe4e0; }
.flash-info { background: #fff1c9; }

.hero { position: relative; margin-top: 18px; }
.slide {
    display: none;
    grid-template-columns: 1.05fr 0.95fr;
    gap: 18px;
    align-items: center;
    background: linear-gradient(160deg, #fff 0%, #fff1e8 55%, #ffe3f0 100%);
    border: 3px solid var(--line);
    border-radius: 36px;
    box-shadow: 8px 8px 0 var(--shadow);
    padding: 28px 36px 28px 72px;
    min-height: 420px;
    min-width: 0;
}
.slide.is-active { display: grid; animation: rise 0.45s ease; }
@keyframes rise {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: none; }
}
.slide-copy { min-width: 0; }
.slide h1 { font-size: clamp(30px, 4vw, 52px); overflow-wrap: break-word; }
.slide p { color: var(--ink-soft); font-weight: 700; max-width: 46ch; }
.eyebrow {
    display: inline-block;
    background: #fff;
    border-radius: 999px;
    padding: 4px 10px;
    font-weight: 800;
    color: var(--coral-deep);
    font-size: 13px;
    margin-bottom: 8px;
}
.slide-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.slide-visual img {
    width: 100%;
    height: 360px;
    object-fit: cover;
    border-radius: 28px;
}
.slide-visual.is-character img {
    object-fit: contain;
    background: #fff6ec;
    padding: 8px;
}
.slides { position: relative; }
.slider-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 3px solid var(--line);
    background: #fff;
    font-size: 26px;
    line-height: 1;
    z-index: 3;
}
.slider-arrow.prev { left: 12px; }
.slider-arrow.next { right: 12px; }
.dots { display: flex; justify-content: center; gap: 6px; margin-top: 12px; }
.dots button {
    width: 11px;
    height: 11px;
    border: 0;
    border-radius: 99px;
    background: #f3c2b6;
    padding: 0;
}
.dots button.is-active { width: 26px; background: var(--coral-deep); }

.section-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 12px;
    margin: 34px 0 14px;
}
.section-head p { margin: 0; color: var(--ink-soft); font-weight: 700; }

.cat-grid, .product-grid, .steps { display: grid; gap: 14px; }
.cat-grid { grid-template-columns: repeat(6, 1fr); }
.product-grid { grid-template-columns: repeat(4, 1fr); }
.steps { grid-template-columns: repeat(3, 1fr); margin-top: 8px; }

.cat-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    text-decoration: none;
    background: var(--tint, #fff);
    border: 3px solid #fff;
    border-radius: 26px;
    padding: 10px 10px 14px;
    box-shadow: 5px 5px 0 var(--shadow);
    transition: transform 0.18s ease;
}
.cat-card img { width: 100%; height: 120px; object-fit: contain; }
.cat-card strong { font-family: "Fredoka", sans-serif; font-size: 18px; }
.cat-card em { font-style: normal; color: var(--ink-soft); font-size: 12.5px; font-weight: 800; }

.step, .product, .panel, .page-hero, .band, .auth-card {
    background: var(--paper);
    border: 3px solid var(--line);
    border-radius: 26px;
    box-shadow: 5px 5px 0 var(--shadow);
}
.step { padding: 16px; }
.step span, .num {
    display: inline-grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--coral);
    color: #3f241f;
    font-family: "Fredoka", sans-serif;
    font-weight: 700;
    margin-bottom: 8px;
}
.step:nth-child(2) span { background: var(--sun); }
.step:nth-child(3) span { background: var(--mint); }

.product {
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    transition: transform 0.18s ease;
}
.product-media {
    aspect-ratio: 1;
    background: #fff6ec;
    border-radius: 20px;
    overflow: hidden;
    display: grid;
    place-items: center;
}
.product-media img { width: 100%; height: 100%; object-fit: contain; }
.product h3 { font-size: 16.5px; min-height: 2.5em; }
.product h3 a { text-decoration: none; }
.cat-pill {
    display: inline-block;
    align-self: flex-start;
    font-size: 12px;
    font-weight: 800;
    background: #fff1ea;
    color: #c26b5c;
    border-radius: 999px;
    padding: 3px 8px;
    text-decoration: none;
}
.price { display: flex; align-items: baseline; gap: 6px; }
.price strong { font-family: "Fredoka", sans-serif; font-size: 22px; color: #c45345; }
.price span { color: var(--ink-soft); font-weight: 800; font-size: 13px; }
.price-lock {
    margin-top: auto;
    display: block;
    text-align: center;
    text-decoration: none;
    font-weight: 800;
    font-size: 13.5px;
    line-height: 1.35;
    color: #a56a5e;
    background: #fff7f2;
    border: 2px dashed #f0c3b6;
    border-radius: 16px;
    padding: 10px;
}
.price-lock:hover { background: #ffe8df; }
.product .btn { margin-top: auto; }

.band {
    margin-top: 28px;
    display: grid;
    grid-template-columns: 1.3fr 0.7fr;
    gap: 8px;
    align-items: center;
    padding: 22px 22px 22px 28px;
    background: linear-gradient(135deg, #fff, #ffe8f1 42%, #e7fff3);
}
.band img { width: 100%; max-height: 280px; object-fit: contain; justify-self: center; }
.band-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }

.page-hero {
    margin-top: 16px;
    display: grid;
    grid-template-columns: 1fr 180px;
    gap: 12px;
    align-items: center;
    padding: 16px 18px;
    background: var(--tint, #fff);
}
.page-hero img { width: 160px; height: 160px; object-fit: contain; justify-self: end; }
.crumbs { display: flex; flex-wrap: wrap; gap: 6px; color: var(--ink-soft); font-weight: 800; font-size: 14px; margin: 16px 0 8px; }
.crumbs a { text-decoration: none; }

.detail { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 18px; margin-top: 8px; }
.detail-photo { padding: 12px; }
.detail-photo img { width: 100%; aspect-ratio: 1; object-fit: contain; background: #fff6ec; border-radius: 22px; }
.desc { white-space: pre-wrap; color: var(--ink-soft); font-weight: 700; }
.qty-row, .stepper { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.buy-box { display: grid; gap: 10px; margin-top: 14px; }

.cart-layout { display: grid; grid-template-columns: 1.6fr 0.8fr; gap: 18px; align-items: start; margin-top: 8px; }
.cart-item {
    display: grid;
    grid-template-columns: 92px 1fr auto;
    gap: 12px;
    align-items: center;
    padding: 12px;
    margin-bottom: 12px;
}
.cart-item img { width: 92px; height: 92px; object-fit: contain; background: #fff6ec; border-radius: 16px; }
.line-total { font-family: "Fredoka", sans-serif; font-size: 20px; color: #c45345; }
.summary { padding: 16px; position: sticky; top: 92px; }
.summary-row { display: flex; justify-content: space-between; gap: 10px; font-weight: 800; margin: 8px 0; }
.muted { color: var(--ink-soft); font-weight: 700; }

.auth-grid { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: 18px; align-items: center; margin-top: 18px; }
.auth-grid img { width: 100%; max-height: 440px; object-fit: contain; }
.auth-card, .panel { padding: 18px; }
.stack-form, .form-grid { display: grid; gap: 12px; }
.form-grid { grid-template-columns: 1fr 1fr; }
.full { grid-column: 1 / -1; }
label { font-weight: 800; display: grid; gap: 6px; }
input[type="text"], input[type="email"], input[type="password"], input[type="number"], input[type="file"], select, textarea {
    width: 100%;
    padding: 12px 14px;
    border-radius: 14px;
    border: 2px solid #f0d2c6;
    background: #fff;
}
textarea { min-height: 120px; resize: vertical; }
.hint { color: var(--ink-soft); font-size: 13px; font-weight: 700; }
.hp { position: absolute; left: -9999px; }
.check { display: flex; align-items: center; gap: 8px; }
.check input { width: auto; }
.errors { background: #ffe4e0; border-radius: 14px; padding: 10px 12px; font-weight: 800; }
.empty { text-align: center; padding: 24px 10px; }
.empty img { width: min(280px, 80%); margin: 0 auto 8px; }

.site-footer { background: #fff; border-top: 3px solid var(--line); padding: 28px 0 16px; }
.footer-inner { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 18px; }
.site-footer a { display: block; text-decoration: none; font-weight: 800; margin: 4px 0; }
.site-footer h2 { font-size: 16px; }
.copy { text-align: center; color: var(--ink-soft); font-weight: 800; margin: 18px 0 0; }
.quiet { opacity: 0.7; font-size: 13px; }

.floaters { pointer-events: none; }
.floater {
    position: fixed;
    width: 70px;
    height: 70px;
    background: url("../img/paw.png") center / contain no-repeat;
    opacity: 0.18;
    z-index: 0;
    animation: floaty 7s ease-in-out infinite;
}
.f1 { top: 140px; left: 2%; }
.f2 { top: 46%; right: 2%; animation-delay: -2s; }
.f3 { bottom: 80px; left: 10%; width: 48px; height: 48px; animation-delay: -4s; }
@keyframes floaty {
    50% { transform: translateY(-16px) rotate(12deg); }
}
.paw-print {
    position: fixed;
    width: 22px;
    height: 22px;
    margin: 0;
    background: url("../img/paw.png") center / contain no-repeat;
    pointer-events: none;
    z-index: 20;
    animation: pawFade 0.7s ease forwards;
}
.stepper .minus { order: 1; }
.stepper input { order: 2; }
.stepper .plus { order: 3; }
.stepper .set { order: 4; }
@keyframes pawFade { from { opacity: 0.8; } to { opacity: 0; } }

.stepper input[type="number"] { width: 72px; text-align: center; padding: 8px; }
.thumb { width: 54px; height: 54px; object-fit: contain; background: #fff6ec; border-radius: 12px; }
.thumb-lg { width: 140px; height: 140px; object-fit: contain; background: #fff6ec; border-radius: 18px; }

.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table th { font-size: 13px; }
.pill-ok, .pill-wait {
    display: inline-block;
    border-radius: 999px;
    padding: 3px 8px;
    font-size: 12px;
    font-weight: 800;
}
.pill-ok { background: #e5f8ee; }
.pill-wait { background: #fff1c9; }
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.stat { padding: 14px; }
.stat strong { display: block; font-family: "Fredoka", sans-serif; font-size: 32px; }
.inline-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.inline-actions form { margin: 0; }

.admin-shell { display: grid; grid-template-columns: 230px 1fr; min-height: 100vh; }
.admin-side {
    background: var(--paper);
    border-right: 3px solid var(--line);
    padding: 16px 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.admin-brand { text-decoration: none; font-family: "Fredoka", sans-serif; font-size: 22px; padding: 8px 10px 14px; }
.admin-side a { display: block; text-decoration: none; font-weight: 800; padding: 10px 12px; border-radius: 14px; }
.admin-side a.is-active, .admin-side a:hover { background: #ffe4da; }
.admin-main { padding: 20px; }
.admin-main h1 { font-size: 32px; margin-bottom: 14px; }
.badge { background: #ef6f5e; color: #fff; border-radius: 99px; padding: 1px 7px; font-size: 12px; margin-left: 4px; }

@media (hover: hover) {
    .cat-card:hover { transform: translateY(-6px) rotate(-1.5deg); }
    .product:hover { transform: translateY(-5px); }
}

@media (max-width: 1100px) {
    .cat-grid { grid-template-columns: repeat(3, 1fr); }
    .product-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 980px) {
    .nav-toggle { display: inline-flex; }
    .header-inner { flex-wrap: wrap; padding: 8px 0; }
    .nav {
        display: none;
        width: 100%;
        order: 5;
        flex-direction: column;
        background: #fff;
        border: 3px solid var(--line);
        border-radius: 18px;
        padding: 8px;
    }
    .nav.is-open { display: flex; }
    .header-actions { margin-left: auto; }
}
@media (max-width: 860px) {
    .admin-shell { grid-template-columns: 1fr; }
    .admin-side {
        flex-direction: row;
        overflow: auto;
        border-right: 0;
        border-bottom: 3px solid var(--line);
        position: sticky;
        top: 0;
        z-index: 20;
    }
    .admin-side a { white-space: nowrap; }
    .stat-grid, .footer-inner, .form-grid, .detail, .cart-layout, .auth-grid, .band, .steps { grid-template-columns: 1fr 1fr; }
    .detail, .cart-layout, .auth-grid, .band { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
    .header-actions { flex: 1 1 100%; justify-content: stretch; }
    .header-actions .btn,
    .header-actions .dealer-chip { flex: 1; justify-content: center; text-align: center; }
    .topbar { font-size: 12.5px; }
}
@media (max-width: 720px) {
    .slide { grid-template-columns: 1fr; padding: 16px; min-height: 0; width: 100%; }
    .slide h1 { font-size: 28px; }
    .slide-visual { order: -1; }
    .slide-visual img { height: 220px; }
    .slider-arrow.prev { left: 8px; }
    .slider-arrow.next { right: 8px; }
    .product-grid, .cat-grid { grid-template-columns: repeat(2, 1fr); }
    .page-hero { grid-template-columns: 1fr 100px; }
    .page-hero img { width: 96px; height: 96px; }
    .floaters { display: none; }
    .cart-item { grid-template-columns: 72px 1fr; }
    .cart-item img { width: 72px; height: 72px; }
    .line-total { grid-column: 2; }
}
@media (max-width: 560px) {
    .steps, .stat-grid, .footer-inner, .form-grid { grid-template-columns: 1fr; }
    .product h3 { min-height: 0; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation: none !important;
        transition: none !important;
    }
}
