/**
 * WooCommerce Pages CSS - Loaded only on product, cart, checkout, and account pages
 * Extracted from main style.css for conditional loading
 */

/* ===========================================
   Product Description - Dark Theme
   =========================================== */

/* Fix product description section text contrast on dark background */
.product-single-description,
.product-single-description .woocommerce-Tabs-panel,
.product-single-description .woocommerce-Tabs-panel p,
.product-single-description .woocommerce-Tabs-panel .product,
.product-single-description .woocommerce-Tabs-panel .product p,
.product-single-description .entry-content,
.product-single-description .entry-content p {
    color: #fff !important;
}

/* Tab navigation text */
.product-single-description .wc-tabs li a {
    color: #ccc !important;
}

.product-single-description .wc-tabs li.active a,
.product-single-description .wc-tabs li a:hover {
    color: #fff !important;
}

/* Reviews section text */
.product-single-description .woocommerce-Reviews-title,
.product-single-description .cr-comment-text,
.product-single-description .cr-comment-text .description,
.product-single-description .cr-comment-text .description p,
.product-single-description .woocommerce-review__author,
.product-single-description .woocommerce-review__published-date,
.product-single-description .cr-count-row,
.product-single-description .cr-nosummary-rating-lbl,
.product-single-description .cr-nosummary-rating-val {
    color: #fff !important;
}

/* Q&A section text */
.product-single-description .cr-qna-list-question,
.product-single-description .cr-qna-list-answer,
.product-single-description .cr-qna-list-answer-s,
.product-single-description .cr-qna-list-answer-s p,
.product-single-description .cr-qna-list-q-author {
    color: #fff !important;
}

/* Additional information table */
.product-single-description .shop_attributes th,
.product-single-description .shop_attributes td {
    color: #fff !important;
}

/* Form labels and inputs */
.product-single-description .cr-review-form-lbl,
.product-single-description .cr-review-form-rating-label {
    color: #fff !important;
}

/* Related Products heading */
.product-single-description .elementor-heading-title,
.product-single-description h2 {
    color: #fff !important;
}

/* ===========================================
   Product Titles - Black on white background
   =========================================== */
.woocommerce-loop-product__title,
.woocommerce ul.products li.product .woocommerce-loop-product__title,
ul.products li.product .woocommerce-loop-product__title,
.wc-block-grid__product-title,
.wc-block-grid .wc-block-grid__product .wc-block-grid__product-title {
    color: #000 !important;
}

/* ===========================================
   Jet Blocks Cart Sidebar
   Cart styling is managed via Elementor
   =========================================== */

/* Ensure cart appears above other elements */
.jet-blocks-cart__list {
    z-index: 99999 !important;
}

/* Hide duplicate empty cart messages */
.woocommerce-mini-cart__empty-message ~ .woocommerce-mini-cart__empty-message,
.ast-mini-cart-empty {
    display: none !important;
}

/* ===========================================
   Hide page titles on WooCommerce pages
   =========================================== */
.woocommerce-page .entry-header,
.woocommerce-checkout .entry-header,
.woocommerce-cart .entry-header,
.woocommerce-account .entry-header {
    display: none !important;
}

/* ===========================================
   Checkout Page - Dark Theme
   =========================================== */

/* Checkout container padding */
.woocommerce-checkout .woocommerce,
.woocommerce-checkout form.checkout {
    max-width: 1200px !important;
    margin: 0 auto !important;
    padding: 40px 60px !important;
    box-sizing: border-box !important;
}

/* Tablet */
@media (max-width: 1024px) {
    .woocommerce-checkout .woocommerce,
    .woocommerce-checkout form.checkout {
        padding: 30px 40px !important;
    }
}

