/**
 * Side Cart WooCommerce - Timbre Style
 * Pixel-accurate recreation of the Timbre reference side cart.
 *
 * Load order: base xoo-wsc-style.css -> inline dynamic styles -> THIS file.
 * Uses !important to win over dynamic inline rules.
 *
 * Design pillars:
 *  - Pure white drawer with subtle left shadow
 *  - Playfair Display serif for "Cart Summary" + product names
 *  - Inter sans for everything else
 *  - Product photo shown CLEAN (no background / no filter / no dark overlay)
 *  - Price top-right, pencil + trash icons bottom-right (horizontal)
 *  - Black "View Cart & Checkout" CTA, outlined "Continue Shopping" below
 */

/* =================================================================
   CONTAINER / DRAWER
================================================================= */
.xoo-wsc-container,
.xoo-wsc-container.xoo-wsc-cart-active {
    max-width: 460px !important;
    width: 100% !important;
    background-color: #ffffff !important;
    box-shadow: -6px 0 30px rgba(0, 0, 0, 0.10) !important;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif !important;
}

/* Overlay behind the drawer */
.xoo-wsc-opac,
.xoo-wsc-cart-active .xoo-wsc-opac {
    background-color: #000000 !important;
    opacity: 0.45 !important;
}

/* =================================================================
   HEADER  — "Cart Summary" (left)  /  "Your Bag (n)" (right)
   The reference has NO close icon in the header. The cart stays
   closeable via the overlay click (handled in main.js).
================================================================= */
.xoo-wsc-header {
    padding: 28px 28px 22px 28px !important;
    background-color: #ffffff !important;
    border-bottom: 1px solid #e8e8e8 !important;
    box-shadow: none !important;
    color: #111111 !important;
}

.xoo-wsch-top.xoo-wsch-new {
    display: flex !important;
    grid-template-columns: none !important;
    align-items: baseline !important;
    justify-content: space-between !important;
    gap: 16px;
}

.xoo-wsch-new .xoo-wsch-section {
    display: flex !important;
    align-items: center !important;
    gap: 10px;
}

.xoo-wsch-new .xoo-wsch-sec-left {
    grid-column: auto !important;
    justify-self: start !important;
}

.xoo-wsch-new .xoo-wsch-sec-center {
    grid-column: auto !important;
    justify-self: center !important;
}

.xoo-wsch-new .xoo-wsch-sec-right {
    grid-column: auto !important;
    justify-self: end !important;
}

/* Heading: serif, large */
.xoo-wsch-text {
    font-family: 'Playfair Display', 'Cormorant Garamond', Georgia, 'Times New Roman', serif !important;
    font-size: 28px !important;
    font-weight: 500 !important;
    letter-spacing: 0.2px !important;
    color: #111111 !important;
    margin: 0 !important;
    line-height: 1.2 !important;
    text-transform: none !important;
}

/* Basket / item count "Your Bag (5)" — right aligned, sans, small */
.xoo-wsch-basket {
    display: inline-flex !important;
    align-items: baseline !important;
    gap: 5px;
    position: relative !important;
    margin: 0 !important;
}

.xoo-wsch-basket .xoo-wsch-bag-label {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    color: #111111 !important;
    letter-spacing: 0.2px;
}

.xoo-wsch-basket .xoo-wsch-bki {
    font-size: 18px !important;
    color: #111111 !important;
}

.xoo-wsch-basket .xoo-wsch-items-count,
.xoo-wsc-items-count {
    background-color: transparent !important;
    color: #111111 !important;
    position: static !important;
    width: auto !important;
    height: auto !important;
    line-height: 1 !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    border-radius: 0 !important;
    letter-spacing: 0.3px;
}

/* Hide the header close (X) icon — reference header has no close button.
   Cart stays closeable via overlay click (main.js binds .xoo-wsc-opac). */
.xoo-wsch-close {
    display: none !important;
}

