/**
 * Custom styles for Single Product View
 * Grupo ZC Theme
 */

.grupozc-custom-product-view .grupozc-product-main-container {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    margin-bottom: 40px;
}

/* Shop Archive Layout with Sidebar on Left */
@media (min-width: 781px) {

    /* Ampliar ancho del contenedor del catálogo (tope en ultra-wide) */
    .woocommerce-active .site-content .col-full {
        max-width: min(95%, 1800px) !important;
        display: flex !important;
        flex-wrap: wrap !important;
        gap: 30px;
        flex-direction: row !important;
    }

    /* Remove pseudo-elements that act as extra flex items (causing unwanted gaps) */
    .woocommerce-active .site-content .col-full::before,
    .woocommerce-active .site-content .col-full::after {
        content: none !important;
        display: none !important;
    }

    /* Aggressively hide any other element inside .col-full that might be creating extra gaps (like skip links or hidden nodes) */
    .woocommerce-active .site-content .col-full>*:not(#primary):not(#secondary):not(.grupozc-filter-btn):not(#grupozc-filter-toggle):not(.catalogo-banner) {
        display: none !important;
        position: absolute !important;
        width: 0 !important;
        height: 0 !important;
        overflow: hidden !important;
    }

    /* Target primary and secondary specifically */
    .woocommerce-active #primary {
        flex: 1 !important;
        min-width: 0;
        /* Prevents overflow content from breaking flexbox */
        margin: 0 !important;
        float: none !important;
    }

    .woocommerce-active #secondary {
        width: 300px !important;
        flex: 0 0 300px !important;
        margin: 0 !important;
        float: none !important;
        display: block !important;
    }

    #secondary .widget {
        padding: 25px !important;
        margin-bottom: 30px !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    /* Single products usually don't have sidebars in Storefront, but if they do, we don't want them forced left if not intended */
    .single-product .site-content .col-full {
        display: block !important;
    }

    .single-product #primary {
        width: 100% !important;
        flex: none !important;
    }

    .single-product #secondary {
        display: none !important;
    }

    .grupozc-filter-btn,
    .sidebar-mobile-header {
        display: none !important;
    }
}

@media (max-width: 780px) {

    .archive.woocommerce-page .site-content .col-full,
    .shop.woocommerce-page .site-content .col-full {
        display: flex !important;
        flex-direction: column !important;
        /* Sidebar on top of products */
    }

    #secondary {
        width: 100% !important;
        margin-bottom: 30px !important;
        display: block !important;
        position: static !important;
        /* Back to normal flow */
        background: none !important;
        padding: 0 !important;
        box-shadow: none !important;
    }

    #primary {
        width: 100% !important;
    }

    /* Target specific woocommerce widgets in mobile to make them less boxed on top */
    #secondary .widget {
        background: #fff;
        padding: 15px !important;
        border: 1px solid #eee !important;
        margin-bottom: 20px !important;
    }

    /* Remove specific mobile drawer overlay and buttons */
    .grupozc-filter-btn,
    .sidebar-mobile-header,
    body.filter-sidebar-open::after {
        display: none !important;
    }
}

/* Premium Sidebar Widget Styles */
#secondary .widget {
    background: #fff;
    padding: 20px;
    border-radius: 12px;
    border: 1px solid #eee;
    margin-bottom: 25px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.02);
}

#secondary .widget-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--theme-accent-color);
    display: inline-block;
}

/* WooCommerce Filters specific styling */
.widget_price_filter .price_slider_amount .button {
    background-color: var(--theme-primary-color) !important;
    border-radius: 4px !important;
    padding: 8px 15px !important;
    display: none !important;
    /* Hide apply button as it is redundant */
}

.widget_price_filter .ui-slider .ui-slider-range {
    background-color: var(--theme-accent-color) !important;
}

.widget_price_filter .ui-slider .ui-slider-handle {
    background-color: var(--theme-accent-color) !important;
    border-radius: 50%;
}

.woocommerce-widget-layered-nav-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.woocommerce-widget-layered-nav-list__item {
    padding: 8px 0;
    border-bottom: 1px solid #f5f5f5;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.woocommerce-widget-layered-nav-list__item a {
    color: var(--theme-text-color);
    font-size: 0.95rem;
    transition: color 0.3s;
}

.woocommerce-widget-layered-nav-list__item a:hover {
    color: var(--theme-accent-color);
}

