/* --- GLOBAL FOOTER COLLISION FIX --- */
footer, .site-footer, #colophon, .cm-rich-footer { z-index: 1 !important; position: relative !important; padding-bottom: 160px !important; }

/* --- BASE RESETS & TOP SPACING (Razor Thin Header Gap) --- */
body.single-product .woocommerce-breadcrumb, 
body.single-product .product_meta,
.woocommerce-product-gallery__trigger, .cm-gallery-pill .onsale { display: none !important; }

/* Global Standard Header Clearance (Clean 16px Space Below Fixed Header) */
.cm-sleek-single-product { max-width: 600px; margin: 0 auto 30px auto !important; padding: 0 15px !important; display: flex; flex-direction: column; gap: 16px; }

/* --- HERO GROUPING (Tight spacing) --- */
.cm-hero-group { display: flex; flex-direction: column; gap: 8px; margin-bottom: 8px; }

/* --- MASTER PILLS --- */
.cm-sp-pill {
    background: var(--cm-surface) !important; 
    backdrop-filter: blur(16px) saturate(180%) !important; 
    -webkit-backdrop-filter: blur(16px) saturate(180%) !important;
    border: 1px solid var(--cm-border) !important; 
    border-radius: 32px !important; 
    padding: 24px !important; 
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.35), inset 0 1px 1.5px 0 rgba(255, 255, 255, 0.15) !important;
}
[data-theme="light"] .cm-sp-pill {
    box-shadow: 0 8px 32px 0 rgba(177, 109, 131, 0.10), inset 0 1px 1.5px 0 rgba(255, 255, 255, 0.75) !important;
}
.cm-sp-pill h1, .cm-sp-pill h2 { font-family: 'Bebas Neue', sans-serif; font-size: 22px; margin: 0 0 15px 0; color: var(--cm-text-static); letter-spacing: 1px; text-transform: uppercase; }

/* --- TITLE & PRICE (Slimmer Vertically) --- */
.cm-title-pill { width: 100%; box-sizing: border-box; padding: 16px 24px !important; text-align: center; }
.cm-title-pill h1 { font-size: clamp(16px, 2vw, 24px) !important; margin: 0 !important; line-height: 1.25 !important; white-space: normal !important; word-break: keep-all !important; text-wrap: balance !important; max-width: 100% !important; }