/* =================================================================
   BODY  — scrollable product list
================================================================= */
.xoo-wsc-body {
    background-color: #ffffff !important;
    padding: 0 !important;
}

.xoo-wsc-products:not(.xoo-wsc-pattern-card),
.xoo-wsc-products:not(.xoo-wsc-pattern-card) span.amount,
.xoo-wsc-products:not(.xoo-wsc-pattern-card) a {
    color: #111111 !important;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif !important;
}

/* Custom thin scrollbar */
.xoo-wsc-markup *::-webkit-scrollbar {
    width: 5px;
}
.xoo-wsc-markup *::-webkit-scrollbar-track {
    background: transparent;
}
.xoo-wsc-markup *::-webkit-scrollbar-thumb {
    background: #d4d4d4;
    border-radius: 50px;
}

/* =================================================================
   PRODUCT ROW
================================================================= */
.xoo-wsc-products:not(.xoo-wsc-pattern-card) .xoo-wsc-product {
    display: flex !important;
    align-items: flex-start !important;
    padding: 22px 28px !important;
    margin: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    background-color: #ffffff !important;
    border-bottom: 1px solid #ececec !important;
    border-top: 0 !important;
}

.xoo-wsc-product:last-child {
    border-bottom: 0 !important;
}

/* -----------------------------------------------------------------
   PRODUCT IMAGE — shown CLEAN, as-is (no filter / no overlay / no opacity).
   The reference wraps each photo in a subtle light-grey tile frame.
   The photo itself stays bright and unmodified.
----------------------------------------------------------------- */
.xoo-wsc-products:not(.xoo-wsc-pattern-card) .xoo-wsc-img-col {
    width: 100px !important;
    flex: 0 0 100px !important;
    align-self: flex-start !important;
    background-color: #f4f4f4 !important;
    border: 1px solid #ececec !important;
    border-radius: 2px !important;
    padding: 6px !important;
    box-sizing: border-box !important;
    box-shadow: none !important;
}

.xoo-wsc-img-col img {
    width: 100% !important;
    height: 86px !important;
    object-fit: contain !important;
    object-position: center !important;
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    filter: none !important;
    opacity: 1 !important;
    -webkit-filter: none !important;
}

.xoo-wsc-img-col a {
    display: block !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
}

/* Summary column */
.xoo-wsc-products:not(.xoo-wsc-pattern-card) .xoo-wsc-sum-col {
    width: auto !important;
    flex-grow: 1 !important;
    padding-left: 20px !important;
    min-width: 0;
}

.xoo-wsc-sm-info {
    display: flex !important;
    align-items: stretch !important;
    gap: 10px;
}

.xoo-wsc-sm-left {
    flex-grow: 1 !important;
    min-width: 0;
    row-gap: 3px !important;
}

/* Collection / category name — small gray line above the name (Title Case, like 'The Space Series') */
.xoo-wsc-pcat {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif !important;
    font-size: 12px !important;
    font-weight: 400 !important;
    color: #777777 !important;
    text-transform: none !important;
    letter-spacing: 0.01em !important;
    line-height: 1.3 !important;
    display: block;
    margin-bottom: 2px;
}

/* Product name — serif (must be specific enough to beat the general product link rule) */
.xoo-wsc-products:not(.xoo-wsc-pattern-card) .xoo-wsc-pname,
.xoo-wsc-products:not(.xoo-wsc-pattern-card) .xoo-wsc-pname a,
.xoo-wsc-product .xoo-wsc-pname,
.xoo-wsc-product .xoo-wsc-pname a {
    font-family: 'Playfair Display', 'Cormorant Garamond', Georgia, 'Times New Roman', serif !important;
    font-size: 16px !important;
    font-weight: 500 !important;
    color: #111111 !important;
    line-height: 1.35 !important;
    text-decoration: none !important;
    display: inline-block;
}

.xoo-wsc-pname a:hover {
    color: #111111 !important;
    text-decoration: underline !important;
}
.xoo-wsc-product dl.variation,
.xoo-wsc-product dl.variation p {
    font-size: 12.5px !important;
    color: #888888 !important;
    margin: 2px 0 0 0 !important;
}

