*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    height: 100%;
}

body {
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}

img {
    max-width: 100%;
    display: block;
}

:root {
    --bg: #0b0c10;
    --panel: #11131a;
    --muted: #6b7280;
    --text: #e5e7eb;
    --brand: #6ee7b7;
    --brand-700: #059669;
    --accent: #9ca3af;
    --danger: #ef4444;
    --radius: 16px;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}

body {
    font-family: Inter, system-ui, Segoe UI, Roboto, Arial, sans-serif;
    background: linear-gradient(180deg, #0b0c10, #0f1220);
    color: var(--text);
    line-height: 1.6;
}

.container {
    width: min(1100px, 92%);
    margin-inline: auto;
}

.sr-only {
    position: absolute;
    left: -9999px;
}

/* Header */
.site-header {
    position: sticky;
    top: 0;
    background: rgba(15, 18, 32, .8);
    backdrop-filter: blur(10px);
    z-index: 50;
    border-bottom: 1px solid rgba(255, 255, 255, .06)
}

.header__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 0
}

.logo {
    display: flex;
    gap: 10px;
    align-items: center;
    color: var(--text);
    text-decoration: none;
    font-weight: 700
}

.nav {
    display: flex;
    gap: 18px
}

.nav a {
    color: var(--accent);
    text-decoration: none
}

.nav a:hover {
    color: var(--text)
}

.cart-link {
    display: flex;
    gap: 8px;
    align-items: center;
    color: var(--text);
    text-decoration: none
}

.badge {
    background: var(--brand);
    color: #0b0c10;
    border-radius: 999px;
    padding: 2px 8px;
    font-weight: 700
}

/* Burger & Mobile */
.burger {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: transparent;
    border: 0;
    cursor: pointer
}

.burger span {
    width: 22px;
    height: 2px;
    background: var(--text);
    display: block
}

.mobile-nav {
    flex-direction: column;
    gap: 12px;
    padding: 12px;
    background: var(--panel);
    border-top: 1px solid rgba(255, 255, 255, .06)
}

a {
    color: var(--brand);
}

.cookie-banner {
    position: fixed;
    inset: auto 12px 12px 12px;
    background: var(--panel);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius);
    padding: 14px;
    box-shadow: var(--shadow);
    gap: 12px;
    align-items: center;
    justify-content: space-between;
}

.cookie-actions {
    display: flex;
    gap: 10px;
}

/* Hero */
.hero {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    align-items: center;
    gap: 30px;
    padding: 60px 0;
}

.hero__content h1 {
    font-size: 40px;
    line-height: 1.1;
    margin: 0 0 10px;
}

.hero__content p {
    color: var(--accent);
    margin: 0 0 20px;
}

.hero__art {
    width: 100%;
    aspect-ratio: 1/1;
    border-radius: 24px;
    background: radial-gradient(
            60% 60% at 30% 30%,
            rgba(110, 231, 183, 0.35),
            transparent 60%
    ),
    linear-gradient(
            135deg,
            rgba(255, 255, 255, 0.06),
            rgba(255, 255, 255, 0.02)
    );
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: var(--shadow);
}

.hero__art img {
    border-radius: 24px;
}

/* Buttons */
.btn {
    border: 0;
    border-radius: 12px;
    padding: 10px 14px;
    font-weight: 600;
    cursor: pointer;
}

.btn--primary {
    background: var(--brand);
    color: #0b0c10;
    text-decoration: none;
}

.btn--primary:hover {
    background: var(--brand-700);
    color: #fff;
}

.btn--ghost {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.16);
    color: var(--text);
}

/* Cards */
.grid--cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.card {
    background: var(--panel);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
}

.card__media img {
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
    max-height: 400px;
}

.card__body {
    padding: 16px;
}

.card__title {
    margin: 0 0 6px;
}

.card__sku {
    color: var(--muted);
    font-size: 12px;
    margin: 0 0 10px;
}

.card__desc {
    color: var(--accent);
    font-size: 14px;
}

.card__price {
    display: flex;
    gap: 12px;
    align-items: baseline;
    margin: 12px 0;
}

.price {
    font-size: 20px;
    font-weight: 800;
}

.price--old {
    color: var(--muted);
    text-decoration: line-through;
    font-weight: 500;
}

.card__actions {
    display: grid;
    grid-template-columns: auto 70px auto 1fr;
    gap: 8px;
}

.qty {
    width: 100%;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: transparent;
    color: var(--text);
    padding: 8px;
}

/* Sections */
.section__header {
    display: flex;
    align-items: end;
    justify-content: space-between;
    margin: 20px 0;
}

.benefits {
    padding: 40px 0;
}

.benefits__list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    padding-left: 18px;
}

/* Cart */
.cart-page h1 {
    margin: 20px 0;
}

.cart-table-wrap {
    background: var(--panel);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    padding: 14px;
}

.cart-table {
    width: 100%;
    border-collapse: collapse;
}

.cart-table th,
.cart-table td {
    padding: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.cart-summary {
    display: flex;
    justify-content: flex-end;
    padding: 14px 0;
}

.checkout .form {
    display: grid;
    gap: 14px;
}

.form__row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.form input,
.form textarea {
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: transparent;
    color: var(--text);
    padding: 10px;
}

.form textarea {
    width: 100%;
}

.checkbox {
    display: flex;
    gap: 8px;
    align-items: center;
}

/* Legal */

@media (max-width: 600px) {
    .legal h1 {
        font-size: 26px;
    }
}

/* Footer */
.site-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    margin-top: 40px;
}

.footer__row {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    padding: 20px 0;
    color: var(--accent);
}

