/* ================================================================
   SleepShop Checkout  v2.0  — inspired by My Account luxury design
   ================================================================ */

@keyframes sscFadeUp {
    from { opacity:0; transform:translateY(14px); }
    to   { opacity:1; transform:translateY(0); }
}

/* ── Page ────────────────────────────────────────────────────── */
body:has(.wc-block-checkout),
body:has(.wc-block-cart) {
    background: #0f0f0f !important;
}

body:has(.wc-block-checkout) .site-main,
body:has(.wc-block-checkout) .page-content,
body:has(.wc-block-cart) .site-main,
body:has(.wc-block-cart) .page-content {
    max-width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
    width: 100% !important;
}

/* ── Checkout outer wrapper ──────────────────────────────────── */
.wp-block-woocommerce-checkout.wc-block-checkout {
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    gap: 0 !important;
    display: grid !important;
    grid-template-columns: 1fr 420px !important;
    grid-template-rows: 1fr !important;
    min-height: calc(100vh - 80px) !important;
    align-items: stretch !important;
}

/* ── Left column — form ──────────────────────────────────────── */
.wp-block-woocommerce-checkout-fields-block {
    background: #faf9f7 !important;
    padding: 56px 64px 80px !important;
    animation: sscFadeUp .45s ease both;
    min-height: calc(100vh - 80px);
    overflow-y: auto;
}

/* ── Right column — dark order summary ───────────────────────── */
.wp-block-woocommerce-checkout-totals-block {
    background: #111111 !important;
    padding: 56px 40px 80px !important;
    position: sticky !important;
    top: 80px !important;
    max-height: calc(100vh - 80px) !important;
    overflow-y: auto !important;
    scrollbar-width: none !important;
    border-left: 1px solid rgba(255,255,255,.07) !important;
}
.wp-block-woocommerce-checkout-totals-block::-webkit-scrollbar { display:none; }

/* ── Section headers ─────────────────────────────────────────── */
.wp-block-woocommerce-checkout-fields-block h2,
.wc-block-checkout__contact-fields > h2,
.wc-block-checkout__shipping-fields > h2,
.wc-block-checkout__billing-fields > h2,
.wc-block-checkout__shipping-method > h2,
.wc-block-checkout__payment-method > h2,
.wc-block-checkout__add-note > h2 {
    font-size: 11px !important;
    font-weight: 700 !important;
    letter-spacing: .14em !important;
    text-transform: uppercase !important;
    color: #b08968 !important;
    margin: 36px 0 18px !important;
    padding-bottom: 10px !important;
    border-bottom: 1px solid #ede8e0 !important;
}
.wp-block-woocommerce-checkout-fields-block h2:first-child { margin-top:0 !important; }

/* ── Inputs ──────────────────────────────────────────────────── */
.wc-block-components-text-input input,
.wc-block-components-country-input .components-combobox-control input,
.wc-block-components-state-input .components-combobox-control input,
.wc-block-checkout input[type="text"],
.wc-block-checkout input[type="email"],
.wc-block-checkout input[type="tel"],
.wc-block-checkout select,
.wc-block-checkout textarea {
    background: #ffffff !important;
    border: 1.5px solid #e4ddd4 !important;
    border-radius: 10px !important;
    padding: 14px 16px !important;
    font-size: 14px !important;
    color: #1a1a1a !important;
    height: auto !important;
    transition: border-color .2s, box-shadow .2s !important;
    box-shadow: 0 1px 3px rgba(0,0,0,.04) !important;
    outline: none !important;
}
.wc-block-components-text-input input:focus,
.wc-block-checkout input:focus,
.wc-block-checkout select:focus {
    border-color: #b08968 !important;
    box-shadow: 0 0 0 3px rgba(176,137,104,.14) !important;
    background: #fff !important;
}

/* Labels */
.wc-block-components-text-input label,
.wc-block-components-country-input label,
.wc-block-components-state-input label,
.wc-block-checkout label:not(.wc-block-components-checkbox__label):not(.wc-block-components-radio-control__label) {
    font-size: 11px !important;
    font-weight: 700 !important;
    letter-spacing: .06em !important;
    text-transform: uppercase !important;
    color: #888 !important;
}