.xoo-wsc-product dl.variation {
    display: block !important;
}

/* Hide the attribute label (dt) so only the value (dd) shows, matching the reference */
.xoo-wsc-product dl.variation dt {
    display: none !important;
}

.xoo-wsc-product dl.variation dd {
    color: #888888 !important;
    font-style: normal !important;
    margin: 0 !important;
    padding: 0 !important;
}

.xoo-wsc-product dl.variation dd p {
    margin: 0 !important;
    padding: 0 !important;
}

/* Qty label */
.xoo-wsc-sml-qty {
    font-size: 12.5px !important;
    color: #888888 !important;
    margin-top: 2px !important;
}

.xoo-wsc-sml-qty span {
    color: #444444 !important;
    font-weight: 500 !important;
}

/* Price (per-unit) — small gray */
.xoo-wsc-pprice {
    font-size: 12.5px !important;
    color: #888888 !important;
    margin-top: 2px !important;
}

/* -----------------------------------------------------------------
   RIGHT COLUMN: price on top, pencil + trash icons at the bottom
----------------------------------------------------------------- */
.xoo-wsc-sm-right {
    align-items: flex-end !important;
    justify-content: space-between !important;
    row-gap: 10px !important;
    flex-shrink: 0;
    min-width: 80px;
    padding-top: 2px;
}

/* Line total — top right, medium weight */
.xoo-wsc-smr-ptotal {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif !important;
    font-size: 14.5px !important;
    font-weight: 600 !important;
    color: #111111 !important;
    line-height: 1.2 !important;
    text-align: right;
    white-space: nowrap;
}

/* Actions group: pencil + trash SIDE BY SIDE (horizontal), bottom-right */
.xoo-wsc-smr-actions {
    display: flex !important;
    flex-direction: row !important;
    align-items: center;
    justify-content: flex-end;
    gap: 14px;
    margin-top: auto;
}

/* Action icons (pencil + trash) — thin, dark, ~16px */
.xoo-wsc-sm-right .xoo-wsc-smr-edit,
.xoo-wsc-sm-right .xoo-wsc-smr-del {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    margin: 0 !important;
    font-size: 16px !important;
    color: #333333 !important;
    line-height: 1;
    cursor: pointer;
    transition: color 0.2s ease, background-color 0.2s ease;
    text-decoration: none !important;
    background: transparent !important;
    border: 0 !important;
}

.xoo-wsc-sm-right .xoo-wsc-smr-edit {
    text-decoration: none !important;
}

.xoo-wsc-sm-right .xoo-wsc-smr-edit:hover {
    color: #000000 !important;
}

.xoo-wsc-sm-right .xoo-wsc-smr-del:hover {
    color: #b00020 !important;
}

/* When delete sits alone (no actions wrapper), keep spacing sane */
.xoo-wsc-sm-right > .xoo-wsc-smr-del {
    margin-top: auto !important;
}

/* =================================================================
   PRODUCT CARD (alternative layout)
================================================================= */
.xoo-wsc-pattern-card .xoo-wsc-product-cont {
    padding: 10px !important;
}

.xoo-wsc-pattern-card {
    margin: 14px 18px !important;
}

.xoo-wsc-pattern-card .xoo-wsc-product {
    border: 1px solid #ececec !important;
    border-radius: 4px !important;
}

.xoo-wsc-sm-front:has(.xoo-wsc-sm-emp+*) {
    padding: 12px 12px 14px 12px !important;
}

.xoo-wsc-pattern-card .xoo-wsc-pname,
.xoo-wsc-sm-front .xoo-wsc-pname,
.xoo-wsc-sm-front .xoo-wsc-pname a {
    font-family: 'Playfair Display', 'Cormorant Garamond', Georgia, 'Times New Roman', serif !important;
    font-size: 15px !important;
    font-weight: 500 !important;
    color: #111111 !important;
}