.footer__copy {
    color: var(--muted);
}

/* Modal */
.modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    place-items: center;
}

.modal__content {
    background: var(--panel);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 20px;
    max-width: 520px;
    width: 92%;
    position: relative;
    top: 20%;
}

/* Responsive */
@media (max-width: 900px) {
    .grid--cards {
        grid-template-columns: repeat(2, 1fr);
    }

    .hero {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 560px) {
    .nav {
        display: none
    }

    .burger {
        display: flex
    }
    .grid--cards {
        grid-template-columns: 1fr;
    }

    .form__row {
        grid-template-columns: 1fr;
    }

    .benefits__list {
        grid-template-columns: 1fr;
    }
}

body.no-scroll {
    overflow: hidden
}

@media (max-width: 1024px) {
    .grid--cards {
        grid-template-columns:repeat(2, 1fr)
    }

    .header__row {
        gap: 12px
    }

    .nav {
        gap: 12px
    }
}

@media (max-width: 768px) {
    .nav {
        display: none
    }

    .burger {
        display: flex
    }
}

@media (max-width: 600px) {
    .cart-table th, .cart-table td {
        padding: 4px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
        font-size: 12px;
    }

    .cart-table .btn {
        font-size: 12px;
        padding: 7px 6px;
        font-weight: 400;
    }
}

@media (max-width: 560px) {
    .grid--cards {
        grid-template-columns:1fr
    }

    .form__row {
        grid-template-columns:1fr
    }

    .benefits__list {
        grid-template-columns:1fr
    }
}

@media (max-width: 400px) {
    .btn {
        padding: 8px 10px
    }

    .card__actions {
        grid-template-columns: auto 60px auto 1fr
    }

    .hero__content h1 {
        font-size: 28px
    }
}

.qty-row {
    display: flex;
    align-items: center;
    gap: 8px
}

.qty-row .qty {
    width: 68px;
    text-align: center
}


/* Cart layout */
.cart-page {
    margin-top: 12px;
}

.cart-table-wrap {
    background: var(--panel);
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 16px;
    padding: 10px;
}

.cart-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

.cart-table th, .cart-table td {
    padding: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, .08);
    vertical-align: middle;
}

.cart-table th:first-child, .cart-table td:first-child {
    width: 42%;
}

.cart-table th:nth-child(2), .cart-table td:nth-child(2) {
    width: 14%;
    text-align: right;
}

.cart-table th:nth-child(3), .cart-table td:nth-child(3) {
    width: 20%;
}

.cart-table th:nth-child(4), .cart-table td:nth-child(4) {
    width: 14%;
    text-align: right;
}

.cart-table th:nth-child(5), .cart-table td:nth-child(5) {
    width: 10%;
    text-align: right;
}

.qty-row {
    display: inline-grid;
    grid-template-columns: 28px 64px 28px;
    gap: 6px;
    align-items: center;
}

.qty-row .btn {
    padding: 6px 0;
}

.qty-row .qty {
    width: 64px;
    text-align: center;
}

.cart-summary {
    display: flex;
    justify-content: flex-end;
    padding: 10px 4px;
}

.cart-summary .row {
    display: flex;
    gap: 10px;
    align-items: baseline;
    font-size: 18px;
}

.cart-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 6px 4px 4px;
}

/* Mobile card layout */
@media (max-width: 680px) {
    .cart-table thead {
        display: none;
    }

    .cart-table, .cart-table tbody, .cart-table tr, .cart-table td {
        display: block;
        width: 100%;
    }

    .cart-table tr {
        border: 1px solid rgba(255, 255, 255, .08);
        border-radius: 14px;
        padding: 10px;
        margin-bottom: 10px;
        background: rgba(255, 255, 255, .02);
    }

    .cart-table td {
        border: 0;
        padding: 6px 0;
    }

    .cart-table td + td {
        border-top: 1px dashed rgba(255, 255, 255, .08);
        padding-top: 10px;
        margin-top: 10px;
    }

    .cart-table td:nth-child(1) {
        order: 1;
    }

    .cart-table td:nth-child(2) {
        order: 3;
        display: flex;
        justify-content: space-between;
    }

    .cart-table td:nth-child(2)::before {
        content: 'Цена';
        color: var(--muted);
    }

    .cart-table td:nth-child(3) {
        order: 2;
    }

    .cart-table td:nth-child(4) {
        order: 4;
        display: flex;
        justify-content: space-between;
    }

    .cart-table td:nth-child(4)::before {
        content: 'Сумма';
        color: var(--muted);
    }

    .cart-table td:nth-child(5) {
        order: 5;
        text-align: left;
    }

    .cart-table td:first-child strong {
        display: block;
        font-size: 15px;
        line-height: 1.3;
    }

    .cart-table td:first-child small {
        color: var(--muted);
    }

    .qty-row {
        display: grid;
        grid-template-columns: 32px 1fr 32px;
        gap: 8px;
    }

    .qty-row .qty {
        width: 100%;
        max-width: 86px;
        min-width: 30px;
    }

    .cart-summary {
        justify-content: stretch;
        padding-inline: 0;
    }

    .cart-summary .row {
        width: 100%;
        justify-content: space-between;
    }

    .cart-actions {
        justify-content: stretch;
    }

    .cart-actions .btn {
        width: 100%;
    }
}

@media (max-width: 360px) {
    .cart-table tr {
        padding: 8px;
    }

    .qty-row {
        grid-template-columns: 28px 1fr 28px;
    }
}

@media (max-width: 680px) {
    .footer__row {
        flex-direction: column;
    }
}
