:root {
    --bg: #f4f4f0;
    --surface: #ffffff;
    --text: #111111;
    --muted: #777b77;
    --line: #dedfd9;
    --green: #b9d86c;
    --green-dark: #7ea43d;
    --dark: #111411;
}


* {
    box-sizing: border-box;
}


html {
    scroll-behavior: smooth;
}


body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: Arial, Helvetica, sans-serif;
    -webkit-font-smoothing: antialiased;
}


a {
    color: inherit;
    text-decoration: none;
}


button {
    font: inherit;
}


/* =========================
   HEADER
========================= */

.site-header {
    position: relative;
    z-index: 20;

    background: rgba(244, 244, 240, 0.96);

    border-bottom: 1px solid var(--line);
}


.header-inner {
    width: min(1400px, calc(100% - 48px));

    margin: 0 auto;

    min-height: 76px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 30px;
}


.brand {
    font-size: 17px;
    font-weight: 800;
    letter-spacing: 0.08em;
}


.main-nav {
    display: flex;
    align-items: center;
    gap: 30px;

    margin-left: auto;
}


.main-nav a,
.search-button,
.cart-button {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.02em;

    transition:
        opacity 0.2s ease,
        color 0.2s ease;
}


.main-nav a:hover,
.search-button:hover {
    opacity: 0.55;
}


.header-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}


.search-button {
    border: 0;
    background: none;
    padding: 0;

    cursor: pointer;
}


.cart-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;

    padding: 10px 14px;

    border: 1px solid var(--text);
    border-radius: 2px;

    background: var(--text);
    color: white;
}


.cart-button.active {
    background: var(--green);
    border-color: var(--green);
    color: var(--text);
}


.cart-count {
    min-width: 18px;
    height: 18px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    border-radius: 50%;

    background: rgba(0, 0, 0, 0.12);

    font-size: 10px;
    font-weight: 700;
}


/* =========================
   HERO
========================= */

.cart-hero {
    padding: 80px 0 70px;

    border-bottom: 1px solid var(--line);
}


.cart-hero-inner {
    width: min(1400px, calc(100% - 48px));

    margin: 0 auto;
}


.eyebrow,
.section-label {
    display: block;

    font-size: 9px;
    font-weight: 700;

    letter-spacing: 0.16em;

    color: var(--muted);
}


.cart-hero h1 {
    margin: 15px 0 15px;

    font-size: clamp(50px, 7vw, 92px);
    line-height: 0.95;
    letter-spacing: -0.055em;
    font-weight: 700;
}


.cart-hero p {
    max-width: 520px;

    margin: 0;

    font-size: 14px;
    line-height: 1.65;

    color: var(--muted);
}


/* =========================
   CART
========================= */

.cart-section {
    padding: 70px 0 100px;
}


.cart-layout {
    width: min(1400px, calc(100% - 48px));

    margin: 0 auto;

    display: grid;

    grid-template-columns: minmax(0, 1fr) 390px;

    gap: 70px;

    align-items: start;
}


/* =========================
   PRODUCTS
========================= */

.cart-section-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;

    padding-bottom: 22px;

    border-bottom: 1px solid var(--line);
}


.cart-section-header h2,
.summary-top h2 {
    margin: 9px 0 0;

    font-size: 30px;
    letter-spacing: -0.035em;
}


.items-count {
    font-size: 11px;
    color: var(--muted);
}


.cart-items {
    display: flex;
    flex-direction: column;
}


.cart-item {
    display: grid;

    grid-template-columns: 150px minmax(0, 1fr) auto;

    gap: 25px;

    padding: 28px 0;

    border-bottom: 1px solid var(--line);
}


.cart-item-image {
    width: 150px;
    height: 150px;

    display: flex;
    align-items: center;
    justify-content: center;

    background: #ecece7;

    position: relative;

    overflow: hidden;
}


.cart-item-image::before {
    content: "";

    position: absolute;

    width: 100px;
    height: 100px;

    border-radius: 50%;

    background:
        radial-gradient(
            circle,
            rgba(185, 216, 108, 0.42) 0%,
            rgba(185, 216, 108, 0.14) 38%,
            transparent 70%
        );
}


/* =========================
   REAL PRODUCT IMAGE
========================= */

.cart-real-product-image {
    display: block;

    width: auto;
    height: 110px;

    max-width: 85%;
    max-height: 85%;

    object-fit: contain;

    position: relative;
    z-index: 2;

    filter:
        drop-shadow(
            0 12px 14px rgba(0, 0, 0, 0.12)
        );
}


