/* ============================================
   1. GLOBAL BUTTON STYLING (SAFE VERSION)
   ============================================ */
.menu-toggle, button, .ast-button, .ast-custom-button, .button, input#submit, input[type="button"], input[type="submit"], input[type="reset"], #comments .submit, .search .search-submit, form[CLASS*="wp-block-search__"].wp-block-search .wp-block-search__inside-wrapper .wp-block-search__button, body .wp-block-file .wp-block-file__button, .search .search-submit, .woocommerce-js a.button, .woocommerce button.button, .woocommerce .woocommerce-message a.button, .woocommerce #respond input#submit.alt, .woocommerce input.button.alt, .woocommerce input.button, .woocommerce input.button:disabled, .woocommerce input.button:disabled[disabled], .woocommerce input.button:disabled:hover, .woocommerce input.button:disabled[disabled]:hover, .woocommerce #respond input#submit, .woocommerce button.button.alt.disabled, .wc-block-grid__products .wc-block-grid__product .wp-block-button__link, .wc-block-grid__product-onsale, [CLASS*="wc-block"] button, .woocommerce-js .astra-cart-drawer .astra-cart-drawer-content .woocommerce-mini-cart__buttons .button:not(.checkout):not(.ast-continue-shopping), .woocommerce-js .astra-cart-drawer .astra-cart-drawer-content .woocommerce-mini-cart__buttons a.checkout, .woocommerce button.button.alt.disabled.wc-variation-selection-needed, [CLASS*="wc-block"] .wc-block-components-button {
    border-style: solid;
    border-top-width: 0;
    border-right-width: 0;
    border-left-width: 0;
    border-bottom-width: 0;
    color: #ffffff;
    border-color: #000000;
    background-color: #000000;
    padding-top: 15px;
    padding-right: 30px;
    padding-bottom: 15px;
    padding-left: 30px;
    font-family: inherit;
    font-weight: 500;
    font-size: 1rem;
    line-height: 1em;
}

/* ============================================
   2. MOBILE MENU & HEADER Z-INDEX
   ============================================ */
.site-header, 
.ast-mobile-header-wrap, 
.elementor-location-header,
.main-header-bar-wrap,
.elementor-element-90c89c5 {
    z-index: 99999 !important;
    position: relative !important;
    overflow: visible !important;
}

.ast-mobile-header-content, 
.main-header-bar, 
#ast-mobile-header {
    z-index: 99999 !important;
}

/* ============================================
   3. PRODUCT GALLERY & LAYOUT CORRECTION
   ============================================ */
/* Fixes the "1." and "2." numbering and image stacking seen in screenshots */
.woocommerce-product-gallery ol, 
.woocommerce-product-gallery ul, 
.flex-control-nav,
.flex-control-thumbs {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
    text-indent: 0 !important;
}

.woocommerce-product-gallery li {
    list-style-type: none !important;
    margin-bottom: 10px !important;
}

/* Prevents images from bleeding into the header area */
.single-product div.product {
    margin-top: 20px !important;
}

/* Ensure the main product container has proper clearance */
.site-content {
    padding-top: 0 !important;
}

/* Hide the image magnifying glass icon */
.woocommerce div.product div.images .woocommerce-product-gallery__trigger {
    display: none !important;
}

/* Image rounding and shadows */
.woocommerce div.product div.images img {
    border-radius: 12px !important;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08) !important;
}

/* ============================================
   4. PRODUCT PAGE STYLING (TEXT & DROPDOWNS)
   ============================================ */
.single-product .woocommerce div.product p.price,
.single-product .woocommerce div.product span.price {
    font-size: 2em !important;
    color: #8b4513 !important;
    font-weight: 600 !important;
    margin-bottom: 25px !important;
}

.woocommerce div.product .product_title {
    font-size: 2.2em !important;
    color: #1a1a1a !important;
    font-weight: 600 !important;
}

