/*--------------------------------------------------------------
# TicketSystem Tango Noir - Core Theme Styles (Materialized)
--------------------------------------------------------------*/

/* 1. Design System Variables (Tango Noir + Material) */
:root {
    /* Color Palette (Preserved) */
    --ts-gold: #C6A664;
    /* Primary Accent */
    --ts-lightgrey: #E0E0E0;
    /* Body copy (High Emphasis Text) */
    --ts-mediumgrey-text: #A0A0A0;
    /* Medium Emphasis Text */

    /* Surfaces (Material uses lighter surfaces for higher elevation in dark mode) */
    --ts-black: #121212;
    /* Global Background (Material Dark Theme Base DP0) */
    --ts-surface-1: #1E1E1E;
    /* Cards, components (DP1) */
    --ts-surface-2: #232323;
    /* (DP2) */
    --ts-surface-4: #272727;
    /* Header, Menus, dialogs (DP4) */
    --ts-surface-8: #2C2C2C;
    /* (DP8) */
    --ts-surface-12: #333333;
    /* (DP12) */

    /* Borders and subtle contrasts */
    --ts-border-color: rgba(255, 255, 255, 0.12);
    --ts-border-focus: rgba(198, 166, 100, 0.5);

    /* Typography (Preserved) */
    --font-headings: 'Playfair Display', serif;
    --font-body: 'Inter', sans-serif;

    /* Shape (Material Shape System) */
    --ts-radius-sm: 4px;
    /* Small components (e.g., inputs, small buttons) */
    --ts-radius: 8px;
    /* Medium components (e.g., cards, dialogs) */
    --ts-radius-lg: 16px;
    /* Large components */
    --ts-radius-pill: 999px;

    /* Elevation (Shadows - Refined for Dark Mode) */
    --ts-shadow-1: 0px 1px 3px rgba(0, 0, 0, 0.30), 0px 1px 2px rgba(0, 0, 0, 0.50);
    --ts-shadow-2: 0px 3px 6px rgba(0, 0, 0, 0.30), 0px 3px 6px rgba(0, 0, 0, 0.50);
    --ts-shadow-4: 0px 10px 20px rgba(0, 0, 0, 0.35), 0px 6px 6px rgba(0, 0, 0, 0.50);
    --ts-shadow-8: 0px 19px 38px rgba(0, 0, 0, 0.40), 0px 15px 12px rgba(0, 0, 0, 0.50);

    /* Animation */
    --ts-ease-out: cubic-bezier(0.0, 0.0, 0.2, 1);
    --ts-ease-in: cubic-bezier(0.4, 0.0, 1, 1);
}

/* 2. Global Resets and Dark Mode Conversion */
html {
    background-color: var(--ts-black);
    scroll-behavior: smooth;
}

