/* =====================================================
   CART PAGE — Storefront (Gulfs Display + Warm Identity)
   Mobile-first card layout
   ===================================================== */


/* =========================
   GULFS DISPLAY — VARIABLE FONT
========================= */

@font-face {
    font-family: "Gulfs Display";
    src: url("../fonts/GulfsDisplay-Variable.woff2") format("woff2-variations");
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}


/* =========================
   DESIGN TOKENS
========================= */

:root {
    --brand-navy: #172B46;
    --brand-navy-deep: #0F1F35;
    --brand-off-white: #F5F3EE;
    --brand-off-white-soft: #EDEAE3;
    --brand-silver: #A8B0BA;
    --brand-silver-soft: #C8CDD3;

    --black: #0A0A0A;

    --accent-warm: #C49A4D;
    --accent-warm-deep: #A8823A;

    --wood: #9A7B5A;
    --wood-deep: #7A5F45;
    --wood-light: #B89470;

    --bg: #F5F3EE;
    --bg-soft: #EDEAE3;
    --surface: #FFFFFF;

    --text: var(--black);
    --text-soft: #4A5568;
    --text-muted: #7A8794;

    --border: #D9DCE0;
    --border-soft: #E8EAED;

    --danger: #A33A2E;
    --danger-bg: #F5E5E2;
    --danger-border: #E8C9C3;

    --space-section: clamp(72px, 11vw, 152px);

    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 22px;
    --radius-pill: 980px;

    --font: "Gulfs Display", -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;

    --ease: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-out-soft: cubic-bezier(0.16, 1, 0.3, 1);
    --anim-duration: 1s;
}


/* =========================
   RESET
========================= */

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
    -webkit-text-size-adjust: 100%;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

body {
    min-height: 100vh;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.5;
    letter-spacing: -0.01em;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    touch-action: pan-y;
}

a { color: inherit; text-decoration: none; }

button,
input,
select { font: inherit; -webkit-tap-highlight-color: transparent; }

button {
    border: 0;
    background: none;
    color: inherit;
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
}

img { max-width: 100%; display: block; }

::selection { background: var(--brand-navy); color: var(--brand-off-white); }

:focus-visible {
    outline: 2px solid var(--brand-navy);
    outline-offset: 3px;
    border-radius: 4px;
}

.hidden { display: none !important; }

.container {
    width: min(1200px, calc(100% - 40px));
    margin-inline: auto;
}


/* =========================
   SCROLL ANIMATIONS
========================= */

[data-animate] {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity var(--anim-duration) var(--ease), transform var(--anim-duration) var(--ease);
    will-change: opacity, transform;
}

[data-animate].is-visible {
    opacity: 1;
    transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
    [data-animate] { opacity: 1; transform: none; transition: none; }
}


/* =========================
   SITE TOP
========================= */

.site-top {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    width: 100%;
    transition: background 0.4s var(--ease);
}

.site-top.is-solid {
    background: rgba(245, 243, 238, 0.94);
    -webkit-backdrop-filter: blur(16px) saturate(160%);
    backdrop-filter: blur(16px) saturate(160%);
}


/* =========================
   ANNOUNCEMENT
========================= */

.announcement-bar {
    width: 100%;
    overflow: hidden;
    background: var(--brand-navy-deep);
    color: var(--brand-off-white);
}

.announcement-track { width: 100%; overflow: hidden; }

.announcement-content {
    display: flex;
    align-items: center;
    width: max-content;
    min-width: 100%;
    min-height: 32px;
    white-space: nowrap;
    will-change: transform;
    animation: announcementMove 30s linear infinite;
}

.announcement-item {
    display: inline-flex;
    align-items: center;
    margin-right: 48px;
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.announcement-separator {
    margin-left: 14px;
    color: var(--brand-silver);
    opacity: 0.6;
}

@keyframes announcementMove {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
}


/* =========================
   STORE CLOSED
========================= */

.store-closed-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 32px;
    padding-inline: 18px;
    background: var(--danger-bg);
    color: var(--danger);
    text-align: center;
    font-size: 11px;
    font-weight: 500;
}