/* Trust Badges - Text only */
.single-product .woocommerce div.product .price::after {
    content: "✓ Free Shipping Over $50    ⏱ Ships in 2-3 Days    🔒 Secure Checkout";
    display: block;
    font-size: 0.45em;
    color: #5a5a5a;
    font-weight: normal;
    margin-top: 15px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e0ddd9;
}

/* Size Selector Dropdown */
.woocommerce div.product form.cart .variations select {
    width: 100% !important;
    padding: 20px 24px !important;
    border: 2px solid #d4cfc8 !important;
    border-radius: 8px !important;
    appearance: none !important;
    background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L6 6L11 1' stroke='%238b4513' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 24px center !important;
}

/* Add to Cart button */
.woocommerce div.product form.cart button.single_add_to_cart_button {
    width: 100% !important;
    padding: 18px !important;
    background: linear-gradient(135deg, #8b4513 0%, #a0522d 100%) !important;
    color: white !important;
    border-radius: 10px !important;
    text-transform: uppercase !important;
}

/* Shipping Info Box */
.woocommerce div.product .product_meta {
    background: #f5f2ee !important;
    border-left: 4px solid #8b4513 !important;
    padding: 20px !important;
    border-radius: 8px !important;
}

/* ============================================
   5. ULTRA-SPECIFIC VARIATION DROPDOWN FIX
   ============================================ */

/* Target the exact select element with maximum specificity */
body.single-product .woocommerce.elementor-961 .elementor-element.elementor-element-860d592 form.cart table.variations td.value select,
body.woocommerce div.product.elementor form.cart .variations select[class*="woo-attribute"],
.woocommerce-js div.product form.cart .variations select {
    color: #000000 !important;
    background-color: #ffffff !important;
    font-size: 16px !important;
    font-weight: 500 !important;
    -webkit-text-fill-color: #000000 !important;
    text-shadow: none !important;
}

/* Force the options to show */
body.single-product select option,
.woocommerce div.product form.cart .variations select option {
    color: #000000 !important;
    background-color: #ffffff !important;
    display: block !important;
}

/* Reset any weird Elementor font family issues */
.woocommerce .elementor-961 .elementor-element.elementor-element-860d592 form.cart table.variations_form select {
    font-family: 'Montserrat', sans-serif !important;
}

/* ============================================
   6. CART & CHECKOUT (BLACK & WHITE)
   ============================================ */
/* Black backgrounds removed from headers - now handled in Section 12 */

.woocommerce-cart .wc-proceed-to-checkout a.checkout-button, 
.woocommerce-checkout #place_order {
    background: #000 !important;
    color: white !important;
    text-transform: uppercase !important;
}

/* ============================================
   7. NUCLEAR AJAX SEARCH REPAIR
   ============================================ */
[class*="ajax"] button, 
[class*="dgwt"] button, 
[class*="search"] button,
.dgwt-wcas-search-submit {
    background-color: transparent !important;
    padding: 0 !important;
    border: none !important;
}

/* ============================================
   8. MOBILE H1 TITLE SIZING FIX
   ============================================ */
@media (max-width: 544px) {
    h1, h1.elementor-heading-title, .elementor-heading-title, .entry-content h1 {
        font-size: 32px !important;
        line-height: 1.2em !important;
        letter-spacing: 0.4px !important;
    }
}

@media (min-width: 545px) and (max-width: 767px) {
    h1, h1.elementor-heading-title, .elementor-heading-title, .entry-content h1 {
        font-size: 38px !important;
        line-height: 1.2em !important;
        letter-spacing: 0.4px !important;
    }
}

@media (min-width: 768px) and (max-width: 921px) {
    h1, h1.elementor-heading-title, .elementor-heading-title, .entry-content h1 {
        font-size: 42px !important;
        line-height: 1.2em !important;
        letter-spacing: 0.4px !important;
    }
}

