/**
 * Custom WooCommerce Styles - Clean & Modern
 *
 * @package AI_Theme_Builder
 */

/* ==========================
   CART & CHECKOUT FORMS
   ========================== */

/* Form Fields */
.woocommerce form .form-row {
    margin-bottom: 1.25rem;
}

.woocommerce form .form-row label {
    display: block;
    font-weight: 600;
    color: #6e5840;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

.woocommerce form .form-row label .required {
    color: #ef4444;
    margin-left: 0.25rem;
}

.woocommerce form .form-row input.input-text,
.woocommerce form .form-row textarea,
.woocommerce form .form-row select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #e5d9c8;
    border-radius: 0.5rem;
    font-size: 1rem;
    transition: all 0.2s;
    background-color: #ffffff;
}

.woocommerce form .form-row input.input-text:focus,
.woocommerce form .form-row textarea:focus,
.woocommerce form .form-row select:focus {
    outline: none;
    border-color: #c38743;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.woocommerce form .form-row-first,
.woocommerce form .form-row-last {
    width: 48%;
    float: left;
}

.woocommerce form .form-row-first {
    margin-right: 4%;
}

@media (max-width: 768px) {
    .woocommerce form .form-row-first,
    .woocommerce form .form-row-last {
        width: 100%;
        float: none;
        margin-right: 0;
    }
}

/* Hide default titles (we use our own) */
.woocommerce-checkout h3 {
    display: none;
}

/* Quantity Input - Default WooCommerce styles (will be overridden for product/cart pages) */
.woocommerce .quantity {
    display: inline-flex;
    align-items: center;
    border: 1px solid #e5d9c8;
    border-radius: 0.5rem;
    overflow: hidden;
}

.woocommerce .quantity input.qty {
    width: 60px;
    padding: 0.5rem;
    text-align: center;
    border: none;
    font-weight: 600;
}

.woocommerce .quantity input.qty:focus {
    outline: none;
}

/* Hide native number input spinners (arrows) */
.woocommerce .quantity input[type="number"]::-webkit-inner-spin-button,
.woocommerce .quantity input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.woocommerce .quantity input[type="number"] {
    -moz-appearance: textfield;
    appearance: textfield;
}

/* Product Page Quantity Controls with +/- Buttons - Connected Group Style */
.woocommerce .product .quantity {
    border: none !important;
    overflow: visible !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 !important;
    display: inline-block !important;
}

/* Force inline-flex container with no gaps */
.woocommerce .product .quantity > div {
    display: inline-flex !important;
    align-items: center !important;
    gap: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Hide native spinners */
.woocommerce .product .product-qty-input {
    -webkit-appearance: none !important;
    -moz-appearance: textfield !important;
    appearance: textfield !important;
    box-shadow: none !important;
    margin: 0 !important;
}

.woocommerce .product .product-qty-input::-webkit-inner-spin-button,
.woocommerce .product .product-qty-input::-webkit-outer-spin-button {
    -webkit-appearance: none !important;
    margin: 0 !important;
    display: none !important;
}

/* Decrease Button - Left side with rounded left corners only */
.product-qty-btn.product-qty-decrease {
    background-color: #ffffff !important;
    color: #6e5840 !important;
    cursor: pointer !important;
    user-select: none !important;
    flex-shrink: 0 !important;
    box-shadow: none !important;
    margin: 0 !important;
    padding: 0 0.625rem !important;
    border: 1px solid #d1d5db !important;
    border-radius: 0.375rem 0 0 0.375rem !important;
    width: auto !important;
    min-width: 2.5rem !important;
    height: 2.5rem !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.2s ease !important;
}

/* Input - Middle with all borders */
.woocommerce .product .product-qty-input {
    background-color: #ffffff !important;
    color: #1f2937 !important;
    text-align: center !important;
    font-weight: 700 !important;
    font-size: 1rem !important;
    width: 4rem !important;
    height: 2.5rem !important;
    margin: 0 0 0 -1px !important;
    padding: 0.5rem 0.75rem !important;
    border: 1px solid #d1d5db !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    display: inline-block !important;
}

/* Increase Button - Right side with rounded right corners only */
.product-qty-btn.product-qty-increase {
    background-color: #ffffff !important;
    color: #6e5840 !important;
    cursor: pointer !important;
    user-select: none !important;
    flex-shrink: 0 !important;
    box-shadow: none !important;
    margin: 0 0 0 -1px !important;
    padding: 0 0.625rem !important;
    border: 1px solid #d1d5db !important;
    border-radius: 0 0.375rem 0.375rem 0 !important;
    width: auto !important;
    min-width: 2.5rem !important;
    height: 2.5rem !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.2s ease !important;
}

/* Hover states */
.product-qty-btn:hover {
    background-color: #fef3e8 !important;
    color: #c38743 !important;
    border-color: #c38743 !important;
}

.woocommerce .product .product-qty-input:hover {
    border-color: #c38743 !important;
}

/* Focus state */
.woocommerce .product .product-qty-input:focus {
    outline: none !important;
    border-color: #c38743 !important;
    box-shadow: none !important;
}

/* Active state */
.product-qty-btn:active {
    transform: scale(0.98) !important;
}

/* Icons */
.product-qty-btn i {
    pointer-events: none !important;
    font-size: 0.875rem !important;
}

/* Mobile responsiveness for quantity inputs */
@media (max-width: 768px) {
    .woocommerce .product .product-qty-input {
        height: auto !important;
    }
}

/* ==========================
   CART PAGE QUANTITY CONTROLS - MATCH PRODUCT PAGE STYLE
   ========================== */

/* Cart page quantity controls - apply same styling as product page */
.woocommerce-cart .quantity {
    border: none !important;
    overflow: visible !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 !important;
    display: inline-block !important;
}

/* Force inline-flex container with no gaps */
.woocommerce-cart .quantity > div {
    display: inline-flex !important;
    align-items: center !important;
    gap: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Hide native spinners on cart page */
.woocommerce-cart .product-qty-input {
    -webkit-appearance: none !important;
    -moz-appearance: textfield !important;
    appearance: textfield !important;
    box-shadow: none !important;
    margin: 0 !important;
}

.woocommerce-cart .product-qty-input::-webkit-inner-spin-button,
.woocommerce-cart .product-qty-input::-webkit-outer-spin-button {
    -webkit-appearance: none !important;
    margin: 0 !important;
    display: none !important;
}

/* Decrease Button - Left side with rounded left corners only */
.woocommerce-cart .product-qty-btn.product-qty-decrease {
    background-color: #ffffff !important;
    color: #6e5840 !important;
    cursor: pointer !important;
    user-select: none !important;
    flex-shrink: 0 !important;
    box-shadow: none !important;
    margin: 0 !important;
    padding: 0 0.625rem !important;
    border: 1px solid #d1d5db !important;
    border-radius: 0.375rem 0 0 0.375rem !important;
    width: auto !important;
    min-width: 2.5rem !important;
    height: 2.5rem !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.2s ease !important;
}

/* Input - Middle with all borders */
.woocommerce-cart .product-qty-input {
    background-color: #ffffff !important;
    color: #1f2937 !important;
    text-align: center !important;
    font-weight: 700 !important;
    font-size: 1rem !important;
    width: 4rem !important;
    height: 2.5rem !important;
    margin: 0 0 0 -1px !important;
    padding: 0.5rem 0.75rem !important;
    border: 1px solid #d1d5db !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    display: inline-block !important;
}

/* Increase Button - Right side with rounded right corners only */
.woocommerce-cart .product-qty-btn.product-qty-increase {
    background-color: #ffffff !important;
    color: #6e5840 !important;
    cursor: pointer !important;
    user-select: none !important;
    flex-shrink: 0 !important;
    box-shadow: none !important;
    margin: 0 0 0 -1px !important;
    padding: 0 0.625rem !important;
    border: 1px solid #d1d5db !important;
    border-radius: 0 0.375rem 0.375rem 0 !important;
    width: auto !important;
    min-width: 2.5rem !important;
    height: 2.5rem !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.2s ease !important;
}

/* Hover states */
.woocommerce-cart .product-qty-btn:hover {
    background-color: #fef3e8 !important;
    color: #c38743 !important;
    border-color: #c38743 !important;
}

.woocommerce-cart .product-qty-input:hover {
    border-color: #c38743 !important;
}

/* Focus state */
.woocommerce-cart .product-qty-input:focus {
    outline: none !important;
    border-color: #c38743 !important;
    box-shadow: none !important;
}

/* Active state */
.woocommerce-cart .product-qty-btn:active {
    transform: scale(0.98) !important;
}

/* Icons */
.woocommerce-cart .product-qty-btn i {
    pointer-events: none !important;
    font-size: 0.875rem !important;
}

/* Center quantity controls in cart table */
.woocommerce-cart table td .quantity {
    display: inline-flex !important;
    justify-content: center !important;
}

/* Hide spinners on custom cart shortcode quantity inputs */
.quantity-input::-webkit-inner-spin-button,
.quantity-input::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.quantity-input {
    -moz-appearance: textfield;
    appearance: textfield;
}

/* Subtle updating indicator - doesn't block UI */
.cart-item-row.updating {
    position: relative;
}

.cart-item-row.updating::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(195, 135, 67, 0.05);
    pointer-events: none;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* ==========================
   ADD TO CART BUTTONS LAYOUT
   ========================== */

/* Make quantity controls and add to cart button appear on same line */
/* Only apply flex layout when plugin wants buttons visible (has .show class or no class) */
.woocommerce .product .add_to_cart_buttons.show,
.woocommerce .product .add_to_cart_buttons:not([class*="show"]) {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: nowrap;
}

/* Quantity wrapper should not shrink */
.woocommerce .product .add_to_cart_buttons .quantity {
    flex-shrink: 0;
}

/* Match add to cart button height to quantity controls - allow shrinking */
.woocommerce .product .add_to_cart_buttons .single_add_to_cart_button {
    height: 2.5rem;
    padding: 0 1.5rem;
    margin: 0;
    font-size: 1rem !important;
    line-height: 1 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    white-space: nowrap !important;
    flex-shrink: 1 !important;
    flex-grow: 1 !important;
    min-width: 0 !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

/* ==========================
   HERO ADD TO CART SECTION
   ========================== */

/* Wrapper for hero controls - no background, just centering */
.hero-add-to-cart-wrapper {
    display: flex !important;
    justify-content: center !important;
    width: 100% !important;
    overflow: visible !important;
}

/* Hero controls container - standalone, no wrapper background */
section .hero-add-to-cart-controls.add_to_cart_buttons {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: nowrap;
    background: none !important;
    padding: 0 0 0 2px !important;
    border: none !important;
    box-shadow: none !important;
    overflow: visible !important;
}

/* Hero quantity wrapper should not shrink */
section .hero-add-to-cart-controls .quantity {
    flex-shrink: 0 !important;
    box-shadow: none !important;
    -webkit-box-shadow: none !important;
    -moz-box-shadow: none !important;
    outline: none !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
    background: transparent !important;
    border-radius: 0 !important;
    opacity: 1 !important;
    isolation: isolate !important;
    overflow: visible !important;
}

/* Hero quantity buttons - styled for hero section */
section .hero-add-to-cart-controls .product-qty-btn.product-qty-decrease {
    background-color: rgb(255, 255, 255) !important;
    color: #6e5840 !important;
    opacity: 1 !important;
    mix-blend-mode: normal !important;
    cursor: pointer !important;
    user-select: none !important;
    flex-shrink: 0 !important;
    box-shadow: none !important;
    -webkit-box-shadow: none !important;
    -moz-box-shadow: none !important;
    outline: none !important;
    text-decoration: none !important;
    padding: 0 0.625rem !important;
    border: 1px solid #d1d5db !important;
    border-top: 1px solid #d1d5db !important;
    border-bottom: 1px solid #d1d5db !important;
    border-left: 1px solid #d1d5db !important;
    border-right: 1px solid #d1d5db !important;
    border-radius: 0.375rem 0 0 0.375rem !important;
    -webkit-border-radius: 0.375rem 0 0 0.375rem !important;
    -moz-border-radius: 0.375rem 0 0 0.375rem !important;
    width: auto !important;
    min-width: 2.5rem !important;
    height: 2.5rem !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.2s ease !important;
    transform: none !important;
    -webkit-transform: none !important;
    -moz-transform: none !important;
    filter: none !important;
    -webkit-filter: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

section .hero-add-to-cart-controls .product-qty-btn.product-qty-increase {
    background-color: rgb(255, 255, 255) !important;
    color: #6e5840 !important;
    opacity: 1 !important;
    mix-blend-mode: normal !important;
    cursor: pointer !important;
    user-select: none !important;
    flex-shrink: 0 !important;
    box-shadow: none !important;
    -webkit-box-shadow: none !important;
    -moz-box-shadow: none !important;
    outline: none !important;
    text-decoration: none !important;
    margin: 0 0 0 -1px !important;
    padding: 0 0.625rem !important;
    border: 1px solid #d1d5db !important;
    border-top: 1px solid #d1d5db !important;
    border-bottom: 1px solid #d1d5db !important;
    border-left: 1px solid #d1d5db !important;
    border-right: 1px solid #d1d5db !important;
    border-radius: 0 0.375rem 0.375rem 0 !important;
    -webkit-border-radius: 0 0.375rem 0.375rem 0 !important;
    -moz-border-radius: 0 0.375rem 0.375rem 0 !important;
    width: auto !important;
    min-width: 2.5rem !important;
    height: 2.5rem !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.2s ease !important;
    transform: none !important;
    -webkit-transform: none !important;
    -moz-transform: none !important;
    filter: none !important;
    -webkit-filter: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

section .hero-add-to-cart-controls .product-qty-btn:hover {
    background-color: #fef3e8 !important;
    border-color: #c38743 !important;
    color: #c38743 !important;
}

section .hero-add-to-cart-controls .product-qty-btn i {
    pointer-events: none !important;
    font-size: 0.875rem !important;
}

/* Hero quantity input */
section .hero-add-to-cart-controls .product-qty-input {
    background-color: rgb(255, 255, 255) !important;
    color: #1f2937 !important;
    opacity: 1 !important;
    mix-blend-mode: normal !important;
    text-align: center !important;
    font-weight: 700 !important;
    font-size: 1rem !important;
    width: 4rem !important;
    height: 2.5rem !important;
    margin: 0 0 0 -1px !important;
    padding: 0.5rem 0.75rem !important;
    border: 1px solid #d1d5db !important;
    border-top: 1px solid #d1d5db !important;
    border-bottom: 1px solid #d1d5db !important;
    border-left: 1px solid #d1d5db !important;
    border-right: none !important;
    border-radius: 0 !important;
    -webkit-border-radius: 0 !important;
    -moz-border-radius: 0 !important;
    box-shadow: none !important;
    -webkit-box-shadow: none !important;
    -moz-box-shadow: none !important;
    outline: none !important;
    text-decoration: none !important;
    display: inline-block !important;
    transform: none !important;
    -webkit-transform: none !important;
    -moz-transform: none !important;
    filter: none !important;
    -webkit-filter: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

section .hero-add-to-cart-controls .product-qty-input:hover,
section .hero-add-to-cart-controls .product-qty-input:focus {
    border-color: #c38743 !important;
    border-top-color: #c38743 !important;
    border-bottom-color: #c38743 !important;
    border-left: none !important;
    border-right: none !important;
    outline: none !important;
    box-shadow: none !important;
    -webkit-box-shadow: none !important;
    -moz-box-shadow: none !important;
}

/* Mobile responsiveness for hero add to cart input */
@media (max-width: 768px) {
    section .hero-add-to-cart-controls .product-qty-input {
        height: auto !important;
    }
}

/* Remove any box-shadow or outline from the inner wrapper div */
section .hero-add-to-cart-controls .quantity > div {
    box-shadow: none !important;
    -webkit-box-shadow: none !important;
    -moz-box-shadow: none !important;
    outline: none !important;
    border: none !important;
    transform: none !important;
    -webkit-transform: none !important;
    -moz-transform: none !important;
    isolation: isolate !important;
    will-change: auto !important;
    backface-visibility: hidden !important;
    -webkit-backface-visibility: hidden !important;
    background: transparent !important;
    border-radius: 0 !important;
    opacity: 1 !important;
    display: flex !important;
    overflow: visible !important;
}

/* Extra specific rule to override any other border-radius */
section .hero-add-to-cart-controls input.product-qty-input,
section .hero-add-to-cart-controls input.product-qty-input.input-text,
section .hero-add-to-cart-controls input.product-qty-input.qty {
    border-radius: 0 !important;
    -webkit-border-radius: 0 !important;
    -moz-border-radius: 0 !important;
    border-top-left-radius: 0 !important;
    border-top-right-radius: 0 !important;
    border-bottom-left-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
}

/* Hero Add to basket button */
section .hero-add-to-cart-controls .single_add_to_cart_button {
    height: 2.5rem !important;
    padding: 0 1.5rem !important;
    margin: 0 !important;
    font-size: 1rem !important;
    line-height: 1 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    white-space: nowrap !important;
    flex-shrink: 1 !important;
    flex-grow: 1 !important;
    min-width: 0 !important;
    background-color: #c38743 !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 0.375rem !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    box-shadow: 0 2px 8px rgba(195, 135, 67, 0.3) !important;
}

section .hero-add-to-cart-controls .single_add_to_cart_button:hover {
    background-color: #a86f37 !important;
    box-shadow: 0 4px 12px rgba(195, 135, 67, 0.4) !important;
    transform: translateY(-1px) !important;
}

/* Mobile responsive */
@media (max-width: 640px) {
    section .hero-add-to-cart-controls.add_to_cart_buttons {
        width: 100%;
        max-width: 100%;
    }

    section .hero-add-to-cart-controls .product-qty-btn.product-qty-decrease,
    section .hero-add-to-cart-controls .product-qty-btn.product-qty-increase {
        height: 2.75rem;
        min-width: 2.75rem;
    }

    section .hero-add-to-cart-controls .product-qty-input {
        height: 2.75rem;
    }

    section .hero-add-to-cart-controls .single_add_to_cart_button {
        height: 2.75rem;
        font-size: 0.875rem;
        padding: 0 1rem;
    }
}

/* ==========================
   PAYMENT METHODS
   ========================== */

.woocommerce-checkout-payment {
    background-color: #faf8f5;
    border-radius: 0.5rem;
    padding: 1.5rem;
}

.woocommerce-checkout-payment ul.payment_methods {
    list-style: none;
    padding: 0;
    margin: 0 0 1.5rem;
}

.woocommerce-checkout-payment ul.payment_methods li {
    margin-bottom: 0.75rem;
}

.woocommerce-checkout-payment ul.payment_methods li input[type="radio"] {
    margin-right: 0.75rem;
}

.woocommerce-checkout-payment ul.payment_methods li label {
    display: inline-flex;
    align-items: center;
    font-weight: 600;
    cursor: pointer;
    padding: 1rem;
    background: white;
    border-radius: 0.5rem;
    border: 2px solid #e5e7eb;
    width: 100%;
    transition: all 0.2s;
}

/* Hide Stripe payment method icons/images that may cause duplicate text */
.woocommerce-checkout-payment ul.payment_methods li label img {
    display: none;
}

/* Fix duplicate payment method titles - some gateways add the title twice */
.woocommerce-checkout-payment ul.payment_methods li label .wc_payment_method_title,
.woocommerce-checkout-payment ul.payment_methods li label > span:first-of-type {
    /* If the label already contains text nodes, hide any nested title spans */
    /* This prevents "Credit / Debit CardCredit / Debit Card" duplication */
}

/* Ensure payment method labels show text correctly */
.woocommerce-checkout-payment ul.payment_methods li label {
    gap: 0.5rem;
}

.woocommerce-checkout-payment ul.payment_methods li label:hover {
    border-color: #c38743;
}

.woocommerce-checkout-payment ul.payment_methods li input[type="radio"]:checked + label {
    border-color: #c38743;
    background-color: #fef9f3;
}

.woocommerce-checkout-payment .payment_box {
    background-color: transparent;
    padding: 1rem;
    margin: 0.5rem 0 0;
    border-radius: 0.5rem;
    font-size: 0.875rem;
}

/* Hide Stripe "Save payment method" checkbox - Stripe handles this automatically */
.wc-stripe-save-source,
.woocommerce-SavedPaymentMethods-saveNew,
.wc-stripe-save-payment-method,
.payment_box .woocommerce-SavedPaymentMethods-saveNew,
.payment_box .woocommerce-SavedPaymentMethods label[for*="save"] {
    display: none !important;
}

/* ==========================
   STRIPE SAVED PAYMENT METHODS - CARD STYLE BUTTONS
   (Checkout wizard has its own specific styling in checkout-wizard.css)
   ========================== */

.woocommerce-SavedPaymentMethods {
    list-style: none;
    padding: 0;
    margin: 0 0 1rem;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.woocommerce-SavedPaymentMethods-token,
.woocommerce-SavedPaymentMethods-new {
    position: relative;
    margin: 0;
}

.woocommerce-SavedPaymentMethods-token label,
.woocommerce-SavedPaymentMethods-new label {
    display: block;
    padding: 16px 20px 16px 50px;
    background: #f9f7f4; /* forest-50 equivalent */
    border: 2px solid #e5ddd4; /* forest-200 equivalent */
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Barlow', sans-serif;
    font-size: 16px;
    font-weight: 500;
    color: #5a4a3a; /* forest-700 equivalent */
    position: relative;
}

.woocommerce-SavedPaymentMethods-token label:hover,
.woocommerce-SavedPaymentMethods-new label:hover {
    background: #ffffff;
    border-color: #c38743; /* autumn-500 */
    box-shadow: 0 2px 8px rgba(195, 135, 67, 0.15);
    transform: translateY(-1px);
}

/* Style the radio button */
.woocommerce-SavedPaymentMethods-tokenInput {
    position: absolute !important;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px !important;
    height: 20px !important;
    margin: 0 !important;
    cursor: pointer;
    accent-color: #c38743; /* autumn-500 */
}

/* Selected state */
.woocommerce-SavedPaymentMethods-tokenInput:checked + label {
    background: #fff9f2; /* autumn-50 equivalent */
    border-color: #c38743; /* autumn-500 */
    border-width: 2px;
    box-shadow: 0 0 0 3px rgba(195, 135, 67, 0.1);
    color: #7d5c32; /* autumn-800 equivalent */
}

/* Add an icon indicator for saved cards */
.woocommerce-SavedPaymentMethods-token label:before {
    content: '\f09d'; /* fa-credit-card */
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #c38743; /* autumn-500 */
    font-size: 18px;
    opacity: 0.7;
}

.woocommerce-SavedPaymentMethods-tokenInput:checked ~ label:before {
    opacity: 1;
}

/* Note: Plus icon for "new payment method" is handled by checkout-wizard.css
   to avoid duplicate icons. The checkout-wizard.css uses :after for the icon
   and :before for the checkmark badge when selected. */

/* Error message styling */
.stripe-source-errors {
    margin-top: 8px;
    padding: 8px 12px;
    background: #fee;
    border-left: 3px solid #c33;
    border-radius: 4px;
    font-size: 14px;
    color: #c33;
    display: none;
}

.stripe-source-errors:not(:empty) {
    display: block;
}

/* Responsive adjustments */
@media (max-width: 640px) {
    .woocommerce-SavedPaymentMethods-token label,
    .woocommerce-SavedPaymentMethods-new label {
        padding: 14px 16px 14px 45px;
        font-size: 14px;
    }

    .woocommerce-SavedPaymentMethods-tokenInput {
        left: 12px;
        width: 18px !important;
        height: 18px !important;
    }

    .woocommerce-SavedPaymentMethods-token label:before,
    .woocommerce-SavedPaymentMethods-new label:before {
        right: 12px;
        font-size: 16px;
    }
}

/* Place Order Button */
#place_order {
    width: 100%;
    background-color: #c38743;
    color: white;
    font-weight: 700;
    font-size: 1.125rem;
    padding: 1rem;
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: background-color 0.2s;
}

#place_order:hover {
    background-color: #a86f37;
}

/* Terms and Conditions */
.woocommerce-terms-and-conditions-wrapper {
    margin-bottom: 1.5rem;
}

.woocommerce-privacy-policy-text {
    margin-top: 1rem;
    padding: 1rem;
    background-color: #f3f4f6;
    border-radius: 0.5rem;
    font-size: 0.875rem;
}

/* ==========================
   PRODUCT GRID/LOOP
   ========================== */

.woocommerce ul.products {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 2rem;
    list-style: none;
    padding: 0;
    margin: 2rem 0;
}

.woocommerce ul.products li.product {
    background: white;
    border-radius: 0.75rem;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: all 0.3s;
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.woocommerce ul.products li.product:hover {
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.woocommerce ul.products li.product img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    display: block;
    margin: 0;
    padding: 0;
}

.woocommerce ul.products li.product .woocommerce-loop-product__title {
    font-size: 1.125rem;
    font-weight: 600;
    margin: 1rem;
    line-height: 1.4;
}

.woocommerce ul.products li.product .price {
    font-size: 1.25rem;
    font-weight: 700;
    color: #c38743;
    margin: auto 1rem 1rem;
}

.woocommerce ul.products li.product .price del {
    opacity: 0.6;
    font-size: 1rem;
    margin-right: 0.5rem;
}

.woocommerce ul.products li.product .price ins {
    text-decoration: none;
}

/* Add to Cart Button */
.woocommerce ul.products li.product .button {
    display: block;
    width: calc(100% - 2rem);
    margin: 0 1rem 1rem;
    padding: 0.75rem;
    background-color: #c38743;
    color: white !important;
    text-align: center;
    text-decoration: none;
    border-radius: 0.5rem;
    font-weight: 600;
    transition: background-color 0.2s;
    border: none;
    cursor: pointer;
}

.woocommerce ul.products li.product .button:hover {
    background-color: #a86f37;
}

.woocommerce ul.products li.product .added_to_cart {
    display: block;
    text-align: center;
    margin: 0 1rem 1rem;
    color: #059669;
    font-weight: 600;
    font-size: 0.875rem;
}

/* Sale Badge */
.woocommerce ul.products li.product .onsale {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background-color: #ef4444;
    color: white;
    padding: 0.375rem 0.75rem;
    border-radius: 0.375rem;
    font-weight: 700;
    font-size: 0.75rem;
    z-index: 1;
}

/* ==========================
   PRODUCT LOOP CARDS - SPECIFIC OVERRIDES
   ========================== */

/* Force product cards (article elements) to have no padding - for custom card layouts */
.woocommerce article.product,
.woocommerce article.type-product {
    padding: 0 !important;
    margin: 0 !important;
    max-width: 100% !important;
}

/* Remove padding from images in custom product cards */
.woocommerce article.product > a img,
.woocommerce article.product img {
    margin: 0 !important;
    padding: 0 !important;
}

/* Custom scrollbar styling for product card excerpts */
.woocommerce article.product .entry-summary::-webkit-scrollbar {
    width: 6px;
}

.woocommerce article.product .entry-summary::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.woocommerce article.product .entry-summary::-webkit-scrollbar-thumb {
    background: #c38743;
    border-radius: 3px;
}

.woocommerce article.product .entry-summary::-webkit-scrollbar-thumb:hover {
    background: #a86f37;
}

/* ==========================
   PRODUCT GALLERY (IMAGES & THUMBNAILS)
   ========================== */

/* Product Gallery Container */
.woocommerce-product-gallery {
    position: relative;
    margin-bottom: 2rem;
}

/* Main Product Image Wrapper */
.woocommerce-product-gallery__wrapper {
    margin-bottom: 1rem;
    position: relative;
}

.woocommerce-product-gallery__image {
    display: block;
    position: relative;
}

.woocommerce-product-gallery__image img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 0.75rem;
}

/* Product Gallery Thumbnails - Horizontal Layout */
.woocommerce-product-gallery ol.flex-control-thumbs {
    display: flex !important;
    flex-wrap: wrap;
    gap: 0.75rem;
    list-style: none;
    padding: 0;
    margin: 1rem 0 0 0;
}

.woocommerce-product-gallery ol.flex-control-thumbs li {
    flex: 0 0 auto;
    width: calc(25% - 0.5625rem);
    margin: 0;
    padding: 0;
    list-style: none;
}

.woocommerce-product-gallery ol.flex-control-thumbs li img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    opacity: 0.6;
    border: 2px solid transparent;
}

.woocommerce-product-gallery ol.flex-control-thumbs li img:hover {
    opacity: 1;
    border-color: #c38743;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(195, 135, 67, 0.3);
}

.woocommerce-product-gallery ol.flex-control-thumbs li img.flex-active {
    opacity: 1;
    border-color: #c38743;
    box-shadow: 0 4px 12px rgba(195, 135, 67, 0.3);
}

/* Zoom Icon on Main Image */
.woocommerce-product-gallery__trigger {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 3rem;
    height: 3rem;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: #6e5840;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
    text-decoration: none;
    border: 2px solid transparent;
}

.woocommerce-product-gallery__trigger:hover {
    background: #c38743;
    color: white;
    border-color: #c38743;
    transform: scale(1.1);
}

/* Responsive adjustments for gallery */
@media (max-width: 768px) {
    .woocommerce-product-gallery ol.flex-control-thumbs li {
        width: calc(33.333% - 0.5rem);
    }
}

@media (max-width: 480px) {
    .woocommerce-product-gallery ol.flex-control-thumbs li {
        width: calc(50% - 0.375rem);
    }

    .woocommerce-product-gallery__trigger {
        width: 2.5rem;
        height: 2.5rem;
        font-size: 1rem;
    }
}

/* ==========================
   SINGLE PRODUCT PAGE
   ========================== */

/* Only apply padding to single product page, not cards */
.woocommerce div.product,
.woocommerce-page div.product {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.woocommerce .product .product_title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.3;
}

.woocommerce .product .price {
    font-size: 1.875rem;
    font-weight: 700;
    color: #c38743;
    margin-bottom: 1.5rem;
}

.woocommerce .product .price del {
    opacity: 0.6;
    font-size: 1.5rem;
    margin-right: 0.75rem;
}

.woocommerce .product form.cart {
    margin-bottom: 2rem;
}

.woocommerce .product form.cart .button {
    background-color: #c38743;
    color: white;
    padding: 1rem 2rem;
    border-radius: 0.5rem;
    font-weight: 600;
    font-size: 1.125rem;
    border: none;
    cursor: pointer;
    transition: background-color 0.2s;
    margin-left: 1rem;
}

.woocommerce .product form.cart .button:hover {
    background-color: #a86f37;
}

.woocommerce .product .woocommerce-product-details__short-description {
    margin-bottom: 2rem;
    line-height: 1.7;
    color: #4b5563;
}

.woocommerce .product .product_meta {
    padding-top: 1.5rem;
    border-top: 1px solid #e5e7eb;
    font-size: 0.875rem;
    color: #6b7280;
}

/* Product Tabs */
.woocommerce .product .woocommerce-tabs {
    margin-top: 3rem;
}

.woocommerce .product .woocommerce-tabs ul.tabs {
    list-style: none;
    padding: 0;
    margin: 0 0 2rem;
    border-bottom: 2px solid #e5e7eb;
    display: flex;
    gap: 2rem;
}

.woocommerce .product .woocommerce-tabs ul.tabs li {
    margin: 0;
}

.woocommerce .product .woocommerce-tabs ul.tabs li a {
    display: block;
    padding: 1rem 0;
    font-weight: 600;
    color: #6b7280;
    text-decoration: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all 0.2s;
}

.woocommerce .product .woocommerce-tabs ul.tabs li.active a {
    color: #c38743;
    border-bottom-color: #c38743;
}

/* ==========================
   MESSAGES & NOTICES
   ========================== */

.woocommerce-message,
.woocommerce-info,
.woocommerce-error {
    padding: 1rem 1.5rem;
    margin-bottom: 1.5rem;
    border-radius: 0.5rem;
    border-left: 4px solid;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.woocommerce-message {
    background-color: #d1fae5;
    color: #065f46;
    border-left-color: #059669;
}

.woocommerce-info {
    background-color: #fdf2e5;
    color: #1e40af;
    border-left-color: #c38743;
}

.woocommerce-error {
    background-color: #fee2e2;
    color: #991b1b;
    border-left-color: #ef4444;
}

.woocommerce-message::before,
.woocommerce-info::before,
.woocommerce-error::before {
    display: none;
}

.woocommerce-message .button,
.woocommerce-info .button {
    background-color: #059669;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.875rem;
    margin-left: auto;
}

.woocommerce-message .button:hover {
    background-color: #047857;
}

/* ==========================
   BREADCRUMBS
   ========================== */

.woocommerce-breadcrumb {
    padding: 1rem 0;
    font-size: 0.875rem;
    color: #6b7280;
}

.woocommerce-breadcrumb a {
    color: #c38743;
    text-decoration: none;
}

.woocommerce-breadcrumb a:hover {
    text-decoration: underline;
}

/* ==========================
   ACCOUNT PAGES - MODERN CLEAN DESIGN
   ========================== */

/* Account Page - Content Area Width Restriction */
.woocommerce-account .content-area {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

/* Account Page Title */
.woocommerce-account .page-title {
    font-family: 'Indie Flower', cursive;
    font-size: 2.5rem;
    color: #6e5840;
    margin-bottom: 2rem;
    text-align: center;
}

/* Two-Column Layout */
.woocommerce-account .woocommerce {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 2rem;
}

@media (max-width: 768px) {
    .woocommerce-account .woocommerce {
        grid-template-columns: 1fr;
    }
}

/* ==========================
   NAVIGATION SIDEBAR
   ========================== */

.woocommerce-account .woocommerce-MyAccount-navigation {
    background: linear-gradient(135deg, #fef3e8 0%, #faf8f5 100%);
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    border: 1px solid #e5d9c8;
    height: fit-content;
    position: sticky;
    top: 2rem;
}

.woocommerce-account .woocommerce-MyAccount-navigation ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.woocommerce-account .woocommerce-MyAccount-navigation ul li {
    margin-bottom: 0.5rem;
}

.woocommerce-account .woocommerce-MyAccount-navigation ul li:last-child {
    margin-bottom: 0;
}

.woocommerce-account .woocommerce-MyAccount-navigation ul li a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1.25rem;
    color: #6e5840;
    text-decoration: none;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
    font-family: 'Open Sans', sans-serif;
    font-weight: 500;
    font-size: 0.9375rem;
    position: relative;
}

.woocommerce-account .woocommerce-MyAccount-navigation ul li a::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 60%;
    background-color: #c38743;
    border-radius: 0 0.25rem 0.25rem 0;
    transition: width 0.3s ease;
}

.woocommerce-account .woocommerce-MyAccount-navigation ul li.is-active a,
.woocommerce-account .woocommerce-MyAccount-navigation ul li a:hover {
    background-color: rgba(195, 135, 67, 0.1);
    color: #c38743;
    font-weight: 600;
    transform: translateX(4px);
}

.woocommerce-account .woocommerce-MyAccount-navigation ul li.is-active a::before,
.woocommerce-account .woocommerce-MyAccount-navigation ul li a:hover::before {
    width: 4px;
}

/* Icon styling (add via JS or use Font Awesome) */
.woocommerce-account .woocommerce-MyAccount-navigation ul li a i {
    color: #c38743;
    font-size: 1.125rem;
    width: 20px;
    text-align: center;
}

/* ==========================
   CONTENT AREA
   ========================== */

.woocommerce-account .woocommerce-MyAccount-content {
    background: white;
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    border: 1px solid #e5d9c8;
}

/* Content Headings */
.woocommerce-account .woocommerce-MyAccount-content h2,
.woocommerce-account .woocommerce-MyAccount-content h3 {
    font-family: 'Indie Flower', cursive;
    color: #6e5840;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #e5d9c8;
}

.woocommerce-account .woocommerce-MyAccount-content h2 {
    font-size: 2rem;
}

.woocommerce-account .woocommerce-MyAccount-content h3 {
    font-size: 1.5rem;
}

.woocommerce-account .woocommerce-MyAccount-content p {
    color: #6e5840;
    line-height: 1.7;
    margin-bottom: 1rem;
}

/* ==========================
   DASHBOARD
   ========================== */

.woocommerce-account .woocommerce-MyAccount-content mark {
    background-color: #fef3e8;
    color: #c38743;
    padding: 0.125rem 0.375rem;
    border-radius: 0.25rem;
    font-weight: 600;
}

/* ==========================
   ORDERS TABLE
   ========================== */

.woocommerce-account .woocommerce-orders-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin-top: 1.5rem;
    overflow: hidden;
    border-radius: 0.75rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.woocommerce-account .woocommerce-orders-table thead {
    background: linear-gradient(135deg, #6e5840 0%, #5a4633 100%);
}

.woocommerce-account .woocommerce-orders-table thead th {
    padding: 1rem 1.25rem;
    text-align: left;
    font-family: 'Barlow', sans-serif;
    font-weight: 600;
    color: white;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.woocommerce-account .woocommerce-orders-table thead th:first-child {
    border-top-left-radius: 0.75rem;
}

.woocommerce-account .woocommerce-orders-table thead th:last-child {
    border-top-right-radius: 0.75rem;
}

.woocommerce-account .woocommerce-orders-table tbody tr {
    background-color: white;
    border-bottom: 1px solid #e5d9c8;
    transition: background-color 0.2s ease;
}

.woocommerce-account .woocommerce-orders-table tbody tr:hover {
    background-color: #fef3e8;
}

.woocommerce-account .woocommerce-orders-table tbody tr:last-child {
    border-bottom: none;
}

.woocommerce-account .woocommerce-orders-table tbody td {
    padding: 1.25rem;
    color: #6e5840;
    font-size: 0.9375rem;
}

/* Order Number */
.woocommerce-account .woocommerce-orders-table .woocommerce-orders-table__cell-order-number a {
    color: #c38743;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.2s ease;
}

.woocommerce-account .woocommerce-orders-table .woocommerce-orders-table__cell-order-number a:hover {
    color: #a86f37;
    text-decoration: underline;
}

/* Order Status */
.woocommerce-account .woocommerce-orders-table .woocommerce-orders-table__cell-order-status mark {
    display: inline-flex;
    align-items: center;
    padding: 0.375rem 0.75rem;
    border-radius: 0.375rem;
    font-size: 0.8125rem;
    font-weight: 600;
    font-family: 'Barlow', sans-serif;
    text-transform: capitalize;
}

.woocommerce-account .woocommerce-orders-table mark.status-completed {
    background-color: #d1fae5;
    color: #065f46;
}

.woocommerce-account .woocommerce-orders-table mark.status-processing {
    background-color: #fef3c7;
    color: #92400e;
}

.woocommerce-account .woocommerce-orders-table mark.status-on-hold {
    background-color: #fef3e8;
    color: #c38743;
}

.woocommerce-account .woocommerce-orders-table mark.status-pending {
    background-color: #e5e7eb;
    color: #4b5563;
}

.woocommerce-account .woocommerce-orders-table mark.status-cancelled,
.woocommerce-account .woocommerce-orders-table mark.status-refunded,
.woocommerce-account .woocommerce-orders-table mark.status-failed {
    background-color: #fee2e2;
    color: #991b1b;
}

/* Order Actions */
.woocommerce-account .woocommerce-orders-table__cell-order-actions {
    text-align: right;
}

.woocommerce-account .woocommerce-orders-table__cell-order-actions .button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background-color: #c38743;
    color: white !important;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 600;
    font-family: 'Barlow', sans-serif;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.woocommerce-account .woocommerce-orders-table__cell-order-actions .button:hover {
    background-color: #a86f37;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(195, 135, 67, 0.3);
}

/* Mobile Responsive Table */
@media (max-width: 768px) {
    .woocommerce-account .woocommerce-orders-table {
        border: 0;
        box-shadow: none;
    }

    .woocommerce-account .woocommerce-orders-table thead {
        display: none;
    }

    .woocommerce-account .woocommerce-orders-table tbody tr {
        display: block;
        margin-bottom: 1.5rem;
        border-radius: 0.75rem;
        border: 1px solid #e5d9c8;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    }

    .woocommerce-account .woocommerce-orders-table tbody td {
        display: flex;
        justify-content: space-between;
        padding: 0.75rem 1rem;
        border-bottom: 1px solid #e5d9c8;
    }

    .woocommerce-account .woocommerce-orders-table tbody td:last-child {
        border-bottom: none;
    }

    .woocommerce-account .woocommerce-orders-table tbody td::before {
        content: attr(data-title);
        font-weight: 600;
        color: #6e5840;
        font-family: 'Barlow', sans-serif;
        text-transform: uppercase;
        font-size: 0.75rem;
        letter-spacing: 0.05em;
    }

    .woocommerce-account .woocommerce-orders-table__cell-order-actions {
        text-align: left;
        display: block;
    }

    .woocommerce-account .woocommerce-orders-table__cell-order-actions .button {
        width: 100%;
        justify-content: center;
    }
}

/* ==========================
   ACCOUNT FORMS (EDIT ACCOUNT, ADDRESS)
   ========================== */

.woocommerce-account .woocommerce-MyAccount-content form.woocommerce-EditAccountForm,
.woocommerce-account .woocommerce-MyAccount-content form.edit-address,
.woocommerce-account .woocommerce-MyAccount-content form.edit-account {
    margin-top: 1.5rem;
}

.woocommerce-account .woocommerce-MyAccount-content form .form-row {
    margin-bottom: 1.5rem;
}

.woocommerce-account .woocommerce-MyAccount-content form .form-row label {
    display: block;
    font-weight: 600;
    color: #6e5840;
    margin-bottom: 0.5rem;
    font-size: 0.9375rem;
    font-family: 'Barlow', sans-serif;
}

.woocommerce-account .woocommerce-MyAccount-content form .form-row label .required {
    color: #ef4444;
    margin-left: 0.25rem;
}

.woocommerce-account .woocommerce-MyAccount-content form .form-row input.input-text,
.woocommerce-account .woocommerce-MyAccount-content form .form-row textarea,
.woocommerce-account .woocommerce-MyAccount-content form .form-row select {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid #e5d9c8;
    border-radius: 0.5rem;
    font-size: 1rem;
    transition: all 0.3s ease;
    background-color: #ffffff;
    color: #6e5840;
    font-family: 'Open Sans', sans-serif;
}

.woocommerce-account .woocommerce-MyAccount-content form .form-row input.input-text:focus,
.woocommerce-account .woocommerce-MyAccount-content form .form-row textarea:focus,
.woocommerce-account .woocommerce-MyAccount-content form .form-row select:focus {
    outline: none;
    border-color: #c38743;
    box-shadow: 0 0 0 3px rgba(195, 135, 67, 0.1);
}

.woocommerce-account .woocommerce-MyAccount-content form .form-row textarea {
    min-height: 120px;
    resize: vertical;
}

/* Form Row Groups */
.woocommerce-account .woocommerce-MyAccount-content form .form-row-first,
.woocommerce-account .woocommerce-MyAccount-content form .form-row-last {
    width: 48%;
    float: left;
}

.woocommerce-account .woocommerce-MyAccount-content form .form-row-first {
    margin-right: 4%;
}

@media (max-width: 768px) {
    .woocommerce-account .woocommerce-MyAccount-content form .form-row-first,
    .woocommerce-account .woocommerce-MyAccount-content form .form-row-last {
        width: 100%;
        float: none;
        margin-right: 0;
    }
}

/* Submit Button - Only target forms within My Account content area */
.woocommerce-account .woocommerce-MyAccount-content form .button,
.woocommerce-account .woocommerce-MyAccount-content form button[type="submit"] {
    background-color: #c38743;
    color: white;
    padding: 0.875rem 2rem;
    border-radius: 0.5rem;
    font-weight: 600;
    font-size: 1rem;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Barlow', sans-serif;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.woocommerce-account .woocommerce-MyAccount-content form .button:hover,
.woocommerce-account .woocommerce-MyAccount-content form button[type="submit"]:hover {
    background-color: #a86f37;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(195, 135, 67, 0.4);
}

/* Clear float after form */
.woocommerce-account .woocommerce-MyAccount-content form::after {
    content: "";
    display: table;
    clear: both;
}

/* ==========================
   ADDRESSES
   ========================== */

.woocommerce-account .woocommerce-Addresses {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 1.5rem;
}

.woocommerce-account .woocommerce-Address {
    background: linear-gradient(135deg, #fef3e8 0%, #ffffff 100%);
    border: 2px solid #e5d9c8;
    border-radius: 1rem;
    padding: 1.5rem;
    transition: all 0.3s ease;
}

.woocommerce-account .woocommerce-Address:hover {
    border-color: #c38743;
    box-shadow: 0 4px 12px rgba(195, 135, 67, 0.2);
    transform: translateY(-2px);
}

.woocommerce-account .woocommerce-Address-title h3 {
    font-family: 'Indie Flower', cursive;
    color: #6e5840;
    font-size: 1.5rem;
    margin-bottom: 1rem;
    border-bottom: 2px solid #e5d9c8;
    padding-bottom: 0.5rem;
}

.woocommerce-account .woocommerce-Address address {
    font-style: normal;
    color: #6e5840;
    line-height: 1.7;
    margin-bottom: 1rem;
}

.woocommerce-account .woocommerce-Address .edit {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background-color: #c38743;
    color: white !important;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 600;
    font-family: 'Barlow', sans-serif;
    transition: all 0.3s ease;
}

.woocommerce-account .woocommerce-Address .edit:hover {
    background-color: #a86f37;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(195, 135, 67, 0.3);
}

/* ==========================
   DOWNLOADS
   ========================== */

.woocommerce-account .woocommerce-Message--info {
    background-color: #fef3e8;
    border-left: 4px solid #c38743;
    padding: 1rem 1.25rem;
    border-radius: 0.5rem;
    margin-bottom: 1.5rem;
    color: #6e5840;
}

/* ==========================
   NO ITEMS MESSAGE
   ========================== */

.woocommerce-account .woocommerce-Message {
    background-color: #fef3e8;
    border-left: 4px solid #c38743;
    padding: 1.5rem;
    border-radius: 0.5rem;
    color: #6e5840;
    font-size: 1rem;
    line-height: 1.6;
}

.woocommerce-account .woocommerce-Message a {
    color: #c38743;
    font-weight: 600;
    text-decoration: none;
}

.woocommerce-account .woocommerce-Message a:hover {
    color: #a86f37;
    text-decoration: underline;
}

/* ==========================
   RESPONSIVE
   ========================== */

@media (max-width: 768px) {
    .woocommerce ul.products {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 1rem;
    }

    .woocommerce ul.products li.product img {
        height: 180px;
    }

    .woocommerce .product .product_title {
        font-size: 1.5rem;
    }

    .woocommerce .product .price {
        font-size: 1.5rem;
    }

    .woocommerce .product form.cart .button {
        width: 100%;
        margin: 1rem 0 0;
    }

    /* Add to cart button on mobile - match slightly taller mobile quantity controls, still shrinks */
    .woocommerce .product .add_to_cart_buttons.show .single_add_to_cart_button,
    .woocommerce .product .add_to_cart_buttons:not([class*="show"]) .single_add_to_cart_button {
        height: 2.75rem;
        font-size: 0.875rem;
        padding: 0 1rem;
        flex-shrink: 1;
        flex-grow: 1;
        min-width: 0;
    }

    /* Keep layout inline on mobile - no wrapping */
    .woocommerce .product .add_to_cart_buttons.show,
    .woocommerce .product .add_to_cart_buttons:not([class*="show"]) {
        gap: 0.5rem;
        flex-wrap: nowrap;
    }

    /* Quantity controls on mobile - slightly larger for touch */
    .product-qty-btn.product-qty-decrease,
    .product-qty-btn.product-qty-increase {
        width: auto !important;
        height: 2.75rem !important;
        min-width: 2.75rem !important;
        min-height: 2.75rem !important;
        padding: 0 0.75rem !important;
    }

    .product-qty-btn i {
        font-size: 1rem !important;
    }

    .woocommerce .product .product-qty-input {
        width: 4rem !important;
        height: 2.75rem !important;
        font-size: 1rem !important;
        padding: 0.625rem 0.5rem !important;
    }
}

/* Hide default WooCommerce button styles that conflict */
.woocommerce #respond input#submit.alt,
.woocommerce a.button.alt,
.woocommerce button.button.alt,
.woocommerce input.button.alt {
    background-color: #c38743;
    color: white;
}

.woocommerce #respond input#submit.alt:hover,
.woocommerce a.button.alt:hover,
.woocommerce button.button.alt:hover,
.woocommerce input.button.alt:hover {
    background-color: #a86f37;
}

/* ==========================
   SMEEHEE PRODUCT ADDONS THEME CUSTOMIZATION
   ========================== */

/* Remove plugin's default margin on add_to_cart_buttons when on product page */
.add_to_cart_buttons {
    margin: 0 !important;
}

/* Only add margin when inside the popup */
.smeehee-overlay .add_to_cart_buttons {
    margin: 24px !important;
}

/* "Customise Item" Button - Match Theme Primary Button Style */
.single-product .button[onclick*="show_single_product_customisation_popup"],
button[onclick*="show_single_product_customisation_popup"] {
    font-family: 'Barlow', sans-serif !important;
    font-weight: 600 !important;
    background-color: #c38743 !important;
    color: #ffffff !important;
    border: none !important;
    padding: 0.75rem 1.5rem !important;
    font-size: 1rem !important;
    border-radius: 0.5rem !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 0.5rem !important;
    text-decoration: none !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08) !important;
}

.single-product .button[onclick*="show_single_product_customisation_popup"]:hover,
button[onclick*="show_single_product_customisation_popup"]:hover {
    background-color: #a86f37 !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 12px rgba(195, 135, 67, 0.4) !important;
}

/* "Configure Buffet" Button - Match Customization Popup Style */
.product-type-buffet button.buffet-popup-trigger,
.product-type-buffet .buffet-popup-trigger {
    font-family: 'Barlow', sans-serif !important;
    font-weight: 600 !important;
    background-color: #c38743 !important;
    color: #ffffff !important;
    border: none !important;
    padding: 0.75rem 1.5rem !important;
    font-size: 1rem !important;
    border-radius: 0.5rem !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0.5rem !important;
    text-decoration: none !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08) !important;
    width: 100% !important;
    margin-bottom: 20px !important;
}

.product-type-buffet button.buffet-popup-trigger:hover,
.product-type-buffet .buffet-popup-trigger:hover {
    background-color: #a86f37 !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 12px rgba(195, 135, 67, 0.4) !important;
}

/* Remove left margin from Add to Basket button inside buffet popup */
.buffet-popup-content form.cart .button,
.buffet-popup-content .cart .button {
    margin-left: 0 !important;
}

/* Customize the popup header with theme color */
.smeehee-overlay .summary-header {
    background-color: #c38743 !important; /* Autumn-600 golden brown */
}

/* Add rounded corners to modal */
.smeehee-overlay .summary-content {
    border-radius: 5px;
}

/* Round the top corners of header */
.smeehee-overlay .summary-header {
    border-top-left-radius: 5px;
    border-top-right-radius: 5px;
}

/* Ensure title and price text is white on golden background */
.smeehee-overlay .summary-header #the_title,
.smeehee-overlay .summary-header #the_price {
    color: #ffffff !important;
}

/* Ensure all headings in popup header are white (override theme colors) */
.smeehee-overlay .summary-header h1,
.smeehee-overlay .summary-header h2,
.smeehee-overlay .summary-header h3,
.smeehee-overlay .summary-header h4,
.smeehee-overlay .summary-header h5,
.smeehee-overlay .summary-header h6 {
    color: #ffffff !important;
}

/* Ensure all text elements in header are white */
.smeehee-overlay .summary-header,
.smeehee-overlay .summary-header * {
    color: #ffffff !important;
}

/* Style the close button icon */
.smeehee-overlay .summary-header .close {
    color: #ffffff !important;
    cursor: pointer;
}

.smeehee-overlay .summary-header .close:hover {
    opacity: 0.8;
}

/* ==========================
   CHECKOUT LOADING SPINNER
   ========================== */

/* Ensure WooCommerce blockUI overlay and spinner are visible */
.woocommerce .blockUI.blockOverlay {
    z-index: 9998 !important;
    background: rgba(255, 255, 255, 0.8) !important;
}

.woocommerce .blockUI.blockMsg {
    z-index: 9999 !important;
    border: none !important;
    background: transparent !important;
    padding: 0 !important;
}

/* Create a visible spinner */
.woocommerce .blockUI.blockMsg::before {
    content: '';
    display: block;
    width: 60px;
    height: 60px;
    border: 5px solid rgba(195, 135, 67, 0.2);
    border-top-color: #c38743;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Add "Placing order..." text below spinner */
.woocommerce .blockUI.blockMsg::after {
    content: 'Placing order...';
    display: block;
    text-align: center;
    margin-top: 16px;
    color: #6e5840;
    font-weight: 600;
    font-size: 16px;
    font-family: 'Barlow', sans-serif;
}