/* ── Shipping method options ─────────────────────────────────── */
.wc-block-components-shipping-rates-control__package {
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

.wc-block-components-radio-control__option {
    background: #ffffff !important;
    border: 1.5px solid #e4ddd4 !important;
    border-radius: 12px !important;
    padding: 16px 18px 16px 48px !important;
    margin-bottom: 10px !important;
    transition: border-color .2s, box-shadow .2s, background .2s !important;
    cursor: pointer !important;
}
.wc-block-components-radio-control__option:has(input:checked) {
    border-color: #b08968 !important;
    background: rgba(176,137,104,.05) !important;
    box-shadow: 0 0 0 3px rgba(176,137,104,.1) !important;
}
.wc-block-components-radio-control__label {
    font-size: 14px !important;
    font-weight: 600 !important;
    color: #1a1a1a !important;
}
.wc-block-components-radio-control__label-group-price {
    color: #b08968 !important;
    font-weight: 700 !important;
}
.wc-block-components-radio-control__input {
    accent-color: #b08968 !important;
}

/* ── Payment methods ─────────────────────────────────────────── */
.wc-block-components-payment-method-label__name {
    font-size: 14px !important;
    font-weight: 600 !important;
    color: #1a1a1a !important;
}

/* Payment option cards */
.wc-block-components-payment-methods__content .wc-block-components-radio-control__option {
    background: #ffffff !important;
    border: 1.5px solid #e4ddd4 !important;
}
.wc-block-components-payment-methods__content .wc-block-components-radio-control__option:has(input:checked) {
    border-color: #b08968 !important;
    background: rgba(176,137,104,.04) !important;
}

/* Express pay buttons area */
.wc-block-components-express-payment,
.wc-block-express-checkout__event-buttons {
    background: #f0ece5 !important;
    border-radius: 14px !important;
    padding: 20px !important;
    margin-bottom: 24px !important;
    border: 1px solid #e4ddd4 !important;
}
.wc-block-components-express-payment-continue-rule,
.wc-block-express-checkout-continue-rule {
    color: #999 !important;
    font-size: 12px !important;
    text-align: center;
    margin: 12px 0 !important;
    display: block;
    position: relative;
}
.wc-block-components-express-payment-continue-rule::before,
.wc-block-components-express-payment-continue-rule::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 38%;
    height: 1px;
    background: #ddd;
}
.wc-block-components-express-payment-continue-rule::before { left: 0; }
.wc-block-components-express-payment-continue-rule::after  { right: 0; }

/* ── Place Order button ──────────────────────────────────────── */
.wc-block-components-checkout-place-order-button {
    background: #111111 !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 12px !important;
    padding: 18px 36px !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    letter-spacing: .08em !important;
    text-transform: uppercase !important;
    width: 100% !important;
    cursor: pointer !important;
    transition: background .25s, box-shadow .25s, transform .15s !important;
    margin-top: 12px !important;
    display: block !important;
}
.wc-block-components-checkout-place-order-button:hover {
    background: #b08968 !important;
    box-shadow: 0 8px 28px rgba(176,137,104,.4) !important;
    transform: translateY(-1px) !important;
}
.wc-block-components-checkout-place-order-button:active {
    transform: translateY(0) !important;
}

/* ── Order summary — dark panel ──────────────────────────────── */
.wc-block-checkout__sidebar,
.wp-block-woocommerce-checkout-order-summary-block {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
}

/* Summary heading */
.wc-block-checkout__sidebar h2,
.wp-block-woocommerce-checkout-order-summary-block h2,
.wc-block-components-order-summary .wc-block-components-panel__button,
.wc-block-components-panel__button {
    color: #ffffff !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    letter-spacing: .14em !important;
    text-transform: uppercase !important;
}

/* Summary items */
.wc-block-components-order-summary-item__description,
.wc-block-components-order-summary-item__individual-prices,
.wc-block-components-order-summary-item__quantity {
    color: rgba(255,255,255,.6) !important;
    font-size: 13px !important;
}
.wc-block-components-order-summary-item__individual-prices { color: rgba(255,255,255,.85) !important; }

/* Totals rows */
.wc-block-components-totals-item {
    border-color: rgba(255,255,255,.08) !important;
    padding: 13px 16px !important;
}
.wc-block-components-totals-item__label {
    color: rgba(255,255,255,.55) !important;
    font-size: 13px !important;
}
.wc-block-components-totals-item__value {
    color: rgba(255,255,255,.9) !important;
    font-weight: 600 !important;
}
/* Grand total */
.wc-block-components-totals-footer-item .wc-block-components-totals-item__label {
    color: #ffffff !important;
    font-size: 15px !important;
    font-weight: 700 !important;
}
.wc-block-components-totals-footer-item .wc-block-components-totals-item__value {
    color: #b08968 !important;
    font-size: 26px !important;
    font-weight: 700 !important;
    letter-spacing: -.02em !important;
}

