:root {
    --ink: #171717;
    --muted: #666b73;
    --line: #e6e8ee;
    --soft: #fff5f8;
    --white: #ffffff;
    --green: #d93d6a;
    --red: #d9233f;
    --blue: #2e55c7;
    --yellow: #ff4f86;
    --shadow: 0 10px 30px rgba(16, 24, 40, .10);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: #fff9fb;
    color: var(--ink);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 15px;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    display: block;
    max-width: 100%;
}

button,
input,
select,
textarea {
    font: inherit;
}

.app-shell {
    width: 100%;
    min-height: 100vh;
    margin: 0 auto;
    background: var(--white);
    box-shadow: none;
    padding-bottom: 82px;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 12px 16px;
    background: var(--white);
    border-bottom: 1px solid rgba(230, 232, 238, .85);
}

.brand,
.cart-link {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    font-weight: 800;
}

.brand-mark {
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border-radius: 8px;
    background: var(--yellow);
    color: var(--white);
}

.desktop-nav,
.account-link {
    display: none;
}

.cart-link {
    position: relative;
    width: 42px;
    height: 42px;
    justify-content: center;
    border: 1px solid var(--line);
    border-radius: 12px;
}

.cart-icon,
.nav-cart {
    width: 19px;
    height: 17px;
    border: 2px solid currentColor;
    border-top: 0;
    border-radius: 0 0 4px 4px;
    position: relative;
}

.cart-icon:before,
.nav-cart:before {
    content: "";
    position: absolute;
    left: 2px;
    right: 2px;
    top: -7px;
    height: 9px;
    border: 2px solid currentColor;
    border-bottom: 0;
    border-radius: 9px 9px 0 0;
}

.cart-count {
    position: absolute;
    right: -5px;
    top: -6px;
    min-width: 19px;
    height: 19px;
    padding: 0 5px;
    border-radius: 99px;
    background: var(--red);
    color: var(--white);
    font-size: 11px;
    line-height: 19px;
    text-align: center;
}

.searchbar {
    position: sticky;
    top: 59px;
    z-index: 18;
    display: flex;
    gap: 8px;
    padding: 10px 16px;
    background: var(--white);
}

.searchbar input {
    flex: 1;
    min-width: 0;
    height: 44px;
    border: 1px solid #b8c1ce;
    border-radius: 12px;
    padding: 0 14px;
    outline: none;
}

.searchbar input:focus {
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(36, 87, 214, .12);
}

.searchbar button,
.primary-btn,
.secondary-btn,
.dark-btn,
.danger-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    border: 0;
    border-radius: 12px;
    padding: 0 15px;
    font-weight: 800;
    cursor: pointer;
}

.searchbar button,
.dark-btn {
    background: var(--ink);
    color: var(--white);
}

.primary-btn {
    background: var(--yellow);
    color: var(--white);
}

.secondary-btn {
    background: var(--white);
    color: var(--ink);
    border: 1px solid var(--line);
}

.danger-btn {
    background: #fff0f2;
    color: var(--red);
}

.content {
    padding: 0 16px 24px;
}

.hero {
    margin: 12px -16px 18px;
    min-height: 282px;
    position: relative;
    overflow: hidden;
    background: #101113;
}

.hero img {
    width: 100%;
    height: 282px;
    object-fit: cover;
}

.hero:after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(0, 0, 0, .72), rgba(0, 0, 0, .18), rgba(0, 0, 0, .03));
}

.hero-copy {
    position: absolute;
    z-index: 1;
    inset: auto 18px 22px 18px;
    color: var(--white);
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 0 10px;
    border-radius: 99px;
    background: rgba(255, 255, 255, .16);
    backdrop-filter: blur(8px);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.hero h1 {
    margin: 12px 0 8px;
    max-width: 340px;
    font-size: 34px;
    line-height: 1.02;
    letter-spacing: 0;
}

.hero p {
    max-width: 315px;
    margin: 0 0 16px;
    color: rgba(255, 255, 255, .88);
}

.section-head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 14px;
    margin: 22px 0 12px;
}

.section-head h2 {
    margin: 0;
    font-size: 21px;
    line-height: 1.15;
}