body,
.site,
.site-content,
.col-full {
    background-color: var(--ts-black) !important;
    color: var(--ts-lightgrey) !important;
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.site-content {
    padding-top: 2rem !important;
    /* Prudent gap between menu and content */
}

.widget {
    background-color: var(--ts-surface-1) !important;
    border-radius: var(--ts-radius);
    box-shadow: var(--ts-shadow-1);
    color: var(--ts-lightgrey) !important;
    padding: 24px;
    border: 1px solid var(--ts-border-color);
}

/* 3. Typography */
h1,
h2,
h3,
h4,
h5,
h6,
.site-title,
.entry-title,
.product_title,
.widget-title {
    font-family: var(--font-headings);
    color: #ffffff;
    /* High emphasis white for headings */
    font-weight: 700;
    margin-bottom: 0.6em;
    line-height: 1.2;
    letter-spacing: -0.01em;
}

p {
    margin-bottom: 1em;
}

a {
    color: var(--ts-gold);
    text-decoration: none;
    transition: color 0.2s var(--ts-ease-out), opacity 0.2s var(--ts-ease-out);
}

a:hover {
    color: #ffffff;
    opacity: 0.9;
}

/* 4. Buttons (Materialized CTAs) */
button,
.button,
.button.alt,
input[type="submit"],
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button,
.woocommerce a.button.alt,
.woocommerce button.button.alt,
.woocommerce input.button.alt {
    background-color: var(--ts-gold) !important;
    color: var(--ts-black) !important;
    /* Use dark color for contrast on gold */
    border: none !important;
    border-radius: var(--ts-radius-pill) !important;
    /* Modern pill shape */
    padding: 12px 32px !important;
    font-family: var(--font-body);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: background-color 0.2s var(--ts-ease-out), box-shadow 0.2s var(--ts-ease-out), transform 0.2s var(--ts-ease-out);
    text-align: center;
    box-shadow: var(--ts-shadow-1);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

/* Ripple effect placeholder - in pure CSS we use active state */
button:active,
.button:active,
.woocommerce a.button:active {
    transform: scale(0.98);
    box-shadow: none;
}

button:hover,
.button:hover,
.woocommerce a.button:hover,
.woocommerce button.button:hover,
.woocommerce input.button:hover {
    opacity: 1;
    /* Ensure opacity doesn't interfere with background color change */
    background-color: #E8C37E !important;
    /* Slightly lighter gold on hover */
    box-shadow: var(--ts-shadow-2);
    transform: translateY(-2px);
}

button:focus-visible,
.button:focus-visible,
.woocommerce a.button:focus-visible {
    outline: none;
    box-shadow: 0 0 0 4px rgba(198, 166, 100, 0.4);
}

/* 5. Inputs, Forms, and Tables (Material Filled Inputs) */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="password"],
input[type="number"],
input[type="date"],
input[type="search"],
textarea,
select,
.select2-container--default .select2-selection--single {
    background-color: var(--ts-surface-4) !important;
    /* Slightly elevated surface for inputs */
    color: var(--ts-lightgrey) !important;
    border: 1px solid var(--ts-border-color) !important;
    border-bottom: 2px solid var(--ts-border-color) !important;
    /* Material filled input style */
    border-radius: var(--ts-radius-sm) var(--ts-radius-sm) 0 0;
    /* Rounded top corners only */
    padding: 16px 16px 12px;
    transition: border-color 0.2s var(--ts-ease-out), background-color 0.2s var(--ts-ease-out);
    font-family: var(--font-body);
    font-size: 1rem;
}

label,
.woocommerce form .form-row label,
.woocommerce-checkout label,
.wp-block-woocommerce-checkout label,
.wc-block-components-field label,
.wc-block-components-text-input label,
.wc-block-components-radio-control__label,
.wc-block-components-checkbox__label {
    color: var(--ts-mediumgrey-text) !important;
    font-size: 0.85rem;
    letter-spacing: 0.02em;
    margin-bottom: 4px;
    display: block;
}

input::placeholder,
textarea::placeholder {
    color: var(--ts-mediumgrey-text) !important;
    opacity: 0.6;
}

input:focus,
textarea:focus,
select:focus,
.select2-container--default.select2-container--focus .select2-selection--single {
    border-color: var(--ts-border-color) !important;
    border-bottom-color: var(--ts-gold) !important;
    background-color: var(--ts-surface-8) !important;
    outline: none;
    box-shadow: none;
    /* Remove default shadow, rely on bottom border */
}

/* Table styling (Cart, Order details) */
table.shop_table,
table.woocommerce-checkout-review-order-table {
    background-color: var(--ts-surface-1);
    border: 1px solid var(--ts-border-color);
    border-radius: var(--ts-radius);
    box-shadow: var(--ts-shadow-1);
    border-collapse: separate;
    border-spacing: 0;
    overflow: hidden;
}

table th,
table td {
    border-color: var(--ts-border-color);
    color: var(--ts-lightgrey);
    padding: 16px 24px;
}

table th {
    font-weight: 600;
    color: #ffffff;
    background-color: var(--ts-surface-2);
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.05em;
}

/* 6. Header Customization (Minimalist & Elevated) */
.site-header {
    background-color: var(--ts-surface-4);
    /* Elevated header */
    border-bottom: 1px solid var(--ts-border-color);
    box-shadow: var(--ts-shadow-4);
    position: relative;
    z-index: 100;
}

body.js-openmenu-active {
    overflow: hidden;
}

body.js-openmenu-active .site-header {
    display: block !important;
}

/* Navigation */
.storefront-primary-navigation,
.storefront-primary-navigation .col-full {
    background-color: transparent !important;
    /* Let header background show through */
    box-shadow: none;
    border: none;
}

.storefront-primary-navigation {
    border-top: 1px solid var(--ts-border-color);
}

.main-navigation ul {
    background-color: transparent;
}

.main-navigation ul ul {
    background-color: var(--ts-surface-8);
    /* Higher elevation for dropdowns */
    border: 1px solid var(--ts-border-color);
    border-radius: var(--ts-radius);
    box-shadow: var(--ts-shadow-8);
    padding: 8px 0;
    min-width: 200px;
}

.main-navigation ul li a,
.site-header-cart .cart-contents {
    color: var(--ts-lightgrey);
    padding: 16px 20px;
    font-weight: 500;
    transition: color 0.2s var(--ts-ease-out), background-color 0.2s var(--ts-ease-out);
}

.main-navigation ul li a:hover,
.site-header-cart .cart-contents:hover {
    color: var(--ts-gold);
    background-color: rgba(255, 255, 255, 0.04);
}

.main-navigation ul li.current-menu-item a {
    color: var(--ts-gold);
    position: relative;
}

/* Add active indicator for current menu item */
.main-navigation ul li.current-menu-item>a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 20px;
    right: 20px;
    height: 2px;
    background-color: var(--ts-gold);
}

