/**
 * FD add to cart — Frontend Styles
 *
 * 1. Forces the Add to Cart button to always be visible.
 * 2. Toast notification UI.
 * 3. Custom GoKwik-style Slide-in Cart Drawer UI.
 *
 * @version 2.0.0
 */

/* =======================================================================
   PRODUCT INNER — strip flex gap that creates space above the button
   ======================================================================= */

ul.products li.product .product-inner {
    display: flex !important;
    flex-direction: column !important;
    gap: 0 !important;          /* remove any flex gap between info and actions */
    padding-bottom: 0 !important;
}

/* Product info layout resets — keeps the button flush */
ul.products li.product .product-info,
ul.products li.product .woocommerce-loop-product__link,
ul.products li.product .product-details {
    padding-bottom: 0 !important;
    margin-bottom: 0 !important;
}

ul.products li.product .price,
ul.products li.product .product-price {
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
}

/* Product info alignment is now handled dynamically via settings */


/* =======================================================================
   PRODUCT ACTION WRAPPER — flush, always visible, zero gap
   ======================================================================= */

ul.products li.product .product-actions {
    opacity: 1 !important;
    visibility: visible !important;
    display: block !important;

    /* Kill ALL spacing between price and button */
    margin: 0 !important;
    padding: 0 !important;

    /* Full width, flush left — no centering */
    width: 100% !important;
    max-width: 100% !important;
    align-self: stretch !important;

    /* Override any theme absolute/fixed positioning */
    position: relative !important;
    top: auto !important;
    bottom: auto !important;
    left: 0 !important;
    right: 0 !important;
    transform: none !important;

    float: none !important;
    text-align: left !important;
}

/* =======================================================================
   ADD TO CART BUTTON — full-width, centred text, no margin
   ======================================================================= */

ul.products li.product .product-actions a.button,
ul.products li.product .product-actions a.add_to_cart_button,
ul.products li.product .product-actions .button {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;

    /* True 100% of the card — box-sizing prevents padding overflow */
    width: 100% !important;
    box-sizing: border-box !important;

    height: 48px !important;
    min-height: 44px !important;

    /* Zero gap — no margin-top at all */
    margin: 0 !important;
    padding: 0 20px !important;

    text-align: center !important;
    line-height: normal !important;

    /* Stay in the normal flow */
    position: static !important;
    float: none !important;

    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;

    border: none !important;
    box-shadow: none !important;
}

/* =======================================================================
   REMOVE HOVER ANIMATION — keep button visible at all times
   ======================================================================= */

ul.products li.product:hover .product-actions,
ul.products li.product:hover .product-actions a.button {
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
}

/* =======================================================================
   HIDE "SELECT OPTIONS" link for variable products
   ======================================================================= */

ul.products li.product a.product_type_variable:not(.vivid-atc-button) {
    display: none !important;
}

/* Ensure only ONE custom Add to Cart button renders visible at the product card footer */
.vivid-atc-loop-footer ~ .product-actions,
.vivid-atc-loop-footer ~ .add_to_cart_button,
.vivid-atc-loop-footer .vivid-atc-button ~ .vivid-atc-button {
    display: none !important;
}

/* =======================================================================
   REMOVE ALL BORDERS / SHADOWS / DIVIDER LINES
   ======================================================================= */

ul.products li.product .product-actions,
ul.products li.product .product-actions *,
ul.products li.product .product-inner,
ul.products li.product {
    border-bottom: none !important;
    box-shadow: none !important;
}

ul.products li.product::after,
ul.products li.product::before,
ul.products li.product .product-inner::after,
ul.products li.product .product-inner::before,
ul.products li.product .product-actions::after,
ul.products li.product .product-actions::before {
    display: none !important;
    border: none !important;
    box-shadow: none !important;
    content: none !important;
}

/* =======================================================================
   MOTTA THEME — specific overrides
   Motta adds padding/margin via .product-inner and positions
   .product-actions absolutely or via flex order.
   ======================================================================= */