/* Mobile */
@media (max-width: 767px) {
    .woocommerce-checkout .woocommerce,
    .woocommerce-checkout form.checkout {
        padding: 20px 20px !important;
    }

    .woocommerce-checkout h3 {
        font-size: 18px !important;
    }

    .woocommerce-checkout .col2-set .col-1,
    .woocommerce-checkout .col2-set .col-2 {
        width: 100% !important;
        float: none !important;
        margin-bottom: 20px !important;
    }

    #order_review_heading,
    #order_review {
        width: 100% !important;
        float: none !important;
    }

    .woocommerce-checkout-review-order-table {
        font-size: 14px !important;
    }

    #place_order {
        padding: 14px 24px !important;
        font-size: 16px !important;
    }
}

/* Small mobile */
@media (max-width: 480px) {
    .woocommerce-checkout .woocommerce,
    .woocommerce-checkout form.checkout {
        padding: 15px 15px !important;
    }

    .woocommerce-checkout h3 {
        font-size: 16px !important;
    }

    .woocommerce-checkout .input-text,
    .woocommerce-checkout input[type="text"],
    .woocommerce-checkout input[type="email"],
    .woocommerce-checkout input[type="tel"],
    .woocommerce-checkout textarea,
    .woocommerce-checkout select {
        padding: 10px !important;
        font-size: 14px !important;
    }
}

/* Text colors for dark background */
.woocommerce-checkout h3,
.woocommerce-checkout label,
.woocommerce-checkout .woocommerce-Price-amount,
.woocommerce-checkout td,
.woocommerce-checkout th,
.woocommerce-checkout p,
#order_review_heading,
#ast-payment_options_heading {
    color: #fff !important;
}

.woocommerce-checkout label .optional {
    color: rgba(255,255,255,0.5) !important;
}

/* Form inputs */
.woocommerce-checkout .input-text,
.woocommerce-checkout input[type="text"],
.woocommerce-checkout input[type="email"],
.woocommerce-checkout input[type="tel"],
.woocommerce-checkout textarea,
.woocommerce-checkout select,
#mxmerchant_gateway-card-number,
#mxmerchant_gateway-card-expiry,
#mxmerchant_gateway-card-cvc {
    background: rgba(255,255,255,0.1) !important;
    border: 1px solid rgba(255,255,255,0.3) !important;
    color: #fff !important;
    border-radius: 6px !important;
    padding: 12px !important;
}

.woocommerce-checkout .input-text:focus,
.woocommerce-checkout input:focus,
.woocommerce-checkout textarea:focus {
    border-color: #4a9eff !important;
    outline: none !important;
}

/* Select2 */
.woocommerce-checkout .select2-selection--single {
    background: rgba(255,255,255,0.1) !important;
    border: 1px solid rgba(255,255,255,0.3) !important;
    height: 48px !important;
    padding: 10px !important;
}

.woocommerce-checkout .select2-selection__rendered {
    color: #fff !important;
}

/* Place order button */
#place_order {
    background: #4a9eff !important;
    color: #fff !important;
    border: none !important;
    padding: 16px 32px !important;
    border-radius: 8px !important;
    font-weight: 600 !important;
    width: 100% !important;
}

#place_order:hover {
    background: #3d8ae8 !important;
}

/* Store Credits Section - Fix white background */
#acfw-checkout-ui-block,
.acfw-checkout-ui-block,
.acfw-accordions,
.acfw-accordion,
.acfw-accordion-inner,
.acfw-accordion-content {
    background: transparent !important;
    background-color: transparent !important;
}

.acfw-accordion h3 {
    background: rgba(255,255,255,0.1) !important;
    border-radius: 6px !important;
}

.acfw-accordion-title,
.acfw-store-credit-user-balance,
.acfw-store-credit-instructions,
#acfw-checkout-ui-block p,
#acfw-checkout-ui-block label {
    color: #fff !important;
}

.acfw-redeem-store-credit-form-field .button {
    background: rgba(255,255,255,0.1) !important;
    color: #fff !important;
    border: 1px solid rgba(255,255,255,0.3) !important;
}