.cart-vial {
    position: relative;

    width: 52px;
    height: 86px;

    border-radius: 7px 7px 10px 10px;

    background:
        linear-gradient(
            90deg,
            #eeeeeb 0%,
            #ffffff 35%,
            #eeeeeb 100%
        );

    border: 1px solid #d0d1cb;

    box-shadow:
        0 12px 25px rgba(0, 0, 0, 0.12);

    z-index: 2;
}


.cart-vial::before {
    content: "";

    position: absolute;

    left: 8px;
    right: 8px;
    top: -14px;

    height: 15px;

    border-radius: 4px 4px 2px 2px;

    background: #252825;

    border: 1px solid #111;
}


.cart-vial::after {
    content: "";

    position: absolute;

    left: 7px;
    right: 7px;
    bottom: 18px;

    height: 22px;

    background: var(--green);

    border-radius: 2px;

    opacity: 0.9;
}


.cart-item-details {
    min-width: 0;

    padding-top: 3px;
}


.cart-item-category {
    display: block;

    margin-bottom: 8px;

    font-size: 9px;
    font-weight: 700;

    letter-spacing: 0.15em;

    color: var(--muted);
}


.cart-item-name {
    margin: 0 0 7px;

    font-size: 22px;
    font-weight: 700;

    letter-spacing: -0.03em;
}


.cart-item-amount {
    margin: 0 0 20px;

    font-size: 12px;

    color: var(--muted);
}


.cart-item-price {
    font-size: 12px;
    font-weight: 600;
}


.cart-item-price span {
    color: var(--muted);
    font-weight: 400;
}


.cart-item-controls {
    display: flex;

    align-items: flex-start;
    gap: 25px;
}


.quantity-control {
    display: flex;
    align-items: center;

    border: 1px solid var(--line);

    background: var(--surface);
}


.quantity-button {
    width: 34px;
    height: 34px;

    border: 0;
    background: transparent;

    cursor: pointer;

    font-size: 16px;

    transition:
        background 0.2s ease;
}


.quantity-button:hover {
    background: #eeeeea;
}


.quantity-value {
    width: 30px;

    text-align: center;

    font-size: 12px;
    font-weight: 700;
}


.remove-button {
    border: 0;
    background: none;

    padding: 8px 0;

    cursor: pointer;

    font-size: 10px;
    font-weight: 700;

    letter-spacing: 0.08em;

    color: var(--muted);

    transition:
        color 0.2s ease;
}


.remove-button:hover {
    color: #111111;
}


/* =========================
   EMPTY CART
========================= */

.empty-cart {
    display: none;

    padding: 90px 20px;

    text-align: center;
}


.empty-cart.visible {
    display: block;
}


.empty-cart-icon {
    width: 46px;
    height: 46px;

    display: flex;
    align-items: center;
    justify-content: center;

    margin: 0 auto 22px;

    border: 1px solid var(--line);
    border-radius: 50%;

    font-size: 20px;

    color: var(--muted);
}


.empty-cart h3 {
    margin: 0 0 10px;

    font-size: 24px;

    letter-spacing: -0.03em;
}


.empty-cart p {
    max-width: 360px;

    margin: 0 auto 28px;

    font-size: 13px;
    line-height: 1.6;

    color: var(--muted);
}


/* =========================
   BUTTONS
========================= */

.primary-button {
    display: inline-flex;

    align-items: center;
    justify-content: center;

    min-height: 46px;

    padding: 0 24px;

    background: var(--text);
    color: white;

    font-size: 11px;
    font-weight: 700;

    letter-spacing: 0.05em;

    transition:
        transform 0.2s ease,
        background 0.2s ease;
}


.primary-button:hover {
    background: #292d29;

    transform: translateY(-1px);
}


/* =========================
   SUMMARY
========================= */

.cart-summary {
    position: sticky;
    top: 30px;

    padding: 30px;

    background: var(--surface);

    border: 1px solid var(--line);
}


.summary-top {
    padding-bottom: 25px;

    border-bottom: 1px solid var(--line);
}


.summary-line {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;

    gap: 20px;

    padding: 17px 0;

    font-size: 12px;
}


.summary-line strong {
    font-size: 13px;
}


.summary-muted {
    max-width: 150px;

    text-align: right;

    color: var(--muted);

    line-height: 1.4;
}


.summary-divider {
    height: 1px;

    background: var(--line);

    margin: 5px 0;
}


.summary-total {
    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 22px 0 25px;
}


.summary-total span {
    font-size: 12px;
    font-weight: 700;
}


.summary-total strong {
    font-size: 24px;

    letter-spacing: -0.04em;
}