/* =========================
   HEADER
========================= */

.header {
    background: transparent;
    border-bottom: 1px solid transparent;
    transition: border-color 0.4s var(--ease);
}

.header-inner {
    min-height: 64px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.logo {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.03em;
    color: var(--brand-navy);
    flex-shrink: 0;
}

.nav {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-left: 24px;
    margin-right: auto;
}

.nav-link {
    position: relative;
    color: rgba(23, 43, 70, 0.6);
    font-size: 14px;
    font-weight: 500;
    transition: color 0.25s ease;
}

.nav-link:hover,
.nav-link.active { color: var(--brand-navy); }

.nav-link.active::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -22px;
    height: 2px;
    background: var(--brand-navy);
    border-radius: 1px;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 2px;
}

.header-action {
    position: relative;
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--brand-navy);
    border-radius: 50%;
    transition: background 0.25s ease;
}

.header-action:hover { background: rgba(23, 43, 70, 0.08); }

.cart-count {
    position: absolute;
    top: 6px;
    right: 4px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--brand-navy);
    color: var(--brand-off-white);
    border-radius: 999px;
    font-size: 9px;
    font-weight: 700;
    line-height: 1;
}

.cart-count.is-bumping { animation: cartBump 0.4s var(--ease); }

@keyframes cartBump {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.25); }
}

.menu-button {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    width: 42px;
    height: 42px;
}

.menu-button span {
    width: 18px;
    height: 1.5px;
    background: var(--brand-navy);
    border-radius: 1px;
}


/* =========================
   MOBILE MENU
========================= */

.mobile-menu {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 150;
    display: none;
    padding: 110px 24px 32px;
    background: var(--brand-navy-deep);
    min-height: 100vh;
}

.mobile-menu.open {
    display: flex;
    flex-direction: column;
    animation: fadeDown 0.3s var(--ease);
}

.mobile-menu a {
    padding: 20px 0;
    border-bottom: 1px solid rgba(245, 243, 238, 0.08);
    color: var(--brand-off-white);
    font-size: 20px;
    font-weight: 500;
}

.mobile-menu a:last-child { border-bottom: 0; }

@keyframes fadeDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}


/* =========================
   GENERAL
========================= */

.eyebrow {
    display: inline-block;
    margin-bottom: 14px;
    color: var(--brand-silver);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding-inline: 28px;
    border-radius: var(--radius-pill);
    font-size: 15px;
    font-weight: 500;
    transition: background 0.2s ease, transform 0.15s ease;
}

.button:active { transform: scale(0.98); }

.button-primary {
    background: var(--brand-navy);
    color: var(--brand-off-white);
}

.button-primary:hover { background: var(--brand-navy-deep); }


/* =========================
   PAGE HERO
========================= */

.page-hero {
    padding-block: 140px 60px;
    border-bottom: 1px solid var(--border-soft);
}

.page-hero h1 {
    max-width: 700px;
    margin-bottom: 18px;
    color: var(--brand-navy);
    font-size: clamp(40px, 6vw, 80px);
    line-height: 1;
    letter-spacing: -0.04em;
    font-weight: 700;
    overflow-wrap: anywhere;
}

.page-hero p {
    max-width: 520px;
    color: var(--text-soft);
    font-size: clamp(16px, 1.5vw, 18px);
    line-height: 1.5;
}


/* =========================
   CART SECTION
========================= */

.cart-section {
    padding-block: clamp(40px, 6vw, 72px) var(--space-section);
}


/* =========================
   EMPTY CART
========================= */

.empty-cart {
    display: none;
    padding-block: clamp(60px, 10vw, 120px);
    text-align: center;
}