.site-search .widget {
    padding: 0;
    background: transparent;
    border: none;
    box-shadow: none;
}

/* Remove Storefront's default hamburger glyph to avoid the stray leading icon */
.menu-toggle::before,
.main-navigation .menu-toggle::before,
#site-navigation .menu-toggle::before,
.menu-toggle::after,
.main-navigation .menu-toggle::after,
#site-navigation .menu-toggle::after,
.menu-toggle span::before,
.main-navigation .menu-toggle span::before,
#site-navigation .menu-toggle span::before,
.menu-toggle span::after,
.main-navigation .menu-toggle span::after,
#site-navigation .menu-toggle span::after {
    content: none !important;
    display: none !important;
}


/* Desktop Header Adjustments */
@media (min-width: 769px) {
    .site-header {
        background-color: #000000;
        /* Black top surrounding */
    }

    .storefront-primary-navigation {
        background-color: var(--ts-surface-4) !important;
        /* Keep menu bar gray */
    }
}

/* Mobile header adjustments */
@media (max-width: 768px) {

    .storefront-primary-navigation,
    .storefront-primary-navigation .col-full,
    #site-navigation,
    .main-navigation {
        background-color: var(--ts-surface-4) !important;
        border-top-color: transparent !important;
        border-bottom-color: transparent !important;
        box-shadow: none !important;
    }

    .main-navigation .menu-toggle,
    #site-navigation .menu-toggle {
        background-color: transparent !important;
        border: 1px solid var(--ts-lightgrey) !important;
        color: var(--ts-lightgrey) !important;
        box-shadow: none !important;
        border-radius: var(--ts-radius-sm);
        padding: 8px 12px;
    }

    .main-navigation .menu-toggle:hover,
    .main-navigation .menu-toggle:focus-visible,
    #site-navigation .menu-toggle:hover,
    #site-navigation .menu-toggle:focus-visible {
        background-color: rgba(255, 255, 255, 0.1) !important;
        border-color: #ffffff !important;
        color: #ffffff !important;
    }
}

/* Header Product Search (Refined) */
.site-header .woocommerce-product-search {
    display: flex;
    align-items: center;
    background: var(--ts-surface-2);
    /* Softer background than the header */
    border-radius: var(--ts-radius-pill);
    /* Pill shape for search bar */
    padding: 4px 8px 4px 20px;
    border: 1px solid transparent;
    transition: border-color 0.2s var(--ts-ease-out), box-shadow 0.2s var(--ts-ease-out), background-color 0.2s var(--ts-ease-out);
    max-width: 400px;
    margin-left: auto;
}

.site-header .woocommerce-product-search:focus-within {
    border-color: var(--ts-gold);
    background-color: var(--ts-surface-1);
    box-shadow: 0 0 0 2px rgba(198, 166, 100, 0.3);
}

.site-header .woocommerce-product-search .search-field {
    flex: 1;
    background: transparent !important;
    border: none !important;
    color: var(--ts-lightgrey) !important;
    padding: 6px 0;
    font-size: 0.95rem;
    box-shadow: none !important;
    /* Remove shadow from input itself */
    border-radius: 0;
}

.site-header .woocommerce-product-search .search-field::placeholder {
    color: var(--ts-mediumgrey-text);
}

.site-header .woocommerce-product-search .search-field:focus {
    outline: none;
}