.checkout-button {
    width: 100%;
    height: 52px;

    border: 0;

    background: var(--text);
    color: white;

    font-size: 11px;
    font-weight: 700;

    letter-spacing: 0.05em;

    cursor: pointer;

    transition:
        background 0.2s ease,
        opacity 0.2s ease,
        transform 0.2s ease;
}


.checkout-button:not(:disabled):hover {
    background: #292d29;

    transform: translateY(-1px);
}


.checkout-button:disabled {
    cursor: not-allowed;

    opacity: 0.35;
}


.continue-link {
    display: block;

    margin-top: 20px;

    text-align: center;

    font-size: 11px;
    font-weight: 600;

    color: var(--muted);

    transition:
        color 0.2s ease;
}


.continue-link:hover {
    color: var(--text);
}


.summary-note {
    display: flex;

    gap: 10px;

    margin-top: 30px;
    padding-top: 20px;

    border-top: 1px solid var(--line);
}


.note-dot {
    width: 6px;
    height: 6px;

    flex: 0 0 6px;

    margin-top: 5px;

    border-radius: 50%;

    background: var(--green-dark);
}


.summary-note p {
    margin: 0;

    font-size: 10px;
    line-height: 1.5;

    color: var(--muted);
}


/* =========================
   QUALITY
========================= */

.cart-quality {
    background: var(--dark);

    color: white;
}


.cart-quality-inner {
    width: min(1400px, calc(100% - 48px));

    margin: 0 auto;

    min-height: 260px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 30px;
}


.cart-quality .section-label {
    color: #858a85;
}


.cart-quality h2 {
    margin: 12px 0 0;

    font-size: clamp(34px, 4vw, 58px);

    line-height: 0.98;

    letter-spacing: -0.05em;
}


.quality-link {
    font-size: 11px;
    font-weight: 700;

    color: var(--green);

    white-space: nowrap;
}


/* =========================
   FOOTER
========================= */

.site-footer {
    background: var(--dark);

    color: white;

    border-top: 1px solid rgba(255, 255, 255, 0.1);
}


.footer-inner {
    width: min(1400px, calc(100% - 48px));

    margin: 0 auto;

    min-height: 100px;

    display: grid;

    grid-template-columns: 1fr auto 1fr;

    align-items: center;

    gap: 30px;
}


.footer-brand {
    font-size: 14px;
    font-weight: 800;

    letter-spacing: 0.08em;
}


.footer-links {
    display: flex;
    gap: 24px;
}


.footer-links a {
    font-size: 10px;

    color: #a5aaa5;

    transition:
        color 0.2s ease;
}


.footer-links a:hover {
    color: white;
}


.footer-copy {
    justify-self: end;

    font-size: 10px;

    color: #777c77;
}


/* =========================
   RESPONSIVE
========================= */

@media (max-width: 1000px) {

    .main-nav {
        gap: 18px;
    }


    .cart-layout {
        grid-template-columns: 1fr;

        gap: 50px;
    }


    .cart-summary {
        position: static;

        max-width: 600px;
    }

}


@media (max-width: 750px) {

    .header-inner {
        width: min(100% - 30px, 1400px);

        min-height: 68px;
    }


    .main-nav {
        display: none;
    }


    .cart-hero {
        padding: 60px 0;
    }


    .cart-layout,
    .cart-hero-inner,
    .cart-quality-inner,
    .footer-inner {
        width: min(100% - 30px, 1400px);
    }


    .cart-item {
        grid-template-columns: 100px minmax(0, 1fr);

        gap: 18px;
    }


    .cart-item-image {
        width: 100px;
        height: 100px;
    }


    .cart-item-controls {
        grid-column: 2;

        align-items: center;

        justify-content: space-between;

        padding-top: 4px;
    }


    .cart-quality-inner {
        min-height: 220px;

        flex-direction: column;
        align-items: flex-start;
        justify-content: center;
    }


    .footer-inner {
        grid-template-columns: 1fr;

        padding: 30px 0;
    }


    .footer-copy {
        justify-self: start;
    }

}


@media (max-width: 500px) {

    .header-actions {
        gap: 10px;
    }


    .search-button {
        display: none;
    }


    .cart-hero h1 {
        font-size: 52px;
    }


    .cart-section {
        padding: 50px 0 70px;
    }


    .cart-item {
        grid-template-columns: 80px minmax(0, 1fr);
    }


    .cart-item-image {
        width: 80px;
        height: 80px;
    }


    .cart-vial {
        transform: scale(0.8);
    }


    .cart-item-name {
        font-size: 18px;
    }


    .cart-item-amount {
        margin-bottom: 12px;
    }


    .cart-item-controls {
        grid-column: 1 / -1;
    }


    .cart-summary {
        padding: 22px;
    }

}