/* Card edit link (pencil) */
a.xoo-wsc-smr-edit {
    color: #333333 !important;
    text-decoration: none !important;
    transition: color 0.2s ease;
}

a.xoo-wsc-smr-edit:hover {
    color: #000000 !important;
}

/* =================================================================
   FOOTER
================================================================= */
.xoo-wsc-footer {
    background-color: #ffffff !important;
    color: #111111 !important;
    padding: 22px 28px 28px 28px !important;
    /* Reference: a thin border box enclosing the whole footer section */
    border: 1px solid #c8c8c8 !important;
    border-top: 1px solid #c8c8c8 !important;
    box-shadow: none !important;
    /* Reference footer order: shipping note (top) -> totals (middle) -> buttons (bottom) */
    display: flex !important;
    flex-direction: column !important;
}

/* Reorder footer children to match the reference.
   Plugin template default order is: totals -> footer-txt -> buttons.
   Reference order is:                  footer-txt -> totals -> buttons. */
.xoo-wsc-footer .xoo-wsc-footer-txt   { order: 1 !important; }
.xoo-wsc-footer .xoo-wsc-ft-totals    { order: 2 !important; }
.xoo-wsc-footer .xoo-wsc-ft-buttons-cont { order: 3 !important; }

.xoo-wsc-footer,
.xoo-wsc-footer a,
.xoo-wsc-footer .amount {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif !important;
    color: #111111 !important;
}

/* Footer shipping / info note — small, left aligned */
.xoo-wsc-footer-txt {
    font-size: 11.5px !important;
    color: #777777 !important;
    text-align: left !important;
    margin: 0 0 14px 0 !important;
    display: block !important;
    line-height: 1.5 !important;
}

/* Totals rows */
.xoo-wsc-ft-totals {
    padding: 0 0 16px 0 !important;
}

.xoo-wsc-ft-amt {
    padding: 4px 0 !important;
    font-size: 13px !important;
    color: #444444 !important;
}

.xoo-wsc-ft-amt-label {
    font-weight: 500 !important;
    color: #444444 !important;
    font-size: 13px !important;
}

.xoo-wsc-ft-amt-value {
    color: #111111 !important;
    font-size: 13px !important;
}

/* Total row — emphasised */
.xoo-wsc-ft-amt-total {
    border-top: 1px solid #e8e8e8 !important;
    border-bottom: 0 !important;
    margin-top: 10px !important;
    padding-top: 14px !important;
    padding-bottom: 4px !important;
    align-items: baseline !important;
}

.xoo-wsc-ft-amt-total .xoo-wsc-ft-amt-label {
    font-size: 13px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.1em !important;
    color: #111111 !important;
}

.xoo-wsc-ft-amt-total .xoo-wsc-ft-amt-value {
    font-size: 20px !important;
    font-weight: 700 !important;
    color: #111111 !important;
}

.xoo-wsc-ft-amt-total .xoo-wsc-ft-amt-value .amount {
    font-size: 20px !important;
    font-weight: 700 !important;
    color: #111111 !important;
}

/* Subtotal row — the reference shows only a TOTAL line, so hide the subtotal row */
.xoo-wsc-ft-amt-subtotal {
    display: none !important;
}

/* =================================================================
   FOOTER BUTTONS
   Reference order: 1) black "View Cart & Checkout"  2) outlined "Continue Shopping"
   The standalone "cart" button is hidden to match the 2-button reference.
================================================================= */
.xoo-wsc-ft-buttons-cont {
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
    grid-template-columns: none !important;
}

/* Hide the standalone "View Cart" button — reference uses a single CTA */
a.xoo-wsc-ft-btn-cart {
    display: none !important;
}

/* Order: checkout (1) first, continue (2) second */
a.xoo-wsc-ft-btn-checkout { order: 1 !important; }
a.xoo-wsc-ft-btn-continue { order: 2 !important; }
a.xoo-wsc-ft-btn-cart     { order: 3 !important; }