.woocommerce-widget-layered-nav-list__item .count {
    background: #f0f0f0;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.75rem;
    color: #888;
}

.grupozc-product-gallery-wrapper {
    flex: 0 0 40%;
    width: 40%;
    max-width: 100%;
}

.grupozc-product-gallery-wrapper .woocommerce-product-gallery {
    overflow: hidden;
}

.grupozc-product-gallery-wrapper .woocommerce-product-gallery img {
    width: 100% !important;
    height: auto !important;
    display: block;
}

@media (max-width: 1200px) {
    .grupozc-product-gallery-wrapper {
        flex: 0 0 50%;
        width: 50%;
    }
}

@media (max-width: 768px) {
    .grupozc-product-gallery-wrapper {
        flex: 0 0 100%;
        width: 100%;
    }
}

/* Mejora de miniaturas (thumbnails) */
.grupozc-product-gallery-wrapper .flex-control-thumbs {
    display: flex !important;
    padding: 0 !important;
    margin: 20px 0 0 0 !important;
    gap: 12px !important;
    flex-wrap: wrap;
}

.grupozc-product-gallery-wrapper .flex-control-thumbs li {
    width: 80px !important;
    float: none !important;
    margin: 0 !important;
    list-style: none;
}

.grupozc-product-gallery-wrapper .flex-control-thumbs li img {
    width: 100% !important;
    height: 80px !important;
    object-fit: cover !important;
    border-radius: 8px;
    border: 2px solid transparent;
    opacity: 1 !important;
    transition: all 0.2s ease;
    cursor: pointer;
}

.grupozc-product-gallery-wrapper .flex-control-thumbs li img:hover {
    border-color: #ddd;
    transform: translateY(-2px);
}