.site-header .woocommerce-product-search button[type="submit"] {
    background: var(--ts-gold) !important;
    border: none !important;
    color: var(--ts-black) !important;
    padding: 8px !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s var(--ts-ease-out), transform 0.2s var(--ts-ease-out);
    border-radius: 50% !important;
    width: 36px;
    height: 36px;
    box-shadow: none !important;
    margin-left: 8px;
}

.site-header .woocommerce-product-search button[type="submit"]:hover {
    background-color: #E8C37E !important;
    transform: scale(1.1);
}

/* 7. Footer Customization and Compliance */
.site-footer {
    background-color: var(--ts-surface-2);
    border-top: 1px solid var(--ts-border-color);
    margin-top: 6em;
    padding-top: 0;
}

.ts-footer-menu {
    padding: 48px 24px 24px;
    border-bottom: 1px solid var(--ts-border-color);
    text-align: center;
}

.ts-footer-menu__heading {
    margin: 0 0 1.5rem;
    font-size: 0.9rem;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: var(--ts-gold);
    font-weight: 700;
    opacity: 1;
}

.ts-footer-menu ul,
.ts-footer-menu__list,
.ts-footer-menu__list li {
    list-style: none !important;
    margin: 0;
    padding: 0;
}

.ts-footer-menu__list li::marker {
    content: '';
    color: transparent !important;
    /* Hide UA bullets in stubborn browsers */
}

.site-footer .ts-footer-menu ul,
.site-footer .ts-footer-menu li,
.site-footer .ts-footer-menu .menu,
.site-footer .ts-footer-menu .menu li {
    list-style: none !important;
}

.ts-footer-menu .menu-item,
.ts-footer-menu li {
    list-style: none !important;
}

.ts-footer-menu .menu-item::before,
.ts-footer-menu li::before,
.site-footer .ts-footer-menu .menu-item::before {
    display: none !important;
    content: none !important;
}

.ts-footer-menu__list {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    justify-content: center;
}

.ts-footer-menu a,
.ts-footer-menu .menu-item a {
    color: var(--ts-lightgrey);
    font-weight: 500;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    text-decoration: none !important;
    transition: color 0.2s var(--ts-ease-out);
    border-bottom: none !important;
    box-shadow: none !important;
    font-size: 0.9rem;
}

.ts-footer-menu a:hover,
.ts-footer-menu a:focus-visible,
.ts-footer-menu .menu-item a:hover,
.ts-footer-menu .menu-item a:focus-visible {
    color: var(--ts-gold);
    text-decoration: none !important;
    border-bottom: none !important;
}

.site-footer .ts-footer-menu a,
.site-footer .ts-footer-menu .menu-item a {
    text-decoration: none !important;
    border: none !important;
    box-shadow: none !important;
}

.site-footer .ts-footer-menu__list a,
.site-footer .ts-footer-menu__list .menu-item a {
    text-decoration: none !important;
    border: none !important;
    box-shadow: none !important;
}

.site-footer .ts-footer-menu__list a:hover,
.site-footer .ts-footer-menu__list a:focus-visible {
    text-decoration: none !important;
    border: none !important;
    box-shadow: none !important;
}

.ts-footer-disclaimer {
    padding: 32px 20px 48px;
    background-color: var(--ts-black);
    color: var(--ts-lightgrey);
    text-align: center;
    border-top: 1px solid var(--ts-border-color);
    line-height: 1.7;
    font-size: 0.95rem;
}

.ts-footer-disclaimer p {
    max-width: 960px;
    margin: 0 auto;
    opacity: 0.85;
}

@media (max-width: 768px) {
    .ts-footer-disclaimer {
        padding: 28px 16px 36px;
        font-size: 0.9rem;
    }
}

.ts-footer-compliance {
    text-align: center;
    padding: 20px 0;
    margin-top: 20px;
    background-color: var(--ts-black);
    /* Back to base color */
}

.ts-copyright {
    font-size: 0.8em;
    color: var(--ts-mediumgrey-text);
}

/* 8. WooCommerce General Overrides */

/* Hide handheld footer bar on very small screens */
@media (max-width: 420px) {
    .storefront-handheld-footer-bar {
        display: none !important;
    }
}

/* Notices (Material Alerts) */
.woocommerce-message,
.woocommerce-info,
.woocommerce-error {
    background-color: var(--ts-surface-4);
    color: var(--ts-lightgrey);
    border: 1px solid var(--ts-border-color);
    border-left: 4px solid var(--ts-gold);
    /* Use left border instead of top */
    border-top-color: transparent;
    box-shadow: var(--ts-shadow-2);
    border-radius: var(--ts-radius-sm);
}