/* Payment Box - Force dark background */
#payment,
#payment .payment_methods,
#payment .wc_payment_method,
#payment .payment_box,
#payment .payment_box.payment_method_mxmerchant_gateway,
.woocommerce-checkout #payment .payment_box,
.woocommerce-checkout .payment_box,
.payment_method_mxmerchant_gateway .payment_box,
#wc-mxmerchant_gateway-cc-form,
.wc-credit-card-form,
.wc-payment-form {
    background: rgba(30, 30, 30, 0.95) !important;
    background-color: rgba(30, 30, 30, 0.95) !important;
    border: 1px solid rgba(255,255,255,0.1) !important;
    border-radius: 8px !important;
}

#payment .payment_box::before {
    display: none !important;
}

#payment .payment_box p,
#payment .payment_box label,
.payment_box .powered_by_text {
    color: #fff !important;
}

.powered_by_text {
    color: rgba(255,255,255,0.5) !important;
}

/* ===========================================
   MY ACCOUNT PAGE - Dark Theme Fix
   Fix white text on white background
   =========================================== */

/* Account page text colors */
.woocommerce-account .woocommerce,
.woocommerce-account .woocommerce p,
.woocommerce-account .woocommerce a,
.woocommerce-account .woocommerce label,
.woocommerce-account .woocommerce span,
.woocommerce-account .woocommerce td,
.woocommerce-account .woocommerce th,
.woocommerce-account .woocommerce h3,
.woocommerce-account .jet-woo-builder,
.woocommerce-account .jet-woo-builder p,
.woocommerce-account .jet-woo-builder a,
.woocommerce-account .elementor-jet-myaccount-dashboard p,
.woocommerce-account .elementor-jet-myaccount-order,
.woocommerce-account .elementor-jet-myaccount-addresses,
.woocommerce-account .elementor-jet-myaccount-addresses p,
.woocommerce-account .elementor-jet-myaccount-addresses address,
.woocommerce-account .elementor-jet-myaccount-account-details {
    color: #fff !important;
}

/* Jet Tabs - Force dark background on everything */
.woocommerce-account .jet-tabs,
.woocommerce-account .jet-tabs *,
.woocommerce-account .elementor-widget-jet-tabs,
.woocommerce-account .elementor-widget-jet-tabs * {
    background-color: transparent !important;
}

.woocommerce-account .jet-tabs {
    background: #0a0a0a !important;
    background-color: #0a0a0a !important;
}

/* Jet Tabs - Tab controls wrapper - FORCE DARK */
.woocommerce-account .jet-tabs__control-wrapper,
.woocommerce-account .jet-tabs .jet-tabs__control-wrapper,
.jet-tabs__control-wrapper[role="tablist"] {
    background: #141414 !important;
    background-color: #141414 !important;
    border: 1px solid #2a2a2a !important;
}

/* Jet Tabs - Individual tab controls */
.woocommerce-account .jet-tabs__control,
.woocommerce-account .jet-tabs__control-inner,
.jet-tabs__control[role="tab"],
.jet-tabs__control-inner {
    background: #141414 !important;
    background-color: #141414 !important;
    color: #b0b0b0 !important;
    border-bottom: 1px solid #2a2a2a !important;
}

.woocommerce-account .jet-tabs__control .jet-tabs__label-text,
.jet-tabs__label-text {
    color: #b0b0b0 !important;
}

.woocommerce-account .jet-tabs__control .jet-tabs__label-icon,
.jet-tabs__label-icon {
    color: #808080 !important;
}

/* Active tab */
.woocommerce-account .jet-tabs__control.active-tab,
.woocommerce-account .jet-tabs__control.active-tab .jet-tabs__control-inner,
.jet-tabs__control.active-tab,
.jet-tabs__control.active-tab .jet-tabs__control-inner {
    background: #1a1a1a !important;
    background-color: #1a1a1a !important;
    border-left: 3px solid #fcb316 !important;
}