/* Suppress duplicate overlay Add to Cart buttons appearing over the product image on hover */
body ul.products li.product .product-thumbnail .product-actions,
body ul.products li.product .product-thumbnail .add_to_cart_button,
body ul.products li.product .product-thumbnail .vivid-atc-button,
body ul.products li.product .motta-product-thumbnail__actions .add_to_cart_button,
body ul.products li.product .motta-product-thumbnail__actions .vivid-atc-button,
body ul.products li.product .product-image .product-actions,
body ul.products li.product .product-image .add_to_cart_button,
body ul.products li.product .product-image .vivid-atc-button,
body ul.products li.product .woocommerce-loop-product__header .product-actions,
body ul.products li.product .woocommerce-loop-product__header .add_to_cart_button,
body ul.products li.product .woocommerce-loop-product__header .vivid-atc-button,
body ul.products li.product .product-media .product-actions,
body ul.products li.product .product-media .add_to_cart_button,
body ul.products li.product .product-media .vivid-atc-button,
body ul.products li.product .motta-loop-product__header .product-actions,
body ul.products li.product .motta-loop-product__header .add_to_cart_button,
body ul.products li.product .motta-loop-product__header .vivid-atc-button,
body ul.products li.product .motta-product-image .product-actions,
body ul.products li.product .motta-product-image .add_to_cart_button,
body ul.products li.product .motta-product-image .vivid-atc-button {
    display: none !important;
}

/* Prevent duplicate/stacked buttons from appearing at the bottom of the product card */
.product-actions ~ .vivid-atc-loop-footer,
.add_to_cart_button ~ .vivid-atc-loop-footer,
.vivid-atc-loop-footer ~ .product-actions,
.vivid-atc-loop-footer ~ .add_to_cart_button,
.vivid-atc-button ~ .vivid-atc-button {
    display: none !important;
}

/* Remove Motta's flex-grow spacer that pushes the button to the bottom */
ul.products li.product .product-info {
    flex-grow: 0 !important;
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
}

/* Motta sometimes gives product-actions a fixed margin-top */
ul.products li.product .product-footer,
ul.products li.product .product-actions {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* =======================================================================
   REMOVE PRODUCT GRID BORDER
   ======================================================================= */

.catalog-grid-has-border-bottom:not(.catalog-view-list) ul.products li {
    border-top: none !important;
}

ul.products li.product {
    border: none !important;
    box-shadow: none !important;
}

/* =======================================================================
   TOAST NOTIFICATION
   ======================================================================= */

#vivid-atc-toast {
    position: fixed;
    z-index: 999999;

    display: flex;
    align-items: center;
    gap: 10px;

    max-width: 340px;
    padding: 14px 20px;
    border-radius: 8px;

    font-family: inherit;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;

    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.18);
    cursor: pointer;
    pointer-events: auto;

    /* Default colours — overridden by inline style from JS */
    background-color: #2e7d32;
    color: #ffffff;

    /* Hidden by default */
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

/* ── Positions ── */
#vivid-atc-toast.toast-bottom-center  { bottom: 32px; left: 50%; transform: translateX(-50%) translateY(20px); }
#vivid-atc-toast.toast-bottom-right   { bottom: 32px; right: 24px; }
#vivid-atc-toast.toast-bottom-left    { bottom: 32px; left: 24px; }
#vivid-atc-toast.toast-top-center     { top: 80px; left: 50%; transform: translateX(-50%) translateY(-20px); }
#vivid-atc-toast.toast-top-right      { top: 80px; right: 24px; }
#vivid-atc-toast.toast-top-left       { top: 80px; left: 24px; }

/* ── Show state ── */
#vivid-atc-toast.vivid-atc-toast-show {
    opacity: 1;
}
#vivid-atc-toast.vivid-atc-toast-show.toast-bottom-center,
#vivid-atc-toast.vivid-atc-toast-show.toast-top-center {
    /* For centred positions the transform already handles X offset,
       so we only clear the Y part. */
    transform: translateX(-50%) translateY(0);
}
#vivid-atc-toast.vivid-atc-toast-show.toast-bottom-right,
#vivid-atc-toast.vivid-atc-toast-show.toast-bottom-left,
#vivid-atc-toast.vivid-atc-toast-show.toast-top-right,
#vivid-atc-toast.vivid-atc-toast-show.toast-top-left {
    transform: translateY(0);
}