.section-head a {
    color: var(--blue);
    font-weight: 800;
    font-size: 13px;
    white-space: nowrap;
}

.category-rail,
.story-rail,
.size-row,
.filter-rail {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: none;
}

.category-rail::-webkit-scrollbar,
.story-rail::-webkit-scrollbar,
.size-row::-webkit-scrollbar,
.filter-rail::-webkit-scrollbar {
    display: none;
}

.category-chip {
    flex: 0 0 82px;
    display: grid;
    gap: 7px;
    justify-items: center;
    text-align: center;
    font-size: 12px;
    font-weight: 700;
}

.category-chip img {
    width: 68px;
    height: 68px;
    object-fit: cover;
    border-radius: 16px;
    background: var(--soft);
    border: 1px solid var(--line);
}

.promo-strip {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin: 18px 0;
}

.promo-tile {
    min-height: 116px;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    background: #f2f4f7;
}

.promo-tile img {
    width: 100%;
    height: 116px;
    object-fit: cover;
}

.promo-tile span {
    position: absolute;
    left: 10px;
    bottom: 10px;
    right: 10px;
    color: var(--white);
    font-weight: 900;
    text-shadow: 0 1px 8px rgba(0, 0, 0, .45);
}

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

.product-card {
    border: 1px solid var(--line);
    border-radius: 8px;
    overflow: hidden;
    background: var(--white);
}

.product-card .photo {
    position: relative;
    aspect-ratio: 4 / 5;
    background: var(--soft);
}

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

.badge {
    position: absolute;
    left: 8px;
    bottom: 8px;
    display: inline-flex;
    min-height: 23px;
    align-items: center;
    gap: 4px;
    padding: 0 8px;
    border-radius: 99px;
    color: var(--white);
    background: rgba(0, 0, 0, .72);
    font-size: 12px;
    font-weight: 800;
}

.product-info {
    padding: 10px;
}

.product-info h3 {
    margin: 0 0 6px;
    font-size: 14px;
    line-height: 1.25;
    min-height: 35px;
}

.price-row {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 6px;
}

.price {
    font-size: 16px;
    font-weight: 900;
}

.compare {
    color: var(--muted);
    text-decoration: line-through;
    font-size: 13px;
}

.off {
    color: #078c4f;
    font-weight: 900;
    font-size: 13px;
}

.trust-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin: 16px 0 8px;
}

.trust-row div {
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 10px 8px;
    text-align: center;
    font-size: 12px;
    color: var(--muted);
}

.trust-row strong {
    display: block;
    color: var(--ink);
    font-size: 13px;
}

.page-title {
    margin: 16px 0 12px;
}

.page-title h1 {
    margin: 0 0 6px;
    font-size: 25px;
}

.page-title p {
    margin: 0;
    color: var(--muted);
}

.filter-rail a {
    flex: 0 0 auto;
    display: inline-flex;
    min-height: 38px;
    align-items: center;
    border: 1px solid var(--line);
    border-radius: 99px;
    padding: 0 13px;
    font-weight: 800;
    font-size: 13px;
}

.filter-rail a.active {
    background: var(--ink);
    color: var(--white);
    border-color: var(--ink);
}

.product-page {
    padding: 0;
}

.product-hero {
    margin: 0 -16px;
    background: var(--soft);
}

.product-hero img {
    width: 100%;
    max-height: 620px;
    object-fit: cover;
}

.product-panel {
    margin: 0 -16px;
    padding: 16px;
    background: var(--white);
    color: var(--ink);
    border-radius: 0 0 8px 8px;
    border-bottom: 1px solid var(--line);
}

.product-panel .muted {
    color: var(--muted);
}

.rating-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 28px;
    padding: 0 9px;
    border-radius: 99px;
    background: var(--soft);
    color: var(--ink);
    font-weight: 900;
    font-size: 12px;
}

.product-panel h1 {
    margin: 12px 0 10px;
    font-size: 19px;
    line-height: 1.25;
}

.size-row label {
    flex: 0 0 auto;
}

.size-row input {
    position: absolute;
    opacity: 0;
}

