:root {
    color-scheme: light;
    --text: #172033;
    --muted: #6d7482;
    --line: #e7eaf0;
    --surface: #f6f7fb;
    --dark: #080d19;
    --accent: #d71962;
    --accent-hover: #b91352;
    --success: #1f8a5b;
}

* {
    box-sizing: border-box;
}

html {
    min-width: 320px;
}

body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    color: var(--text);
    background: #fff;
}

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

button,
input {
    font: inherit;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.site-header {
    border-bottom: 1px solid var(--line);
    background: #fff;
}

.utility-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    min-height: 34px;
    padding: 0 clamp(16px, 4vw, 32px);
    color: #c4c9d4;
    background: var(--dark);
    font-size: 13px;
}

.utility-links,
.utility-meta,
.language-switcher,
.main-header,
.header-actions {
    display: flex;
    align-items: center;
}

.utility-links,
.utility-meta {
    gap: 22px;
}

.language-switcher {
    gap: 4px;
    padding: 3px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 18px;
}

.language-switcher a {
    min-width: 30px;
    padding: 4px 7px;
    border-radius: 14px;
    text-align: center;
    color: #c4c9d4;
}

.language-switcher a.is-active {
    color: #fff;
    background: rgba(255, 255, 255, 0.12);
}

.phone {
    color: #fff;
    font-weight: 700;
    white-space: nowrap;
}

.main-header {
    gap: 16px;
    min-height: 86px;
    padding: 16px clamp(16px, 4vw, 32px);
}

.site-logo {
    flex: 0 0 auto;
    font-size: 30px;
    font-weight: 900;
    letter-spacing: 0;
    color: var(--dark);
}

.site-logo span {
    color: var(--accent);
}

.catalog-button,
.buy-button,
.primary-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    border: 0;
    border-radius: 8px;
    background: var(--accent);
    color: #fff;
    font-weight: 800;
    cursor: pointer;
}

.catalog-button {
    padding: 0 18px;
}

.search-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 48px;
    flex: 1 1 auto;
    min-width: 220px;
    height: 52px;
    overflow: hidden;
    border: 1px solid transparent;
    border-radius: 26px;
    background: var(--surface);
}

.search-form:focus-within {
    border-color: rgba(215, 25, 98, 0.3);
    background: #fff;
}

.search-form input {
    min-width: 0;
    padding: 0 18px;
    border: 0;
    outline: 0;
    background: transparent;
}

.search-form button {
    width: 42px;
    height: 42px;
    margin: 5px 6px 5px 0;
    border: 0;
    border-radius: 50%;
    background: var(--accent);
    color: #fff;
    font-size: 22px;
    cursor: pointer;
}

.catalog-button:hover,
.search-form button:hover,
.buy-button:hover,
.primary-link:hover {
    background: var(--accent-hover);
}

.header-actions {
    flex: 0 0 auto;
    gap: 10px;
}

.header-actions span {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: #fff4f8;
    color: var(--dark);
    font-size: 22px;
}

.page-shell {
    width: min(1220px, calc(100% - 32px));
    margin: 0 auto;
    padding: 22px 0 64px;
}

.store-hero {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(280px, 1.1fr);
    align-items: center;
    min-height: 360px;
    overflow: hidden;
    border-radius: 8px;
    background: #dce8f2;
}

.hero-copy {
    position: relative;
    z-index: 1;
    padding: clamp(26px, 5vw, 52px);
}

.section-label {
    display: inline-block;
    margin: 0 0 12px;
    color: var(--accent);
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
}

.store-hero h1,
.content-section h1 {
    margin: 0;
    font-size: clamp(30px, 5vw, 54px);
    line-height: 1.05;
}

.store-hero h1 {
    max-width: 520px;
    margin-bottom: 24px;
}

.primary-link {
    width: max-content;
    padding: 0 20px;
}

.hero-image {
    width: 100%;
    max-height: 330px;
    object-fit: contain;
    padding: 30px;
}

.category-strip {
    display: flex;
    gap: 18px;
    margin: 18px 0 30px;
    padding: 14px 0;
    overflow-x: auto;
    border-bottom: 1px solid var(--line);
    color: #303746;
    font-size: 14px;
    font-weight: 700;
}

.category-strip a {
    flex: 0 0 auto;
    white-space: nowrap;
}

.breadcrumbs {
    margin: 0 0 20px;
    color: var(--muted);
    font-size: 13px;
}

.breadcrumbs ol {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    padding: 0;
    margin: 0;
    list-style: none;
}