.grupozc-product-gallery-wrapper .flex-control-thumbs li img.flex-active {
    border-color: var(--theme-accent-color, #ef8c00);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.grupozc-product-summary-wrapper {
    flex: 0 0 55%;
    width: 55%;
    min-width: 300px;
}

/* Enhancing the summary */
.grupozc-product-summary-wrapper .product_title {
    font-weight: 700;
    color: var(--theme-primary-color, #1a1a1a);
    margin-bottom: 25px;
    font-size: 2.25rem;
    line-height: 1.1;
    text-transform: uppercase;
}

.grupozc-product-summary-wrapper .price {
    font-size: 2.25rem !important;
    font-weight: 800 !important;
    color: var(--theme-accent-color, #ef8c00);
    margin-bottom: 30px;
    display: block;
}

.grupozc-product-summary-wrapper .price del {
    color: #999;
    font-weight: 400;
    font-size: 0.7em;
    margin-right: 12px;
}

.grupozc-product-summary-wrapper .price ins {
    text-decoration: none;
}

.grupozc-product-summary-wrapper .woocommerce-product-details__short-description {
    margin-bottom: 25px;
    line-height: 1.6;
}

/* Add to cart section */
.grupozc-product-summary-wrapper form.cart {
    padding: 0;
    background: none;
    margin-top: 30px;
}

.grupozc-product-summary-wrapper .single_add_to_cart_button {
    background-color: var(--theme-primary-color, #1a1a1a) !important;
    color: #fff !important;
    padding: 15px 40px !important;
    font-weight: 700;
    text-transform: uppercase;
    border-radius: 5px !important;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.grupozc-product-summary-wrapper .single_add_to_cart_button:hover {
    filter: brightness(1.1);
    transform: translateY(-2px);
}

/* Tabs and lower sections */
.woocommerce-tabs {
    margin-top: 40px;
    border-top: 1px solid #eee;
    padding-top: 30px;
}

.woocommerce-Tabs-panel h2 {
    display: none;
    /* Hide redundant titles in panels */
}

@media (max-width: 768px) {
    .grupozc-custom-product-view .grupozc-product-main-container {
        flex-direction: column;
    }
}

/* Loop Product Cards */
.grupozc-product-card {
    border: 1px solid #eee;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    background: #fff;
    padding: 15px;
    display: flex;
    flex-direction: column;
}

.grupozc-product-card:hover {
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    transform: translateY(-5px);
}

.grupozc-product-card img {
    border-radius: 8px;
    margin-bottom: 15px;
    height: 220px !important;
    width: 100% !important;
    object-fit: contain !important;
}

.grupozc-product-card-info {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.grupozc-product-card .woocommerce-loop-product__title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.grupozc-product-card .price {
    color: var(--theme-accent-color, #ef8c00) !important;
    font-weight: 800;
    font-size: 1.25rem;
    margin-bottom: 15px;
    display: block;
}

.grupozc-product-card .price .amount {
    color: var(--theme-accent-color, #ef8c00) !important;
}

.grupozc-product-card .price del,
.grupozc-product-card .price del .amount {
    color: #999 !important;
    font-size: 0.85em;
    font-weight: 400;
}

.grupozc-product-card .button {
    margin-top: auto;
    width: 100%;
    text-align: center;
    padding: 0.5rem;
    margin-bottom: 0 !important;
}

/* Base Product Grid Styling (Desktop: 4 cols) */
.site-main ul.products {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 1rem !important;
    margin: 2rem 0 !important;
    padding: 0 !important;
}

/* Tablet: 3 cols */
@media (max-width: 1200px) {
    .site-main ul.products {
        grid-template-columns: repeat(3, 1fr) !important;
    }
}

/* Small tablet: 2 cols */
@media (max-width: 1040px) {
    .site-main ul.products {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

/* Neutralize legacy WooCommerce/Storefront margins and floats */
.site-main ul.products li.product {
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    float: none !important;
    list-style: none !important;
    display: flex !important;
    flex-direction: column !important;
}

.site-main ul.products::before,
.site-main ul.products::after {
    content: none !important;
    display: none !important;
}

/* Mobile: 2 Products per row */
@media (max-width: 780px) {
    .site-main ul.products {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 1rem !important;
        margin: 0 !important;
    }


    .grupozc-product-card {
        padding: 10px !important;
        height: 100% !important;
    }

    .grupozc-product-card img {
        height: 150px !important;
        margin-bottom: 10px !important;
    }

    .grupozc-product-card .woocommerce-loop-product__title {
        font-size: 0.9rem !important;
        line-height: 1.2 !important;
        height: 2.6em !important;
        overflow: hidden !important;
        margin-bottom: 8px !important;
    }

    .grupozc-product-card .price {
        font-size: 1.1rem !important;
        margin-bottom: 12px !important;
    }

    .grupozc-product-card .button {
        padding: 10px 5px !important;
        font-size: 0.8rem !important;
        min-height: auto !important;
    }
}

/* Ensure banner takes full width in flex container */
.catalogo-banner {
    flex: 0 0 100% !important;
    width: 100% !important;
}

/* Hide title and original brand thumbnails if our banner exists */
.catalogo-banner~#primary .brand-thumbnail,
.catalogo-banner~#primary .woocommerce-products-header__title,
.catalogo-banner~#primary .page-title,
.catalogo-banner~#primary .woocommerce-products-header .brand-thumbnail,
.tax-product_brand .brand-thumbnail,
.tax-product_brand .woocommerce-products-header__title,
.tax-product_brand .brand-thumbnail+.woocommerce-products-header__title {
    display: none !important;
}

/* Specific fix for themes where elements are not siblings */
.archive.woocommerce-page .brand-thumbnail {
    display: none !important;
}

/* Contextual sidebar filters moved to puentec-filters plugin */

/* ================================================================
   WooCommerce Buttons — Modern, consistent styling
   ================================================================ */

/* Base button style */
.woocommerce button.button,
.woocommerce input.button,
.woocommerce a.button,
.woocommerce .button,
.woocommerce #respond input#submit,
.woocommerce-page button.button,
.woocommerce-page input.button,
.woocommerce-page a.button,
.woocommerce-page .button,
.woocommerce-page #respond input#submit {
    background-color: #1a3a5c !important;
    color: #fff !important;
    border: none !important;
    border-radius: 8px !important;
    padding: 12px 24px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    line-height: 1.5 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.woocommerce button.button:hover,
.woocommerce input.button:hover,
.woocommerce a.button:hover,
.woocommerce .button:hover,
.woocommerce #respond input#submit:hover,
.woocommerce-page button.button:hover,
.woocommerce-page input.button:hover,
.woocommerce-page a.button:hover,
.woocommerce-page .button:hover,
.woocommerce-page #respond input#submit:hover {
    background-color: #e8830c !important;
    color: #fff !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15) !important;
}

/* Disabled state */
.woocommerce button.button:disabled,
.woocommerce button.button[disabled],
.woocommerce input.button:disabled,
.woocommerce-page button.button:disabled,
.woocommerce-page button.button[disabled],
.woocommerce-page input.button:disabled {
    background-color: #ccc !important;
    color: #666 !important;
    cursor: not-allowed !important;
    transform: none !important;
    box-shadow: none !important;
}

/* Alt / Secondary buttons */
.woocommerce button.button.alt,
.woocommerce input.button.alt,
.woocommerce a.button.alt,
.woocommerce .button.alt,
.woocommerce a.button.checkout-button,
.wc-proceed-to-checkout .button,
.woocommerce-page button.button.alt,
.woocommerce-page input.button.alt,
.woocommerce-page a.button.alt,
.woocommerce-page .button.alt,
.woocommerce-page a.button.checkout-button {
    background-color: #e8830c !important;
}

.woocommerce button.button.alt:hover,
.woocommerce input.button.alt:hover,
.woocommerce a.button.alt:hover,
.woocommerce .button.alt:hover,
.woocommerce a.button.checkout-button:hover,
.wc-proceed-to-checkout .button:hover,
.woocommerce-page button.button.alt:hover,
.woocommerce-page input.button.alt:hover,
.woocommerce-page a.button.alt:hover,
.woocommerce-page .button.alt:hover,
.woocommerce-page a.button.checkout-button:hover {
    background-color: #cf7309 !important;
}

/* Cart coupon + update buttons */
.woocommerce .cart .coupon .button,
.woocommerce .cart button[name="update_cart"],
.woocommerce-page .cart .coupon .button,
.woocommerce-page .cart button[name="update_cart"] {
    padding: 10px 20px !important;
    font-size: 13px !important;
}

/* Add to cart on shop page */
.woocommerce ul.products li.product .button {
    border-radius: 0 0 8px 8px !important;
    width: 100% !important;
    padding: 10px !important;
}

/* Remove item button (x) */
.woocommerce a.remove {
    color: #999 !important;
    font-size: 16px !important;
    font-weight: 400 !important;
    border-radius: 50% !important;
    width: 22px !important;
    height: 22px !important;
    line-height: 1 !important;
    text-align: center !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border: none !important;
    background: #f0f0f0 !important;
    transition: all 0.2s ease !important;
    text-decoration: none !important;
    padding: 0 !important;
    margin: 0 auto !important;
}

.woocommerce a.remove:hover {
    background-color: #e74c3c !important;
    color: #fff !important;
}

/* Place order button */
#payment .place-order .button {
    width: 100% !important;
    padding: 16px !important;
    font-size: 16px !important;
    border-radius: 8px !important;
}

/* WooCommerce notices / messages buttons */
.woocommerce-message a.button,
.woocommerce-info a.button,
.woocommerce-error a.button {
    padding: 8px 16px !important;
    font-size: 12px !important;
}

/* Quantity input */
.woocommerce .quantity input.qty {
    border: 1px solid #ddd !important;
    border-radius: 6px !important;
    padding: 8px !important;
    text-align: center !important;
    width: 60px !important;
}

/* Select fields (dropdowns) */
.woocommerce form select,
.woocommerce-checkout select {
    border: 1px solid #ddd !important;
    border-radius: 6px !important;
    padding: 10px 12px !important;
    background-color: #fff !important;
    font-size: 14px !important;
    width: 100% !important;
    appearance: auto !important;
}

/* Input fields */
.woocommerce form .form-row input.input-text,
.woocommerce form .form-row textarea,
.woocommerce-checkout input.input-text,
.woocommerce-checkout textarea {
    border: 1px solid #ddd !important;
    border-radius: 6px !important;
    padding: 10px 12px !important;
    font-size: 14px !important;
}

.woocommerce form .form-row input.input-text:focus,
.woocommerce form .form-row textarea:focus,
.woocommerce-checkout input.input-text:focus,
.woocommerce-checkout textarea:focus,
.woocommerce form select:focus {
    border-color: #1a3a5c !important;
    outline: none !important;
    box-shadow: 0 0 0 2px rgba(26,58,92,0.1) !important;
}

/* Cart totals table */
.woocommerce .cart_totals,
.woocommerce-checkout #order_review {
    border-radius: 8px !important;
}

/* Fix WooCommerce icons — theme references FA5 but only FA6 is loaded */
.woocommerce-info::before,
.woocommerce-message::before,
.woocommerce-error::before,
.woocommerce-page .woocommerce-info::before,
.woocommerce-page .woocommerce-message::before,
.woocommerce-page .woocommerce-error::before {
    font-family: "Font Awesome 6 Free" !important;
    font-weight: 900 !important;
}

/* ================================================================
   Checkout Layout — Compact & Modern
   ================================================================ */

/* Checkout billing fields — use flexbox for row control */
.woocommerce-checkout .woocommerce-billing-fields__field-wrapper {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 0 12px !important;
}

/* Reset floats & margins from theme — essential for flexbox to work */
.woocommerce-checkout .woocommerce-billing-fields__field-wrapper .form-row {
    width: 100% !important;
    flex: 0 0 100% !important;
    float: none !important;
    clear: none !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}
.woocommerce-checkout .woocommerce-billing-fields__field-wrapper .form-row-first,
.woocommerce-checkout .woocommerce-billing-fields__field-wrapper .form-row-last {
    float: none !important;
    margin-right: 0 !important;
    margin-left: 0 !important;
}

/* Name fields: 2 columns */
.woocommerce-checkout #billing_first_name_field,
.woocommerce-checkout #billing_last_name_field {
    flex: 0 0 calc(50% - 6px) !important;
    width: calc(50% - 6px) !important;
}

/* Provincia, Canton, Distrito: 3 columns */
.woocommerce-checkout #billing_state_field,
.woocommerce-checkout #billing_city_field,
.woocommerce-checkout #billing_address_2_field {
    flex: 0 0 calc(33.33% - 8px) !important;
    width: calc(33.33% - 8px) !important;
}

/* Phone and Email: 2 columns */
.woocommerce-checkout #billing_phone_field,
.woocommerce-checkout #billing_email_field {
    flex: 0 0 calc(50% - 6px) !important;
    width: calc(50% - 6px) !important;
}

/* Reduce vertical spacing between fields */
.woocommerce-checkout .form-row {
    margin-bottom: 12px !important;
}

/* Field labels — smaller, subtle */
.woocommerce-checkout .form-row label {
    font-size: 13px !important;
    font-weight: 600 !important;
    color: #444 !important;
    margin-bottom: 4px !important;
}

/* Order review table — modern card style */
.woocommerce-checkout #order_review_heading {
    display: none !important;
}

.woocommerce-checkout #order_review {
    background: #f8f9fa !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 12px !important;
    padding: 24px !important;
    position: sticky !important;
    top: 120px !important;
}

.woocommerce-checkout .woocommerce-checkout-review-order-table {
    border: none !important;
    margin-bottom: 16px !important;
}

.woocommerce-checkout .woocommerce-checkout-review-order-table th,
.woocommerce-checkout .woocommerce-checkout-review-order-table td {
    padding: 10px 0 !important;
    border-bottom: 1px solid #e5e7eb !important;
    font-size: 14px !important;
}

.woocommerce-checkout .woocommerce-checkout-review-order-table thead th {
    font-weight: 700 !important;
    color: #1a3a5c !important;
    font-size: 13px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
}

.woocommerce-checkout .woocommerce-checkout-review-order-table tfoot th {
    font-weight: 600 !important;
}

.woocommerce-checkout .woocommerce-checkout-review-order-table .order-total th,
.woocommerce-checkout .woocommerce-checkout-review-order-table .order-total td {
    font-size: 18px !important;
    font-weight: 700 !important;
    color: #1a3a5c !important;
    border-bottom: none !important;
    padding-top: 16px !important;
}

/* Payment methods — clean cards */
.woocommerce-checkout #payment {
    background: transparent !important;
    border: none !important;
}

.woocommerce-checkout #payment ul.payment_methods {
    border: 1px solid #e5e7eb !important;
    border-radius: 8px !important;
    overflow: hidden !important;
    padding: 0 !important;
    margin-bottom: 16px !important;
}