.empty-icon {
    width: 76px;
    height: 76px;
    margin-inline: auto;
    margin-bottom: 26px;
    display: grid;
    place-items: center;
    background: var(--surface);
    border: 1px solid var(--border-soft);
    border-radius: 50%;
    color: var(--brand-navy);
}

.empty-cart h2 {
    margin-bottom: 10px;
    color: var(--brand-navy);
    font-size: clamp(24px, 4vw, 32px);
    font-weight: 700;
    letter-spacing: -0.02em;
}

.empty-cart p {
    margin-bottom: 32px;
    color: var(--text-soft);
    font-size: 16px;
}


/* =========================
   CART LAYOUT
========================= */

.cart-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 380px;
    gap: clamp(32px, 5vw, 56px);
    align-items: start;
}

.cart-items { min-width: 0; }


/* =========================
   CART ITEMS HEADER
========================= */

.cart-items-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 160px 120px;
    gap: 20px;
    align-items: center;
    padding-bottom: 18px;
    margin-bottom: 8px;
    border-bottom: 1px solid var(--border-soft);
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.cart-items-header span:nth-child(2),
.cart-items-header span:nth-child(3) {
    text-align: right;
}


/* =========================
   CART ITEM
========================= */

.cart-items-list {
    display: flex;
    flex-direction: column;
}

.cart-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 160px 120px;
    gap: 20px;
    align-items: center;
    padding-block: 24px;
    border-bottom: 1px solid var(--border-soft);
    transition: opacity 0.2s ease;
}

.cart-item.unavailable { opacity: 0.55; }

.cart-product {
    display: flex;
    align-items: center;
    gap: 18px;
    min-width: 0;
}

.cart-product-image {
    width: 90px;
    height: 112px;
    flex-shrink: 0;
    display: grid;
    place-items: center;
    overflow: hidden;
    background: linear-gradient(145deg, var(--brand-silver-soft), var(--brand-silver));
    border-radius: var(--radius-md);
    color: var(--brand-navy);
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-align: center;
}