.breadcrumbs li {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.breadcrumbs li:not(:last-child)::after {
    content: "/";
    color: #a6adba;
}

.breadcrumbs a {
    color: #4b5565;
}

.breadcrumbs span {
    color: var(--text);
    font-weight: 700;
}

.content-section {
    margin-top: 34px;
}

.section-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.section-heading h2 {
    margin: 0;
    font-size: 28px;
}

.section-heading a,
.section-heading span {
    color: var(--muted);
    font-size: 14px;
    font-weight: 700;
}

.category-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 10px;
}

.category-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 58px;
    padding: 14px 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    font-weight: 800;
}

.category-item:hover,
.category-tree a:hover,
.subcategory-item:hover,
.product-card:hover {
    border-color: rgba(215, 25, 98, 0.35);
    box-shadow: 0 8px 24px rgba(19, 24, 35, 0.08);
}

.category-tree {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 14px;
    padding: 0;
    margin: 0;
    list-style: none;
}

.category-tree .category-tree {
    display: grid;
    grid-template-columns: 1fr;
    gap: 6px;
    margin-top: 8px;
    padding-left: 14px;
}

.category-tree-item {
    min-width: 0;
}

.category-tree a,
.subcategory-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 44px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    color: #252d3d;
    font-weight: 800;
}

.category-tree .category-tree a {
    min-height: 36px;
    padding: 8px 10px;
    border-color: transparent;
    background: var(--surface);
    color: #4b5565;
    font-size: 14px;
    font-weight: 700;
}

.category-tree .category-tree .category-tree a {
    color: var(--muted);
    font-size: 13px;
    font-weight: 600;
}

.subcategory-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 10px;
    margin-bottom: 24px;
}

.product-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
}

.product-card {
    display: grid;
    grid-template-rows: 210px minmax(122px, 1fr) auto;
    gap: 12px;
    min-height: 438px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
}

.product-media {
    position: relative;
    min-width: 0;
}

.product-image {
    display: grid;
    place-items: center;
    width: 100%;
    height: 210px;
    overflow: hidden;
    border-radius: 8px;
    background: #fff;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 8px;
}

.favorite-button {
    position: absolute;
    top: 4px;
    right: 4px;
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 50%;
    color: #3a4150;
    background: #fff;
    box-shadow: 0 6px 18px rgba(19, 24, 35, 0.12);
    font-size: 20px;
    cursor: pointer;
}

.product-info {
    display: grid;
    align-content: start;
    gap: 7px;
    min-width: 0;
}

.image-placeholder {
    display: grid;
    place-items: center;
    align-content: center;
    gap: 8px;
    width: 100%;
    height: 100%;
    padding: 16px;
    color: #7b8494;
    text-align: center;
    background:
        linear-gradient(135deg, rgba(215, 25, 98, 0.08), rgba(8, 13, 25, 0.04)),
        var(--surface);
}

.image-placeholder[hidden] {
    display: none;
}

.image-placeholder-mark {
    display: grid;
    place-items: center;
    width: 56px;
    height: 56px;
    border: 1px solid rgba(215, 25, 98, 0.22);
    border-radius: 50%;
    color: var(--accent);
    background: #fff;
    font-weight: 900;
}

.image-placeholder-text {
    font-size: 13px;
    font-weight: 700;
}

.product-title {
    color: #252d3d;
    font-size: 14px;
    line-height: 1.35;
}

.product-brand {
    min-height: 17px;
    color: #7b8494;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.stock-status,
.delivery-status {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.25;
}

.stock-status.is-available {
    color: var(--success);
    font-weight: 800;
}

.stock-status.is-empty {
    color: #9b243f;
    font-weight: 800;
}

.product-purchase {
    display: grid;
    gap: 10px;
}

.product-price {
    color: var(--dark);
    font-size: 21px;
    line-height: 1;
}

.quantity-row {
    display: grid;
    grid-template-columns: 92px minmax(0, 1fr);
    gap: 8px;
}

.quantity-stepper {
    display: grid;
    grid-template-columns: 28px 1fr 28px;
    align-items: center;
    height: 40px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    text-align: center;
    font-weight: 800;
}

.quantity-stepper button {
    width: 28px;
    height: 40px;
    border: 0;
    color: #8d95a3;
    background: transparent;
}

.card-cart-button {
    min-width: 0;
    min-height: 40px;
    padding: 0 10px;
    border: 0;
    border-radius: 8px;
    color: #fff;
    background: var(--accent);
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
}

.card-cart-button:hover {
    background: var(--accent-hover);
}

.card-cart-button:disabled {
    cursor: not-allowed;
    opacity: 0.55;
}

.product-page {
    display: grid;
    grid-template-columns: minmax(0, 520px) minmax(0, 1fr);
    gap: 38px;
    align-items: start;
}

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

.gallery-image,
.product-gallery .image-placeholder-large {
    width: 100%;
    aspect-ratio: 1;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
}

.gallery-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 14px;
}