.woocommerce-message::before,
.woocommerce-info::before {
    color: var(--ts-gold);
}

.woocommerce-error {
    border-left-color: #D32F2F;
    /* Material Error Red */
}

.woocommerce-error::before {
    color: #D32F2F;
}

/* Prices */
.price,
.amount {
    color: var(--ts-gold) !important;
    font-weight: 600;
    font-size: 1.25em;
    /* Slightly larger */
}

/* 9. Catalog/Archive (Event Loop) Layout */

/* Mobile-first: Single column list view (390px optimization) */
@media (max-width: 768px) {

    .woocommerce ul.products li.product,
    .storefront-full-width-content ul.products li.product {
        width: 100% !important;
        float: none !important;
        margin-right: 0 !important;
    }
}

/* 10. Event Card Design (Material Cards) */
.woocommerce ul.products li.product {
    background-color: var(--ts-surface-1);
    /* DP1 Elevation */
    border-radius: var(--ts-radius);
    overflow: hidden;
    /* Clips image corners */
    box-shadow: var(--ts-shadow-1);
    transition: box-shadow 0.3s ease, transform 0.3s ease;
    border: 1px solid var(--ts-border-color);
}

.woocommerce ul.products li.product:hover {
    box-shadow: var(--ts-shadow-4);
    transform: translateY(-3px);
}

/* Wrapper added in content-product.php override */
.product-content-wrapper {
    padding: 24px;
    /* Increased padding */
    display: flex;
    flex-direction: column;
    height: 100%;
}

.woocommerce ul.products li.product .woocommerce-loop-product__title {
    font-family: var(--font-headings);
    font-size: 1.5em;
    /* Larger title */
    color: #ffffff;
    margin-bottom: 12px;
}

/* Injected Metadata (from functions.php) */
.ts-event-metadata {
    margin-bottom: 16px;
    display: flex;
    flex-direction: column;
    font-size: 0.95em;
    gap: 4px;
}

.ts-meta-datetime {
    color: var(--ts-gold);
    font-weight: 600;
}

.ts-meta-location {
    color: var(--ts-mediumgrey-text);
}

/* Ensure button is at the bottom of the card if heights vary */
.woocommerce ul.products li.product .button {
    margin-top: auto;
}


/* 11. Single Product Page (Event Detail) */

.single-product div.product .summary .price {
    color: var(--ts-gold) !important;
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.2;
    margin: 12px 0 20px;
    display: block;
}

.single-product div.product .summary .price .woocommerce-Price-amount,
.single-product div.product .summary .price .amount {
    color: inherit;
    font-size: inherit;
    font-weight: inherit;
}

.single-product div.product .summary {
    background-color: var(--ts-surface-1);
    padding: 24px;
    border-radius: var(--ts-radius);
    box-shadow: var(--ts-shadow-1);
    border: 1px solid var(--ts-border-color);
}

.single-product div.product form.cart {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: center;
    margin-top: 24px;
}

/* Quantity Selector (Refined from previous version) */
.single-product div.product form.cart .quantity {
    display: inline-flex;
    align-items: center;
    padding: 0;
    background: transparent;
}

.single-product div.product form.cart .gtango-qty {
    display: inline-flex;
    align-items: center;
    gap: 0;
    border: none;
    background-color: transparent;
    color: var(--ts-lightgrey);
    overflow: visible;
    min-height: 48px;
    /* Larger touch target */
}

.single-product div.product form.cart .gtango-qty:focus-within {
    outline: none;
}

.single-product div.product form.cart .gtango-qty__btn {
    width: 48px;
    height: 48px;
    flex: 0 0 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: var(--ts-gold);
    color: var(--ts-black);
    border: none;
    border-radius: var(--ts-radius-sm);
    font-size: 1.2rem;
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
    box-shadow: var(--ts-shadow-1);
    transition: background-color 0.3s ease, box-shadow 0.3s ease, transform 0.2s ease, color 0.2s ease;
}

.single-product div.product form.cart .gtango-qty__btn:hover:not(:disabled) {
    background-color: #E8C37E;
    box-shadow: var(--ts-shadow-2);
    transform: translateY(-1px);
    color: var(--ts-black);
}