/* Desktop H1 letter spacing */
@media (min-width: 922px) {
    h1, h1.elementor-heading-title, .elementor-heading-title, .entry-content h1 {
        letter-spacing: 0.4px !important;
    }
}

/* ============================================
   9. MOBILE H2 HEADING SIZE FIX
   ============================================ */
@media (max-width: 544px) {
    h2, h2.elementor-heading-title, .elementor-heading-title.elementor-size-default, .entry-content h2 {
        font-size: 24px !important;
        line-height: 1.3em !important;
        letter-spacing: 0.4px !important;
    }
}

@media (min-width: 545px) and (max-width: 767px) {
    h2, h2.elementor-heading-title, .elementor-heading-title.elementor-size-default, .entry-content h2 {
        font-size: 28px !important;
        line-height: 1.3em !important;
        letter-spacing: 0.4px !important;
    }
}

@media (min-width: 768px) and (max-width: 921px) {
    h2, h2.elementor-heading-title, .elementor-heading-title.elementor-size-default, .entry-content h2 {
        font-size: 32px !important;
        line-height: 1.3em !important;
        letter-spacing: 0.4px !important;
    }
}

/* Desktop H2 letter spacing */
@media (min-width: 922px) {
    h2, h2.elementor-heading-title, .elementor-heading-title.elementor-size-default, .entry-content h2 {
        letter-spacing: 0.4px !important;
    }
}

/* Fix Elementor global typography variables */
@media (max-width: 767px) {
    .elementor-kit-26 {
        --e-global-typography-secondary-font-size: 28px !important;
    }
}

@media (min-width: 768px) and (max-width: 1024px) {
    .elementor-kit-26 {
        --e-global-typography-secondary-font-size: 32px !important;
    }
}

/* Force WooCommerce Variation Dropdowns to be visible and styled */
.variations select, 
.variations td.value select,
.elementor-widget-wc-add-to-cart .variations select {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    color: #333 !important;
    background-color: #ffffff !important;
    border: 1px solid #777 !important;
    height: auto !important;
    min-height: 40px !important;
    width: 100% !important;
}

/* ============================================
   9B. MOBILE H3 HEADING SIZE FIX
   ============================================ */
@media (max-width: 544px) {
    h3, h3.elementor-heading-title, .entry-content h3 {
        font-size: 20px !important;
        line-height: 1.4em !important;
        letter-spacing: 0.4px !important;
    }
}

@media (min-width: 545px) and (max-width: 767px) {
    h3, h3.elementor-heading-title, .entry-content h3 {
        font-size: 22px !important;
        line-height: 1.4em !important;
        letter-spacing: 0.4px !important;
    }
}

@media (min-width: 768px) and (max-width: 921px) {
    h3, h3.elementor-heading-title, .entry-content h3 {
        font-size: 26px !important;
        line-height: 1.4em !important;
        letter-spacing: 0.4px !important;
    }
}

/* Desktop H3 letter spacing */
@media (min-width: 922px) {
    h3, h3.elementor-heading-title, .entry-content h3 {
        letter-spacing: 0.4px !important;
    }
}

/* ============================================
   9C. MOBILE H4 HEADING SIZE FIX
   ============================================ */
@media (max-width: 544px) {
    h4, h4.elementor-heading-title, .entry-content h4 {
        font-size: 18px !important;
        line-height: 1.4em !important;
        letter-spacing: 0.4px !important;
    }
}

@media (min-width: 545px) and (max-width: 767px) {
    h4, h4.elementor-heading-title, .entry-content h4 {
        font-size: 19px !important;
        line-height: 1.4em !important;
        letter-spacing: 0.4px !important;
    }
}

@media (min-width: 768px) and (max-width: 921px) {
    h4, h4.elementor-heading-title, .entry-content h4 {
        font-size: 22px !important;
        line-height: 1.4em !important;
        letter-spacing: 0.4px !important;
    }
}