.product-summary h1 {
    margin: 0 0 12px;
    font-size: clamp(28px, 4vw, 44px);
    line-height: 1.12;
}

.muted,
.empty-state {
    color: var(--muted);
}

.offer-box {
    display: grid;
    gap: 12px;
    margin: 22px 0;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
}

.product-detail-price {
    margin: 0;
    color: var(--dark);
    font-size: 34px;
    font-weight: 900;
}

.buy-button {
    width: 100%;
}

.product-description {
    color: #303746;
    line-height: 1.65;
}

.message {
    max-width: 560px;
    padding: 48px 0;
}

.static-page {
    max-width: 840px;
}

.static-page h1 {
    margin: 0 0 18px;
}

.static-copy {
    color: #303746;
    font-size: 16px;
    line-height: 1.7;
}

.site-footer {
    color: #d8dde7;
    background: var(--dark);
}

.newsletter-strip,
.footer-main,
.footer-bottom {
    width: min(1220px, calc(100% - 32px));
    margin: 0 auto;
}

.newsletter-strip {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 420px);
    gap: 24px;
    align-items: center;
    padding: 30px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.newsletter-strip h2 {
    margin: 0 0 6px;
    color: #fff;
    font-size: 24px;
}

.newsletter-strip p {
    margin: 0;
    color: #aeb6c5;
}

.newsletter-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 130px;
    height: 48px;
    overflow: hidden;
    border-radius: 8px;
    background: #fff;
}

.newsletter-form input,
.newsletter-form button {
    min-width: 0;
    border: 0;
}

.newsletter-form input {
    padding: 0 16px;
    color: var(--text);
}

.newsletter-form button {
    color: #fff;
    background: var(--accent);
    font-weight: 800;
}

.newsletter-form input:disabled,
.newsletter-form button:disabled {
    opacity: 1;
}

.footer-main {
    display: grid;
    grid-template-columns: minmax(280px, 1.4fr) repeat(3, minmax(150px, 1fr));
    gap: 34px;
    padding: 34px 0;
}

.footer-logo {
    display: inline-block;
    margin-bottom: 14px;
    color: #fff;
    font-size: 30px;
    font-weight: 900;
}

.footer-logo span {
    color: var(--accent);
}

.footer-company p,
.footer-company address {
    max-width: 360px;
    margin: 0 0 16px;
    color: #aeb6c5;
    font-style: normal;
    line-height: 1.55;
}

.footer-company address,
.footer-contact,
.footer-column {
    display: grid;
    gap: 9px;
}

.footer-company strong {
    color: #fff;
}

.footer-contact a {
    width: max-content;
    color: #fff;
    font-weight: 800;
}

.footer-column h2 {
    margin: 4px 0 8px;
    color: #fff;
    font-size: 16px;
}

.footer-column a,
.footer-column button {
    width: max-content;
    max-width: 100%;
    padding: 0;
    border: 0;
    color: #aeb6c5;
    background: transparent;
    text-align: left;
    line-height: 1.4;
}

.footer-column a:hover,
.footer-column button:hover,
.footer-contact a:hover {
    color: #fff;
}

.footer-social-title {
    padding-top: 12px;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 0 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: #aeb6c5;
    font-size: 13px;
}

.admin-body {
    min-height: 100vh;
    background: var(--surface);
}

.admin-login {
    display: grid;
    place-items: center;
    min-height: 100vh;
    padding: 24px;
}

.admin-login-panel {
    width: min(420px, 100%);
    padding: 28px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 18px 50px rgba(19, 24, 35, 0.08);
}

.admin-logo {
    display: inline-block;
    color: var(--dark);
    font-size: 28px;
    font-weight: 900;
}

.admin-logo span {
    color: var(--accent);
}

.admin-login-panel h1,
.admin-section h1,
.admin-section h2 {
    margin: 18px 0;
}

.admin-alert {
    padding: 12px;
    border: 1px solid rgba(155, 36, 63, 0.22);
    border-radius: 8px;
    color: #9b243f;
    background: #fff4f8;
    font-weight: 700;
}

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

.admin-form label {
    display: grid;
    gap: 6px;
    color: #4b5565;
    font-size: 13px;
    font-weight: 800;
}

.admin-form input {
    width: 100%;
    height: 46px;
    padding: 0 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    outline: 0;
    background: #fff;
}

.admin-form input:focus {
    border-color: rgba(215, 25, 98, 0.45);
}