.single-product div.product form.cart .gtango-qty__btn:focus-visible:not(:disabled) {
    outline: none;
    box-shadow: 0 0 0 4px rgba(198, 166, 100, 0.5);
}


.single-product div.product form.cart .gtango-qty__btn:disabled {
    opacity: 0.38;
    /* Material disabled state opacity */
    cursor: not-allowed;
    background-color: rgba(198, 166, 100, 0.3);
    box-shadow: none;
    transform: none;
}

.single-product div.product form.cart .gtango-qty__input {
    width: 60px;
    height: 48px;
    padding: 0 12px;
    border: 1px solid var(--ts-border-color);
    border-radius: var(--ts-radius-sm);
    background: var(--ts-surface-4);
    color: var(--ts-lightgrey);
    font-weight: 600;
    font-size: 1.05rem;
    text-align: center;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.single-product div.product form.cart .gtango-qty__input:focus {
    border-color: var(--ts-gold);
    box-shadow: 0 0 0 2px rgba(198, 166, 100, 0.3);
    outline: none;
}

/* Hide number input spinners */
.single-product div.product form.cart .gtango-qty__input::-webkit-outer-spin-button,
.single-product div.product form.cart .gtango-qty__input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.single-product div.product form.cart .gtango-qty__input[type="number"] {
    -moz-appearance: textfield;
    appearance: textfield;
}

/* Ensure mobile stack layout */
@media (max-width: 768px) {

    .single-product .storefront-full-width-content div.product .summary,
    .single-product .storefront-full-width-content div.product .woocommerce-product-gallery {
        width: 100%;
        float: none;
    }

    .single-product div.product .summary {
        padding: 16px;
    }
}

/* Desktop: spread gallery wider while keeping responsive spacing (Material Grid) */
@media (min-width: 769px) {
    .single-product .storefront-full-width-content div.product {
        display: grid;
        grid-template-columns: minmax(0, 1.5fr) minmax(20rem, 1fr);
        /* Adjusted ratio */
        gap: 32px;
        /* Standard Material grid gap */
        align-items: start;
    }

    .single-product .storefront-full-width-content div.product .woocommerce-product-gallery,
    .single-product .storefront-full-width-content div.product .summary {
        width: 100%;
        float: none;
        margin: 0;
    }

    .single-product .storefront-full-width-content div.product .woocommerce-product-gallery {
        max-width: 100%;
    }
}

@media (min-width: 1280px) {
    .single-product .storefront-full-width-content div.product {
        grid-template-columns: minmax(0, 2fr) minmax(22rem, 1fr);
        gap: 48px;
    }
}

/* Tabs (Material Tabs) */
.woocommerce-tabs {
    margin-top: 48px;
}

.woocommerce-tabs ul.tabs {
    background-color: transparent;
    border-bottom: 1px solid var(--ts-border-color);
    display: flex;
    padding: 0;
    gap: 12px;
}

.woocommerce-tabs ul.tabs::before,
.woocommerce-tabs ul.tabs::after {
    display: none;
}

.woocommerce-tabs ul.tabs li {
    background-color: transparent;
    border: none;
    border-radius: 0;
    margin: 0;
    padding: 0;
    position: relative;
}

.woocommerce-tabs ul.tabs li a {
    color: var(--ts-mediumgrey-text);
    padding: 12px 24px 16px;
    font-weight: 600;
    display: inline-block;
    transition: color 0.2s ease;
    text-decoration: none !important;
    position: relative;
    /* Allows underline indicator */
}

.woocommerce-tabs ul.tabs li a::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    height: 3px;
    border-radius: 2px 2px 0 0;
    background-color: transparent;
    transition: background-color 0.2s ease;
}

.woocommerce-tabs ul.tabs li:hover a {
    color: var(--ts-lightgrey);
}

.woocommerce-tabs ul.tabs li.active a {
    color: var(--ts-gold);
    text-decoration: none !important;
}

.woocommerce-tabs ul.tabs li.active a::after {
    background-color: var(--ts-gold);
}

.woocommerce-tabs .panel {
    background-color: transparent;
    /* Content on base background */
    color: var(--ts-lightgrey);
    padding: 24px 0;
    border: none;
}

@media (max-width: 640px) {
    .woocommerce-tabs ul.tabs {
        flex-wrap: wrap;
    }

    .woocommerce-tabs ul.tabs li {
        flex: 1 1 100%;
    }

    .woocommerce-tabs ul.tabs li a {
        display: block;
        width: 100%;
        padding: 14px 20px 18px;
    }
}

