:root {
    --ink: #241812;
    --ink-soft: rgba(36, 24, 18, 0.62);
    --cream: #f3eadf;
    --foam: #faf6f1;
    --clay: #c4654a;
    --clay-deep: #8d3d32;
    --line: rgba(36, 24, 18, 0.14);
    --ease: cubic-bezier(0.16, 1, 0.3, 1);
    --slide: 880ms;
    --serif: "Poppins", "Segoe UI", sans-serif;
    --sans: "Poppins", "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
}

body {
    min-height: 100dvh;
    color: var(--ink);
    background:
        radial-gradient(900px 420px at 50% -10%, rgba(196, 101, 74, 0.16), transparent 70%),
        var(--cream);
    font-family: var(--sans);
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
}

img {
    display: block;
    max-width: 100%;
    user-select: none;
    -webkit-user-drag: none;
}

a { color: inherit; }

button, a { -webkit-tap-highlight-color: transparent; }

body.is-home {
    height: 100dvh;
    overflow: hidden;
}

.home {
    height: 100dvh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 18px 28px 20px;
}

.brand {
    display: grid;
    grid-template-columns: 96px 1fr 96px;
    align-items: center;
}

.brand-copy {
    grid-column: 2;
    text-align: center;
}

.brand-copy h1 {
    margin: 0;
    font-family: var(--sans);
    font-weight: 600;
    font-size: clamp(1.8rem, 2.4vw, 2.6rem);
    letter-spacing: -0.03em;
    line-height: 1.1;
}

.slogan {
    margin: 6px 0 0;
    font-size: 1.05rem;
    font-weight: 400;
    letter-spacing: 0.04em;
    color: var(--ink-soft);
}

.logo-img {
    width: 96px;
    height: 96px;
    object-fit: cover;
    border-radius: 50%;
    display: block;
}

.topbar-logo .logo-img {
    width: 64px;
    height: 64px;
    margin: 0;
}

.category-grid {
    flex: 1;
    min-height: 0;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    grid-template-rows: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.category-card {
    position: relative;
    display: block;
    height: 100%;
    overflow: hidden;
    border-radius: 18px;
    min-height: 0;
    text-decoration: none;
    color: #fff;
    isolation: isolate;
    animation: rise 0.8s var(--ease) both;
    animation-delay: calc(var(--i) * 70ms);
}

.category-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.04);
    transition: transform 900ms var(--ease);
}

.category-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(20, 12, 8, 0.05) 30%, rgba(20, 12, 8, 0.78) 100%);
}

.category-index,
.category-name {
    position: absolute;
    z-index: 1;
}

.category-index {
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.45);
    font-size: 0.72rem;
    letter-spacing: 0.06em;
    backdrop-filter: blur(6px);
}

.category-name {
    left: 18px;
    bottom: 16px;
    font-family: var(--serif);
    font-size: clamp(1.6rem, 2.4vw, 2.3rem);
    font-weight: 520;
    letter-spacing: -0.03em;
    transition: transform 500ms var(--ease);
}

.category-card:hover img,
.category-card:focus-visible img {
    transform: scale(1.1);
}

.category-card:hover .category-name,
.category-card:focus-visible .category-name {
    transform: translateY(-4px);
}

.category-card:focus-visible {
    outline: 2px solid var(--clay);
    outline-offset: 3px;
}

body.is-category {
    height: 100dvh;
    overflow: hidden;
}

.detail-page {
    height: 100dvh;
    width: 100%;
    margin: 0;
    padding: 18px 28px 20px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 22px;
}

.back,
.topbar-logo {
    text-decoration: none;
}

.back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.45);
    font-size: 0.92rem;
    transition: background 300ms ease, transform 300ms var(--ease);
}

.back:hover { background: #fff; transform: translateX(-2px); }

.topbar-logo {
    display: block;
    line-height: 0;
}

.detail {
    flex: 1;
    min-height: 0;
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 28px;
    align-items: stretch;
}

.col-4 { grid-column: span 4; }

.col-8 {
    grid-column: span 8;
    min-height: 0;
}

.detail-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 0;
}

.price-label {
    margin: 0;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    font-size: 0.75rem;
    color: var(--clay-deep);
}

.price-label { margin-top: 22px; }

.price {
    margin: 6px 0 0;
    font-family: var(--serif);
    font-size: clamp(2.4rem, 4vw, 3.6rem);
    font-weight: 520;
    letter-spacing: -0.04em;
    line-height: 1;
}

.detail-info h1 {
    margin: 0;
    font-family: var(--serif);
    font-weight: 600;
    font-size: clamp(3rem, 6vw, 5rem);
    letter-spacing: -0.045em;
    line-height: 0.92;
}