.cart-product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.cart-product-info {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.cart-product-category {
    color: var(--text-muted);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.cart-product-name {
    color: var(--brand-navy);
    font-size: 16px;
    font-weight: 500;
    letter-spacing: -0.015em;
    overflow-wrap: anywhere;
}

.cart-product-price {
    color: var(--text-soft);
    font-size: 14px;
}

.cart-item-note {
    margin-top: 4px;
    color: var(--danger);
    font-size: 12px;
}

.remove-item {
    align-self: flex-start;
    margin-top: 8px;
    padding: 0;
    background: transparent;
    color: var(--text-muted);
    font-size: 12px;
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: color 0.2s ease;
}

.remove-item:hover { color: var(--danger); }


/* =========================
   QUANTITY
========================= */

.quantity-control {
    width: 120px;
    height: 42px;
    margin-left: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border: 1px solid var(--border);
    background: var(--surface);
    border-radius: var(--radius-pill);
    overflow: hidden;
}

.quantity-control button {
    width: 40px;
    height: 100%;
    color: var(--brand-navy);
    font-size: 16px;
    transition: background 0.2s ease, color 0.2s ease;
}

.quantity-control button:hover:not(:disabled) {
    background: rgba(23, 43, 70, 0.06);
}

.quantity-control button:disabled {
    color: var(--brand-silver);
    cursor: not-allowed;
}

.quantity-control span {
    font-size: 15px;
    font-weight: 600;
    color: var(--brand-navy);
    min-width: 20px;
    text-align: center;
}

.cart-item-total {
    text-align: right;
    color: var(--brand-navy);
    font-size: 16px;
    font-weight: 600;
    white-space: nowrap;
}

.cart-item-total.unavailable-total {
    color: var(--text-muted);
    font-weight: 500;
}


/* =========================
   SUMMARY
========================= */

.cart-summary {
    position: sticky;
    top: var(--cart-summary-top, 100px);
    padding: 28px;
    background: var(--surface);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-lg);
}

.summary-label {
    display: block;
    margin-bottom: 10px;
    color: var(--brand-silver);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.14em;
}

.cart-summary h2 {
    margin-bottom: 24px;
    color: var(--brand-navy);
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 14px;
    color: var(--text-soft);
    font-size: 14px;
}

.summary-row strong {
    color: var(--brand-navy);
    font-weight: 500;
    white-space: nowrap;
}

.minimum-order {
    margin-top: -4px;
    color: var(--brand-navy);
    font-size: 12px;
    line-height: 1.5;
}

.summary-divider {
    height: 1px;
    margin: 20px 0;
    background: var(--border-soft);
}

.summary-total {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 20px;
    margin-bottom: 22px;
}

.summary-total span {
    color: var(--brand-navy);
    font-size: 15px;
    font-weight: 600;
}

.summary-total strong {
    color: var(--brand-navy);
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.02em;
    white-space: nowrap;
}


/* =========================
   NOTICE
========================= */

.cart-notice {
    padding: 12px 14px;
    margin-bottom: 16px;
    background: var(--bg-soft);
    color: var(--text-soft);
    border-radius: var(--radius-sm);
    font-size: 12px;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

.cart-notice.warning {
    background: var(--danger-bg);
    color: var(--danger);
    border: 1px solid var(--danger-border);
}


/* =========================
   CHECKOUT BUTTON
========================= */

.checkout-button {
    display: grid;
    place-items: center;
    width: 100%;
    min-height: 54px;
    padding-inline: 24px;
    background: var(--brand-navy);
    color: var(--brand-off-white);
    border-radius: var(--radius-pill);
    font-size: 15px;
    font-weight: 500;
    transition: background 0.2s ease, transform 0.15s ease;
}

.checkout-button:hover {
    background: var(--brand-navy-deep);
    transform: translateY(-1px);
}

.checkout-button.disabled {
    background: var(--brand-silver-soft);
    color: var(--text-soft);
    pointer-events: none;
    cursor: not-allowed;
    transform: none;
}

.continue-shopping {
    display: block;
    margin-top: 16px;
    color: var(--text-soft);
    font-size: 13px;
    text-align: center;
    transition: color 0.2s ease;
}

.continue-shopping:hover { color: var(--brand-navy); }


/* =========================
   WHATSAPP FLOAT
========================= */

.whatsapp-float {
    position: fixed;
    bottom: 22px;
    right: 22px;
    z-index: 90;
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #25D366;
    color: #FFFFFF;
    border-radius: 50%;
    box-shadow:
        0 10px 24px rgba(37, 211, 102, 0.35),
        0 4px 10px rgba(0, 0, 0, 0.2);
    transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

.whatsapp-float:hover {
    transform: scale(1.08);
    box-shadow:
        0 14px 32px rgba(37, 211, 102, 0.45),
        0 6px 14px rgba(0, 0, 0, 0.25);
}

.whatsapp-float svg { width: 28px; height: 28px; }


/* =========================
   FOOTER
========================= */

.footer {
    position: relative;
    margin-top: var(--space-section);
    background: var(--brand-navy-deep);
    color: var(--brand-off-white);
}

.footer::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--brand-silver), transparent);
    opacity: 0.4;
}

.footer-main {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 40px;
    padding-block: 56px;
}

.footer-brand .logo { color: var(--brand-off-white); }

.footer-brand p {
    max-width: 320px;
    margin-top: 12px;
    color: var(--brand-silver);
    font-size: 14px;
    line-height: 1.5;
}

.footer-column {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-column > span {
    margin-bottom: 4px;
    color: var(--brand-silver);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.14em;
}

.footer-column a {
    color: #DDE2E8;
    font-size: 14px;
    transition: color 0.2s ease;
}

.footer-column a:hover { color: var(--brand-off-white); }

.footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 60px;
    padding-block: 18px;
    border-top: 1px solid rgba(168, 176, 186, 0.15);
    color: var(--brand-silver);
    font-size: 12px;
}