@media (min-width: 769px) {
    .woocommerce-tabs ul.tabs {
        flex-direction: column;
        align-items: flex-start;
    }

    .woocommerce-tabs ul.tabs li {
        width: 100%;
    }

    .woocommerce-tabs ul.tabs li a {
        display: block;
        width: 100%;
    }
}


/* 12. Sticky CTA Footer (Removed as per previous functions.php comment) */


/* 13. Cart and Checkout Streamlining */

/* Enforce single-column layout on mobile */
@media (max-width: 768px) {

    .col2-set .col-1,
    .col2-set .col-2,
    .woocommerce-cart .cart-collaterals,
    .woocommerce-cart .cart_totals {
        width: 100% !important;
        float: none !important;
    }

    /* Full-width primary CTAs on mobile (Material FAB-like prominence) */
    .woocommerce-cart .wc-proceed-to-checkout a.checkout-button,
    #place_order {
        width: 100% !important;
        padding: 16px 24px !important;
        font-size: 1.1em;
    }
}

/* Checkout specific background overrides (Material Cards for sections) */
.woocommerce-checkout form .col2-set,
#order_review,
#payment,
.woocommerce-checkout-review-order {
    background-color: var(--ts-surface-1);
    border-radius: var(--ts-radius);
    box-shadow: var(--ts-shadow-1);
    padding: 24px;
    margin-bottom: 32px;
    border: 1px solid var(--ts-border-color);
}

/* Adjustments for sections that shouldn't have padding if they are just wrappers */
#order_review,
.woocommerce-checkout-review-order {
    padding: 0;
    overflow: hidden;
}

#order_review_heading {
    padding: 24px;
    margin: 0;
}

/* Payment methods (Accordion/List style) */
#payment {
    padding: 0;
    overflow: hidden;
}

#payment ul.payment_methods {
    background-color: var(--ts-surface-1);
    border: none;
    padding: 24px;
}

#payment div.payment_box {
    background-color: var(--ts-surface-4);
    /* Higher elevation for the open box */
    color: var(--ts-lightgrey);
    border-radius: var(--ts-radius-sm);
    margin-top: 12px;
}

#payment div.payment_box::before {
    display: none;
    /* Remove the little triangle pointer */
}

#payment .place-order {
    padding: 24px;
    background-color: var(--ts-surface-2);
    border-top: 1px solid var(--ts-border-color);
}


/* 14. Publicitar landing page (Tenemos dos formas de publicitar) */
body.page-id-1581 .site-content {
    padding-top: clamp(40px, 8vw, 110px);
    padding-bottom: clamp(40px, 8vw, 110px);
}

.ts-publicitar {
    max-width: 960px;
    margin: 0 auto;
    padding: 0 clamp(1rem, 4vw, 2.5rem);
}

.ts-publicitar__header {
    text-align: center;
    margin-bottom: clamp(1.5rem, 5vw, 3rem);
}

.ts-publicitar__title {
    margin-bottom: 0.4em;
}

.ts-publicitar__summary {
    color: var(--ts-mediumgrey-text);
    font-size: 1.1rem;
    margin: 0;
}

.ts-publicitar__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: clamp(1rem, 4vw, 2.5rem);
    padding: clamp(1.75rem, 5vw, 3rem);
    background-color: var(--ts-surface-1);
    border: 1px solid var(--ts-border-color);
    border-radius: var(--ts-radius-lg);
    box-shadow: var(--ts-shadow-2);
    align-items: stretch;
}

.ts-publicitar__card {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 0.9rem;
    text-align: center;
    height: 100%;
}

.ts-publicitar__card-title {
    margin: 0;
    font-size: clamp(1.8rem, 5vw, 2.4rem);
    line-height: 1.2;
}

.ts-publicitar__card-copy {
    margin: 0;
    color: var(--ts-lightgrey);
    font-size: 1rem;
}

.ts-publicitar__button {
    width: 100%;
    justify-content: center;
    padding: 14px 32px;
    border-radius: var(--ts-radius);
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    box-shadow: var(--ts-shadow-1);
    margin-top: auto;
}

.ts-publicitar__button:hover {
    box-shadow: var(--ts-shadow-2);
    transform: translateY(-1px);
}

.ts-publicitar__content {
    margin-top: clamp(2rem, 5vw, 3.5rem);
    font-size: 1rem;
}