/* ── Hide state ── */
#vivid-atc-toast.vivid-atc-toast-hide {
    opacity: 0;
    pointer-events: none;
}
#vivid-atc-toast.vivid-atc-toast-hide.toast-bottom-center,
#vivid-atc-toast.vivid-atc-toast-hide.toast-top-center {
    transform: translateX(-50%) translateY(20px);
}
#vivid-atc-toast.vivid-atc-toast-hide.toast-bottom-right,
#vivid-atc-toast.vivid-atc-toast-hide.toast-bottom-left {
    transform: translateY(20px);
}
#vivid-atc-toast.vivid-atc-toast-hide.toast-top-right,
#vivid-atc-toast.vivid-atc-toast-hide.toast-top-left {
    transform: translateY(-20px);
}

/* ── Icon (checkmark) ── */
#vivid-atc-toast .vivid-atc-toast-icon::before {
    content: '✓';
    font-size: 16px;
    font-weight: 700;
    flex-shrink: 0;
}

/* =======================================================================
   BUTTON LOADING STATE & ANIMATION
   ======================================================================= */

@keyframes vivid_atc_spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

body ul.products li.product .product-actions a.button.loading,
body ul.products li.product .product-actions a.add_to_cart_button.loading,
body ul.products li.product .product-actions .button.loading,
body .vivid-atc-direct.loading {
    opacity: 0.8 !important;
    pointer-events: none !important;
    color: transparent !important;
    position: relative !important;
}

/* Hide child elements inside the button during loading so text/icons disappear cleanly */
body ul.products li.product .product-actions a.button.loading > *,
body ul.products li.product .product-actions a.add_to_cart_button.loading > *,
body ul.products li.product .product-actions .button.loading > * {
    opacity: 0 !important;
}

/* Hide any theme/WooCommerce default unstyled/broken loading pseudo-elements */
body ul.products li.product .product-actions a.button.loading::before,
body ul.products li.product .product-actions a.add_to_cart_button.loading::before,
body ul.products li.product .product-actions .button.loading::before {
    display: none !important;
    content: none !important;
    animation: none !important;
}

/* Custom Premium Pure CSS Dead-Center Spinning Loader */
body ul.products li.product .product-actions a.button.loading::after,
body ul.products li.product .product-actions a.add_to_cart_button.loading::after,
body ul.products li.product .product-actions .button.loading::after {
    content: "" !important;
    display: block !important;
    position: absolute !important;
    left: 50% !important;
    top: 50% !important;
    width: 20px !important;
    height: 20px !important;
    margin-left: -10px !important;
    margin-top: -10px !important;
    border: 3px solid currentColor !important;
    border-bottom-color: transparent !important;
    border-left-color: transparent !important;
    border-radius: 50% !important;
    animation: vivid_atc_spin 0.6s linear infinite !important;
    opacity: 1 !important;
    visibility: visible !important;
    box-sizing: border-box !important;
}

/* =======================================================================
   MOBILE VERSION FIXES — Force visibility and proper layout on mobile grids
   ======================================================================= */

@media (max-width: 767px) {
    body ul.products li.product .product-inner {
        display: flex !important;
        flex-direction: column !important;
    }
    body ul.products li.product .product-actions,
    body ul.products li.product:hover .product-actions,
    body .catalog-grid ul.products li.product .product-actions {
        display: block !important;
        opacity: 1 !important;
        visibility: visible !important;
        position: relative !important;
        bottom: auto !important;
        left: auto !important;
        right: auto !important;
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        transform: none !important;
    }
    body ul.products li.product .product-actions a.button,
    body ul.products li.product .product-actions a.add_to_cart_button,
    body ul.products li.product .product-actions .button {
        display: flex !important;
        width: 100% !important;
        box-sizing: border-box !important;
        white-space: normal !important;
        word-break: break-word !important;
        line-height: 1.2 !important;
        height: auto !important;
        min-height: 40px !important;
        padding-top: 8px !important;
        padding-bottom: 8px !important;
    }
}

/* =======================================================================
   CUSTOM PREMIUM AJAX CART DRAWER
   ======================================================================= */

/* Body locking rule */
body.vivid-atc-cart-open {
    overflow: hidden !important;
}

/* Overlay */
#vivid-atc-cart-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 999999;
}

/* Slide Drawer Container */
#vivid-atc-cart-drawer {
    position: fixed;
    top: 0;
    right: -450px;
    width: 420px;
    height: 100%;
    background-color: #ffffff;
    z-index: 1000000;
    box-shadow: -5px 0 25px rgba(0, 0, 0, 0.15);
    transition: right 0.3s cubic-bezier(0.25, 1, 0.5, 1);
    display: flex;
    flex-direction: column;
}