/* =========================
   TABLET
========================= */

@media (max-width: 950px) {

    .cart-layout {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .cart-summary { position: static; }

    .cart-items-header { display: none; }

    .cart-item {
        grid-template-columns: minmax(0, 1fr) auto;
        grid-template-areas:
            "product product"
            "quantity total";
        gap: 16px;
        padding-block: 22px;
    }

    .cart-product { grid-area: product; }
    .quantity-control { grid-area: quantity; margin-left: 0; }
    .cart-item-total { grid-area: total; align-self: center; }
}


/* =========================
   MOBILE — card style
========================= */

@media (max-width: 700px) {

    .container { width: calc(100% - 32px); }

    .header-inner { min-height: 60px; }
    .nav { display: none; }
    .menu-button { display: flex; }
    .logo { font-size: 18px; }

    .page-hero {
        padding-block: 110px 44px;
    }

    .page-hero h1 {
        font-size: clamp(34px, 10vw, 48px);
        letter-spacing: -0.035em;
    }

    .cart-section { padding-block: 32px 72px; }

    .cart-items-list { gap: 14px; }

    .cart-item {
        display: block;
        padding: 16px;
        background: var(--surface);
        border: 1px solid var(--border-soft);
        border-radius: var(--radius-lg);
    }

    .cart-item:last-child { border-bottom: 1px solid var(--border-soft); }

    .cart-product {
        display: grid;
        grid-template-columns: 84px minmax(0, 1fr);
        gap: 14px;
        align-items: start;
        margin-bottom: 14px;
    }

    .cart-product-image {
        width: 84px;
        height: 104px;
        border-radius: var(--radius-md);
    }

    .cart-product-info { min-width: 0; gap: 4px; }
    .cart-product-name { font-size: 15px; line-height: 1.3; }
    .cart-product-price { font-size: 13px; }
    .remove-item { margin-top: 6px; font-size: 11px; }

    .cart-item > .quantity-control {
        width: 100%;
        height: 44px;
        margin: 0;
    }

    .cart-item > .cart-item-total {
        margin-top: 12px;
        padding-top: 12px;
        border-top: 1px dashed var(--border);
        text-align: left;
        display: flex;
        justify-content: space-between;
        align-items: baseline;
        font-size: 16px;
    }

    .cart-item > .cart-item-total::before {
        content: "Total";
        color: var(--text-muted);
        font-size: 12px;
        font-weight: 600;
        letter-spacing: 0.14em;
        text-transform: uppercase;
    }

    .cart-summary {
        padding: 22px;
        border-radius: var(--radius-lg);
    }

    .cart-summary h2 { font-size: 22px; margin-bottom: 20px; }
    .summary-total strong { font-size: 22px; }

    .checkout-button { min-height: 52px; }

    .whatsapp-float {
        width: 50px;
        height: 50px;
        bottom: 18px;
        right: 18px;
    }

    .whatsapp-float svg { width: 24px; height: 24px; }

    .footer-main {
        grid-template-columns: 1fr;
        gap: 32px;
        padding-block: 44px;
    }

    .footer-bottom {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
        padding-block: 18px;
    }
}


/* =========================
   SMALL MOBILE
========================= */

@media (max-width: 450px) {

    .container { width: calc(100% - 24px); }

    .header-actions { gap: 0; }
    .header-action { width: 38px; height: 38px; }

    .cart-item { padding: 14px; }

    .cart-product {
        grid-template-columns: 72px minmax(0, 1fr);
        gap: 12px;
    }

    .cart-product-image {
        width: 72px;
        height: 92px;
    }

    .cart-product-name { font-size: 14px; }

    .cart-summary { padding: 20px; }

    .page-hero h1 { font-size: 34px; }
}


/* =========================
   ACCESSIBILITY
========================= */

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }

    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    .announcement-content { animation: none; }
}