.woocommerce-checkout #payment ul.payment_methods li {
    padding: 14px 16px !important;
    border-bottom: 1px solid #e5e7eb !important;
    margin: 0 !important;
}

.woocommerce-checkout #payment ul.payment_methods li:last-child {
    border-bottom: none !important;
}

.woocommerce-checkout #payment ul.payment_methods li label {
    font-weight: 600 !important;
    font-size: 14px !important;
    cursor: pointer !important;
}

.woocommerce-checkout #payment .payment_box {
    background: #f0f4f8 !important;
    border-radius: 6px !important;
    padding: 12px 16px !important;
    margin-top: 8px !important;
    font-size: 13px !important;
    color: #555 !important;
}

.woocommerce-checkout #payment .payment_box::before {
    display: none !important;
}

/* Shipping to different address — compact */
.woocommerce-checkout .woocommerce-shipping-fields h3 {
    font-size: 15px !important;
    font-weight: 500 !important;
}

.woocommerce-checkout .woocommerce-shipping-fields h3 label.woocommerce-form__label-for-checkbox {
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    cursor: pointer !important;
    width: auto !important;
}

.woocommerce-checkout .woocommerce-shipping-fields h3 label.woocommerce-form__label-for-checkbox input#ship-to-different-address-checkbox {
    position: static !important;
    margin: 0 !important;
    width: 16px !important;
    height: 16px !important;
    left: auto !important;
    right: auto !important;
    top: auto !important;
}