.woocommerce-account .jet-tabs__control.active-tab .jet-tabs__label-text,
.jet-tabs__control.active-tab .jet-tabs__label-text {
    color: #fcb316 !important;
}

.woocommerce-account .jet-tabs__control.active-tab .jet-tabs__label-icon,
.jet-tabs__control.active-tab .jet-tabs__label-icon {
    color: #fcb316 !important;
}

/* Hover state */
.woocommerce-account .jet-tabs__control:hover,
.woocommerce-account .jet-tabs__control:hover .jet-tabs__control-inner {
    background: #1a1a1a !important;
    background-color: #1a1a1a !important;
}

.woocommerce-account .jet-tabs__control:hover .jet-tabs__label-text {
    color: #fff !important;
}

.woocommerce-account .jet-tabs__control:hover .jet-tabs__label-icon {
    color: #fcb316 !important;
}

/* Jet Tabs - Content area */
.woocommerce-account .jet-tabs__content-wrapper,
.jet-tabs__content-wrapper {
    background: #0a0a0a !important;
    background-color: #0a0a0a !important;
    border: 1px solid #2a2a2a !important;
    border-left: none !important;
}

.woocommerce-account .jet-tabs__content,
.jet-tabs__content {
    background: #0a0a0a !important;
    background-color: #0a0a0a !important;
}

/* ===========================================
   MY ACCOUNT PAGE - MOBILE RESPONSIVE
   =========================================== */

@media (max-width: 767px) {
    /* Stack tabs vertically on mobile */
    .woocommerce-account .jet-tabs {
        flex-direction: column !important;
    }

    .woocommerce-account .jet-tabs.jet-tabs-position-left {
        display: block !important;
    }

    .woocommerce-account .jet-tabs__control-wrapper {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: wrap !important;
        width: 100% !important;
        border: 1px solid #2a2a2a !important;
        margin-bottom: 15px !important;
    }

    .woocommerce-account .jet-tabs__control {
        flex: 1 1 50% !important;
        min-width: 50% !important;
        text-align: center !important;
        padding: 12px 8px !important;
        border-bottom: 1px solid #2a2a2a !important;
        border-right: 1px solid #2a2a2a !important;
        box-sizing: border-box !important;
    }

    .woocommerce-account .jet-tabs__control:nth-child(2n) {
        border-right: none !important;
    }

    .woocommerce-account .jet-tabs__control-inner {
        flex-direction: column !important;
        gap: 5px !important;
    }

    .woocommerce-account .jet-tabs__label-text {
        font-size: 11px !important;
    }

    .woocommerce-account .jet-tabs__content-wrapper {
        width: 100% !important;
        border: 1px solid #2a2a2a !important;
        border-left: 1px solid #2a2a2a !important;
    }

    /* Orders table responsive */
    .woocommerce-account .woocommerce-orders-table {
        display: block !important;
        overflow-x: auto !important;
        font-size: 12px !important;
    }

    .woocommerce-account .woocommerce-orders-table th,
    .woocommerce-account .woocommerce-orders-table td {
        padding: 8px 5px !important;
        font-size: 11px !important;
    }

    /* Address columns stack on mobile */
    .woocommerce-account .u-columns.col2-set {
        display: block !important;
    }

    .woocommerce-account .u-columns .u-column1,
    .woocommerce-account .u-columns .u-column2 {
        width: 100% !important;
        float: none !important;
        margin-bottom: 20px !important;
    }

    /* Form fields full width */
    .woocommerce-account .woocommerce-form-row {
        width: 100% !important;
        float: none !important;
    }

    .woocommerce-account .form-row-first,
    .woocommerce-account .form-row-last {
        width: 100% !important;
    }

    /* Content padding */
    .woocommerce-account .jet-tabs__content {
        padding: 15px !important;
    }
}

/* Orders table */
.woocommerce-account .woocommerce-orders-table,
.woocommerce-account .shop_table {
    background: rgba(20, 20, 20, 0.8) !important;
    border: 1px solid #2a2a2a !important;
}