/* Crushed the vertical padding to absolute minimum for 1-page fit */
.cm-price-pill { display: flex; align-items: center; justify-content: center; gap: 15px; padding: 6px 24px !important; }
.cm-sale-tag { color: #ff6b6b; font-weight: 900; text-transform: uppercase; letter-spacing: 1px; font-size: 16px; }
.cm-price-display { font-size: 24px; font-weight: 800; color: var(--cm-accent); }

/* --- HERO NATIVE SWIPE CAROUSEL --- */
.cm-gallery-pill { position: relative; padding: 12px !important; overflow: hidden; }
.cm-hero-carousel { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; -ms-overflow-style: none; width: 100%; border-radius: 20px; background: transparent; cursor: grab; user-select: none; }
.cm-hero-carousel::-webkit-scrollbar { display: none; }
.cm-carousel-img { flex: 0 0 100%; scroll-snap-align: center; width: 100%; height: auto; max-height: 50vh; object-fit: contain; border-radius: 20px; cursor: zoom-in; -webkit-user-drag: none; }
.cm-gallery-counter { position: absolute; bottom: 20px; right: 20px; background: rgba(0,0,0,0.6); color: #fff; padding: 6px 14px; border-radius: 20px; font-size: 11px; font-weight: 700; backdrop-filter: blur(10px); z-index: 10; pointer-events: none; }

.cm-gallery-nav {
    display: none;
    position: absolute; top: 50%; transform: translateY(-50%); z-index: 15;
    width: 38px; height: 38px; border-radius: 50%;
    background: var(--cm-surface); border: 1px solid var(--cm-border);
    color: var(--cm-accent) !important; font-size: 18px;
    align-items: center; justify-content: center; cursor: pointer;
    backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
    transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease, opacity 0.2s ease;
    padding: 0;
}
.cm-gallery-nav svg { display: block; stroke: var(--cm-accent) !important; color: var(--cm-accent) !important; }
.cm-gallery-prev { left: 20px; }
.cm-gallery-next { right: 20px; }
.cm-modal-prev { left: 16px; }
.cm-modal-next { right: 16px; }
.cm-gallery-nav:hover { border-color: var(--cm-accent); color: var(--cm-accent) !important; background: var(--cm-card-glass-hover); transform: translateY(-50%) scale(1.06); }
@media (min-width: 769px), (hover: hover) and (pointer: fine) {
    .cm-gallery-nav { display: flex; opacity: 0.9; }
    .cm-gallery-pill:hover .cm-gallery-nav,
    .cm-modal-main-view-wrapper:hover .cm-modal-nav { opacity: 1; }
}

/* --- FULLSCREEN MODAL (Always flex-centered on Desktop & Mobile) --- */
.cm-fullscreen-modal { 
    display: flex !important; opacity: 0; visibility: hidden; pointer-events: none;
    position: fixed; inset: 0; top: 0; left: 0; width: 100vw; height: 100vh; height: 100dvh;
    background: color-mix(in srgb, var(--cm-bg) 88%, transparent); backdrop-filter: blur(28px); -webkit-backdrop-filter: blur(28px);
    z-index: 99998 !important; /* One level below the 99999 global header */
    flex-direction: column; align-items: center; justify-content: center; 
    padding: 82px 16px 24px 16px; box-sizing: border-box; cursor: pointer;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}
.cm-fullscreen-modal.active { opacity: 1; visibility: visible; pointer-events: auto; }

.cm-modal-topbar {
    width: 100%; max-width: 560px; margin: 0 auto 10px auto; padding: 0 12px; box-sizing: border-box;
    display: flex; align-items: center; justify-content: space-between; z-index: 35; flex-shrink: 0; cursor: default;
}
.cm-modal-main-view-wrapper { position: relative; width: 100%; max-width: 680px; margin: 0 auto; display: flex; justify-content: center; align-items: center; padding: 0 10px; box-sizing: border-box; cursor: default; }

.cm-modal-close { position: static !important; color: var(--cm-accent) !important; font-size: 20px; cursor: pointer; background: var(--cm-surface); border: 1px solid var(--cm-border); border-radius: 50%; width: 38px; height: 38px; display: flex; align-items: center; justify-content: center; z-index: 30; backdrop-filter: blur(10px); pointer-events: auto; padding: 0; }
.cm-modal-counter { position: static !important; z-index: 30; background: var(--cm-surface); border: 1px solid var(--cm-border); color: var(--cm-text-static); padding: 6px 14px; border-radius: 20px; font-size: 11px; font-weight: 700; backdrop-filter: blur(10px); pointer-events: none; }

.cm-modal-swipe-track { 
    display: flex; width: 100%; height: 58vh; overflow-x: auto; scroll-snap-type: x mandatory; 
    scrollbar-width: none; -ms-overflow-style: none; align-items: center; cursor: grab;
}
.cm-modal-swipe-track::-webkit-scrollbar { display: none; }
.cm-modal-slide { flex: 0 0 100%; scroll-snap-align: center; height: 100%; display: flex; justify-content: center; align-items: center; padding: 0 20px; box-sizing: border-box; }
.cm-modal-slide img { max-width: 100%; max-height: 58vh; object-fit: contain; border-radius: 16px; pointer-events: none; -webkit-user-drag: none; }

/* Mathematically Dead-Center Thumbnails */
.cm-modal-thumbnails { 
    display: flex; gap: 12px; max-width: calc(100vw - 32px); 
    overflow-x: auto; padding: 12px 6px 4px 6px; margin: 10px auto 0 auto !important; 
    justify-content: safe center !important; align-items: center; 
    scrollbar-width: none; cursor: auto; box-sizing: border-box; 
}
.cm-modal-thumbnails::-webkit-scrollbar { display: none; }
.cm-modal-thumb { width: 55px; height: 55px; border-radius: 12px; object-fit: cover; opacity: 0.5; border: 2px solid transparent; cursor: pointer; transition: 0.2s; flex-shrink: 0; }
.cm-modal-thumb.active { opacity: 1; border-color: var(--cm-accent); }

/* --- BNPL (Single Outer Glass Pill, Zero Nested Borders) --- */
.cm-bnpl-pill { padding: 10px 18px !important; }
.cm-bnpl-pill .cm-unified-bnpl-promo,
.cm-sp-pill .cm-unified-bnpl-promo {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    border-radius: 0 !important;
    padding: 0 !important;
}

/* --- SMART ACTION ROW (Clean 1-row Desktop, Breathing Multi-row Mobile) --- */
.cm-action-row-locked { padding: 12px 14px !important; display: flex; flex-wrap: nowrap; gap: 8px; align-items: center; justify-content: space-between; position: relative; z-index: 99; overflow: visible !important; }

.cm-action-attributes { display: flex; flex: 1.45 1 auto; gap: 6px; min-width: 0; flex-wrap: wrap; }
.cm-action-attributes .cm-mini-pill.cm-single-attr { flex: 1 1 auto; min-width: max-content; padding: 6px 10px; height: 42px; }
.cm-action-utils { display: flex; flex: 1 1 auto; gap: 6px; align-items: center; justify-content: flex-end; min-width: 0; }

.cm-action-row-locked.no-attributes .cm-action-attributes { display: none; }
.cm-action-row-locked.no-attributes .cm-action-utils { flex: 1 1 100%; }
.cm-action-row-locked.has-attributes .cm-stock-pill { flex: 1 1 auto; min-width: 72px; padding: 6px 10px; height: 42px; }
.cm-action-row-locked.no-attributes .cm-stock-pill { flex: 1 1 100%; height: 44px; }

@media (max-width: 600px) {
    .cm-action-row-locked { padding: 10px 12px !important; gap: 8px; }
    .cm-action-row-locked.has-attributes { flex-wrap: wrap; }
    .cm-action-row-locked.has-attributes .cm-action-attributes { flex: 1 1 100%; width: 100%; gap: 8px !important; }
    .cm-action-row-locked.has-attributes .cm-action-utils { flex: 1 1 100%; width: 100%; justify-content: space-between; gap: 8px !important; }
    .cm-action-attributes .cm-mini-pill.cm-single-attr,
    .cm-action-row-locked.has-attributes .cm-stock-pill { height: 40px; padding: 5px 10px; border-radius: 14px !important; }
    .cm-action-row-locked.has-attributes .cm-mini-pill .cm-label { font-size: 8.5px; margin-bottom: 1px; }
    .cm-action-row-locked.has-attributes .cm-mini-pill .cm-value { font-size: 11px; }
    .cm-action-row-locked button.cm-icon-pill { flex: 0 0 40px !important; width: 40px !important; max-width: 40px !important; height: 40px !important; }
}

.cm-mini-pill { 
    background: transparent !important; border: 1px solid var(--cm-border) !important; border-radius: 16px; 
    padding: 8px 10px; display: flex; flex-direction: column; justify-content: center; align-items: center; 
    box-shadow: none !important; cursor: pointer; position: relative; box-sizing: border-box; text-align: center;
}

.cm-stock-pill { padding: 8px 12px; }

.cm-mini-pill .cm-label { font-size: 9px; opacity: 0.7; text-transform: uppercase; margin-bottom: 2px; pointer-events: none; text-align: center; width: 100%; color: var(--cm-accent) !important; }
.cm-mini-pill .cm-value { font-size: 11px; font-weight: 800; color: var(--cm-accent); width: 100%; text-align: center; white-space: nowrap; pointer-events: none; display: inline-flex; align-items: center; justify-content: center; }

button.cm-icon-pill { flex: 0 0 44px; height: 44px; border-radius: 50%; padding: 0; display: flex; align-items: center; justify-content: center; background: transparent !important; border: 1px solid var(--cm-border) !important; color: var(--cm-accent) !important; }

/* --- CASA CUSTOM DROPDOWNS --- */
.cm-action-attributes form.variations_form { width: 100%; margin: 0; }
.cm-action-attributes table.variations { margin: 0; border: none; width: 100%; display: flex; gap: 8px; height: 100%; }
.cm-action-attributes table.variations tbody { display: flex; flex-wrap: wrap; gap: 8px; width: 100%; height: 100%; }
.cm-action-attributes table.variations tr { display: flex; flex: 1 1 auto; min-width: max-content; position: relative; height: 100%; }
.cm-action-attributes table.variations th, .cm-action-attributes table.variations td.label, .cm-action-attributes table.variations select { display: none !important; width: 0 !important; padding: 0 !important; margin: 0 !important; }
.cm-action-attributes table.variations td.value { width: 100%; height: 100%; display: flex; }

.cm-custom-select-wrap { width: 100%; position: relative; z-index: 999; height: 100%; }
.cm-custom-select-trigger {
    background: transparent !important; border: 1px solid var(--cm-border) !important; border-radius: 16px; 
    padding: 6px 12px; display: flex; flex-direction: column; justify-content: center; align-items: center; 
    box-shadow: none !important; cursor: pointer; min-height: 40px; height: 100%; width: 100%; box-sizing: border-box; text-align: center;
}
.cm-custom-select-trigger.cm-single-attr { cursor: default; }

.cm-custom-select-trigger .cm-drop-label { font-size: 9px; opacity: 0.7; text-transform: uppercase; margin-bottom: 2px; text-align: center; width: 100%; color: var(--cm-accent) !important; }
.cm-custom-select-trigger .cm-drop-value { 
    font-size: 11px; font-weight: 800; color: var(--cm-accent); white-space: nowrap; 
    display: inline-flex; align-items: center; justify-content: center; gap: 4px; width: 100%; text-align: center;
}
.cm-custom-select-options {
    display: none; position: absolute; top: calc(100% + 8px); left: 0; min-width: 100%; width: max-content; max-width: 240px;
    background: var(--cm-surface) !important; border: 1px solid var(--cm-border) !important; border-radius: 16px; 
    backdrop-filter: blur(30px) !important; -webkit-backdrop-filter: blur(30px) !important; padding: 8px; z-index: 999; box-shadow: none !important; box-sizing: border-box;
}
.cm-custom-select-options .cm-option { padding: 8px 4px; font-size: 11px; font-weight: 700; color: var(--cm-text-static); text-align: center; border-radius: 8px; cursor: pointer; transition: 0.2s; white-space: normal; word-break: break-word; line-height: 1.2; }
.cm-custom-select-options .cm-option:hover { background: var(--cm-surface); color: var(--cm-accent); }
.cm-action-attributes .single_add_to_cart_button, .cm-action-attributes .quantity, .cm-action-attributes .reset_variations, .cm-action-attributes .single_variation_wrap .woocommerce-variation { display: none !important; }

/* --- TRUST, DESC, SLIM REVIEWS --- */
.cm-trust-icons { display: flex; justify-content: space-between; gap: 5px; margin-bottom: 12px; border-bottom: 1px solid var(--cm-border); padding-bottom: 12px; }
.cm-trust-item { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; flex: 1; }
.cm-trust-item i { font-size: 22px; color: var(--cm-accent); }
.cm-trust-item span { font-size: 9px; font-weight: 700; text-transform: uppercase; color: var(--cm-text-static); }
.cm-trust-disclaimer { text-align: center; font-size: 10px; opacity: 0.9; font-weight: 600; color: #ff6b6b; text-transform: uppercase; }
.cm-desc-pill { font-size: 13px; line-height: 1.6; }

/* =========================================================================
   SINGLE PRODUCT REVIEWS (Swiper Continuous Marquee Engine)
   ========================================================================= */
/* --- E. GLOBAL REVIEWS: Handled sitewide by global.css unified 1-size engine --- */



/* --- RELATED PRODUCTS PILL (Boutique Luxury Grid) --- */
.cm-related-pill { 
    padding: 24px 16px 28px 16px !important; 
    margin-bottom: 30px !important; /* Clean boutique clearance above rich footer */
    text-align: center !important;
    box-shadow: none !important;
}
.cm-related-pill h2,
.cm-related-pill .cm-sp-section-title { 
    display: block !important; 
    font-family: 'Bebas Neue', sans-serif !important; 
    font-size: 24px !important; 
    letter-spacing: 1.5px !important; 
    color: var(--cm-text-static) !important; 
    text-align: center !important; 
    margin: 0 0 16px 0 !important; 
    text-transform: uppercase !important; 
    line-height: 1 !important;
}
.cm-related-pill ul.products { 
    display: grid !important; 
    grid-template-columns: repeat(2, 1fr) !important; 
    gap: 12px !important; 
    margin: 0 auto !important; 
    padding: 0 !important; 
    list-style: none !important; 
    width: 100% !important; 
    justify-content: center !important; 
    box-sizing: border-box !important;
}
.cm-related-pill li.product,
.cm-related-pill li.cm-glass-product-card { 
    background: var(--cm-card-glass) !important; 
    backdrop-filter: blur(12px) saturate(160%) !important;
    -webkit-backdrop-filter: blur(12px) saturate(160%) !important;
    border: 1px solid var(--cm-card-border) !important; 
    border-radius: 20px !important; 
    box-shadow: var(--cm-card-gloss) !important;
    padding: 10px 8px !important; 
    text-align: center !important; 
    margin: 0 !important; 
    width: 100% !important; 
    box-sizing: border-box !important; 
    display: flex !important; 
    flex-direction: column !important; 
    position: relative !important; 
    transition: background 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease !important;
}
.cm-related-pill li.product:hover,
.cm-related-pill li.cm-glass-product-card:hover {
    background: var(--cm-card-glass-hover) !important;
    border-color: var(--cm-accent) !important;
    box-shadow: var(--cm-card-gloss-hover) !important;
}
.cm-related-pill li.product img,
.cm-related-pill li.cm-glass-product-card img.cm-grid-img { 
    width: 100% !important; 
    height: 160px !important; 
    object-fit: cover !important; 
    border-radius: 12px !important; 
    margin-bottom: 8px !important; 
    display: block !important; 
}
.cm-related-pill li.product h2,
.cm-related-pill li.cm-glass-product-card .cm-grid-title { 
    font-size: 10px !important; 
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif !important; 
    font-weight: 700 !important; 
    color: var(--cm-text-static) !important; 
    line-height: 12px !important; 
    margin: 0 0 6px 0 !important; 
    text-transform: none !important; 
    letter-spacing: normal !important; 
    display: -webkit-box !important; 
    -webkit-line-clamp: 3 !important; 
    -webkit-box-orient: vertical !important; 
    overflow: hidden !important; 
    text-overflow: ellipsis !important;
    min-height: 36px !important; 
    height: 36px !important; 
}
@media (min-width: 769px) {
    .cm-related-pill li.product h2,
    .cm-related-pill li.cm-glass-product-card .cm-grid-title {
        font-size: 11.5px !important;
        line-height: 14px !important;
        min-height: 42px !important;
        height: 42px !important;
    }
}
.cm-related-pill li.product .price,
.cm-related-pill li.cm-glass-product-card .price { 
    display: inline-flex !important; 
    flex-direction: row !important; 
    align-items: baseline !important; 
    justify-content: center !important; 
    white-space: nowrap !important; 
    gap: 3px !important; 
    font-size: 12px !important; 
    color: var(--cm-accent) !important; 
    font-weight: 900 !important; 
    margin-bottom: 8px !important; 
}
/* Active Add to Cart & View Cart buttons on Related Products */
.cm-related-pill li.product .button,
.cm-related-pill li.cm-glass-product-card .button,
.cm-related-pill li.cm-glass-product-card a.cm-grid-atc { 
    display: flex !important; 
    align-items: center !important; 
    justify-content: center !important; 
    width: 100% !important; 
    height: 30px !important; 
    background: var(--cm-accent) !important; 
    color: var(--cm-bg) !important; 
    font-size: 10px !important; 
    font-weight: 800 !important; 
    text-transform: uppercase !important; 
    letter-spacing: 0.8px !important; 
    padding: 0 !important; 
    border-radius: 8px !important; 
    text-decoration: none !important; 
    border: none !important; 
    transition: 0.25s ease !important; 
    box-shadow: none !important; 
    margin-top: auto !important; 
}
.cm-related-pill li.product .button:active,
.cm-related-pill li.cm-glass-product-card .button:active,
.cm-related-pill li.cm-glass-product-card a.cm-grid-atc:active { 
    transform: scale(0.96); 
    opacity: 0.85; 
}
.cm-related-pill li.cm-glass-product-card .button.cm-in-cart,
.cm-related-pill li.cm-glass-product-card a.cm-grid-atc.cm-in-cart { 
    background: transparent !important; 
    border: 1px solid var(--cm-accent) !important; 
    color: var(--cm-accent) !important; 
}

/* --- UNIFIED SMART BOTTOM BAR (Z-Index dropped to hide under Drawer, Clean clearance above Bottom Nav) --- */
.cm-unified-bottom-bar { 
    position: fixed !important; bottom: 98px !important; left: 0; width: 100vw; 
    display: flex; justify-content: center; align-items: center; 
    z-index: 90000 !important; pointer-events: none; padding: 0 15px; box-sizing: border-box;
}
.cm-smart-pill-wrapper {
    background: var(--cm-surface); backdrop-filter: blur(40px); -webkit-backdrop-filter: blur(40px);
    border: 1px solid var(--cm-border); border-radius: 40px; padding: 6px; 
    display: flex; gap: 8px; box-shadow: none !important;
    width: 100%; max-width: 280px; pointer-events: auto; /* Narrow footprint */
}
.cm-dummy-qty { display: flex; align-items: center; background: var(--cm-bg); border-radius: 30px; height: 42px; width: 90px; flex-shrink: 0; }
.cm-dummy-qty button { background: transparent; border: none; color: var(--cm-text-static); font-size: 16px; width: 30px; height: 100%; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.cm-dummy-qty input { width: 30px; background: transparent; border: none; color: var(--cm-text-static); text-align: center; font-weight: 800; font-size: 14px; padding: 0; margin: 0; pointer-events: none; }

.cm-dummy-add-to-cart, a.cm-visit-cart-btn { 
    flex: 1; height: 42px; border-radius: 25px; background: var(--cm-accent) !important; 
    color: var(--cm-bg) !important; /* Forces text to pure dark */
    font-size: 13px; font-weight: 900; text-transform: uppercase; letter-spacing: 1px; 
    border: none; cursor: pointer; transition: 0.3s; display: flex; justify-content: center; align-items: center; text-decoration: none !important;
}
.cm-dummy-add-to-cart:active, a.cm-visit-cart-btn:active { transform: scale(0.95); opacity: 0.8; }
.cm-hidden { display: none !important; }

/* =========================================================
   SHRINK RAY: SINGLE PRODUCT PAGE (< 365px)
========================================================= */
@media (max-width: 365px) {
    /* 1. ATTRIBUTES (Color/Size): Allow labels and swatches to stack */
    form.cart .variations th, form.cart .variations td { 
        display: block !important; 
        width: 100% !important; 
        text-align: left !important; 
        padding-bottom: 5px !important;
    }
    .cm-variation-selector, .tawcvs-swatches { 
        flex-wrap: wrap !important; 
        gap: 6px !important; 
    }
    /* Stop the vertical squish on the pills */
    .tawcvs-swatch { padding: 6px 10px !important; font-size: 11px !important; height: auto !important; } 

    /* 2. ADD TO CART ROW: Force button to drop below quantity box */
    form.cart .single_variation_wrap .woocommerce-variation-add-to-cart {
        flex-wrap: wrap !important; 
        gap: 12px !important;
    }
    form.cart .single_variation_wrap .woocommerce-variation-add-to-cart .cm-qty-wrapper {
        margin-bottom: 0 !important;
    }
    form.cart .single_variation_wrap .woocommerce-variation-add-to-cart button.single_add_to_cart_button {
        width: 100% !important; /* Button takes full width of the bottom row */
        margin-left: 0 !important;
    }
}

/* =========================================================================
   CASA MODESTA: HARD CROSS-BROWSER HARD RESET FIX FOR FIREFOX
   ========================================================================= */

/* 1. Neutralize Firefox Desktop native quantity arrow tickers universally */
.cm-sleek-single-product input[type="number"] {
    -moz-appearance: textfield !important;
    appearance: textfield !important;
    margin: 0 !important;
}

/* Sync internal browser sizing overrides to prevent parent stretching */
.cm-sleek-single-product input[type="number"]::-webkit-outer-spin-button,
.cm-sleek-single-product input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none !important;
    margin: 0 !important;
}

/* 2. FORCE THE UTILITIES ROW TO LOCK ELEMENT SIZES HORIZONTALLY */
.cm-action-utils {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 8px !important;
    flex-wrap: nowrap !important; /* Blocks Firefox from ever splitting the icon column */
    min-width: 0 !important;
}

/* 3. HARD POSITIONING OVERRIDE FOR YOUR CIRCULAR ICON PILLS */
button.cm-icon-pill {
    flex: 0 0 44px !important;
    width: 44px !important;
    max-width: 44px !important;
    height: 44px !important;
    border-radius: 50% !important;
    padding: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-sizing: border-box !important;
}

/* 4. RESTORE THE HEART ICON POSITIONING INSIDE THE WISHLIST CONTAINER HOOK */
button.cm-wishlist-btn i,
button.cm-share-btn i {
    font-size: 18px !important;
    display: inline-block !important;
    line-height: 1 !important;
    width: auto !important;
    height: auto !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* 5. FORCE THE HIDDEN WOOCOMMERCE INJECTION LAYER TO ZERO PIXEL SPACE */
.cm-hidden-simple-cart,
form.cart div.quantity,
.cm-action-attributes .quantity,
.woocommerce-variation-availability {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    width: 0 !important;
    opacity: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* =========================================================================
   CASA MODESTA: HARD EXTENSION TO DESTROY DESKTOP SPIN ACCENTS ON FIREFOX
   ========================================================================= */

/* 1. Target and wipe out the hidden internal desktop spin container in Firefox */
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none !important;
    margin: 0 !important;
}

/* 2. Target Firefox's internal layout structural number spinners specifically */
.cm-smart-pill-wrapper input[type="number"],
#cm-teleport-bar input[type="number"],
.cm-dummy-qty input {
    -moz-appearance: textfield !important;
    appearance: textfield !important;
}

/* 3. Deep target Firefox's desktop mouse-scroll indicator container layers */
.cm-dummy-qty input::-moz-number-spin-box,
.cm-dummy-qty input::-moz-number-spin-inner,
.cm-dummy-qty input::-moz-number-spin-outer {
    -moz-appearance: none !important;
    display: none !important;
    width: 0 !important;
    height: 0 !important;
}