.woocommerce-checkout .woocommerce-shipping-fields h3 label.woocommerce-form__label-for-checkbox span {
    display: inline !important;
}

/* Order notes — smaller */
.woocommerce-checkout .woocommerce-additional-fields h3 {
    font-size: 15px !important;
}

.woocommerce-checkout #order_comments {
    min-height: 80px !important;
}

/* Privacy text */
.woocommerce-checkout .woocommerce-privacy-policy-text {
    font-size: 12px !important;
    color: #777 !important;
}

/* Terms checkbox */
.woocommerce-checkout .woocommerce-terms-and-conditions-wrapper {
    margin-bottom: 12px !important;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .woocommerce-checkout #billing_state_field,
    .woocommerce-checkout #billing_city_field,
    .woocommerce-checkout #billing_address_2_field {
        width: 100% !important;
        padding-right: 0 !important;
    }

    .woocommerce-checkout #billing_phone_field,
    .woocommerce-checkout #billing_email_field {
        width: 100% !important;
        padding-right: 0 !important;
    }
}

/* ================================================================
   Cart Page — Clean, modern layout
   ================================================================ */

/* Cart page container */
.woocommerce-cart .woocommerce,
.woocommerce-page.woocommerce-cart .entry-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Cart table */
.woocommerce table.shop_table.cart,
.woocommerce-page table.shop_table.cart {
    border: 1px solid #e5e7eb !important;
    border-radius: 12px !important;
    border-collapse: separate !important;
    border-spacing: 0 !important;
    overflow: hidden;
    width: 100% !important;
    table-layout: auto !important;
}