.lead {
    max-width: 34ch;
    margin: 16px 0 0;
    font-size: 1.08rem;
    line-height: 1.55;
    font-weight: 300;
    color: var(--ink-soft);
}

.sampler {
    min-height: 0;
    display: flex;
    flex-direction: column;
}

.slider {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

.sampler-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 12px;
}

.sampler-head h2 {
    margin: 0;
    font-size: 0.78rem;
    font-weight: 500;
    letter-spacing: 0.22em;
    text-transform: uppercase;
}

.counter {
    margin: 0;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.08em;
    color: var(--ink-soft);
}

.slider-viewport {
    position: relative;
    overflow: hidden;
    border-radius: 24px;
    background: #1b120e;
    flex: 1;
    min-height: 0;
    height: auto;
    touch-action: pan-y;
    cursor: grab;
    box-shadow: 0 22px 50px rgba(36, 24, 18, 0.14);
}

.slider-viewport.is-dragging { cursor: grabbing; }

.slider-track {
    display: flex;
    height: 100%;
    will-change: transform;
}

.slider-track.is-animating {
    transition: transform var(--slide) var(--ease);
}

.slide {
    position: relative;
    flex: 0 0 100%;
    height: 100%;
    margin: 0;
}

.slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.06);
    transition: transform 1200ms var(--ease);
}

.slide.is-active img { transform: scale(1); }

.slide figcaption {
    position: absolute;
    left: 22px;
    bottom: 20px;
    margin: 0;
    color: #fff;
    font-family: var(--serif);
    font-size: 1.35rem;
    letter-spacing: -0.03em;
    text-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 600ms ease, transform 700ms var(--ease);
}

.slide.is-active figcaption {
    opacity: 1;
    transform: none;
    transition-delay: 180ms;
}

.slider-progress {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 3px;
    background: rgba(255, 255, 255, 0.85);
    transform: scaleX(0);
    transform-origin: left center;
    pointer-events: none;
}

.slider-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    border: 0;
    border-radius: 50%;
    background: rgba(250, 246, 241, 0.92);
    color: var(--ink);
    display: grid;
    place-items: center;
    cursor: pointer;
    transition: transform 300ms var(--ease), background 300ms ease;
}

.slider-prev { left: 14px; }
.slider-next { right: 14px; }

.slider-nav:hover { transform: translateY(-50%) scale(1.06); background: #fff; }

.thumbs {
    display: flex;
    flex: 0 0 auto;
    gap: 10px;
    margin-top: 12px;
    overflow-x: auto;
    padding: 6px 2px 2px;
    scrollbar-width: none;
}

.thumbs::-webkit-scrollbar { display: none; }

.thumb {
    flex: 0 0 112px;
    height: 76px;
    padding: 0;
    border: 2px solid transparent;
    border-radius: 12px;
    overflow: hidden;
    background: none;
    cursor: pointer;
    opacity: 0.62;
    transform: translateY(0);
    transition: opacity 400ms ease, transform 400ms var(--ease), border-color 400ms ease;
}

.thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.thumb.is-active {
    opacity: 1;
    border-color: var(--clay);
    transform: translateY(-3px);
}

.thumb:focus-visible {
    outline: 2px solid var(--clay-deep);
    outline-offset: 2px;
}

.other-cats {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 28px;
}

.other-cats a {
    text-decoration: none;
    padding: 8px 14px;
    border-radius: 999px;
    border: 1px solid var(--line);
    font-size: 0.9rem;
    transition: background 300ms ease, color 300ms ease;
}

.other-cats a:hover {
    background: var(--ink);
    color: var(--foam);
}

@keyframes rise {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: none; }
}

@media (max-width: 860px) {
    .home { padding: 20px 16px 18px; }
    body.is-category { overflow: auto; }
    .detail-page {
        height: auto;
        min-height: 100dvh;
        overflow: visible;
        width: min(100% - 28px, 1180px);
        margin: 0 auto;
    }
    .detail { grid-template-columns: 1fr; }
    .slider-viewport { aspect-ratio: 16 / 9; flex: none; }
}

@media (max-width: 720px) {
    body.is-home { overflow: auto; }
    .home { height: auto; min-height: 100dvh; overflow: visible; }
    .category-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        grid-template-rows: none;
    }
    .category-card { aspect-ratio: 1; height: auto; }
}

@media (max-width: 560px) {
    .thumb { flex-basis: 88px; height: 62px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation: none !important;
        transition: none !important;
    }
}