.admin-form button,
.admin-user button {
    min-height: 42px;
    border: 0;
    border-radius: 8px;
    color: #fff;
    background: var(--accent);
    font-weight: 800;
    cursor: pointer;
}

.admin-form button:hover,
.admin-user button:hover {
    background: var(--accent-hover);
}

.admin-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    min-height: 72px;
    padding: 0 clamp(16px, 4vw, 32px);
    border-bottom: 1px solid var(--line);
    background: #fff;
}

.admin-nav {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    overflow-x: auto;
}

.admin-nav a {
    flex: 0 0 auto;
    padding: 8px 10px;
    border-radius: 8px;
    color: #4b5565;
    font-size: 13px;
    font-weight: 800;
}

.admin-nav a.is-active,
.admin-nav a:hover {
    color: #fff;
    background: var(--accent);
}

.admin-user {
    display: flex;
    align-items: center;
    gap: 14px;
    color: #4b5565;
    font-weight: 800;
}

.admin-user button {
    min-height: 36px;
    padding: 0 14px;
}

.admin-shell {
    width: min(1220px, calc(100% - 32px));
    margin: 0 auto;
    padding: 28px 0 64px;
}

.admin-section {
    margin-bottom: 28px;
}

.admin-stats {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 12px;
}

.admin-stats div {
    display: grid;
    gap: 6px;
    min-height: 96px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
}

.admin-stats strong {
    font-size: 30px;
}

.admin-stats span {
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
}

.admin-table-wrap {
    overflow-x: auto;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 760px;
}

.admin-table-wide {
    min-width: 1180px;
}

.admin-table th,
.admin-table td {
    padding: 12px 14px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    font-size: 14px;
}

.admin-table th {
    color: #4b5565;
    background: var(--surface);
    font-size: 12px;
    text-transform: uppercase;
}

.admin-status {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 0 8px;
    border-radius: 12px;
    color: #fff;
    font-size: 12px;
    font-weight: 800;
}

.admin-status.is-success {
    background: var(--success);
}

.admin-status.is-failed {
    background: #9b243f;
}

.admin-inline-form {
    display: grid;
    grid-template-columns: repeat(4, minmax(160px, 1fr));
    gap: 10px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
}

.admin-inline-form input,
.admin-inline-form button,
.admin-row-form select,
.admin-row-form button,
.admin-actions button {
    min-height: 38px;
    border-radius: 8px;
    font: inherit;
}

.admin-inline-form input,
.admin-row-form select {
    min-width: 0;
    padding: 0 10px;
    border: 1px solid var(--line);
    background: #fff;
}

.admin-inline-form button,
.admin-row-form button,
.admin-actions button {
    border: 0;
    color: #fff;
    background: var(--accent);
    font-weight: 800;
    cursor: pointer;
}

.admin-row-form {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) 68px;
    gap: 8px;
}

.admin-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.admin-actions form {
    margin: 0;
}

@media (max-width: 860px) {
    .utility-bar,
    .main-header,
    .store-hero,
    .product-page {
        grid-template-columns: 1fr;
    }

    .utility-bar,
    .main-header {
        align-items: stretch;
        flex-direction: column;
    }

    .utility-meta,
    .utility-links {
        justify-content: space-between;
    }

    .site-logo {
        font-size: 28px;
    }

    .catalog-button {
        width: 100%;
    }

    .header-actions {
        justify-content: space-between;
    }

    .store-hero {
        min-height: 0;
    }

    .hero-image {
        max-height: 240px;
        padding-top: 0;
    }

    .newsletter-strip,
    .footer-main {
        grid-template-columns: 1fr;
    }

    .admin-topbar {
        align-items: stretch;
        flex-direction: column;
        padding-top: 14px;
        padding-bottom: 14px;
    }

    .admin-nav {
        order: 3;
    }

    .admin-user {
        justify-content: space-between;
    }

    .admin-inline-form {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 560px) {
    .utility-links {
        display: none;
    }

    .main-header {
        gap: 12px;
    }

    .section-heading {
        align-items: start;
        flex-direction: column;
    }

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

    .product-card {
        grid-template-rows: 150px minmax(120px, 1fr) auto;
        min-height: 392px;
        padding: 10px;
    }

    .product-image {
        height: 150px;
    }

    .quantity-row {
        grid-template-columns: 1fr;
    }

    .newsletter-form {
        grid-template-columns: 1fr;
        height: auto;
    }

    .newsletter-form input,
    .newsletter-form button {
        min-height: 46px;
    }

    .footer-bottom {
        flex-direction: column;
    }

    .product-gallery {
        grid-template-columns: 1fr;
    }
}