a.xoo-wsc-ft-btn,
.xoo-wsc-container .xoo-wsc-btn {
    width: 100% !important;
    padding: 14px 16px !important;
    border-radius: 2px !important;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    letter-spacing: 0.02em !important;
    text-transform: none !important;
    text-align: center !important;
    text-decoration: none !important;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, opacity 0.2s ease !important;
    cursor: pointer;
    line-height: 1.2 !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
}

/* Primary (checkout) button — solid black */
a.xoo-wsc-ft-btn-checkout,
.xoo-wsc-container a.xoo-wsc-ft-btn-checkout {
    background-color: #000000 !important;
    color: #ffffff !important;
    border: 1px solid #000000 !important;
}

a.xoo-wsc-ft-btn-checkout:hover {
    background-color: #222222 !important;
    color: #ffffff !important;
    border-color: #222222 !important;
}

a.xoo-wsc-ft-btn-checkout .amount {
    color: #ffffff !important;
    font-style: normal !important;
    display: none !important; /* hide the total in the checkout label to match reference */
}

a.xoo-wsc-ft-btn-checkout .amount:before {
    content: "" !important;
    margin: 0 !important;
}

/* Continue / secondary button — outline */
a.xoo-wsc-ft-btn-continue {
    background-color: transparent !important;
    color: #111111 !important;
    border: 1px solid #cccccc !important;
}

a.xoo-wsc-ft-btn-continue:hover {
    background-color: #111111 !important;
    color: #ffffff !important;
    border-color: #111111 !important;
}

/* Empty-cart button */
.xoo-wsc-empty-cart a.xoo-wsc-btn {
    background-color: #000000 !important;
    color: #ffffff !important;
    border: 1px solid #000000 !important;
    padding: 13px 22px !important;
    border-radius: 2px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.08em !important;
    font-weight: 600 !important;
    font-size: 13px !important;
    width: auto !important;
}

/* =================================================================
   EMPTY CART STATE
================================================================= */
.xoo-wsc-empty-cart {
    padding: 60px 30px !important;
}

.xoo-wsc-emp-txt {
    font-family: 'Playfair Display', 'Cormorant Garamond', Georgia, 'Times New Roman', serif !important;
    font-size: 22px !important;
    color: #111111 !important;
}

.xoo-wsc-emp-img {
    max-width: 90px;
    opacity: 0.6;
}

/* =================================================================
   NOTICES
================================================================= */
ul.xoo-wsc-notices li {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif !important;
    font-size: 13px !important;
}

.xoo-wsc-notice-success {
    background-color: #f4f8f1 !important;
    color: #2e6b2e !important;
}

.xoo-wsc-notice-error {
    background-color: #fbeeee !important;
    color: #b00020 !important;
}

/* =================================================================
   FLOATING BASKET (trigger button)
================================================================= */
.xoo-wsc-basket {
    background-color: #000000 !important;
    color: #ffffff !important;
}

/* =================================================================
   RESPONSIVE
================================================================= */
@media only screen and (max-width: 600px) {
    .xoo-wsc-container,
    .xoo-wsc-container.xoo-wsc-cart-active {
        max-width: 100% !important;
    }

    .xoo-wsc-header {
        padding: 20px 18px 16px 18px !important;
    }

    .xoo-wsch-text {
        font-size: 22px !important;
    }

    .xoo-wsc-products:not(.xoo-wsc-pattern-card) .xoo-wsc-product {
        padding: 18px 18px !important;
    }

    .xoo-wsc-products:not(.xoo-wsc-pattern-card) .xoo-wsc-img-col {
        width: 80px !important;
        flex: 0 0 80px !important;
    }

    .xoo-wsc-img-col img {
        height: 68px !important;
    }

    .xoo-wsc-products:not(.xoo-wsc-pattern-card) .xoo-wsc-sum-col {
        padding-left: 14px !important;
    }

    .xoo-wsc-footer {
        padding: 18px 18px 22px 18px !important;
    }
}
