
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Playfair+Display:wght@500;600;700&display=swap');

:root {
    --red: #c71932;
    --red-dark: #9f1025;
    --black: #101010;
    --dark: #171717;
    --grey: #8b8b8b;
    --white: #ffffff;
    --border: rgba(255, 255, 255, 0.10);
    --muted: #b5b5b5;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'DM Sans', sans-serif;
    background: #101010;
    color: #ffffff;
    min-height: 100vh;
}


/* HEADER */

.cart-header {
    min-height: 88px;
    padding: 15px 7%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #090909;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.brand {
    display: flex;
    align-items: center;
    gap: 13px;
    color: white;
    text-decoration: none;
}

.brand img {
    width: 48px;
    height: 48px;
    object-fit: contain;
}

.brand-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.brand-name {
    font-size: 17px;
    font-weight: 700;
    letter-spacing: 2px;
}

.brand-tagline {
    color: #c71932;
    font-size: 9px;
    letter-spacing: 3px;
}

.header-nav {
    display: flex;
    align-items: center;
    gap: 34px;
}

.header-nav a {
    text-decoration: none;
    color: #c7c7c7;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.5px;
    transition: 0.3s;
}

.header-nav a:hover,
.header-nav a.active {
    color: #e21c3a;
}


/* PAGE HEADING */

.cart-page {
    max-width: 1400px;
    margin: auto;
    padding: 65px 7% 90px;
}

.cart-heading {
    text-align: center;
    margin-bottom: 55px;
}

.section-label {
    color: #d41d39;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 4px;
}

.cart-heading h1 {
    font-family: 'Playfair Display', serif;
    font-size: clamp(38px, 5vw, 58px);
    font-weight: 600;
    margin: 15px 0;
}

.cart-heading h1 span {
    color: #d41d39;
}

.cart-heading p {
    color: #a3a3a3;
    font-size: 14px;
}


/* ALERTS */

.alert {
    padding: 15px 20px;
    border-radius: 5px;
    margin-bottom: 25px;
    font-size: 13px;
}

.success-alert {
    color: #b7f5c8;
    background: rgba(32, 150, 76, 0.13);
    border: 1px solid rgba(32, 150, 76, 0.35);
}

.error-alert {
    color: #ffb4b4;
    background: rgba(199, 25, 50, 0.12);
    border: 1px solid rgba(199, 25, 50, 0.35);
}


/* EMPTY CART */

.empty-cart {
    text-align: center;
    padding: 75px 20px;
    background: #171717;
    border: 1px solid var(--border);
    border-radius: 10px;
}

.empty-cart-icon {
    width: 85px;
    height: 85px;
    margin: 0 auto 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(199, 25, 50, 0.12);
    border-radius: 50%;
}

.cart-icon {
    font-style: normal;
    font-size: 35px;
}

.empty-cart h2 {
    font-family: 'Playfair Display', serif;
    font-size: 30px;
    margin-bottom: 12px;
}

.empty-cart p {
    color: #a5a5a5;
    font-size: 14px;
    margin-bottom: 28px;
}

.primary-button {
    display: inline-block;
    background: #c71932;
    color: white;
    text-decoration: none;
    padding: 15px 28px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.5px;
    border-radius: 3px;
    transition: 0.3s;
}

.primary-button:hover {
    background: #a71027;
}


/* CART LAYOUT */

.cart-content {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    align-items: start;
    gap: 35px;
}

.cart-items-section {
    min-width: 0;
}

.cart-table-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
}

.cart-table-heading h2 {
    font-family: 'Playfair Display', serif;
    font-size: 23px;
    font-weight: 500;
}

.cart-table-heading > span {
    color: #d41d39;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
}


/* CART ITEM */

.cart-item {
    display: grid;
    grid-template-columns: 115px minmax(150px, 1fr) 145px 145px;
    align-items: center;
    gap: 22px;
    padding: 25px 0;
    border-bottom: 1px solid var(--border);
}