/* Desktop H4 letter spacing */
@media (min-width: 922px) {
    h4, h4.elementor-heading-title, .entry-content h4 {
        letter-spacing: 0.4px !important;
    }
}

/* ============================================
   10. FORCE H1 AND H2 TO USE OSWALD FONT
   ============================================ */
h1, h1.elementor-heading-title, .elementor-heading-title, .entry-content h1,
h2, h2.elementor-heading-title, .elementor-heading-title.elementor-size-default, .entry-content h2 {
    font-family: 'Oswald', sans-serif !important;
}

/* ============================================
   11. COMPACT PRODUCT PAGE - LESS SCROLLING
   ============================================ */

/* Reduce overall product page spacing */
.single-product .product {
    padding-top: 10px !important;
    padding-bottom: 20px !important;
}

/* Tighten product title */
.single-product .woocommerce div.product .product_title {
    margin-bottom: 15px !important;
    font-size: 2em !important;
}

/* Reduce price spacing */
.single-product .woocommerce div.product p.price,
.single-product .woocommerce div.product span.price {
    margin-bottom: 20px !important;
}

/* Compact variation table */
.single-product form.cart .variations {
    margin-bottom: 15px !important;
}

.single-product form.cart .variations tr {
    margin-bottom: 10px !important;
}

/* Tighter Add to Cart section */
.single-product .cart {
    margin-top: 10px !important;
    margin-bottom: 15px !important;
}

/* Compact main description paragraphs */
.single-product .woocommerce-Tabs-panel p,
.single-product #tab-description p,
.single-product .entry-content p {
    margin-bottom: 10px !important;
    line-height: 1.6em !important;
}

/* Reduce heading spacing in description */
.single-product .entry-content h3,
.single-product .entry-content h4 {
    margin-top: 15px !important;
    margin-bottom: 10px !important;
}

/* Compact lists in description */
.single-product .entry-content ul,
.single-product .entry-content ol {
    margin-bottom: 15px !important;
    padding-left: 20px !important;
}

.single-product .entry-content li {
    margin-bottom: 5px !important;
}

/* Reduce spacing around product meta */
.single-product .product_meta {
    margin-top: 15px !important;
    padding: 15px !important;
}

/* Tighter size chart table */
.single-product table {
    margin: 15px 0 !important;
}

.single-product table th,
.single-product table td {
    padding: 8px 10px !important;
    font-size: 14px !important;
}

/* Remove extra spacing from horizontal rules */
.single-product hr {
    margin: 15px 0 !important;
}

/* Mobile: Make everything even more compact */
@media (max-width: 768px) {
    /* Smaller product images on mobile */
    .single-product .woocommerce-product-gallery {
        margin-bottom: 15px !important;
    }
    
    /* Compact title on mobile */
    .single-product .woocommerce div.product .product_title {
        font-size: 1.6em !important;
        margin-bottom: 10px !important;
        line-height: 1.2em !important;
    }
    
    /* Smaller price on mobile */
    .single-product .woocommerce div.product p.price,
    .single-product .woocommerce div.product span.price {
        font-size: 1.5em !important;
        margin-bottom: 15px !important;
    }
    
    /* Reduce all paragraph spacing on mobile */
    .single-product p {
        margin-bottom: 8px !important;
        font-size: 14px !important;
        line-height: 1.5em !important;
    }
    
    /* Smaller headings on mobile */
    .single-product h3 {
        font-size: 1.1em !important;
        margin-bottom: 8px !important;
    }
    
    /* Compact button */
    .single-product .single_add_to_cart_button {
        padding: 14px !important;
        font-size: 15px !important;
    }
    
    /* Reduce trust badge spacing */
    .single-product .woocommerce div.product .price::after {
        margin-top: 10px !important;
        padding-bottom: 12px !important;
        font-size: 0.4em !important;
    }
    
    /* Tighter tables on mobile */
    .single-product table th,
    .single-product table td {
        padding: 6px 8px !important;
        font-size: 13px !important;
    }
}