.woocommerce-account .woocommerce-orders-table th,
.woocommerce-account .woocommerce-orders-table td,
.woocommerce-account .shop_table th,
.woocommerce-account .shop_table td {
    color: #fff !important;
    border-color: #2a2a2a !important;
}

.woocommerce-account .woocommerce-orders-table thead {
    background: rgba(30, 30, 30, 0.9) !important;
}

.woocommerce-account .woocommerce-orders-table tbody tr:nth-child(even) {
    background: rgba(40, 40, 40, 0.5) !important;
}

/* Order status colors */
.woocommerce-account .woocommerce-orders-table__cell-order-status {
    text-transform: capitalize;
}

/* Buttons */
.woocommerce-account .woocommerce-button,
.woocommerce-account .button {
    background: #fcb316 !important;
    color: #000 !important;
    border: none !important;
}

.woocommerce-account .woocommerce-button:hover,
.woocommerce-account .button:hover {
    background: #e5a214 !important;
}

/* Links */
.woocommerce-account .woocommerce a:not(.button) {
    color: #fcb316 !important;
}

.woocommerce-account .woocommerce a:not(.button):hover {
    color: #fff !important;
}

/* Address section */
.woocommerce-account .woocommerce-Address-title h3 {
    color: #fcb316 !important;
}

.woocommerce-account .woocommerce-Address address {
    color: #b0b0b0 !important;
}

/* Form inputs */
.woocommerce-account .woocommerce input[type="text"],
.woocommerce-account .woocommerce input[type="email"],
.woocommerce-account .woocommerce input[type="password"],
.woocommerce-account .woocommerce textarea,
.woocommerce-account .woocommerce select {
    background: rgba(255, 255, 255, 0.1) !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    color: #fff !important;
    border-radius: 4px !important;
    padding: 10px !important;
}

.woocommerce-account .woocommerce input:focus,
.woocommerce-account .woocommerce textarea:focus {
    border-color: #fcb316 !important;
    outline: none !important;
}

/* Form labels */
.woocommerce-account .woocommerce label {
    color: #fff !important;
}

.woocommerce-account .woocommerce .required {
    color: #fcb316 !important;
}

/* Fieldset legend */
.woocommerce-account .woocommerce fieldset legend {
    color: #fcb316 !important;
    font-weight: 600 !important;
}

/* Password change hint text */
.woocommerce-account .woocommerce em {
    color: #808080 !important;
}

/* Show password button */
.woocommerce-account .show-password-input {
    color: #b0b0b0 !important;
}

/* ===========================================
   PRODUCT VARIATION SELECTORS
   McLean tactical styling for color/size swatches
   =========================================== */

/* Base styling for all variation items - high specificity to override plugin */
.woo-variation-swatches .variable-items-wrapper .variable-item,
.woo-variation-swatches .variable-items-wrapper .variable-item.button-variable-item,
body .woo-variation-swatches .variable-items-wrapper .variable-item,
body .variable-items-wrapper .variable-item.button-variable-item,
ul.variable-items-wrapper li.variable-item,
ul.variable-items-wrapper li.button-variable-item {
    padding: 12px 20px !important;
    background: #111111 !important;
    background-color: #111111 !important;
    border: 2px solid #2a2a2a !important;
    color: #ffffff !important;
    font-family: 'Montserrat', sans-serif !important;
    font-size: 0.8rem !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    border-radius: 0 !important;
    margin: 4px !important;
    width: auto !important;
    height: auto !important;
    min-width: unset !important;
    line-height: 1 !important;
}

/* Inner span text */
.woo-variation-swatches .variable-items-wrapper .variable-item .variable-item-span,
.woo-variation-swatches .variable-items-wrapper .variable-item .variable-item-span-button,
.woo-variation-swatches .variable-item-contents .variable-item-span,
body .variable-item .variable-item-contents .variable-item-span-button {
    color: #ffffff !important;
    font-family: 'Montserrat', sans-serif !important;
    font-size: 0.8rem !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
}