.size-row span {
    display: grid;
    min-width: 52px;
    min-height: 44px;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 12px;
    font-weight: 900;
}

.size-row input:checked + span {
    color: var(--white);
    background: var(--yellow);
    border-color: var(--yellow);
}

.qty-control {
    display: inline-grid;
    grid-template-columns: 42px 48px 42px;
    align-items: center;
    min-height: 44px;
    border: 1px solid var(--line);
    border-radius: 12px;
    overflow: hidden;
}

.qty-control button,
.qty-control input {
    width: 100%;
    height: 44px;
    border: 0;
    background: var(--white);
    text-align: center;
}

.qty-control button {
    font-weight: 900;
    cursor: pointer;
}

.product-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 16px;
}

.product-actions button {
    width: 100%;
}

.copy-block,
.form-card,
.cart-row,
.order-row,
.policy-block {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--white);
    padding: 14px;
}

.copy-block p,
.policy-block p {
    color: var(--muted);
    line-height: 1.65;
}

.form-card {
    display: grid;
    gap: 12px;
}

.field {
    display: grid;
    gap: 6px;
}

.field label {
    font-weight: 800;
    font-size: 13px;
}

.field input,
.field select,
.field textarea {
    width: 100%;
    min-height: 44px;
    border: 1px solid #cfd5df;
    border-radius: 10px;
    padding: 10px 12px;
    outline: none;
}

.field textarea {
    min-height: 104px;
    resize: vertical;
}

.notice {
    margin: 12px 0;
    border-radius: 8px;
    padding: 11px 12px;
    background: #eef8f3;
    color: #075b39;
    font-weight: 700;
}

.error {
    margin: 12px 0;
    border-radius: 8px;
    padding: 11px 12px;
    background: #fff0f2;
    color: #9e1028;
    font-weight: 700;
}

.cart-list,
.order-list,
.blog-list {
    display: grid;
    gap: 12px;
}

.cart-row {
    display: grid;
    grid-template-columns: 88px 1fr;
    gap: 12px;
}

.cart-row img {
    width: 88px;
    height: 110px;
    border-radius: 8px;
    object-fit: cover;
}

.cart-row h3 {
    margin: 0 0 5px;
    font-size: 15px;
}

.cart-summary {
    position: sticky;
    bottom: 78px;
    z-index: 8;
    margin: 16px -16px 0;
    padding: 12px 16px;
    background: rgba(255, 255, 255, .94);
    border-top: 1px solid var(--line);
    backdrop-filter: blur(12px);
}

.cart-summary .primary-btn,
.cart-summary .secondary-btn {
    width: 100%;
    margin-top: 8px;
}

.summary-line {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
    font-weight: 900;
}

.empty-state {
    display: grid;
    min-height: 240px;
    place-items: center;
    text-align: center;
    border: 1px dashed #cad0da;
    border-radius: 8px;
    padding: 24px;
    color: var(--muted);
}

.blog-card {
    display: grid;
    grid-template-columns: 116px 1fr;
    gap: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    overflow: hidden;
}

.blog-card img {
    width: 116px;
    height: 128px;
    object-fit: cover;
}

.blog-card div {
    padding: 10px 10px 10px 0;
}

.blog-card h2 {
    margin: 0 0 6px;
    font-size: 16px;
}

.blog-card p {
    margin: 0;
    color: var(--muted);
    line-height: 1.45;
}

.bottom-nav {
    position: fixed;
    left: 50%;
    bottom: 0;
    z-index: 30;
    width: min(100%, 480px);
    transform: translateX(-50%);
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    min-height: 68px;
    background: var(--white);
    border-top: 1px solid var(--line);
    box-shadow: 0 -10px 24px rgba(16, 24, 40, .08);
}

.bottom-nav a {
    display: grid;
    place-items: center;
    align-content: center;
    gap: 4px;
    color: #525864;
    font-size: 11px;
    font-weight: 800;
}

.bottom-nav a.active {
    color: var(--blue);
}

.nav-home,
.nav-grid,
.nav-search,
.nav-user {
    width: 21px;
    height: 21px;
    position: relative;
}