#vivid-atc-cart-drawer.vivid-open {
    right: 0 !important;
}

#vivid-atc-cart-container {
    height: 100%;
    width: 100%;
    display: flex;
    flex-direction: column;
}

#vivid-atc-cart-content-wrapper {
    height: 100%;
    width: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Header */
.vivid-atc-drawer-header {
    padding: 20px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #f1f5f9;
    background: #ffffff;
}

.vivid-atc-drawer-title-text {
    font-size: 18px;
    font-weight: 700;
    margin: 0;
    color: #0f172a;
    font-family: 'Outfit', 'Inter', sans-serif;
}

.vivid-atc-close-drawer-btn {
    background: none;
    border: none;
    font-size: 28px;
    line-height: 1;
    color: #64748b;
    cursor: pointer;
    padding: 0;
    margin: 0;
    transition: color 0.2s ease;
}

.vivid-atc-close-drawer-btn:hover {
    color: #0f172a;
}

/* Coupon Banner */
.vivid-atc-coupon-banner {
    background: #0f172a;
    color: #ffffff;
    padding: 8px 16px;
    font-size: 11px;
    text-align: center;
    font-weight: 600;
    letter-spacing: 0.5px;
    font-family: 'Inter', sans-serif;
}

/* Savings progress bar */
.vivid-atc-progress-bar-wrapper {
    padding: 16px 24px;
    background: #f8fafc;
    border-bottom: 1px solid #f1f5f9;
}

.vivid-atc-progress-bar-text {
    font-size: 12px;
    color: #334155;
    margin-bottom: 8px;
    line-height: 1.4;
}

.vivid-atc-progress-bar-bg {
    height: 6px;
    background: #e2e8f0;
    border-radius: 3px;
    overflow: hidden;
}

.vivid-atc-progress-bar-fill {
    height: 100%;
    background-color: var(--vivid-atc-drawer-accent, #12b89f);
    border-radius: 3px;
    transition: width 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

/* Drawer Body (Scrollable content) */
.vivid-atc-drawer-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px 24px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* Empty State */
.vivid-atc-drawer-empty-body {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 40px 0;
    flex: 1;
    overflow-y: auto;
}

.vivid-atc-empty-icon {
    color: #94a3b8;
    margin-bottom: 16px;
}

.vivid-atc-empty-message {
    font-size: 16px;
    color: #475569;
    font-weight: 600;
    margin: 0 0 20px 0;
}

.vivid-atc-continue-shopping-btn {
    background: #0f172a;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    padding: 12px 28px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: 24px;
}

.vivid-atc-continue-shopping-btn:hover {
    background: #1e293b;
    transform: translateY(-1px);
}

.vivid-atc-empty-rec-wrapper {
    width: 100%;
    text-align: left;
    border-top: 1px solid #f1f5f9;
    padding-top: 24px;
}

/* Cart Items List */
.vivid-atc-cart-items-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.vivid-atc-cart-item {
    display: flex;
    gap: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid #f1f5f9;
}

.vivid-atc-cart-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.vivid-atc-item-image {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    overflow: hidden;
    flex-shrink: 0;
}

.vivid-atc-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.vivid-atc-item-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.vivid-atc-item-name {
    font-size: 14px;
    font-weight: 600;
    color: #0f172a;
    margin: 0 0 4px 0;
    line-height: 1.4;
}

.vivid-atc-item-name a {
    color: inherit;
    text-decoration: none;
}

.vivid-atc-item-name a:hover {
    color: var(--vivid-atc-drawer-accent, #12b89f);
}

.vivid-atc-item-variations {
    font-size: 11px;
    color: #64748b;
    margin-bottom: 6px;
    line-height: 1.3;
}

.vivid-atc-item-price-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.vivid-atc-price {
    font-size: 14px;
    font-weight: 700;
    color: #0f172a;
}

.vivid-atc-price-ins {
    font-size: 14px;
    font-weight: 700;
    color: #ef4444;
    text-decoration: none;
}

.vivid-atc-price-del {
    font-size: 12px;
    color: #94a3b8;
}

.vivid-atc-item-discount {
    font-size: 10px;
    font-weight: 700;
    color: #ef4444;
    background: #fef2f2;
    padding: 2px 6px;
    border-radius: 4px;
}

.vivid-atc-item-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Stepper */
.vivid-atc-qty-stepper {
    display: flex;
    align-items: center;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    overflow: hidden;
    height: 28px;
}

.vivid-atc-qty-minus,
.vivid-atc-qty-plus {
    background: #f8fafc;
    border: none;
    width: 28px;
    height: 100%;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: #475569;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
}

.vivid-atc-qty-minus:hover,
.vivid-atc-qty-plus:hover {
    background: #e2e8f0;
}

.vivid-atc-qty-input {
    width: 32px !important;
    height: 100% !important;
    border: none !important;
    border-left: 1px solid #cbd5e1 !important;
    border-right: 1px solid #cbd5e1 !important;
    text-align: center !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    color: #0f172a !important;
    padding: 0 !important;
    margin: 0 !important;
    background: #ffffff !important;
}

/* Remove Button */
.vivid-atc-remove-item-btn {
    background: none;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    transition: color 0.2s ease;
}

.vivid-atc-remove-item-btn:hover {
    color: #ef4444;
}

/* Coupon box styles */
.vivid-atc-coupon-box {
    background: #f8fafc;
    padding: 16px;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
}

.vivid-atc-coupon-input-wrapper {
    display: flex;
    gap: 8px;
}

#vivid-atc-coupon-code-field {
    flex: 1;
    height: 38px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    padding: 0 12px;
    font-size: 13px;
    outline: none;
    transition: border-color 0.2s ease;
}

#vivid-atc-coupon-code-field:focus {
    border-color: var(--vivid-atc-drawer-accent, #12b89f);
}

#vivid-atc-apply-coupon-btn {
    background: #0f172a;
    color: #ffffff;
    border: none;
    border-radius: 6px;
    padding: 0 16px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

#vivid-atc-apply-coupon-btn:hover {
    background: #1e293b;
}

.vivid-atc-applied-coupons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.vivid-atc-applied-coupon-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #166534;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
}