/* Optional: Sticky Add to Cart on mobile */
@media (max-width: 768px) {
    /* Add body padding to prevent content from hiding under sticky button */
    body.single-product {
        padding-bottom: 80px !important;
    }
    
    .single-product form.cart {
        position: fixed !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        background: white !important;
        padding: 12px 15px !important;
        box-shadow: 0 -3px 15px rgba(0,0,0,0.15) !important;
        z-index: 999 !important;
        margin: 0 !important;
    }
    
    .single-product .single_add_to_cart_button {
        width: 100% !important;
        margin-bottom: 0 !important;
    }
    
    /* Hide quantity selector on sticky bar to save space */
    .single-product form.cart .quantity {
        display: none !important;
    }
    
    /* Keep size selector visible */
    .single-product form.cart .variations {
        margin-bottom: 8px !important;
    }
}

/* ============================================
   12. CART PAGE IMPROVEMENTS
   ============================================ */

/* Center remove X buttons with product images */
.woocommerce-cart table.cart .product-remove {
    text-align: center !important;
    vertical-align: middle !important;
    padding: 15px !important;
}

/* Simple X button - no circle */
.woocommerce-cart table.cart .product-remove a {
    display: inline-block !important;
    color: #cc0000 !important;
    font-size: 24px !important;
    line-height: 1 !important;
    text-decoration: none !important;
    font-weight: bold !important;
    padding: 5px !important;
    transition: all 0.2s ease !important;
}

/* Hide the circle background image */
.woocommerce-cart table.cart .product-remove a:before {
    display: none !important;
}

/* Hover effect on X */
.woocommerce-cart table.cart .product-remove a:hover {
    color: #ff0000 !important;
    transform: scale(1.2) !important;
}

/* Align product thumbnails properly */
.woocommerce-cart table.cart .product-thumbnail {
    vertical-align: middle !important;
    text-align: center !important;
    padding: 15px !important;
}

.woocommerce-cart table.cart .product-thumbnail img {
    max-width: 80px !important;
    border-radius: 8px !important;
}

/* Better product name alignment */
.woocommerce-cart table.cart .product-name {
    vertical-align: middle !important;
    padding: 15px !important;
}

.woocommerce-cart table.cart .product-name a {
    font-weight: 600 !important;
    color: #333 !important;
    text-decoration: none !important;
}

/* Price and quantity alignment */
.woocommerce-cart table.cart .product-price,
.woocommerce-cart table.cart .product-quantity,
.woocommerce-cart table.cart .product-subtotal {
    vertical-align: middle !important;
    text-align: center !important;
    padding: 15px !important;
}

/* REMOVE black background from table headers */
.woocommerce-cart table.cart thead th {
    background: transparent !important;
    color: #333 !important;
    padding: 15px !important;
    text-align: center !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    font-size: 12px !important;
    letter-spacing: 0.5px !important;
    border-bottom: 2px solid #e0e0e0 !important;
}

/* Better update cart button */
.woocommerce-cart .actions button[name="update_cart"] {
    background: #000 !important;
    color: white !important;
    border: none !important;
    padding: 12px 30px !important;
    border-radius: 6px !important;
    text-transform: uppercase !important;
    font-weight: 600 !important;
    cursor: pointer !important;
}

.woocommerce-cart .actions button[name="update_cart"]:hover {
    background: #333 !important;
}

/* Cart totals box styling - REMOVE black bar */
.cart-collaterals .cart_totals {
    background: #f5f5f5 !important;
    padding: 25px !important;
    border-radius: 8px !important;
    border: 1px solid #e0e0e0 !important;
}

.cart-collaterals .cart_totals h2 {
    background: transparent !important;
    color: #333 !important;
    margin-top: 0 !important;
    padding-bottom: 15px !important;
    border-bottom: 2px solid #e0e0e0 !important;
}