.nav-home:before {
    content: "";
    position: absolute;
    inset: 5px 2px 2px;
    border: 2px solid currentColor;
    border-radius: 3px;
}

.nav-home:after {
    content: "";
    position: absolute;
    left: 4px;
    top: 1px;
    width: 13px;
    height: 13px;
    border-left: 2px solid currentColor;
    border-top: 2px solid currentColor;
    transform: rotate(45deg);
}

.nav-grid {
    display: grid;
    grid-template-columns: repeat(2, 8px);
    grid-template-rows: repeat(2, 8px);
    gap: 4px;
}

.nav-grid:before,
.nav-grid:after {
    content: "";
}

.nav-grid,
.nav-grid:before,
.nav-grid:after {
    background:
        linear-gradient(currentColor 0 0) 0 0 / 8px 8px no-repeat,
        linear-gradient(currentColor 0 0) 13px 0 / 8px 8px no-repeat,
        linear-gradient(currentColor 0 0) 0 13px / 8px 8px no-repeat,
        linear-gradient(currentColor 0 0) 13px 13px / 8px 8px no-repeat;
}

.nav-search:before {
    content: "";
    position: absolute;
    width: 13px;
    height: 13px;
    border: 2px solid currentColor;
    border-radius: 50%;
}

.nav-search:after {
    content: "";
    position: absolute;
    width: 8px;
    height: 2px;
    right: 0;
    bottom: 3px;
    background: currentColor;
    transform: rotate(45deg);
}

.nav-user:before {
    content: "";
    position: absolute;
    left: 6px;
    top: 1px;
    width: 9px;
    height: 9px;
    border: 2px solid currentColor;
    border-radius: 50%;
}

.nav-user:after {
    content: "";
    position: absolute;
    left: 3px;
    bottom: 1px;
    width: 15px;
    height: 9px;
    border: 2px solid currentColor;
    border-radius: 10px 10px 0 0;
    border-bottom: 0;
}

.cookie-banner {
    position: fixed;
    left: 50%;
    bottom: 82px;
    z-index: 40;
    width: min(calc(100% - 24px), 456px);
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    border-radius: 8px;
    background: #101113;
    color: var(--white);
    box-shadow: var(--shadow);
}

.cookie-banner[hidden] {
    display: none;
}

.cookie-banner p {
    margin: 0;
    flex: 1;
    font-size: 12px;
    color: rgba(255, 255, 255, .82);
}

.cookie-banner button {
    min-height: 38px;
    border: 0;
    border-radius: 8px;
    padding: 0 13px;
    background: var(--yellow);
    font-weight: 900;
}

.site-foot {
    margin: 28px -16px -24px;
    padding: 20px 16px 92px;
    background: #111214;
    color: var(--white);
}

.site-foot div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.site-foot span {
    color: rgba(255, 255, 255, .66);
    font-size: 12px;
}

.site-foot nav {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 14px;
}

.site-foot a {
    color: rgba(255, 255, 255, .78);
    font-weight: 800;
    font-size: 12px;
}

