:root {
    --red: #cf1f25;
    --red-dark: #ad151b;
    --ink: #18191b;
    --muted: #6f7379;
    --line: #e7e8ea;
    --surface: #ffffff;
    --soft: #f5f6f7;
    --shadow: 0 18px 50px rgba(22, 24, 28, 0.08);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    color: var(--ink);
    background: #fafafa;
    font-family: "DM Sans", sans-serif;
    -webkit-font-smoothing: antialiased;
}
button, input, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .5; }

.page-loader {
    position: fixed;
    inset: 0;
    z-index: 500;
    display: grid;
    place-items: center;
    background: rgba(255, 255, 255, .97);
    transition: opacity .28s ease, visibility .28s ease;
}
.page-loader.hidden { opacity: 0; visibility: hidden; pointer-events: none; }
.loader-content { width: min(280px, 70vw); text-align: center; }
.loader-content img { width: 210px; height: auto; }
.loader-content p { margin: 14px 0 0; color: var(--muted); font-size: 13px; }
.loader-line { height: 3px; margin-top: 25px; overflow: hidden; border-radius: 99px; background: #ececee; }
.loader-line span { display: block; width: 42%; height: 100%; border-radius: inherit; background: var(--red); animation: loaderSlide 1.05s ease-in-out infinite; }
@keyframes loaderSlide {
    0% { transform: translateX(-110%); }
    100% { transform: translateX(340%); }
}

.site-header {
    height: 82px;
    padding: 0 clamp(22px, 4vw, 68px);
    display: flex;
    align-items: center;
    gap: 28px;
    background: rgba(255, 255, 255, .94);
    border-bottom: 1px solid var(--line);
    position: sticky;
    top: 0;
    z-index: 30;
    backdrop-filter: blur(16px);
}
.brand img { display: block; width: 174px; height: auto; }
.header-note {
    display: flex;
    align-items: center;
    gap: 9px;
    color: var(--muted);
    font-size: 14px;
    border-left: 1px solid var(--line);
    padding-left: 28px;
}
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: #36a269; box-shadow: 0 0 0 4px #e5f5ec; }
.currency-button {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 14px;
    border: 1px solid var(--line);
    background: #fff;
    border-radius: 12px;
    padding: 10px 14px;
    color: var(--muted);
}
.currency-button strong { color: var(--ink); min-width: 38px; }
main { width: min(1500px, calc(100% - 48px)); margin: 0 auto; }

.hero {
    min-height: 310px;
    padding: 62px clamp(32px, 5vw, 76px);
    margin-top: 28px;
    border-radius: 26px;
    background:
        radial-gradient(circle at 87% 5%, rgba(207,31,37,.15), transparent 27%),
        linear-gradient(135deg, #fff 0%, #f4f5f6 100%);
    border: 1px solid #ececee;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 50px;
    overflow: hidden;
    position: relative;
}
.hero::after {
    content: "D";
    position: absolute;
    right: 4%;
    top: -125px;
    font: 800 430px/1 "Manrope", sans-serif;
    color: rgba(20, 20, 21, .025);
    transform: skew(-10deg);
}
.eyebrow { margin: 0 0 12px; color: var(--red); font-weight: 700; font-size: 12px; letter-spacing: .13em; text-transform: uppercase; }
.hero h1, h2 { font-family: "Manrope", sans-serif; }
.hero h1 { margin: 0; font-size: clamp(40px, 5vw, 70px); line-height: 1.02; letter-spacing: -.045em; }
.hero h1 span { color: var(--red); }
.hero-copy { max-width: 610px; margin: 24px 0 0; color: var(--muted); font-size: 17px; line-height: 1.7; }
.hero-stats { display: grid; grid-template-columns: repeat(3, 1fr); min-width: 410px; position: relative; z-index: 1; }
.hero-stats div { padding: 0 24px; border-left: 1px solid #dedfe1; }
.hero-stats strong { display: block; font: 700 28px "Manrope", sans-serif; }
.hero-stats span { display: block; margin-top: 6px; color: var(--muted); font-size: 12px; }

.toolbar { display: flex; justify-content: space-between; gap: 24px; align-items: center; padding: 28px 0; }
.back-button { border: 1px solid var(--line); background: #fff; color: var(--ink); padding: 11px 16px; border-radius: 10px; font-weight: 700; }
.search-box { width: 290px; height: 44px; display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); background: #fff; padding: 0 14px; border-radius: 12px; }
.search-box svg { width: 19px; fill: none; stroke: #92969c; stroke-width: 1.8; }
.search-box input { min-width: 0; width: 100%; border: 0; outline: 0; background: transparent; }
.global-search-panel {
    margin: 28px 0;
    padding: 28px clamp(22px, 4vw, 42px);
    display: grid;
    grid-template-columns: minmax(240px, .75fr) minmax(420px, 1.25fr);
    align-items: center;
    gap: 36px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 12px 35px rgba(22, 24, 28, .05);
}
.global-search-panel h2 { margin: 0 0 7px; font-size: 25px; letter-spacing: -.03em; }
.global-search-panel > div > p:last-child { margin: 0; color: var(--muted); }
.global-search-form {
    height: 64px;
    display: grid;
    grid-template-columns: 25px 1fr auto;
    align-items: center;
    gap: 13px;
    padding: 7px 8px 7px 19px;
    border: 2px solid #e2e3e6;
    border-radius: 15px;
    background: #fafafa;
    transition: border .2s, box-shadow .2s;
}
.global-search-form:focus-within { border-color: var(--red); box-shadow: 0 0 0 4px rgba(207,31,37,.08); }
.global-search-form svg { width: 23px; fill: none; stroke: #85898f; stroke-width: 1.8; }
.global-search-form input { min-width: 0; height: 100%; border: 0; outline: 0; background: transparent; font-size: 16px; }
.global-search-form button { height: 48px; border: 0; border-radius: 11px; padding: 0 25px; background: var(--red); color: #fff; font-weight: 700; }

.shop-layout { display: grid; grid-template-columns: minmax(0, 1fr) 390px; gap: 30px; align-items: start; padding-bottom: 70px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; margin-bottom: 20px; }
.section-heading h2, .order-panel h2 { margin: 0; font-size: 27px; letter-spacing: -.03em; }
.section-heading > span { color: var(--muted); font-size: 13px; }
.subcategory-filters { margin: -4px 0 20px; padding: 15px; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.subcategory-filters > span { display: block; margin-bottom: 10px; color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; }
.subcategory-filters > div { display: flex; flex-wrap: wrap; gap: 8px; }
.subcategory-filters button { display: inline-flex; align-items: center; gap: 8px; min-height: 38px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fafafa; color: #555a60; font-weight: 700; transition: .2s; }
.subcategory-filters button:hover { border-color: #d7b4b6; color: var(--red); }
.subcategory-filters button.active { border-color: var(--red); background: var(--red); color: #fff; }
.subcategory-filters small { min-width: 20px; padding: 2px 5px; border-radius: 7px; background: rgba(0, 0, 0, .06); font-size: 10px; text-align: center; }
.subcategory-filters button.active small { background: rgba(255, 255, 255, .2); }
.product-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.product-grid.loading { opacity: .45; pointer-events: none; }
.category-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.category-card { background: #fff; border: 1px solid var(--line); border-radius: 18px; overflow: hidden; cursor: pointer; transition: transform .2s, box-shadow .2s, border-color .2s; }
.category-card:hover { transform: translateY(-3px); border-color: #d7b4b6; box-shadow: var(--shadow); }
.category-image { height: 150px; display: grid; place-items: center; overflow: hidden; background: linear-gradient(145deg, #f4f5f6, #fff); }
.category-image img { width: 100%; height: 100%; object-fit: cover; }
.category-image > span { color: rgba(207,31,37,.15); font: 800 86px "Manrope", sans-serif; }
.category-content { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px; }
.category-content h3 { margin: 0 0 5px; font: 700 17px "Manrope", sans-serif; }
.category-content p { margin: 0; color: var(--muted); font-size: 12px; }
.category-arrow { display: grid; place-items: center; width: 36px; height: 36px; flex: 0 0 auto; border-radius: 50%; background: #f9e8e9; color: var(--red); font-size: 19px; }
.subcategory-list { max-height: 210px; overflow: auto; padding: 0 18px 18px; }
.subcategory-list button {
    width: calc(100% - (var(--category-depth) * 14px));
    margin: 0 0 6px calc(var(--category-depth) * 14px);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    border: 1px solid var(--line);
    background: #fafafa;
    padding: 7px 9px;
    border-radius: 8px;
    color: #555a60;
    font-size: 11px;
    text-align: left;
}
.subcategory-list button:hover { border-color: var(--red); color: var(--red); }
.subcategory-count { color: #9a9da2; }
.pagination { display: flex; justify-content: center; align-items: center; gap: 7px; margin-top: 28px; }
.pagination button { min-width: 38px; height: 38px; border: 1px solid var(--line); border-radius: 9px; background: #fff; color: var(--ink); font-weight: 700; }
.pagination button.active { border-color: var(--red); background: var(--red); color: #fff; }
.pagination span { color: var(--muted); }
.catalog-empty { padding: 70px 28px; border: 1px dashed #d8dade; border-radius: 18px; background: #fff; text-align: center; }
.catalog-empty h3 { margin: 0 0 9px; font: 700 18px "Manrope", sans-serif; }
.catalog-empty p { max-width: 570px; margin: 0 auto; color: var(--muted); line-height: 1.6; }
.product-card { background: #fff; border: 1px solid var(--line); border-radius: 18px; overflow: hidden; transition: transform .2s, box-shadow .2s; }
.product-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.product-image-wrap { height: 270px; position: relative; background: var(--soft); overflow: hidden; }
.product-image-wrap img { width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; transition: transform .35s; }
.product-card:hover img { transform: scale(1.035); }
.minimum-badge { position: absolute; left: 12px; top: 12px; background: rgba(255,255,255,.9); backdrop-filter: blur(8px); border: 1px solid rgba(0,0,0,.06); padding: 7px 9px; border-radius: 8px; font-size: 11px; font-weight: 700; }
.product-info { padding: 18px; }
.product-meta { display: flex; justify-content: space-between; color: var(--red); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
.product-meta small { color: #9a9da2; font-size: 10px; }
.product-info h3 { min-height: 46px; margin: 10px 0 14px; font: 700 16px/1.4 "Manrope", sans-serif; }
.product-options { margin-bottom: 16px; }
.product-options label { display: block; }
.product-options label > span { display: block; margin-bottom: 6px; color: var(--muted); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.product-options select {
    width: 100%;
    height: 40px;
    border: 1px solid #dfe1e4;
    border-radius: 10px;
    padding: 0 34px 0 11px;
    background: #fff;
    color: var(--ink);
    outline: 0;
}
.product-options select:focus { border-color: var(--red); box-shadow: 0 0 0 3px rgba(207,31,37,.08); }
.product-footer { display: flex; align-items: center; justify-content: space-between; }
.product-footer strong { font: 700 20px "Manrope", sans-serif; }
.add-button { width: 42px; height: 42px; border-radius: 50%; border: 0; background: var(--red); color: #fff; font-size: 25px; line-height: 1; transition: background .2s, transform .2s; }
.add-button:hover { background: var(--red-dark); transform: rotate(90deg); }

.order-panel { position: sticky; top: 106px; background: #fff; border: 1px solid var(--line); border-radius: 20px; box-shadow: 0 14px 44px rgba(28,31,36,.06); overflow: hidden; }
.order-panel-head { display: flex; justify-content: space-between; align-items: center; padding: 24px; border-bottom: 1px solid var(--line); }
.cart-count { display: grid; place-items: center; min-width: 34px; height: 34px; border-radius: 50%; background: #fbe8e9; color: var(--red); font-weight: 700; font-size: 13px; }
.cart-items { max-height: 420px; overflow: auto; padding: 6px 20px; }
.cart-item { display: grid; grid-template-columns: 72px 1fr; gap: 14px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.cart-item > img { width: 72px; height: 82px; border-radius: 10px; object-fit: contain; background: var(--soft); mix-blend-mode: multiply; }
.cart-item-content { min-width: 0; position: relative; }
.cart-item h3 { padding-right: 20px; margin: 1px 0 4px; font: 700 13px "Manrope", sans-serif; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cart-variations { display: flex; flex-wrap: wrap; gap: 4px; margin: 0 0 5px; }
.cart-variations span { padding: 3px 6px; border-radius: 5px; background: #f8e9ea; color: var(--red-dark); font-size: 10px; }
.cart-variations b { font-weight: 700; }
.cart-item p { margin: 0 0 10px; color: var(--muted); font-size: 11px; }
.cart-item small { color: #9a9da2; font-size: 10px; }
.remove-item { position: absolute; top: -4px; right: 0; border: 0; background: none; color: #a0a2a6; font-size: 20px; }
.quantity-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.quantity-row > strong { font-size: 13px; }
.quantity-control { display: flex; height: 29px; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.quantity-control button { width: 27px; border: 0; background: var(--soft); }
.quantity-control input { width: 38px; border: 0; text-align: center; outline: 0; font-size: 12px; }
.empty-cart { padding: 48px 24px; text-align: center; }
.empty-icon { margin: 0 auto 16px; width: 58px; height: 58px; display: grid; place-items: center; background: var(--soft); border-radius: 50%; }
.empty-icon svg { width: 25px; fill: none; stroke: #85898f; stroke-width: 1.6; }
.empty-cart h3 { margin: 0 0 7px; font: 700 15px "Manrope", sans-serif; }
.empty-cart p { margin: 0; color: var(--muted); font-size: 12px; }
.order-summary { padding: 22px 24px 24px; background: #fafafa; border-top: 1px solid var(--line); }
.order-summary > div { display: flex; justify-content: space-between; align-items: center; }
.order-summary > div span { font-weight: 600; }
.order-summary > div strong { font: 800 24px "Manrope", sans-serif; }
.order-summary p { margin: 10px 0 18px; color: var(--muted); font-size: 11px; line-height: 1.5; }
.primary-button { width: 100%; display: flex; align-items: center; justify-content: center; gap: 10px; border: 0; border-radius: 12px; padding: 15px 20px; background: var(--red); color: #fff; font-weight: 700; transition: background .2s; }
.primary-button:hover { background: var(--red-dark); }
.primary-button span { font-size: 19px; }

.modal-backdrop { position: fixed; inset: 0; z-index: 100; display: none; place-items: center; padding: 24px; background: rgba(17,18,20,.62); backdrop-filter: blur(8px); }
.modal-backdrop.visible { display: grid; animation: fadeIn .2s ease; }
.modal { width: min(100%, 630px); max-height: calc(100vh - 48px); overflow: auto; border-radius: 24px; padding: 36px; background: #fff; box-shadow: 0 30px 100px rgba(0,0,0,.28); position: relative; }
.modal h2 { margin: 0 0 10px; font-size: 30px; }
.modal > p:not(.eyebrow) { color: var(--muted); line-height: 1.6; }
.currency-modal { width: min(100%, 760px); text-align: center; padding: 48px; }
.currency-modal > img { width: 180px; margin-bottom: 34px; }
.currency-modal > p { max-width: 520px; margin-left: auto; margin-right: auto; }
.currency-options { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 30px; }
.currency-options button { display: flex; align-items: center; gap: 13px; border: 1px solid var(--line); background: #fff; padding: 17px; border-radius: 14px; text-align: left; transition: border .2s, transform .2s, background .2s; }
.currency-options button:hover { border-color: var(--red); background: #fff9f9; transform: translateY(-2px); }
.currency-options button > span { display: grid; place-items: center; width: 40px; height: 40px; flex: 0 0 auto; border-radius: 10px; background: #f4f4f5; color: var(--red); font-size: 20px; font-weight: 700; }
.currency-options strong, .currency-options small { display: block; }
.currency-options small { margin-top: 3px; color: var(--muted); }
.modal-close { position: absolute; right: 18px; top: 16px; border: 0; background: transparent; color: #84878c; font-size: 29px; }
.type-switch { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 5px; margin: 22px 0; border-radius: 12px; background: var(--soft); }
.type-switch input { position: absolute; opacity: 0; }
.type-switch span { display: block; padding: 10px; text-align: center; border-radius: 9px; color: var(--muted); font-weight: 600; cursor: pointer; }
.type-switch input:checked + span { background: #fff; color: var(--ink); box-shadow: 0 3px 12px rgba(0,0,0,.07); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.form-grid label { display: block; }
.form-grid label.full { grid-column: 1 / -1; }
.form-grid label > span { display: block; margin-bottom: 7px; font-size: 12px; font-weight: 600; }
.form-grid input, .form-grid textarea { width: 100%; border: 1px solid #dfe1e4; border-radius: 10px; padding: 12px; outline: 0; transition: border .2s, box-shadow .2s; }
.form-grid textarea { min-height: 76px; resize: vertical; }
.form-grid input:focus, .form-grid textarea:focus { border-color: var(--red); box-shadow: 0 0 0 3px rgba(207,31,37,.09); }
.submit-order { margin-top: 20px; }
.success-modal { width: min(100%, 470px); text-align: center; }
.success-mark { width: 68px; height: 68px; display: grid; place-items: center; margin: 0 auto 24px; border-radius: 50%; background: #e8f7ef; color: #25955c; font-size: 32px; font-weight: 700; }
.order-number { margin: 24px 0; padding: 15px; border-radius: 12px; background: var(--soft); color: var(--muted); font-size: 13px; }
.order-number strong { display: block; margin-top: 5px; color: var(--ink); font-size: 18px; }
.toast { position: fixed; z-index: 200; left: 50%; bottom: 28px; transform: translate(-50%, 20px); opacity: 0; pointer-events: none; background: #1e2023; color: #fff; padding: 13px 18px; border-radius: 10px; box-shadow: var(--shadow); font-size: 13px; transition: .25s; }
.toast.visible { transform: translate(-50%, 0); opacity: 1; }
[hidden] { display: none !important; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

@media (max-width: 1180px) {
    .shop-layout { grid-template-columns: minmax(0, 1fr) 350px; }
    .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .category-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .hero { align-items: flex-start; flex-direction: column; }
}
@media (max-width: 850px) {
    main { width: min(100% - 28px, 700px); }
    .header-note { display: none; }
    .site-header { padding: 0 18px; }
    .brand img { width: 145px; }
    .hero { padding: 38px 28px; }
    .hero-stats { min-width: 0; width: 100%; }
    .shop-layout { display: flex; flex-direction: column; }
    .order-panel { position: static; width: 100%; order: -1; }
    .toolbar { align-items: stretch; flex-direction: column; }
    .search-box { width: 100%; }
    .global-search-panel { grid-template-columns: 1fr; gap: 20px; }
}
@media (max-width: 560px) {
    .currency-button span { display: none; }
    .hero h1 { font-size: 39px; }
    .hero-stats { grid-template-columns: 1fr; gap: 14px; }
    .hero-stats div { border-left: 3px solid var(--red); }
    .product-grid { grid-template-columns: 1fr; }
    .category-grid { grid-template-columns: 1fr; }
    .product-image-wrap { height: 320px; }
    .currency-options, .form-grid { grid-template-columns: 1fr; }
    .form-grid label.full { grid-column: auto; }
    .modal, .currency-modal { padding: 30px 22px; }
    .global-search-panel { padding: 24px 18px; }
    .global-search-form { grid-template-columns: 22px 1fr; height: auto; padding: 13px; }
    .global-search-form button { grid-column: 1 / -1; width: 100%; }
    .subcategory-filters > div { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 3px; }
    .subcategory-filters button { flex: 0 0 auto; }
}