/* Proceed to checkout button */
.woocommerce-cart .wc-proceed-to-checkout a.checkout-button {
    background: #000 !important;
    color: white !important;
    padding: 18px !important;
    border-radius: 8px !important;
    font-weight: 600 !important;
    letter-spacing: 1px !important;
    width: 100% !important;
    display: block !important;
    text-align: center !important;
    text-transform: uppercase !important;
}

.woocommerce-cart .wc-proceed-to-checkout a.checkout-button:hover {
    background: #333 !important;
}

/* Shipping info styling */
.cart-collaterals .shipping {
    padding: 15px !important;
    background: white !important;
    border-radius: 6px !important;
    margin-bottom: 15px !important;
}

/* Coupon form styling */
.woocommerce-cart .coupon {
    display: flex !important;
    gap: 10px !important;
}

.woocommerce-cart .coupon input[type="text"] {
    flex: 1 !important;
    padding: 12px 15px !important;
    border: 2px solid #ddd !important;
    border-radius: 6px !important;
}

.woocommerce-cart .coupon button {
    background: #000 !important;
    color: white !important;
    border: none !important;
    padding: 12px 25px !important;
    border-radius: 6px !important;
    text-transform: uppercase !important;
    font-weight: 600 !important;
    cursor: pointer !important;
}

/* Hide the undo link */
.woocommerce-cart .woocommerce-message .restore-item {
    display: none !important;
}

/* Add breathing room */
.woocommerce-cart {
    padding: 40px 0 !important;
}

.woocommerce-cart table.cart {
    margin-bottom: 30px !important;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .woocommerce-cart table.cart .product-thumbnail img {
        max-width: 60px !important;
    }
    
    .woocommerce-cart table.cart thead th {
        font-size: 10px !important;
        padding: 10px 5px !important;
    }
    
    .woocommerce-cart table.cart td {
        padding: 10px 5px !important;
    }
}

/* ============================================
   CART & CHECKOUT FONT CONSISTENCY
   ============================================ */

/* Match product page heading fonts (Oswald) */
.woocommerce-cart h2,
.woocommerce-cart h3,
.woocommerce-checkout h2,
.woocommerce-checkout h3,
.cart_totals h2,
.woocommerce-checkout-review-order h3 {
    font-family: 'Oswald', sans-serif !important;
    font-weight: 600 !important;
    letter-spacing: 0.4px !important;
}

/* Cart table headers match product page style */
.woocommerce-cart table.cart thead th {
    font-family: 'Oswald', sans-serif !important;
    font-weight: 600 !important;
}

/* Product names in cart */
.woocommerce-cart table.cart .product-name a {
    font-family: inherit !important;
}

/* Cart Totals labels */
.cart_totals table th,
.woocommerce-checkout-review-order-table th {
    font-family: inherit !important;
    font-weight: 500 !important;
}

/* Button text consistency */
.woocommerce-cart button,
.woocommerce-cart .button,
.woocommerce-checkout button,
.woocommerce-checkout .button {
    font-family: inherit !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
}

/* Form labels on checkout */
.woocommerce-checkout .form-row label {
    font-family: inherit !important;
    font-weight: 500 !important;
}

/* Input fields match product page style */
.woocommerce-cart input[type="text"],
.woocommerce-cart input[type="number"],
.woocommerce-checkout input[type="text"],
.woocommerce-checkout input[type="email"],
.woocommerce-checkout input[type="tel"],
.woocommerce-checkout select,
.woocommerce-checkout textarea {
    font-family: inherit !important;
}

/* Price text consistency */
.woocommerce-cart .amount,
.woocommerce-checkout .amount,
.cart_totals .amount,
.order-total .amount {
    font-family: inherit !important;
    font-weight: 600 !important;
}

/* ============================================
   END OF CUSTOM CSS
   ============================================ */