@media (min-width: 760px) {
    body {
        background: var(--white);
        font-size: 16px;
    }

    .app-shell {
        padding-bottom: 0;
    }

    .topbar,
    .searchbar,
    .content {
        width: min(100% - 48px, 1180px);
        margin-left: auto;
        margin-right: auto;
    }

    .topbar {
        min-height: 76px;
        padding: 14px 0;
        gap: 24px;
        border-bottom: 0;
    }

    .desktop-nav {
        display: flex;
        align-items: center;
        gap: 24px;
        margin-left: 18px;
        flex: 1;
    }

    .desktop-nav a,
    .account-link {
        display: inline-flex;
        align-items: center;
        min-height: 38px;
        color: var(--muted);
        font-size: 14px;
        font-weight: 800;
    }

    .desktop-nav a:hover,
    .account-link:hover {
        color: var(--ink);
    }

    .searchbar {
        position: static;
        max-width: 760px;
        padding: 0 0 18px;
    }

    .searchbar input {
        border-radius: 8px;
    }

    .searchbar button,
    .primary-btn,
    .secondary-btn,
    .dark-btn,
    .danger-btn {
        border-radius: 8px;
    }

    .content {
        padding: 0 0 48px;
    }

    .hero {
        margin: 0 0 28px;
        min-height: 430px;
        border-radius: 0;
    }

    .hero img {
        height: 430px;
    }

    .hero-copy {
        left: 42px;
        bottom: 42px;
    }

    .hero h1 {
        max-width: 540px;
        font-size: 52px;
    }

    .hero p {
        max-width: 440px;
        font-size: 17px;
    }

    .category-rail {
        display: grid;
        grid-template-columns: repeat(5, minmax(0, 1fr));
        overflow: visible;
    }

    .category-chip {
        width: auto;
        flex: initial;
        border: 1px solid var(--line);
        border-radius: 8px;
        padding: 14px 10px;
        background: var(--white);
    }

    .category-chip img {
        width: 96px;
        height: 96px;
        border-radius: 50%;
    }

    .promo-strip {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 16px;
        margin: 26px 0;
    }

    .promo-tile,
    .promo-tile img {
        height: 210px;
    }

    .product-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 18px;
    }

    .product-card {
        border-radius: 8px;
        transition: transform .18s ease, box-shadow .18s ease;
    }

    .product-card:hover {
        transform: translateY(-3px);
        box-shadow: var(--shadow);
    }

    .product-info {
        padding: 12px;
    }

    .product-info h3 {
        font-size: 15px;
        min-height: 40px;
    }

    .trust-row {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 14px;
    }

    .page-title {
        margin: 30px 0 20px;
    }

    .page-title h1 {
        font-size: 36px;
    }

    .filter-rail {
        flex-wrap: wrap;
        overflow: visible;
    }

    .product-layout {
        display: grid;
        grid-template-columns: minmax(0, 1.05fr) minmax(360px, .95fr);
        gap: 32px;
        align-items: start;
        margin: 26px 0 26px;
    }

    .product-hero {
        margin: 0;
        background: var(--soft);
    }

    .product-hero img {
        width: 100%;
        height: min(72vh, 760px);
        max-height: none;
        object-fit: cover;
    }

    .product-panel {
        position: sticky;
        top: 24px;
        margin: 0;
        padding: 26px;
        border: 1px solid var(--line);
        border-radius: 8px;
        background: var(--white);
        color: var(--ink);
    }

    .product-panel .muted {
        color: var(--muted);
        line-height: 1.65;
    }

    .rating-pill {
        background: var(--soft);
        color: var(--ink);
    }

    .product-panel h1 {
        font-size: 30px;
        line-height: 1.12;
    }

    .product-panel .price {
        font-size: 24px;
    }

    .size-row span {
        border-color: var(--line);
        background: var(--white);
        color: var(--ink);
    }

    .size-row input:checked + span {
        background: var(--ink);
        border-color: var(--ink);
        color: var(--white);
    }

    .copy-block,
    .form-card,
    .cart-row,
    .order-row,
    .policy-block {
        padding: 20px;
    }

    .checkout-layout {
        display: grid;
        grid-template-columns: minmax(0, 1fr) 420px;
        gap: 24px;
        align-items: start;
    }

    .checkout-layout .cart-summary,
    .cart-summary {
        position: static;
        margin: 16px 0 0;
        border: 1px solid var(--line);
        border-radius: 8px;
    }

    .cart-row {
        grid-template-columns: 108px 1fr;
    }

    .cart-row img {
        width: 108px;
        height: 136px;
    }

    .blog-list {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .blog-card {
        grid-template-columns: 1fr;
    }

    .blog-card img {
        width: 100%;
        height: 190px;
    }

    .blog-card div {
        padding: 14px;
    }

    .site-foot {
        margin: 46px calc(50% - 50vw) -48px;
        padding: 28px max(24px, calc((100vw - 1180px) / 2)) 34px;
    }

    .bottom-nav {
        display: none;
    }

    .cookie-banner {
        bottom: 22px;
        width: min(calc(100% - 44px), 620px);
    }
}

@media (min-width: 1180px) {
    .product-grid {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }
}