.woocommerce table.shop_table.cart thead th {
    background: #f8f9fa !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    color: #1a3a5c !important;
    padding: 14px 16px !important;
    border-bottom: 2px solid #e5e7eb !important;
}

.woocommerce table.shop_table.cart td {
    padding: 16px !important;
    vertical-align: middle !important;
    border-bottom: 1px solid #f0f0f0 !important;
}

/* Column widths */
.woocommerce table.shop_table.cart .product-remove {
    width: 40px !important;
    text-align: center !important;
    padding: 16px 8px !important;
}

.woocommerce table.shop_table.cart .product-thumbnail {
    width: 80px !important;
    padding: 12px !important;
}

.woocommerce table.shop_table.cart .product-thumbnail img {
    width: 60px !important;
    height: 60px !important;
    object-fit: contain !important;
    border-radius: 6px !important;
    border: 1px solid #eee !important;
}

.woocommerce table.shop_table.cart .product-name {
    width: auto !important;
}

.woocommerce table.shop_table.cart .product-name a {
    color: #1a3a5c !important;
    font-weight: 600 !important;
    font-size: 14px !important;
    text-decoration: none !important;
}

.woocommerce table.shop_table.cart .product-name a:hover {
    color: #e8830c !important;
}

.woocommerce table.shop_table.cart .product-price,
.woocommerce table.shop_table.cart .product-subtotal {
    width: 120px !important;
    font-weight: 600 !important;
    color: #333 !important;
    white-space: nowrap !important;
}

.woocommerce table.shop_table.cart .product-quantity {
    width: 100px !important;
    text-align: center !important;
    white-space: nowrap !important;
}

.woocommerce table.shop_table.cart .product-quantity .qty {
    width: 50px !important;
    padding: 6px !important;
    text-align: center !important;
}