/* Coupon input in summary */
.wc-block-components-totals-coupon .wc-block-components-text-input input {
    background: rgba(255,255,255,.08) !important;
    border-color: rgba(255,255,255,.15) !important;
    color: #ffffff !important;
    border-radius: 8px !important;
}
.wc-block-components-totals-coupon .wc-block-components-text-input input::placeholder { color: rgba(255,255,255,.35) !important; }
.wc-block-components-totals-coupon .wc-block-components-text-input input:focus {
    border-color: #b08968 !important;
    background: rgba(255,255,255,.12) !important;
}
.wc-block-components-totals-coupon button {
    background: #b08968 !important;
    color: #fff !important;
    border: none !important;
    border-radius: 8px !important;
    font-weight: 600 !important;
    padding: 10px 18px !important;
    transition: background .2s !important;
}
.wc-block-components-totals-coupon button:hover { background: #8a6445 !important; }

/* Summary panel text */
.wp-block-woocommerce-checkout-totals-block *,
.wp-block-woocommerce-checkout-order-summary-block * {
    color: inherit;
}
.wp-block-woocommerce-checkout-totals-block span,
.wp-block-woocommerce-checkout-totals-block p,
.wp-block-woocommerce-checkout-totals-block button {
    color: rgba(255,255,255,.75);
}

/* Panel toggle chevron */
.wc-block-components-panel__button-icon { filter: invert(1) !important; }

/* ── Cart page ───────────────────────────────────────────────── */
.wp-block-woocommerce-cart {
    max-width: 100% !important;
    margin-inline: 0 !important;
    padding: 0 !important;
    width: 100% !important;
}

/* .wp-block-woocommerce-filled-cart-block: WC manages display */

/* cart items => .wc-block-components-main.wc-block-cart__main */

/* cart totals => .wc-block-components-sidebar.wc-block-cart__sidebar */


/* ── Cart sidebar-layout (after React hydration) ──────────── */
.wc-block-components-sidebar-layout.wc-block-cart {
    display: grid !important;
    grid-template-columns: 1fr 380px !important;
    gap: 0 !important;
    margin: 0 !important;
    padding-top: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    min-height: calc(100vh - 80px) !important;
    align-items: stretch !important;
}
.wc-block-components-main.wc-block-cart__main {
    background: #faf9f7 !important;
    padding: 56px 64px 80px !important;
    width: auto !important;
    box-sizing: border-box !important;
    min-height: calc(100vh - 80px) !important;
}
.wc-block-components-sidebar.wc-block-cart__sidebar {
    background: #111111 !important;
    padding: 56px 40px 80px !important;
    position: sticky !important;
    top: 80px !important;
    max-height: calc(100vh - 80px) !important;
    overflow-y: auto !important;
    scrollbar-width: none !important;
    width: 380px !important;
    box-sizing: border-box !important;
    border-left: 1px solid rgba(255,255,255,.07) !important;
}
.wc-block-components-sidebar.wc-block-cart__sidebar::-webkit-scrollbar { display: none; }
.wc-block-components-sidebar.wc-block-cart__sidebar * { color: rgba(255,255,255,.75); }
.wc-block-components-sidebar.wc-block-cart__sidebar h2 { color:#fff !important; font-size:11px !important; font-weight:700 !important; letter-spacing:.14em !important; text-transform:uppercase !important; }

/* Cart proceed button */
.wc-block-cart__submit-container .wc-block-cart__submit-button,
.wp-block-woocommerce-proceed-to-checkout-block a,
.wp-block-woocommerce-proceed-to-checkout-block button {
    background: #b08968 !important;
    color: #fff !important;
    border: none !important;
    border-radius: 12px !important;
    padding: 18px 32px !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    letter-spacing: .08em !important;
    text-transform: uppercase !important;
    width: 100% !important;
    display: block !important;
    text-align: center !important;
    text-decoration: none !important;
    transition: background .2s, box-shadow .2s, transform .15s !important;
    cursor: pointer !important;
}
.wc-block-cart__submit-container .wc-block-cart__submit-button:hover,
.wp-block-woocommerce-proceed-to-checkout-block a:hover {
    background: #111 !important;
    box-shadow: 0 8px 28px rgba(0,0,0,.3) !important;
    transform: translateY(-1px) !important;
}

/* Cart totals rows */
.wp-block-woocommerce-cart-totals-block .wc-block-components-totals-footer-item .wc-block-components-totals-item__value {
    color: #b08968 !important;
    font-size: 26px !important;
    font-weight: 700 !important;
}
.wp-block-woocommerce-cart-totals-block .wc-block-components-totals-item {
    border-color: rgba(255,255,255,.08) !important;
}
.wp-block-woocommerce-cart-totals-block .wc-block-components-totals-item__label { color:rgba(255,255,255,.55) !important; }
.wp-block-woocommerce-cart-totals-block .wc-block-components-totals-item__value { color:rgba(255,255,255,.9) !important; font-weight:600 !important; }
.wp-block-woocommerce-cart-totals-block .wc-block-components-totals-footer-item .wc-block-components-totals-item__label { color:#fff !important; font-weight:700 !important; }

/* Cart table */
.wc-block-cart-items table { border-collapse:collapse; width:100%; }
.wc-block-cart-items__header { border-bottom:1px solid #e8e2d9; padding-bottom:12px; margin-bottom:8px; font-size:11px; font-weight:700; letter-spacing:.1em; text-transform:uppercase; color:#b08968; }
.wc-block-cart-item { border-bottom:1px solid #ede8e0; padding:20px 0 !important; }
.wc-block-cart-item__product-name { font-weight:600 !important; color:#1a1a1a !important; font-size:15px !important; }
.wc-block-cart-item__prices .wc-block-components-product-price { color:#b08968 !important; font-weight:700 !important; font-size:16px !important; }
.wc-block-cart-item__quantity input { border:1.5px solid #e4ddd4 !important; border-radius:8px !important; padding:8px 12px !important; font-size:14px !important; text-align:center; width:64px !important; }
.wc-block-cart-item__remove-link a { color:#ccc !important; font-size:12px !important; }
.wc-block-cart-item__remove-link a:hover { color:#d63031 !important; }

/* ── Notices ─────────────────────────────────────────────────── */
.wc-block-components-notice-banner {
    border-radius:10px !important;
    border-left:4px solid #b08968 !important;
    background:rgba(176,137,104,.06) !important;
    font-size:14px !important;
}

/* ── Mobile — stack: dark summary top, form below ────────────── */
@media (max-width: 900px) {
    body:has(.wc-block-checkout),
    body:has(.wc-block-cart) { background:#faf9f7 !important; }

    .wp-block-woocommerce-checkout.wc-block-checkout,
    .wp-block-woocommerce-cart {
        display: block !important;
        min-height: auto !important;
    }

    /* Summary goes first (on top) on mobile */
    .wp-block-woocommerce-checkout-fields-block { order: 2 !important; }
    .wp-block-woocommerce-checkout-totals-block { order: 1 !important; }

    .wp-block-woocommerce-checkout-fields-block {
        padding: 28px 18px 48px !important;
        min-height: auto !important;
    }

    .wp-block-woocommerce-checkout-totals-block {
        position: static !important;
        height: auto !important;
        padding: 28px 18px 24px !important;
        border-left: none !important;
        border-bottom: 1px solid rgba(255,255,255,.08) !important;
    }

    /* Cart mobile */
    .wc-block-components-sidebar-layout.wc-block-cart { display:block !important; min-height:auto !important; }
    .wc-block-components-main.wc-block-cart__main { padding:28px 18px !important; min-height:auto !important; }
    .wc-block-components-sidebar.wc-block-cart__sidebar { position:static !important; height:auto !important; width:100% !important; padding:28px 18px 32px !important; border-left:none !important; border-top:1px solid rgba(255,255,255,.08) !important; }

    .wc-block-components-checkout-place-order-button {
        padding:16px !important;
        font-size:13px !important;
    }

    /* Compact totals on mobile dark panel */
    .wc-block-components-totals-footer-item .wc-block-components-totals-item__value {
        font-size: 22px !important;
    }
}

@media (max-width: 480px) {
    .wp-block-woocommerce-checkout-fields-block { padding:20px 14px 40px !important; }
    .wp-block-woocommerce-checkout-totals-block { padding:20px 14px 20px !important; }
    .wc-block-cart-item { flex-direction:column; }
}


/* hide-free-shipping-price */
/* Hide "Free" / "€0.00" price in shipping method options and order summary */
.wc-block-components-shipping-rates-control .wc-block-components-radio-control__secondary-label,
.wc-block-checkout__shipping-method .wc-block-components-radio-control__secondary-label,
.wc-block-components-radio-control__label-group-price { display: none !important; }
.wc-block-components-totals-shipping .wc-block-components-totals-item__value { display: none !important; }


/* ── Order summary items: better spacing in dark panel ───────── */
.wc-block-components-order-summary-item {
    padding: 16px 0 !important;
    gap: 14px !important;
    align-items: flex-start !important;
}
.wc-block-components-order-summary-item__image img {
    border-radius: 8px !important;
    border: 1px solid rgba(255,255,255,.12) !important;
    display: block !important;
}
.wc-block-components-order-summary-item__name a,
.wc-block-components-order-summary-item__name {
    color: rgba(255,255,255,.9) !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    line-height: 1.4 !important;
}
.wc-block-components-order-summary-item__individual-prices,
.wc-block-components-order-summary-item__full-data {
    color: rgba(255,255,255,.55) !important;
    font-size: 12px !important;
}
.wc-block-components-order-summary-item__amount .wc-block-formatted-money-amount,
.wc-block-components-order-summary-item__amount {
    color: rgba(255,255,255,.85) !important;
    font-weight: 600 !important;
    font-size: 14px !important;
}
.wc-block-components-order-summary {
    margin-bottom: 16px !important;
}
/* Panel heading spacing */
.wp-block-woocommerce-checkout-order-summary-block,
.wc-block-checkout__sidebar {
    padding-top: 0 !important;
}

/* ── Mobile: order summary — switch to light theme ────────────── */
@media (max-width: 900px) {
    /* Remove dark background, use card style */
    .wp-block-woocommerce-checkout-totals-block {
        background: #fff !important;
        border: 1px solid #e8e2d9 !important;
        border-radius: 14px !important;
        margin: 0 0 16px 0 !important;
        padding: 20px 20px 24px !important;
        border-bottom: none !important;
    }
    /* Reset ALL text to dark inside the mobile order summary */
    .wp-block-woocommerce-checkout-totals-block *,
    .wp-block-woocommerce-checkout-totals-block button {
        color: #1a1a1a !important;
    }
    /* Heading stays gold */
    .wp-block-woocommerce-checkout-totals-block h2,
    .wp-block-woocommerce-checkout-totals-block .wc-block-components-panel__button {
        color: #b08968 !important;
        font-size: 11px !important;
        letter-spacing: .12em !important;
        text-transform: uppercase !important;
        font-weight: 700 !important;
    }
    /* Chevron icon: no invert on light bg */
    .wp-block-woocommerce-checkout-totals-block .wc-block-components-panel__button-icon {
        filter: none !important;
    }
    /* Grand total stays gold */
    .wp-block-woocommerce-checkout-totals-block .wc-block-components-totals-footer-item .wc-block-components-totals-item__value {
        color: #b08968 !important;
        font-size: 20px !important;
        font-weight: 700 !important;
    }
    /* Dividers: light */
    .wp-block-woocommerce-checkout-totals-block .wc-block-components-totals-item {
        border-color: #e8e2d9 !important;
    }
    /* Coupon input: light style */
    .wp-block-woocommerce-checkout-totals-block .wc-block-components-totals-coupon .wc-block-components-text-input input {
        background: #faf9f7 !important;
        border-color: #e4ddd4 !important;
        color: #1a1a1a !important;
    }
    .wp-block-woocommerce-checkout-totals-block .wc-block-components-totals-coupon .wc-block-components-text-input input::placeholder {
        color: #999 !important;
    }
    /* Product name in mobile summary */
    .wp-block-woocommerce-checkout-totals-block .wc-block-components-order-summary-item__name a,
    .wp-block-woocommerce-checkout-totals-block .wc-block-components-order-summary-item__name {
        color: #1a1a1a !important;
    }
    .wp-block-woocommerce-checkout-totals-block .wc-block-components-order-summary-item__amount {
        color: #1a1a1a !important;
    }
    .wp-block-woocommerce-checkout-totals-block .wc-block-components-order-summary-item__image img {
        border: 1px solid #e8e2d9 !important;
        border-radius: 6px !important;
    }
}