.vivid-atc-remove-coupon-btn {
    background: none;
    border: none;
    color: #166534;
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    font-weight: 700;
}

.vivid-atc-remove-coupon-btn:hover {
    color: #ef4444;
}

/* Offers in drawer section */
.vivid-atc-drawer-offers-section {
    border-top: 1px solid #f1f5f9;
    padding-top: 20px;
}

.vivid-atc-drawer-offers-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.vivid-atc-drawer-offers-header h4 {
    font-size: 14px;
    font-weight: 700;
    color: #0f172a;
    margin: 0;
}

.vivid-atc-view-all-offers {
    font-size: 12px;
    font-weight: 600;
    color: var(--vivid-atc-drawer-accent, #12b89f);
    text-decoration: none;
}

.vivid-atc-view-all-offers:hover {
    text-decoration: underline;
}

.vivid-atc-drawer-offers-scroll {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 180px;
    overflow-y: auto;
    padding-right: 4px;
}

.vivid-atc-drawer-offer-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 10px 12px;
    gap: 12px;
}

.vivid-atc-drawer-offer-main {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.vivid-atc-drawer-offer-code {
    background: #ffffff;
    border: 1px dashed #cbd5e1;
    border-radius: 4px;
    padding: 6px 10px;
    text-align: center;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    min-width: 80px;
    transition: all 0.2s ease;
}

.vivid-atc-drawer-offer-code span {
    font-family: monospace;
    font-weight: 700;
    font-size: 11px;
    color: #0f172a;
}

.vivid-atc-click-to-copy-hint {
    font-size: 8px;
    color: #94a3b8;
    text-transform: uppercase;
    margin-top: 2px;
}

.vivid-atc-drawer-offer-code.copied {
    border-color: #10b981;
    background: #f0fdf4;
}
.vivid-atc-drawer-offer-code.copied span {
    color: #10b981;
}

.vivid-atc-drawer-offer-details {
    flex: 1;
}

.vivid-atc-drawer-offer-details h5 {
    font-size: 12px;
    font-weight: 600;
    color: #1e293b;
    margin: 0 0 2px 0;
}

.vivid-atc-drawer-offer-details p {
    font-size: 10px;
    color: #64748b;
    margin: 0;
}

.vivid-atc-drawer-apply-coupon-btn {
    background: transparent;
    color: var(--vivid-atc-drawer-accent, #12b89f);
    border: 1px solid var(--vivid-atc-drawer-accent, #12b89f);
    border-radius: 4px;
    padding: 4px 10px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.vivid-atc-drawer-apply-coupon-btn:hover {
    background: var(--vivid-atc-drawer-accent, #12b89f);
    color: #ffffff;
}

/* Recommended Products section */
.vivid-atc-bestseller-section {
    border-top: 1px solid #f1f5f9;
    padding-top: 20px;
}

.vivid-atc-bestseller-section-title {
    font-size: 14px;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 12px 0;
}

.vivid-atc-bestseller-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.vivid-atc-rec-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
}

.vivid-atc-rec-image {
    aspect-ratio: 1;
    overflow: hidden;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
}

.vivid-atc-rec-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.vivid-atc-rec-card:hover .vivid-atc-rec-image img {
    transform: scale(1.05);
}

.vivid-atc-rec-info {
    padding: 10px;
    display: flex;
    flex-direction: column;
    flex: 1;
    justify-content: space-between;
}

.vivid-atc-rec-title {
    font-size: 12px;
    font-weight: 600;
    color: #1e293b;
    margin: 0 0 6px 0;
    line-height: 1.3;
}

.vivid-atc-rec-title a {
    color: inherit;
    text-decoration: none;
}

.vivid-atc-rec-title a:hover {
    color: var(--vivid-atc-drawer-accent, #12b89f);
}

.vivid-atc-rec-price-row {
    margin-bottom: 8px;
    font-size: 13px;
    font-weight: 700;
    color: #0f172a;
}

.vivid-atc-rec-price-row ins {
    text-decoration: none;
    color: #ef4444;
}

.vivid-atc-rec-price-row del {
    font-size: 11px;
    color: #94a3b8;
    margin-left: 4px;
}

.vivid-atc-rec-add-btn {
    width: 100%;
    background: #0f172a;
    color: #ffffff;
    border: none;
    border-radius: 6px;
    height: 28px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.vivid-atc-rec-add-btn:hover {
    background: var(--vivid-atc-drawer-accent, #12b89f);
}

.vivid-atc-rec-select-btn {
    width: 100%;
    background: #f1f5f9;
    color: #334155;
    border: none;
    border-radius: 6px;
    height: 28px;
    font-size: 11px;
    font-weight: 600;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.vivid-atc-rec-select-btn:hover {
    background: #e2e8f0;
    color: #0f172a;
}

.vivid-atc-rec-discount {
    position: absolute;
    top: 6px;
    left: 6px;
    background: #ef4444;
    color: #ffffff;
    font-size: 9px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
}

/* Sticky Footer */
.vivid-atc-drawer-footer {
    border-top: 1px solid #f1f5f9;
    padding: 16px 24px 24px 24px;
    background: #ffffff;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.vivid-atc-totals-breakdown {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.vivid-atc-total-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 13px;
    color: #64748b;
}

.vivid-atc-discount-row {
    color: #16a34a;
}

.vivid-atc-estimated-total {
    font-size: 16px;
    color: #0f172a;
    border-top: 1px dashed #cbd5e1;
    padding-top: 8px;
    margin-top: 4px;
}

.vivid-atc-checkout-btn {
    width: 100%;
    background: #0f172a;
    color: #ffffff;
    height: 48px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.15);
}

.vivid-atc-checkout-btn:hover {
    background: var(--vivid-atc-drawer-accent, #12b89f);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(18, 184, 159, 0.3);
}

/* Loading mask */
.vivid-loading {
    position: relative;
    pointer-events: none;
}
.vivid-loading::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 30px;
    height: 30px;
    margin-top: -15px;
    margin-left: -15px;
    border: 3px solid var(--vivid-atc-drawer-accent, #12b89f);
    border-bottom-color: transparent;
    border-radius: 50%;
    animation: vivid_atc_spin 0.6s linear infinite;
    z-index: 1000;
}

/* Mobile responsive drawer overlay adjustments */
@media (max-width: 600px) {
    #vivid-atc-cart-drawer {
        width: 100%;
        right: -100%;
        height: 100%;
    }
}