/* Hover state */
.woo-variation-swatches .variable-items-wrapper .variable-item:hover,
.woo-variation-swatches .variable-items-wrapper .variable-item.button-variable-item:hover,
body .variable-items-wrapper .variable-item:hover,
ul.variable-items-wrapper li.variable-item:hover {
    border-color: #fcb316 !important;
    color: #fcb316 !important;
    background: #111111 !important;
    background-color: #111111 !important;
}

.woo-variation-swatches .variable-items-wrapper .variable-item:hover .variable-item-span,
.woo-variation-swatches .variable-items-wrapper .variable-item:hover .variable-item-span-button,
body .variable-item:hover .variable-item-contents .variable-item-span-button {
    color: #fcb316 !important;
}

/* Selected/Active state */
.woo-variation-swatches .variable-items-wrapper .variable-item.selected,
.woo-variation-swatches .variable-items-wrapper .variable-item[aria-checked="true"],
.woo-variation-swatches .variable-items-wrapper .variable-item.button-variable-item.selected,
.woo-variation-swatches .variable-items-wrapper .variable-item.button-variable-item[aria-checked="true"],
body .variable-items-wrapper .variable-item.selected,
body .variable-items-wrapper .variable-item[aria-checked="true"],
ul.variable-items-wrapper li.variable-item.selected,
ul.variable-items-wrapper li.variable-item[aria-checked="true"] {
    border-color: #fcb316 !important;
    color: #fcb316 !important;
    background: #111111 !important;
    background-color: #111111 !important;
}

.woo-variation-swatches .variable-items-wrapper .variable-item.selected .variable-item-span,
.woo-variation-swatches .variable-items-wrapper .variable-item.selected .variable-item-span-button,
.woo-variation-swatches .variable-items-wrapper .variable-item[aria-checked="true"] .variable-item-span,
.woo-variation-swatches .variable-items-wrapper .variable-item[aria-checked="true"] .variable-item-span-button,
body .variable-item.selected .variable-item-contents .variable-item-span-button,
body .variable-item[aria-checked="true"] .variable-item-contents .variable-item-span-button {
    color: #fcb316 !important;
}

/* Remove any default box shadows or outlines */
.woo-variation-swatches .variable-items-wrapper .variable-item:focus,
body .variable-items-wrapper .variable-item:focus {
    outline: none !important;
    box-shadow: none !important;
}

/* Out of stock styling */
.woo-variation-swatches .variable-items-wrapper .variable-item.out-of-stock,
.woo-variation-swatches .variable-items-wrapper .variable-item.disabled,
body .variable-items-wrapper .variable-item.out-of-stock,
body .variable-items-wrapper .variable-item.disabled {
    opacity: 0.4 !important;
    cursor: not-allowed !important;
}

/* Variation label styling */
.woo-variation-swatches .woo-variation-swatches-variable-item-wrapper label,
.woo-variation-swatches .variations .label label,
.variations .label label,
.variations th.label label,
body .variations td.label label {
    color: #ffffff !important;
    font-family: 'Montserrat', sans-serif !important;
    font-size: 0.85rem !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
    margin-bottom: 10px !important;
}

/* Mobile responsive */
@media (max-width: 767px) {
    .woo-variation-swatches .variable-items-wrapper .variable-item,
    .woo-variation-swatches .variable-items-wrapper .variable-item.button-variable-item,
    body .variable-items-wrapper .variable-item,
    ul.variable-items-wrapper li.variable-item {
        padding: 10px 14px !important;
        font-size: 0.7rem !important;
        margin: 3px !important;
    }

    .woo-variation-swatches .variable-items-wrapper .variable-item .variable-item-span,
    .woo-variation-swatches .variable-items-wrapper .variable-item .variable-item-span-button,
    body .variable-item .variable-item-contents .variable-item-span-button {
        font-size: 0.7rem !important;
    }
}