/* Cart actions row (coupon + update) */
.woocommerce table.shop_table.cart td.actions {
    padding: 16px !important;
    background: #f8f9fa !important;
    border-bottom: none !important;
}

.woocommerce .cart .coupon {
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
}

.woocommerce .cart .coupon #coupon_code {
    width: 200px !important;
    padding: 10px 12px !important;
    border: 1px solid #ddd !important;
    border-radius: 6px !important;
    font-size: 14px !important;
}

/* Cart layout — table left, totals right */
.woocommerce-cart .woocommerce {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 24px !important;
}

.woocommerce-cart .woocommerce > .woocommerce-notices-wrapper {
    flex: 0 0 100% !important;
    width: 100% !important;
}

.woocommerce-cart form.woocommerce-cart-form {
    flex: 1 !important;
    min-width: 0 !important;
}

/* Cart totals — card style */
.woocommerce .cart-collaterals {
    flex: 0 0 340px !important;
    margin-top: 0 !important;
}

.woocommerce .cart_totals {
    background: #f8f9fa !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 12px !important;
    padding: 24px !important;
    width: 100% !important;
    position: sticky !important;
    top: 120px !important;
}

.woocommerce .cart_totals h2 {
    font-size: 18px !important;
    font-weight: 700 !important;
    color: #1a3a5c !important;
    margin-bottom: 16px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
}

.woocommerce .cart_totals table.shop_table {
    border: none !important;
    border-radius: 0 !important;
}

.woocommerce .cart_totals table.shop_table th,
.woocommerce .cart_totals table.shop_table td {
    padding: 12px 8px !important;
    border-bottom: 1px solid #e5e7eb !important;
    font-size: 14px !important;
}

.woocommerce .cart_totals table.shop_table th {
    padding-right: 20px !important;
}

.woocommerce .cart_totals table.shop_table .order-total th,
.woocommerce .cart_totals table.shop_table .order-total td {
    font-size: 18px !important;
    font-weight: 700 !important;
    color: #1a3a5c !important;
    border-bottom: none !important;
    padding-top: 16px !important;
}

.woocommerce .cart_totals .wc-proceed-to-checkout {
    margin-top: 16px !important;
}

.woocommerce .cart_totals .wc-proceed-to-checkout .button {
    width: 100% !important;
    padding: 14px !important;
    font-size: 15px !important;
    text-align: center !important;
}

/* Hide page title on cart */
.woocommerce-cart .entry-title {
    display: none !important;
}

/* Mobile cart */
@media (max-width: 768px) {
    .woocommerce table.shop_table.cart {
        table-layout: auto !important;
    }

    .woocommerce table.shop_table.cart thead {
        display: none !important;
    }

    .woocommerce table.shop_table.cart tr.cart_item {
        display: flex !important;
        flex-wrap: wrap !important;
        align-items: center !important;
        padding: 12px !important;
        border-bottom: 1px solid #eee !important;
        position: relative !important;
    }

    .woocommerce table.shop_table.cart td {
        border-bottom: none !important;
        padding: 4px 8px !important;
    }

    .woocommerce table.shop_table.cart .product-remove {
        position: absolute !important;
        top: 8px !important;
        right: 8px !important;
        width: auto !important;
    }

    .woocommerce table.shop_table.cart .product-thumbnail {
        width: 70px !important;
        flex: 0 0 70px !important;
    }

    .woocommerce table.shop_table.cart .product-name {
        flex: 1 !important;
        width: auto !important;
    }

    .woocommerce table.shop_table.cart .product-price,
    .woocommerce table.shop_table.cart .product-quantity,
    .woocommerce table.shop_table.cart .product-subtotal {
        width: auto !important;
        flex: 0 0 33.33% !important;
        text-align: center !important;
        padding-top: 8px !important;
    }

    .woocommerce .cart .coupon {
        flex-direction: column !important;
        width: 100% !important;
    }

    .woocommerce .cart .coupon #coupon_code {
        width: 100% !important;
    }

    .woocommerce-cart form.woocommerce-cart-form {
        flex: 0 0 100% !important;
    }

    .woocommerce .cart-collaterals {
        flex: 0 0 100% !important;
    }

    .woocommerce .cart_totals {
        width: 100% !important;
    }
}

/* "Volver a la tienda" link */
.woocommerce .return-to-shop .button,
.woocommerce-cart .wc-empty-cart-message + .return-to-shop .button {
    background-color: #1a3a5c !important;
}