.cart-product-image {
    height: 125px;
    width: 115px;
    overflow: hidden;
    border-radius: 5px;
    background: #202020;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.image-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    width: 100%;
    background: linear-gradient(145deg, #351016, #151515);
}

.image-placeholder span {
    color: #d41d39;
    font-family: 'Playfair Display', serif;
    font-size: 35px;
}


.cart-product-info {
    min-width: 0;
}

.product-brand {
    color: #d41d39;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 2px;
}

.cart-product-info h3 {
    font-family: 'Playfair Display', serif;
    font-size: 21px;
    margin: 7px 0;
    overflow-wrap: anywhere;
}

.product-type {
    display: inline-block;
    color: #f1a4b0;
    background: rgba(199, 25, 50, 0.12);
    padding: 5px 9px;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 1px;
}

.product-size {
    color: #b4b4b4;
    font-size: 12px;
    margin-top: 10px;
}

.product-size strong {
    color: white;
}

.unit-price {
    color: #b4b4b4;
    font-size: 12px;
    margin-top: 7px;
}


/* QUANTITY */

.quantity-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.quantity-form label,
.cart-item-total label {
    color: #929292;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 1.3px;
}

.quantity-controls {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.quantity-controls input {
    width: 75px;
    padding: 10px;
    background: #202020;
    border: 1px solid #444;
    border-radius: 3px;
    color: white;
    outline: none;
}

.quantity-controls input:focus {
    border-color: #c71932;
}

.update-button {
    width: fit-content;
    padding: 7px 10px;
    background: transparent;
    border: 1px solid #555;
    color: #ddd;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 1px;
    cursor: pointer;
    transition: 0.3s;
}

.update-button:hover {
    background: #c71932;
    border-color: #c71932;
}

.stock-info {
    display: block;
    color: #858585;
    font-size: 10px;
    margin-top: 9px;
}


/* ITEM TOTAL */

.cart-item-total {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
}

.cart-item-total > strong {
    font-size: 14px;
    color: #ffffff;
    white-space: nowrap;
}

.remove-button {
    background: none;
    border: none;
    color: #e34a60;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 1px;
    cursor: pointer;
}

.remove-button:hover {
    color: #ff8192;
}


/* CONTINUE SHOPPING */

.continue-shopping {
    display: inline-block;
    margin-top: 30px;
    text-decoration: none;
    color: #cccccc;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.5px;
    transition: 0.3s;
}

.continue-shopping:hover {
    color: #e21c3a;
}


/* ORDER SUMMARY */

.cart-summary {
    background: #191919;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 7px;
    padding: 27px 25px;
    position: sticky;
    top: 25px;
}

.cart-summary h2 {
    font-family: 'Playfair Display', serif;
    font-size: 24px;
    font-weight: 500;
    margin-bottom: 27px;
}

.summary-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 17px 0;
    gap: 10px;
    color: #a9a9a9;
    font-size: 12px;
}

.summary-row strong {
    color: white;
    white-space: nowrap;
}

.summary-divider {
    height: 1px;
    background: var(--border);
    margin: 23px 0;
}

.summary-total {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.summary-total > span {
    color: white;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.5px;
}

.summary-total strong {
    color: #e21c3a;
    font-size: 18px;
    white-space: nowrap;
}

.checkout-notice {
    background: rgba(255, 255, 255, 0.04);
    border-left: 3px solid #c71932;
    padding: 12px;
    margin-top: 25px;
}

.checkout-notice p {
    color: #a9a9a9;
    font-size: 11px;
    line-height: 1.6;
}

.checkout-button {
    width: 100%;
    margin-top: 20px;
    padding: 16px 12px;
    background: #444;
    border: none;
    color: #bcbcbc;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.3px;
    cursor: not-allowed;
    opacity: 0.8;
}

.secure-note {
    text-align: center;
    color: #777;
    font-size: 10px;
    margin-top: 15px;
    line-height: 1.5;
}


/* FOOTER */

.cart-footer {
    text-align: center;
    padding: 25px 15px;
    background: #090909;
    border-top: 1px solid var(--border);
}

.cart-footer p {
    color: #777;
    font-size: 9px;
    letter-spacing: 2px;
}


/* RESPONSIVE DESIGN */

@media (max-width: 1050px) {

    .cart-content {
        grid-template-columns: 1fr;
    }

    .cart-summary {
        position: static;
        max-width: 500px;
        width: 100%;
        margin-left: auto;
    }

    .cart-item {
        grid-template-columns: 100px minmax(130px, 1fr) 120px 125px;
        gap: 15px;
    }
}

@media (max-width: 700px) {

    .cart-header {
        padding: 15px 5%;
        flex-wrap: wrap;
        gap: 15px;
    }

    .brand-name {
        font-size: 14px;
    }

    .header-nav {
        gap: 17px;
    }

    .header-nav a {
        font-size: 9px;
    }

    .cart-page {
        padding: 45px 5% 65px;
    }

    .cart-heading {
        margin-bottom: 35px;
    }

    .cart-item {
        grid-template-columns: 90px minmax(0, 1fr);
        align-items: start;
        gap: 15px;
    }

    .cart-product-image {
        height: 105px;
        width: 90px;
    }

    .cart-product-info h3 {
        font-size: 18px;
    }

    .cart-quantity-section {
        grid-column: 2;
    }

    .cart-item-total {
        grid-column: 2;
        flex-direction: row;
        align-items: center;
        flex-wrap: wrap;
        gap: 12px;
    }

    .cart-item-total label {
        display: none;
    }

    .cart-item-total > strong {
        font-size: 13px;
    }

    .cart-summary {
        padding: 23px 18px;
    }
}

@media (max-width: 380px) {

    .header-nav {
        gap: 11px;
    }

    .header-nav a {
        font-size: 8px;
        letter-spacing: 1px;
    }

    .brand img {
        width: 40px;
        height: 40px;
    }

    .brand-name {
        font-size: 12px;
        letter-spacing: 1px;
    }

    .brand-tagline {
        font-size: 8px;
    }
}
