/*
Theme Name: Flaman Storefront
Theme URI: https://flaman.com
Author: Flaman E-Commerce Team
Description: Custom WooCommerce theme for Flaman Storefront with BOPIS support, advanced filtering, and optimized product display pages.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.4
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: flaman-storefront
Tags: e-commerce, woocommerce, responsive, two-columns, custom-menu, custom-logo, featured-images
*/

/* =====================================================
   CSS Reset & Base Styles
   ===================================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    /* Prevent horizontal scrollbar from causing layout shifts */
    overflow-x: hidden;
    scroll-behavior: smooth;
}

/* Ensure no overflow issues that could interfere with sticky header */
#page.site {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Block theme: make site-blocks fill remaining space so footer sticks to bottom */
.wp-site-blocks {
    display: flex;
    flex-direction: column;
    flex: 1 0 auto;
}

.wp-site-blocks > .site-footer,
.wp-site-blocks > footer {
    margin-top: auto;
}


:root {
    /* Flaman Brand Colors */
    --flaman-red: #C4161C;
    --flaman-red-dark: #9B1219;
    --flaman-red-light: #D44449;
    --flaman-blue: #003646;
    --flaman-blue-dark: #001D25;
    --flaman-blue-light: #00495E;
    --flaman-footer-blue: #003646;

    /* Primary Colors (Flaman Red) */
    --primary-color: var(--flaman-red);
    --primary-dark: var(--flaman-red-dark);
    --primary-light: var(--flaman-red-light);

    /* Secondary Colors (Flaman Blue/Navy) */
    --secondary-color: var(--flaman-blue);
    --secondary-dark: var(--flaman-blue-dark);
    --secondary-light: var(--flaman-blue-light);

    /* Neutral Colors */
    --text-primary: #1F2937;
    --text-secondary: #4B5563;
    --text-muted: #6B7280;
    --text-disabled: #9CA3AF;
    --background: #ffffff;
    --background-gray: #F3F4F6;
    --background-dark: #E5E7EB;
    --border-color: #D1D5DB;
    --border-light: #E5E7EB;

    /* Status Colors */
    --success: #059669;
    --warning: #D97706;
    --error: #DC2626;
    --info: #2563EB;

    /* Typography - Helvetica as per brand guidelines */
    --font-primary: Helvetica, "Helvetica Neue", Arial, sans-serif;
    --font-heading: Helvetica, "Helvetica Neue", Arial, sans-serif;


    /* Font Size Scale — responsive, override at breakpoints */
    --text-xs: 12px;
    --text-sm: 14px;
    --text-base: 16px;
    --text-md: 17px;
    --text-lg: 20px;
    --text-xl: 22px;
    --text-2xl: 24px;
    --text-page-title: 1.75rem;

    /* Flaman Design System Colors */
    --flaman-headings: #323232;
    --flaman-secondary-3: #DBE1E5;

    /* Spacing */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    --spacing-2xl: 3rem;

    /* Border Radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;

    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.12);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.16);
    --shadow-lg: 0 10px 20px rgba(0,0,0,0.19);

    /* Transitions */
    --transition-fast: 150ms ease-in-out;
    --transition-base: 250ms ease-in-out;
    --transition-slow: 350ms ease-in-out;

    /* Container Width */
    --container-max: 1200px;
    --container-wide: 1600px;
}

body {
    font-family: var(--font-primary);
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--background);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: var(--spacing-md);
    color: var(--text-primary);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1rem; }

p {
    margin-bottom: var(--spacing-md);
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--primary-dark);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* =====================================================
   Layout & Container
   ===================================================== */

.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--spacing-lg);
    box-sizing: border-box;
    width: 100%;
}

.container-wide {
    max-width: var(--container-wide);
    margin: 0 auto;
    padding: 0 var(--spacing-lg);
    box-sizing: border-box;
    width: 100%;
}

/* PLP container — match header width */
.plp-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 var(--spacing-lg);
    box-sizing: border-box;
    width: 100%;
}

/* Cart & Checkout pages — match header width */
.woocommerce-cart .container,
.woocommerce-checkout .container,
.page-id-8 .container,
.page-id-9 .container {
    max-width: 1400px;
}

/* Remove extra top spacing on cart/checkout */
.woocommerce-cart .site-main,
.woocommerce-checkout .site-main,
.page-id-8 .site-main,
.page-id-9 .site-main {
    padding-top: 0;
}

/* Remove WordPress block layout padding/constraints on cart/checkout/account */
.woocommerce-cart .entry-content,
.woocommerce-checkout .entry-content,
.woocommerce-account .entry-content,
.page-id-8 .entry-content,
.page-id-9 .entry-content,
.page-id-10 .entry-content {
    max-width: none !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
}

/* Hide page title on cart/checkout — WooCommerce blocks have their own */
.woocommerce-cart .entry-header,
.woocommerce-checkout .entry-header,
.page-id-8 .entry-header,
.page-id-9 .entry-header {
    display: none;
}

.site-header {
    background: var(--background);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-sm);
}

/* Red accent border at top of header */
.site-header::before {
    content: '';
    display: block;
    height: 4px;
    background: var(--flaman-red);
    flex-shrink: 0;
}

.header-top {
    padding: 14px 0;
    border-bottom: none;
    background: var(--background);
}

.header-top .container {
    max-width: 1400px;
}

.site-main {
    flex: 1 0 auto;
    padding: var(--spacing-xl) 0;
}

.site-footer {
    flex-shrink: 0;
    margin-top: auto;
}

/* =====================================================
   Footer — Newsletter Bar (Top)
   ===================================================== */

.footer-top {
    background: #C4161C;
    padding: 0;
}

.footer-top .container {
    max-width: 1400px;
}

.footer-newsletter {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
    min-height: 125px;
    padding: 20px 0;
}

.footer-newsletter-text {
    flex-shrink: 0;
}

.footer-newsletter-text h3 {
    color: #ffffff;
    font-size: 25px;
    font-weight: 700;
    margin: 0 0 4px 0;
    line-height: 1.2;
}

.footer-newsletter-text p {
    color: #ffffff;
    font-size: 14px;
    font-weight: 400;
    margin: 0;
    opacity: 0.9;
}

.footer-newsletter-form {
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    max-width: 720px;
    width: 100%;
}

.footer-newsletter-fields select {
    flex-shrink: 0;
    width: auto;
    height: 48px;
    padding: 0 30px 0 12px;
    border: none;
    border-left: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 0;
    font-size: 13px;
    font-family: var(--font-primary);
    background: #ffffff;
    color: var(--text-primary);
    cursor: pointer;
    outline: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' fill='none'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23666' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    white-space: nowrap;
}

.footer-newsletter-fields select {
    border-left: 1px solid rgba(0, 0, 0, 0.1);
}

.footer-newsletter-fields select option {
    background: #fff;
    color: var(--text-primary);
}

.footer-newsletter-select {
    flex-shrink: 0;
    width: auto;
    height: 48px;
    padding: 0 30px 0 12px;
    border: none;
    border-left: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 0;
    font-size: 13px;
    font-family: var(--font-primary);
    background: #ffffff;
    color: var(--text-primary);
    cursor: pointer;
    outline: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' fill='none'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23666' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    white-space: nowrap;
}

.footer-newsletter-select option {
    background: #fff;
    color: var(--text-primary);
}

.footer-newsletter-fields {
    display: flex;
    flex-wrap: wrap;
    width: 100%;
}

.footer-newsletter-form input[type="email"] {
    flex: 1;
    height: 48px;
    padding: 0 16px;
    border: none;
    border-radius: 7px 0 0 7px;
    font-size: 14px;
    font-family: var(--font-primary);
    background: #ffffff;
    color: var(--text-primary);
    outline: none;
    min-width: 0;
}

.footer-newsletter-form input[type="email"]::placeholder {
    color: #999;
}

.footer-newsletter-form input[type="email"]:focus {
    box-shadow: none;
}

.footer-newsletter-form button[type="submit"],
.footer-newsletter-form button {
    height: 48px;
    padding: 0 24px;
    background: #003646;
    color: #ffffff;
    border: none;
    border-radius: 0 7px 7px 0;
    font-size: 16px;
    font-weight: 600;
    font-family: var(--font-primary);
    cursor: pointer;
    white-space: nowrap;
    transition: background var(--transition-fast);
    text-transform: none;
    letter-spacing: normal;
    transform: none;
    box-shadow: none;
}

.footer-newsletter-form button[type="submit"]:hover,
.footer-newsletter-form button:hover {
    background: #002a36;
    transform: none;
    box-shadow: none;
}

.footer-newsletter-messages {
    width: 100%;
}

.footer-newsletter-messages .success_message {
    color: #fff;
    font-weight: 600;
    padding: 8px 0;
}

.footer-newsletter-messages .error_message {
    color: #ffcccc;
    font-weight: 600;
    padding: 8px 0;
}

/* =====================================================
   Footer — Info Section (Bottom)
   ===================================================== */

.footer-bottom {
    background: var(--flaman-footer-blue);
    padding: 50px 0 0;
}

.footer-bottom .container {
    max-width: 1400px;
}

.footer-main {
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr 1fr;
    gap: 40px;
    padding-bottom: 40px;
}

/* Brand Column */
.footer-brand {
    color: #ffffff;
}

.footer-logo {
    display: inline-block;
    margin-bottom: 20px;
    background: #C4161C;
    border-radius: 3px;
    overflow: hidden;
}

.footer-logo svg {
    display: block;
    width: 170px;
    height: auto;
    margin: -5px -2px -7px -2px;
}

.footer-description {
    font-size: 14px;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.8);
    margin: 0 0 24px 0;
}

.footer-social {
    display: flex;
    gap: 12px;
}

.footer-social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    background: transparent;
    border-radius: 7px;
    color: rgba(255, 255, 255, 0.85);
    transition: color var(--transition-fast), transform var(--transition-fast);
}

.footer-social-link:hover {
    transform: translateY(-2px);
    color: #ffffff;
}

.footer-social-link svg {
    width: 20px;
    height: 20px;
}

/* Quick Links Column */
.footer-links {
    color: #ffffff;
}

.footer-links h4,
.footer-divisions h4 {
    font-size: 18px;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 20px 0;
    padding-bottom: 12px;
    position: relative;
}

.footer-links h4::after,
.footer-divisions h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 3px;
    background: #C4161C;
    border-radius: 2px;
}

.footer-links ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links ul li {
    display: flex;
    align-items: center;
    gap: 10px;
    line-height: 2;
}

.footer-links ul li svg {
    flex-shrink: 0;
    color: rgba(255, 255, 255, 0.6);
}

.footer-links ul li a {
    color: rgba(255, 255, 255, 0.85);
    font-size: 16px;
    white-space: nowrap;
    transition: color var(--transition-fast);
}

.footer-links ul li a:hover {
    color: #ffffff;
}

/* Company Divisions Column */
.footer-divisions {
    color: #ffffff;
}

.footer-divisions-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
}

.footer-divisions-grid ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-divisions-grid ul li {
    line-height: 2;
}

.footer-divisions-grid ul li a {
    color: rgba(255, 255, 255, 0.85);
    font-size: 16px;
    white-space: nowrap;
    transition: color var(--transition-fast);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.footer-divisions-grid ul li a svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    color: rgba(255, 255, 255, 0.6);
    transition: color var(--transition-fast);
}

.footer-divisions-grid ul li a:hover {
    color: #ffffff;
}

.footer-divisions-grid ul li a:hover svg {
    color: #ffffff;
}

.footer-divisions-grid ul li a.active {
    color: #ffffff;
    font-weight: 600;
}

.footer-divisions-grid ul li a.active svg {
    color: #ffffff;
}

/* Copyright Bar */
.footer-copyright {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-top: 1px solid rgba(255, 255, 255, 0.25);
    padding: 20px 0;
}

.footer-copyright p {
    margin: 0;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
}

.footer-copyright a {
    color: rgba(255, 255, 255, 0.6);
    transition: color var(--transition-fast);
}

.footer-copyright a:hover {
    color: #ffffff;
}

.footer-copyright-sep {
    color: rgba(255, 255, 255, 0.3);
    margin: 0 4px;
}

/* =====================================================
   Footer — Responsive
   ===================================================== */

@media (max-width: 1024px) {
    .footer-main {
        grid-template-columns: 1fr 1fr;
        gap: 40px;
    }

    .footer-brand {
        grid-column: 1 / -1;
    }

    .footer-newsletter {
        gap: 24px;
    }
}

@media (max-width: 768px) {
    .footer-newsletter {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
        min-height: auto;
        padding: 30px 0;
    }

    .footer-newsletter-fields {
        flex-direction: column;
        gap: 8px;
    }

    .footer-newsletter-fields select,
    .footer-newsletter-form input[type="email"] {
        border-left: none;
        border-radius: 7px;
        width: 100%;
    }

    .footer-newsletter-fields select:first-child {
        border-radius: 7px;
    }

    .footer-newsletter-form button[type="submit"],
    .footer-newsletter-form button {
        border-radius: 7px;
        width: 100%;
    }

    .footer-newsletter-text h3 {
        font-size: 20px;
    }

    .footer-newsletter-form {
        max-width: 100%;
    }

    .footer-main {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .footer-brand {
        grid-column: auto;
    }

    .footer-copyright {
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .footer-newsletter-form input[type="email"] {
        height: 48px;
        padding: 0 14px;
        font-size: 14px;
    }

    .footer-newsletter-form button {
        height: 48px;
        padding: 0 20px;
        font-size: 14px;
    }

    .footer-divisions-grid {
        grid-template-columns: 1fr;
        gap: 0;
    }
}

/* =====================================================
   Header
   ===================================================== */

.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    width: 100%;
    box-sizing: border-box;
}

.site-branding {
    flex-shrink: 0;
}

/* SVG Logo Styling */
.site-logo-link {
    display: flex;
    align-items: center;
}

.site-logo {
    width: 170px;
    height: auto;
    display: block;
}

.site-logo path {
    transition: fill var(--transition-fast);
}

.site-logo-link:hover .site-logo path {
    fill: var(--flaman-red-dark);
}

.header-search {
    flex: 1 1 auto;
    min-width: 300px;
}

.header-search .search-form {
    position: relative;
}

.header-search .search-wrapper {
    display: flex;
    align-items: stretch;
    border: 1px solid var(--flaman-secondary-3);
    border-radius: 7px;
    background: var(--background);
    transition: border-color var(--transition-fast);
    overflow: hidden;
    height: 45px;
}

.header-search .search-wrapper:focus-within {
    border-color: var(--flaman-red);
}

.header-search .search-field {
    flex-grow: 1;
    padding: 12px 14px;
    border: none;
    background: transparent;
    font-family: var(--font-primary);
    font-size: 15px;
    outline: none;
    min-width: 120px;
}

.header-search .search-field::placeholder {
    color: #8E8F95;
}

/* Search category filter removed — see git history to restore */

.header-search .search-submit {
    width: 51px;
    min-width: 51px;
    height: 45px;
    flex-shrink: 0;
    background: var(--flaman-red);
    border: none;
    color: #ffffff;
    cursor: pointer;
    transition: background var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0 6px 6px 0;
    padding: 0;
    margin: 0;
}

.header-search .search-submit svg {
    width: 20px !important;
    height: 20px !important;
    min-width: 20px;
    min-height: 20px;
    flex-shrink: 0;
    display: block;
}

.header-search .search-submit svg path {
    stroke: #ffffff;
    stroke-width: 2;
}

.header-search .search-submit:hover {
    background: var(--flaman-red-dark);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

/* Hidden on desktop — shown at 1024px breakpoint */
.mobile-search-toggle.header-icon-btn {
    display: none;
}

.header-nav-toggle {
    display: none;
}

@media (max-width: 1024px) {
    .header-container {
        gap: 10px;
    }

    /* Show hamburger, hide secondary nav bar */
    .header-nav-toggle {
        display: flex;
    }

    .secondary-navigation {
        display: none;
    }

    .header-search {
        min-width: 180px;
    }

    .header-location-text {
        display: none;
    }

    .header-location-wrapper {
        padding: 10px;
        width: 45px;
        justify-content: center;
    }

    .header-location-wrapper .dropdown-arrow {
        display: none;
    }
}

@media (max-width: 768px) {
    .site-logo {
        width: 120px;
    }

    .header-container {
        gap: var(--spacing-sm);
    }

    .header-search {
        flex: 0 0 auto;
        min-width: auto;
        margin-left: auto;
    }

    /* Show mobile search toggle — inherits all styling from .header-icon-btn */
    .mobile-search-toggle.header-icon-btn {
        display: flex;
    }

    .header-actions {
        gap: var(--spacing-sm);
    }

    .header-location-text {
        display: none;
    }

    .header-location-wrapper {
        padding: 10px;
        width: 40px;
        height: 40px;
        justify-content: center;
    }

    .header-location-wrapper .dropdown-arrow {
        display: none;
    }

    .header-icon-btn {
        width: 40px;
        height: 40px;
    }

    .header-account {
        display: none;
    }

}


/* Store Location Selector */
.header-location-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 12px 15px;
    color: #373737;
    font-family: var(--font-primary);
    font-size: 16px;
    font-weight: 400;
    border: 1px solid var(--flaman-secondary-3);
    border-radius: 7px;
    background: transparent;
    height: 45px;
    white-space: nowrap;
    cursor: pointer;
    transition: border-color 0.2s ease;
}

@media (min-width: 1025px) {
    .header-location-wrapper {
        min-width: 278px;
    }
}

.header-location-wrapper:hover {
    border-color: var(--flaman-red);
}

.header-location-wrapper .location-icon {
    width: 19px;
    height: 19px;
    flex-shrink: 0;
    pointer-events: none;
    z-index: 1;
}

.header-location-text {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    pointer-events: none;
    color: #373737;
}

.header-location-wrapper .dropdown-arrow {
    flex-shrink: 0;
    pointer-events: none;
    z-index: 1;
    transition: transform 0.2s ease;
}

.header-location-select {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    font-family: var(--font-primary);
    font-size: 16px;
    border: none;
    background: transparent;
    padding-left: 45px;
    padding-right: 35px;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    color: #373737;
}

.header-location-select:focus {
    outline: 2px solid var(--flaman-red);
    outline-offset: 2px;
    border-radius: 7px;
}

.header-location-select:focus-visible {
    opacity: 0;
}

/* Rotate arrow when select is focused/active */
.header-location-select:focus ~ .dropdown-arrow {
    transform: rotate(180deg);
}

/* Store location dropdown options */
.header-location-select option {
    padding: 8px 10px !important;
    font-family: var(--font-primary);
    font-size: 16px;
    line-height: 1.8;
    color: #373737;
    background: #ffffff;
    min-height: 40px;
}

/* Global dropdown option styles for better UX */
.site-header select option {
    padding: 8px 10px !important;
    line-height: 1.8;
}

/* Hover state for dropdown options (browser-dependent support) */
.site-header select option:hover,
.site-header select option:focus {
    background-color: var(--flaman-secondary-4, #EEF2F4);
}

/* Selected option styling */
.site-header select option:checked {
    background-color: var(--flaman-secondary-3, #DBE1E5);
    font-weight: 600;
}

/* Ensure proper spacing in dropdown lists across browsers */
.site-header select {
    /* Prevent text from touching edges in dropdown */
    text-indent: 0.01px;
}

/* Firefox specific - improve dropdown list appearance */
@-moz-document url-prefix() {
    .site-header select option {
        padding: 10px 10px !important;
        margin: 2px 0;
    }
}

/* WebKit/Chrome specific - improve dropdown list spacing */
@supports (-webkit-appearance: none) {
    .site-header select option {
        padding: 10px 8px !important;
    }
}

/* Message Notification Styles */
.location-message {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    background: var(--flaman-blue-dark);
    color: white;
    font-family: var(--font-primary);
    font-size: 14px;
    font-weight: 500;
    border-radius: 7px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 10000;
    opacity: 0;
    transform: translateX(400px);
    transition: all 0.3s ease;
}

.location-message.show {
    opacity: 1;
    transform: translateX(0);
}

.location-message.success {
    background: var(--flaman-blue-dark);
}

.location-message.error {
    background: var(--flaman-red);
}

/* Header Icon Buttons (Account, Cart) */
.header-account,
.header-cart {
    position: relative;
}

.header-quote {
    position: relative;
    display: none;
}

.header-quote.has-items {
    display: block;
}

.header-icon-btn {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    background: transparent;
    border: 1px solid var(--flaman-secondary-3);
    border-radius: 7px;
    color: var(--flaman-blue);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.header-icon-btn:hover {
    border-color: var(--flaman-red);
}

.header-icon-btn:hover svg path,
.header-icon-btn:hover svg circle {
    stroke: var(--flaman-red);
}

.header-icon-btn svg {
    width: 18px;
    height: 18px;
}

.header-icon-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    min-width: 20px;
    height: 20px;
    background: var(--flaman-red);
    color: var(--background);
    font-family: var(--font-primary);
    font-size: 12px;
    font-weight: 600;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
}

.header-icon-badge.hidden {
    display: none;
}

/* Cart stock error state */
.header-cart.has-stock-errors .header-icon-btn {
    border: 2px solid var(--flaman-red);
    border-radius: 6px;
    padding: 4px;
}

/* Per-item stock warning (mini-cart sidebar + /cart page) */
.cart-item-stock-warning {
    color: var(--flaman-red);
    font-size: 0.75rem;
    font-weight: 600;
    margin: 4px 0 0;
    padding: 0;
    line-height: 1.3;
}

/* Mini-cart error banner */
.mini-cart-error-banner {
    background: #fef2f2;
    border: 1px solid var(--flaman-red);
    border-radius: 4px;
    color: var(--flaman-red);
    font-size: 0.8125rem;
    font-weight: 500;
    padding: 10px 12px;
    margin-bottom: var(--spacing-md);
    list-style: none;
    line-height: 1.4;
}

.mini-cart-error-banner a {
    color: var(--flaman-red);
    font-weight: 700;
    text-decoration: underline;
}

/* Disabled checkout button in mini-cart */
.woocommerce-mini-cart__buttons .button.checkout.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

/* ─── Checkout Store Info (base styles — overridden by checkout.css on checkout page) ── */
.flaman-checkout-store-info {
    margin-bottom: var(--spacing-lg, 1.5rem);
}

.flaman-checkout-store-info .store-info-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #f8f9fa;
    border: 1px solid #e2e6ea;
    border-left: 4px solid var(--primary-color, #C4161C);
    border-radius: 4px;
    padding: var(--spacing-md, 1rem) var(--spacing-lg, 1.5rem);
}

.flaman-checkout-store-info .store-info-details {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm, 0.5rem);
    flex-wrap: wrap;
}

.flaman-checkout-store-info .store-info-label {
    color: #6c757d;
    font-size: 0.9em;
}

.flaman-checkout-store-info .store-info-name {
    font-size: 1.05em;
    color: var(--text-primary, #003646);
}

.flaman-checkout-store-info .fulfillment-badge {
    display: inline-block;
    font-size: 0.78em;
    font-weight: 600;
    padding: 2px 10px;
    border-radius: 12px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.flaman-checkout-store-info .fulfillment-ship {
    background: #d4edda;
    color: #155724;
}

.flaman-checkout-store-info .fulfillment-pickup {
    background: #fff3cd;
    color: #856404;
}

.flaman-checkout-store-info .store-info-notice {
    padding: var(--spacing-md, 1rem) var(--spacing-lg, 1.5rem);
    border-radius: 4px;
}

.flaman-checkout-store-info .store-info-warning {
    background: #fff3cd;
    border: 1px solid #ffc107;
    color: #856404;
}

.flaman-checkout-store-info .store-info-warning p {
    margin: 0;
}

@media (max-width: 600px) {
    .flaman-checkout-store-info .store-info-details {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* Mobile Search Toggle + Nav Toggle — see 768px media query for mobile styles */

/* Sidebar Mini Cart */
.cart-sidebar {
    position: fixed;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    pointer-events: none;
}

.cart-sidebar.active {
    pointer-events: auto;
}

.cart-sidebar-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.cart-sidebar.active .cart-sidebar-overlay {
    opacity: 1;
}

.cart-sidebar-panel {
    position: absolute;
    top: 0;
    right: 0;
    width: 480px;
    max-width: 90vw;
    height: 100%;
    background: var(--background);
    box-shadow: var(--shadow-lg);
    transform: translateX(100%);
    transition: transform var(--transition-fast);
    display: flex;
    flex-direction: column;
}

.cart-sidebar.active .cart-sidebar-panel {
    transform: translateX(0);
}

.cart-sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 32px;
    border-bottom: none;
}

.cart-sidebar-header h3 {
    margin: 0;
    font-family: var(--font-primary);
    font-size: 25px;
    font-weight: 700;
    color: #323232;
    line-height: 1.2;
}

.cart-sidebar-close {
    background: none;
    border: none;
    cursor: pointer;
    padding: var(--spacing-xs);
    color: var(--text-primary);
    transition: color var(--transition-fast);
}

.cart-sidebar-close:hover {
    color: var(--primary-color);
}

.cart-sidebar-content {
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.cart-sidebar .widget_shopping_cart_content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* WooCommerce Mini Cart — Card Layout */
.cart-sidebar ul.cart_list,
.cart-sidebar ul.product_list_widget {
    margin: 0 32px !important;
    padding: 0 0 32px !important;
}

.cart-sidebar .woocommerce-mini-cart {
    flex: 1;
    overflow-y: auto;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.cart-sidebar .woocommerce-mini-cart-item {
    padding: 0;
    border: none;
    margin: 0;
}

.cart-sidebar .woocommerce-mini-cart-item::before,
.cart-sidebar .woocommerce-mini-cart-item::after {
    display: none;
}

/* Scale down text inside mini-cart sidebar to fit 480px panel */
.cart-sidebar .cart-item-card {
    --text-xs: 11px;
    --text-sm: 12px;
    --text-base: 13px;
    --text-md: 14px;
}

/* ── Shared Cart Item Card (used by mini-cart + full cart page) ─────────── */

.cart-item-card {
    display: grid;
    grid-template-columns: 84px 1fr auto;
    grid-template-rows: auto auto auto;
    column-gap: 14px;
    row-gap: 4px;
    padding: 10px 16px;
    border: 1px solid var(--flaman-secondary-3);
    border-radius: var(--radius-md);
    background: var(--background);
}

.cart-item-card__thumb {
    grid-row: 1 / -1;
    align-self: center;
    width: 84px;
    height: 70px;
    overflow: hidden;
    border-radius: 6px;
    background: #d9d9d9;
}

.cart-item-card__thumb a {
    display: block;
    width: 100%;
    height: 100%;
}

.cart-item-card__thumb img {
    width: 84px !important;
    height: 70px !important;
    object-fit: cover;
    border-radius: var(--radius-md);
}

.cart-item-card__details {
    grid-row: 1 / -1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    gap: 4px;
}

.cart-item-card__name {
    font-size: var(--text-md);
    font-weight: 700;
    line-height: 1.2;
    color: var(--flaman-headings);
    margin: 0;
}

.cart-item-card__name a {
    color: inherit;
    text-decoration: none;
}

.cart-item-card__name a:hover {
    color: var(--flaman-red);
}

.cart-item-card__sku {
    font-size: var(--text-base);
    color: var(--flaman-headings);
    line-height: 1.2;
    margin: 0;
}

.cart-item-card__variation-row {
    min-height: 22px;
}

.cart-item-card__variation {
    display: inline-block;
    padding: 4px 10px;
    font-size: var(--text-xs);
    font-weight: 700;
    color: var(--flaman-red);
    background: #F6D9DA;
    border: 1px solid var(--flaman-red);
    border-radius: 6px;
    line-height: 1;
}

/* Right column — price, qty, remove (rows 1–3) */
.cart-item-card__price,
.cart-item-card__qty,
.cart-item-card__remove-cell {
    grid-column: 3;
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.cart-item-card__price { grid-row: 1; }
.cart-item-card__qty   { grid-row: 2; gap: 16px; }
.cart-item-card__remove-cell { grid-row: 3; }

.cart-item-card__price,
.cart-item-card__price .woocommerce-Price-amount,
.cart-item-card__price bdi,
.cart-item-card__price .woocommerce-Price-currencySymbol {
    font-size: var(--text-md);
    font-weight: 700;
    color: var(--flaman-red) !important;
    text-align: right;
    line-height: 1.2;
}

/* Override WC's a.remove circle style (.woocommerce a.remove) */
.cart-item-card__remove,
.woocommerce .cart-item-card__remove {
    display: inline !important;
    font-size: var(--text-sm) !important;
    color: var(--flaman-red) !important;
    text-decoration: none;
    cursor: pointer;
    width: auto !important;
    height: auto !important;
    line-height: inherit !important;
    border-radius: 0 !important;
    font-weight: inherit !important;
    text-align: left !important;
    position: static !important;
}

.cart-item-card__remove:hover,
.woocommerce .cart-item-card__remove:hover {
    text-decoration: underline;
    color: var(--flaman-red-dark) !important;
    background: none !important;
}

/* Quantity control — bordered pill: - 1 + */
.mini-cart-qty-control {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    height: 35px;
    padding: 0 15px;
    border: 1px solid #DBE1E5;
    border-radius: 7px;
    font-family: var(--font-primary);
    font-size: 16px;
    font-weight: 400;
    color: #373737;
}

.mini-cart-qty-control.loading {
    opacity: 0.5;
    pointer-events: none;
}

.mini-cart-qty-btn {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    font-size: 16px;
    font-weight: 400;
    color: #373737;
    line-height: 1;
    width: 16px;
    text-align: center;
    font-family: var(--font-primary);
    transition: color var(--transition-fast);
}

.mini-cart-qty-btn:hover {
    color: var(--flaman-red);
}

.mini-cart-qty-value {
    min-width: 12px;
    text-align: center;
}

.mini-cart-tax-note {
    font-family: var(--font-primary);
    font-size: 16px;
    font-weight: 600;
    color: #323232;
}

/* Footer — subtotal + buttons */
.mini-cart-footer {
    border-top: 1px solid #DBE1E5;
    padding: 16px 32px 32px;
    background: var(--background);
}

.mini-cart-subtotal {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding-bottom: 16px;
    border-bottom: 1px solid #DBE1E5;
    margin-left: -32px;
    margin-right: -32px;
    padding-left: 32px;
    padding-right: 32px;
    margin-bottom: 20px;
}

.mini-cart-subtotal-left {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.mini-cart-subtotal-label {
    font-family: var(--font-primary);
    font-size: 14px;
    font-weight: 400;
    color: #505050;
}

.mini-cart-store {
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: var(--font-primary);
    font-size: 12px;
    color: #505050;
}

.mini-cart-store-label {
    font-weight: 400;
}

.mini-cart-store-name {
    font-weight: 600;
    color: #323232;
}

.mini-cart-store-dot {
    width: 8px;
    height: 8px;
    background: #22c55e;
    border-radius: 50%;
    flex-shrink: 0;
}

.mini-cart-subtotal-right {
    display: flex;
    align-items: baseline;
    gap: 4px;
}

.mini-cart-subtotal-amount {
    font-family: var(--font-primary);
    font-size: 25px;
    font-weight: 600;
    color: #C4161C;
}

/* Buttons — side by side */
.mini-cart-buttons {
    display: flex;
    gap: 10px;
}

.mini-cart-buttons .mini-cart-checkout-btn {
    flex: 1;
    text-align: center;
    padding: 16px 18px;
    font-family: var(--font-primary);
    font-size: 16px;
    font-weight: 700;
    border-radius: 8px;
    background: #C4161C;
    color: #fff;
    border: none;
    border-bottom: 2px solid #890005;
    text-transform: none;
    letter-spacing: 0;
    white-space: nowrap;
}

.mini-cart-buttons .mini-cart-checkout-btn:hover {
    background: var(--flaman-red-dark);
}

.mini-cart-buttons .mini-cart-continue-btn {
    flex: 1;
    text-align: center;
    padding: 16px 18px;
    font-family: var(--font-primary);
    font-size: 16px;
    font-weight: 700;
    border-radius: 8px;
    background: var(--flaman-blue);
    color: #fff;
    border: none;
    border-bottom: 2px solid #002c39;
    text-transform: none;
    letter-spacing: 0;
    white-space: nowrap;
}

.mini-cart-buttons .mini-cart-continue-btn:hover {
    background: var(--flaman-blue-dark);
    color: #fff;
}

/* Hide WC default total/buttons (replaced by custom footer) */
.cart-sidebar .woocommerce-mini-cart__total,
.cart-sidebar .woocommerce-mini-cart__buttons {
    display: none;
}

/* Empty cart state */
.mini-cart-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 48px 24px;
    gap: 16px;
}

.mini-cart-empty p {
    font-size: 15px;
    color: #505050;
    margin: 0;
}

.mini-cart-empty .btn-primary {
    margin-top: 8px;
}

/* Cart sidebar — mobile full-screen */
@media (max-width: 768px) {
    .cart-sidebar-panel {
        width: 100%;
        max-width: 100vw;
    }

    .cart-sidebar-header {
        padding: 20px;
    }

    .cart-sidebar ul.cart_list,
    .cart-sidebar ul.product_list_widget {
        margin: 0 20px !important;
        padding: 0 0 20px !important;
    }

    .mini-cart-footer {
        padding: 16px 20px 20px;
    }

    .mini-cart-subtotal {
        margin-left: -20px;
        margin-right: -20px;
        padding-left: 20px;
        padding-right: 20px;
    }

    .mini-cart-buttons {
        flex-direction: column;
    }
}

/* =====================================================
   Quote Sidebar
   ===================================================== */

.quote-sidebar {
    position: fixed;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    pointer-events: none;
}

.quote-sidebar.active {
    pointer-events: auto;
}

.quote-sidebar-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.quote-sidebar.active .quote-sidebar-overlay {
    opacity: 1;
}

.quote-sidebar-panel {
    position: absolute;
    top: 0;
    right: 0;
    width: 480px;
    max-width: 90vw;
    height: 100%;
    background: var(--background);
    box-shadow: var(--shadow-lg);
    transform: translateX(100%);
    transition: transform var(--transition-fast);
    display: flex;
    flex-direction: column;
}

.quote-sidebar.active .quote-sidebar-panel {
    transform: translateX(0);
}

.quote-sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 32px;
    border-bottom: none;
}

.quote-sidebar-header h3 {
    margin: 0;
    font-family: var(--font-primary);
    font-size: 25px;
    font-weight: 700;
    color: #323232;
    line-height: 1.2;
}

.quote-sidebar-close {
    background: none;
    border: none;
    cursor: pointer;
    padding: var(--spacing-xs);
    color: var(--text-primary);
    transition: color var(--transition-fast);
}

.quote-sidebar-close:hover {
    color: var(--primary-color);
}

.quote-sidebar-content {
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* Scale down text inside quote sidebar to match mini-cart */
.quote-sidebar .cart-item-card {
    --text-xs: 11px;
    --text-sm: 12px;
    --text-base: 13px;
    --text-md: 14px;
}

/* Quote item list — mirrors .woocommerce-mini-cart */
.quote-sidebar-list {
    margin: 0 32px !important;
    padding: 0 0 32px !important;
    list-style: none;
    overflow-y: auto;
    flex: 1;
}

.quote-sidebar-list > li {
    margin-bottom: 16px;
}

.quote-sidebar-list > li:last-child {
    margin-bottom: 0;
}

/* Footer — mirrors .mini-cart-footer */
.quote-sidebar-footer {
    border-top: 1px solid #DBE1E5;
    padding: 16px 32px 32px;
    background: var(--background);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.quote-sidebar-summary {
    display: flex;
    justify-content: center;
    padding-bottom: 4px;
}

.quote-sidebar-count {
    font-family: var(--font-primary);
    font-size: 14px;
    font-weight: 400;
    color: #505050;
}

.quote-send-btn {
    display: block;
    width: 100%;
    padding: 14px 16px;
    background: #C4161C;
    border: none;
    border-radius: 5px;
    color: #ffffff;
    font-family: var(--font-primary);
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    text-align: center;
    cursor: pointer;
    transition: background var(--transition-fast);
    text-decoration: none;
    letter-spacing: 0;
}

.quote-send-btn:hover {
    background: #9B1219;
}

.quote-send-btn:disabled {
    background: #8E8F95;
    cursor: not-allowed;
}

.quote-continue-btn {
    display: block;
    width: 100%;
    padding: 14px 16px;
    border-radius: 5px;
    font-family: var(--font-primary);
    font-size: 14px;
    font-weight: 700;
    text-align: center;
    text-transform: uppercase;
    cursor: pointer;
    letter-spacing: 0;
    white-space: nowrap;
}

.quote-sidebar-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 48px 24px;
    flex: 1;
    gap: 16px;
}

.quote-sidebar-empty p {
    font-family: var(--font-primary);
    font-size: 15px;
    color: #505050;
    margin: 0;
}

.quote-sidebar-empty .btn-primary {
    margin-top: 8px;
}

.quote-sidebar-success {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 48px 24px;
    flex: 1;
    gap: 12px;
}

.quote-sidebar-success p {
    font-family: var(--font-primary);
    font-size: var(--text-lg);
    font-weight: 600;
    color: #323232;
    margin: 0;
}

/* Quote sidebar form */
.quote-sidebar-form-wrap {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 0 32px 32px;
    overflow-y: auto;
}

.quote-sidebar-form label {
    display: block;
    font-family: var(--font-primary);
    font-weight: 600;
    font-size: var(--text-sm);
    margin-bottom: 4px;
    margin-top: var(--spacing-sm);
    color: #323232;
}

.quote-sidebar-form label:first-child {
    margin-top: 0;
}

.quote-sidebar-form label .required {
    color: var(--flaman-red);
}

.quote-sidebar-form input[type="text"],
.quote-sidebar-form input[type="email"],
.quote-sidebar-form input[type="tel"],
.quote-sidebar-form select,
.quote-sidebar-form textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #DBE1E5;
    border-radius: 5px;
    font-family: var(--font-primary);
    font-size: var(--text-base);
    box-sizing: border-box;
    transition: border-color var(--transition-fast);
    background: #fff;
}

.quote-sidebar-form input:focus,
.quote-sidebar-form select:focus,
.quote-sidebar-form textarea:focus {
    outline: none;
    border-color: var(--flaman-red);
}

.quote-form-notice {
    font-family: var(--font-primary);
    font-size: 12px;
    color: #8E8F95;
    line-height: 1.5;
    margin: var(--spacing-md) 0 0;
    text-align: center;
}

.quote-sidebar-form .quote-send-btn {
    margin-top: var(--spacing-sm);
}

.quote-form-error {
    color: var(--flaman-red);
    font-size: var(--text-sm);
    margin-top: var(--spacing-sm);
}

.quote-form-back {
    display: block;
    text-align: center;
    margin-top: var(--spacing-sm);
    font-family: var(--font-primary);
    font-size: var(--text-sm);
    color: #505050;
}

.quote-form-back:hover {
    color: var(--flaman-red);
}

/* Quote toast notification */
.quote-toast {
    position: absolute;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background: #323232;
    color: #fff;
    font-family: var(--font-primary);
    font-size: 13px;
    font-weight: 500;
    padding: 10px 20px;
    border-radius: 6px;
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
    pointer-events: none;
    white-space: nowrap;
    z-index: 10;
}

.quote-toast.visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

@media (max-width: 768px) {
    .quote-sidebar-panel {
        width: 100%;
        max-width: 100vw;
    }

    .quote-sidebar-header {
        padding: 20px;
    }

    .quote-sidebar-list {
        margin: 0 20px !important;
        padding: 0 0 20px !important;
    }

    .quote-sidebar-footer {
        padding: 16px 20px 20px;
    }

    .quote-sidebar-form-wrap {
        padding: 0 20px 20px;
    }
}

/* =====================================================
   Mobile Nav Drawer
   ===================================================== */

.nav-drawer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    pointer-events: none;
}

.nav-drawer.active {
    pointer-events: auto;
}

.nav-drawer-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.nav-drawer.active .nav-drawer-overlay {
    opacity: 1;
}

.nav-drawer-panel {
    position: absolute;
    top: 0;
    right: 0;
    width: 300px;
    max-width: 85vw;
    height: 100%;
    background: var(--background);
    box-shadow: var(--shadow-lg);
    transform: translateX(100%);
    transition: transform var(--transition-fast);
    display: flex;
    flex-direction: column;
}

.nav-drawer.active .nav-drawer-panel {
    transform: translateX(0);
}

.nav-drawer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-lg);
    border-bottom: 1px solid var(--border-color);
}

.nav-drawer-title {
    font-family: var(--font-primary);
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--flaman-headings);
}

.nav-drawer-close {
    background: none;
    border: none;
    cursor: pointer;
    padding: var(--spacing-xs);
    color: var(--text-primary);
    transition: color var(--transition-fast);
}

.nav-drawer-close:hover {
    color: var(--flaman-red);
}

.nav-drawer-content {
    flex: 1;
    overflow-y: auto;
}

.nav-drawer-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.nav-drawer-menu li {
    border-bottom: 1px solid var(--border-color);
}

.nav-drawer-menu li:last-child {
    border-bottom: none;
}

.nav-drawer-menu > li > a {
    display: block;
    padding: 15px var(--spacing-lg);
    color: var(--flaman-headings);
    font-family: var(--font-primary);
    font-size: 15px;
    font-weight: 500;
    transition: color var(--transition-fast), background var(--transition-fast);
}

.nav-drawer-menu > li > a:hover {
    color: var(--flaman-red);
    background: var(--background-gray);
}

.nav-drawer-menu .current-menu-item > a {
    color: var(--flaman-red);
    font-weight: 600;
}

/* Submenu parent item — flex row for link + toggle */
.nav-drawer-menu .menu-item-has-children {
    position: relative;
}

.nav-drawer-menu .menu-item-has-children > a {
    padding-right: 52px;
}

.submenu-toggle {
    position: absolute;
    top: 0;
    right: 0;
    width: 52px;
    height: 49px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    border-left: 1px solid var(--border-color);
    cursor: pointer;
    color: var(--flaman-red);
    transition: transform var(--transition-fast);
}

.submenu-toggle svg {
    width: 14px;
    height: 14px;
    transition: transform var(--transition-fast);
}

.submenu-toggle.open svg {
    transform: rotate(180deg);
}

/* Submenu items */
.nav-drawer-menu .sub-menu {
    display: none;
    list-style: none;
    padding: 0;
    margin: 0;
    background: var(--background-gray);
}

.nav-drawer-menu .sub-menu a {
    display: block;
    padding: 12px var(--spacing-lg) 12px calc(var(--spacing-lg) + 16px);
    color: var(--text-secondary);
    font-family: var(--font-primary);
    font-size: 14px;
    font-weight: 400;
    transition: color var(--transition-fast);
}

.nav-drawer-menu .sub-menu a:hover {
    color: var(--flaman-red);
}

/* Hide ::after arrow WP generates for parent items in drawer */
.nav-drawer-menu .menu-item-has-children > a::after {
    display: none;
}

/* Nav drawer footer — account link on mobile */
.nav-drawer-footer {
    margin-top: auto;
    border-top: 1px solid var(--border-color);
    padding: var(--spacing-md) var(--spacing-lg);
}

.nav-drawer-account-link {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-primary);
    font-size: 15px;
    font-weight: 500;
    color: var(--flaman-headings);
    text-decoration: none;
    padding: 8px 0;
}

.nav-drawer-account-link:hover {
    color: var(--flaman-red);
}

.nav-drawer-account-link svg {
    flex-shrink: 0;
}

/* =====================================================
   Standard Modal
   ===================================================== */

.flaman-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
}

/* jQuery fadeIn sets display:block — override to flex for centering */
.flaman-modal[style*="display: block"],
.flaman-modal[style*="display:block"] {
    display: flex !important;
}

.flaman-modal.active {
    display: flex;
}

.flaman-modal__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
}

.flaman-modal__content {
    position: relative;
    background: #fff;
    border: 1px solid #DBE1E5;
    border-radius: 7px;
    box-shadow: 0 4px 8.4px rgba(0, 0, 0, 0.4);
    padding: 48px 32px 40px;
    max-width: 400px;
    width: 90%;
    z-index: 1;
    text-align: center;
}

.flaman-modal__close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: none;
    border: none;
    font-size: 24px;
    color: #505050;
    cursor: pointer;
    line-height: 1;
    padding: 0;
}

.flaman-modal__close:hover {
    color: #323232;
}

.flaman-modal__title {
    font-family: var(--font-primary);
    font-size: 25px;
    font-weight: 700;
    color: var(--flaman-blue);
    line-height: 1.2;
    margin: 0 0 12px;
}

.flaman-modal__text,
.flaman-modal__message {
    font-family: var(--font-primary);
    font-size: 13px;
    color: #323232;
    line-height: 1.25;
    margin: 0 0 24px;
}

.flaman-modal__message {
    font-size: 15px;
    font-weight: 500;
    line-height: 1.5;
}

.flaman-modal__icon {
    margin-bottom: var(--spacing-md);
}

.flaman-modal__select {
    width: 100%;
    height: 43px;
    border: 1px solid #DBE1E5;
    border-radius: 7px;
    padding: 0 36px 0 16px;
    font-family: var(--font-primary);
    font-size: 16px;
    color: #373737;
    appearance: none;
    -webkit-appearance: none;
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='none' stroke='%23C4161C' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round' d='M1 1.5L6 6.5L11 1.5'/%3E%3C/svg%3E") no-repeat right 12px center;
    cursor: pointer;
    box-sizing: border-box;
}

.flaman-modal__select:focus {
    outline: 2px solid var(--flaman-red);
    outline-offset: 2px;
}

.flaman-modal__actions {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
    margin-top: 24px;
}

.flaman-modal__btn {
    width: 100%;
    font-family: var(--font-primary);
    font-size: 16px;
    font-weight: 700;
    padding: 16px 18px;
    border-radius: 8px;
    cursor: pointer;
    border: none;
    transition: background var(--transition-fast);
    text-align: center;
}

.flaman-modal__btn--primary {
    background: #C4161C;
    border-bottom: 2px solid #890005;
    color: #fff;
}

.flaman-modal__btn--primary:hover {
    background: #9B1219;
}

.flaman-modal__btn--secondary {
    background: #fff;
    border: 1.5px solid #DBE1E5;
    color: #505050;
}

.flaman-modal__btn--secondary:hover {
    border-color: #8E8F95;
    color: #323232;
}

/* =====================================================
   Navigation
   ===================================================== */

.main-navigation {
    background: var(--background);
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.main-navigation ul {
    list-style: none;
    display: flex;
    gap: 0;
    padding: 0;
    margin: 0;
    justify-content: center;
}

.main-navigation li {
    position: relative;
}

.main-navigation a {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    padding: var(--spacing-md) var(--spacing-lg);
    color: var(--text-primary);
    font-size: 0.9375rem;
    font-weight: 500;
    transition: color var(--transition-fast);
    border: none;
    background: transparent;
}

.main-navigation a:hover {
    color: var(--flaman-red);
    background: transparent;
}

/* Dropdown arrow for menu items with children */
.main-navigation .menu-item-has-children > a::after {
    content: '';
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 5px solid currentColor;
    margin-left: var(--spacing-xs);
}

/* Submenu Dropdown Styles */
.main-navigation .sub-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 200px;
    background: var(--background);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-md);
    z-index: 1000;
    padding: var(--spacing-xs) 0;
}

.main-navigation .menu-item-has-children:hover > .sub-menu {
    display: block;
}

.main-navigation .sub-menu li {
    display: block;
}

.main-navigation .sub-menu a {
    display: block;
    padding: var(--spacing-sm) var(--spacing-lg);
    font-size: 0.875rem;
    font-weight: 400;
    white-space: nowrap;
}

.main-navigation .sub-menu a:hover {
    background: var(--background-gray);
    color: var(--flaman-red);
}

/* Active Navigation State */
.main-navigation .current-menu-item > a,
.main-navigation .current_page_item > a,
.main-navigation a.active {
    color: var(--flaman-red);
    font-weight: 600;
}

.main-navigation .current-menu-item > a:hover,
.main-navigation .current_page_item > a:hover {
    color: var(--flaman-red-dark);
}

/* =====================================================
   Secondary Navigation (Category-specific)
   ===================================================== */

.secondary-navigation {
    background: var(--background);
    border-top: 1px solid var(--flaman-secondary-3);
    border-bottom: 1px solid var(--flaman-secondary-3);
    /* Ensure it's part of the sticky header without shifting */
    flex-shrink: 0;
}

.secondary-navigation .container {
    max-width: 1400px;
}

.secondary-navigation ul {
    list-style: none;
    display: flex;
    padding: 0;
    margin: 0;
    justify-content: space-between;
    flex-wrap: nowrap;
}

.secondary-navigation li {
    position: relative;
}

.secondary-navigation a {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    padding: 15.5px 0;
    color: var(--flaman-headings);
    font-family: var(--font-primary);
    font-size: 15px;
    font-weight: 500;
    line-height: 1.2;
    transition: color var(--transition-fast);
    border: none;
    background: transparent;
    white-space: nowrap;
}

.secondary-navigation a:hover {
    color: var(--flaman-red);
}

/* Hide dropdown arrow on Locations menu item (no submenu needed) */
.menu-item-133.menu-item-has-children > a::after {
    display: none;
}

/* Dropdown arrow for menu items with children */
.secondary-navigation .menu-item-has-children > a::after {
    content: '';
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 6px solid var(--flaman-red);
    margin-left: 8px;
}

/* Submenu Dropdown Styles */
.secondary-navigation .sub-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 200px;
    background: var(--background);
    border: 1px solid var(--flaman-secondary-3);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-md);
    z-index: 1000;
    padding: var(--spacing-xs) 0;
}

.secondary-navigation .menu-item-has-children:hover > .sub-menu {
    display: block;
}

.secondary-navigation .sub-menu li {
    display: block;
}

.secondary-navigation .sub-menu a {
    display: block;
    padding: var(--spacing-sm) var(--spacing-lg);
    font-size: 14px;
    font-weight: 400;
    white-space: nowrap;
}

.secondary-navigation .sub-menu a:hover {
    background: var(--background-gray);
    color: var(--flaman-red);
}

/* Active Navigation State for Secondary Menu */
.secondary-navigation .current-menu-item > a,
.secondary-navigation .current_page_item > a,
.secondary-navigation a.active {
    color: var(--flaman-red);
}

/* 1024px and below: secondary nav hidden, hamburger shown — see header media queries */

/* =====================================================
   Sidebar Styles
   ===================================================== */

.sidebar-section {
    margin-bottom: var(--spacing-lg);
    background: var(--background);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.sidebar-section-header {
    background: var(--flaman-blue);
    color: var(--background);
    padding: var(--spacing-md) var(--spacing-lg);
    font-weight: 600;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.sidebar-section-content {
    padding: var(--spacing-md) var(--spacing-lg);
}

.sidebar-section-content ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-section-content ul li {
    padding: var(--spacing-xs) 0;
    border-bottom: 1px solid var(--border-light);
}

.sidebar-section-content ul li:last-child {
    border-bottom: none;
}

.sidebar-section-content ul li a {
    color: var(--text-primary);
    transition: color var(--transition-fast);
}

.sidebar-section-content ul li a:hover,
.sidebar-section-content ul li a.active {
    color: var(--flaman-red);
}

/* Widget/Filter Section Headers */
.widget-title,
.filter-title {
    background: var(--flaman-blue);
    color: var(--background);
    padding: var(--spacing-md) var(--spacing-lg);
    margin: 0 0 var(--spacing-md) 0;
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
}

/* =====================================================
   Product Cards
   ===================================================== */

/* Products Grid Container */
.woocommerce ul.products,
.products-wrapper ul.products {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--spacing-lg);
    list-style: none;
    padding: 0;
    margin: 0;
}

.product-card,
.woocommerce ul.products li.product {
    background: var(--background);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: box-shadow var(--transition-fast);
    position: relative;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.product-card:hover,
.woocommerce ul.products li.product:hover {
    box-shadow: var(--shadow-md);
}

/* Product Card Inner Wrapper */
.product-card-inner {
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* Clickable card — entire card navigates to product */
.product-card-inner[data-href] {
    cursor: pointer;
}

/* Product Image Container */
.product-card-image {
    position: relative;
    overflow: hidden;
    background: #f0f0f0;
}

.product-card-image a {
    display: block;
    position: relative;
}

/* Product thumbnail image - exclude badge */
.product-card-image img:not(.badge-canadian),
.woocommerce ul.products li.product .woocommerce-loop-product__link img:not(.badge-canadian) {
    width: 100%;
    aspect-ratio: 4/3;
    object-fit: cover;
    display: block;
}

/* Canadian Flag Badge */
.product-badge-canadian,
.badge-canadian {
    position: absolute !important;
    top: 12px !important;
    right: 12px !important;
    width: 28px !important;
    height: 28px !important;
    max-width: 28px !important;
    max-height: 28px !important;
    min-width: 28px !important;
    min-height: 28px !important;
    z-index: 2;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
    object-fit: contain;
    background-color: #ffffff;
    padding: 4px;
    box-sizing: border-box;
}

/* Ensure badge doesn't inherit product image styles */
.product-card-image .badge-canadian,
.product-gallery-main .product-gallery-badge {
    aspect-ratio: 1 / 1 !important;
}

/* Product Card Content */
.product-card-content {
    padding: 1.5em var(--spacing-md) 0;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.product-card-title,
.woocommerce ul.products li.product .woocommerce-loop-product__title {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    line-height: 1.35;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.product-card-title a {
    color: inherit;
}

.product-card-title a:hover {
    color: var(--flaman-red);
}

.product-card-specs {
    font-size: 0.875rem;
    color: var(--text-primary);
    margin: 0 0 1.5em 0;
    line-height: 1.6;
    /* Reserve 3 lines + span margins */
    height: 4.8em;
    overflow: hidden;
}

.product-card-specs span {
    display: block;
    margin-bottom: 2px;
}

.product-card-location {
    font-size: 0.875rem;
    color: var(--text-primary);
    margin: 0 0 var(--spacing-sm) 0;
}

/* Product Card Footer - Price and Actions on same row */
.product-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--spacing-sm);
    margin: auto calc(-1 * var(--spacing-md)) 0;
    padding: var(--spacing-md) var(--spacing-md) var(--spacing-md);
    border-top: 1px solid var(--border-light);
    flex-wrap: wrap;
}

/* Product Price */
.product-card-price,
.woocommerce ul.products li.product .price {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0;
    display: flex;
    align-items: baseline;
    gap: var(--spacing-xs);
    flex-wrap: wrap;
    min-width: 0;
}

.product-card-price .woocommerce-Price-amount {
    font-size: 1.25rem;
    font-weight: 700;
}

.product-card-price .tax-label {
    font-size: 0.75rem;
    font-weight: 400;
    color: var(--text-secondary);
}

.product-card-financing {
    font-size: 0.8125rem;
    color: var(--text-muted);
    margin-top: var(--spacing-xs);
    margin-bottom: 0;
}

/* Product Card Actions */
.product-card-actions {
    display: flex;
    gap: var(--spacing-xs);
    align-items: center;
    flex-wrap: wrap;
}

.product-card-actions .btn-view {
    padding: 8px 12px;
    background: var(--flaman-red);
    color: #fff;
    border: 1px solid var(--flaman-red);
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    text-align: center;
    cursor: pointer;
    transition: all var(--transition-fast);
    white-space: nowrap;
}

.product-card-actions .btn-view:hover {
    background: var(--flaman-red-dark);
    border-color: var(--flaman-red-dark);
}


/* =====================================================
   Breadcrumbs
   ===================================================== */

.breadcrumbs,
.woocommerce-breadcrumb {
    padding: var(--spacing-md) 0;
    font-size: 0.875rem;
}

.breadcrumbs a,
.woocommerce-breadcrumb a {
    color: var(--flaman-red);
}

.breadcrumbs a:hover,
.woocommerce-breadcrumb a:hover {
    color: var(--flaman-red-dark);
    text-decoration: underline;
}

.breadcrumbs span.separator {
    color: var(--text-muted);
    margin: 0 var(--spacing-xs);
}

/* =====================================================
   Page Headers
   ===================================================== */

.page-header {
    margin-bottom: var(--spacing-lg);
}

.page-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.page-title .item-count {
    font-weight: 400;
    color: var(--text-secondary);
}

/* =====================================================
   Product Detail Page (PDP)
   ===================================================== */

.product-detail {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: var(--spacing-xl);
    align-items: start;
}

@media (max-width: 1024px) {
    .product-detail {
        grid-template-columns: 1fr;
    }
}

/* Product Title & Meta */
.product-detail-header {
    margin-bottom: var(--spacing-lg);
}

.product-detail-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 var(--spacing-xs) 0;
}

.product-detail-sku {
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* Product Gallery */
.product-gallery {
    position: relative;
}

.product-gallery-main {
    position: relative;
    border-radius: var(--radius-md);
    overflow: hidden;
    margin-bottom: var(--spacing-md);
}

.product-gallery-main img:not(.product-gallery-badge) {
    width: 100%;
    aspect-ratio: 4/3;
    object-fit: contain;
    background: #f5f5f5;
}

.product-gallery-badge {
    position: absolute !important;
    top: 12px !important;
    left: 12px !important;
    width: 32px !important;
    height: 32px !important;
    max-width: 32px !important;
    max-height: 32px !important;
    z-index: 2;
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    background-color: #ffffff;
    padding: 5px;
    box-sizing: border-box;
}

.product-gallery-thumbnails {
    display: flex;
    gap: var(--spacing-sm);
    overflow-x: auto;
    padding-bottom: var(--spacing-sm);
}

.product-gallery-thumb {
    flex-shrink: 0;
    width: 80px;
    height: 60px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color var(--transition-fast);
}

.product-gallery-thumb:hover,
.product-gallery-thumb.active {
    border-color: var(--flaman-red);
}

.product-gallery-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background: var(--background);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-fast);
    z-index: 2;
}

.gallery-nav:hover {
    background: var(--flaman-red);
    color: var(--background);
    border-color: var(--flaman-red);
}

.gallery-nav-prev {
    left: var(--spacing-md);
}

.gallery-nav-next {
    right: var(--spacing-md);
}

/* Product Info Sidebar */
.product-info-sidebar {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

/* Price Box */
.product-price-box {
    background: var(--background);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: var(--spacing-lg);
}

.product-price-main {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--spacing-xs);
}

.product-price-main .tax-label {
    font-size: 1rem;
    font-weight: 400;
    color: var(--text-secondary);
}


.product-price-actions {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.product-price-actions .btn-buy-now {
    width: 100%;
    padding: var(--spacing-md);
    background: var(--flaman-red);
    color: var(--background);
    border: none;
    border-radius: var(--radius-sm);
    font-size: 1rem;
    font-weight: 600;
    text-transform: uppercase;
    cursor: pointer;
    transition: background var(--transition-fast);
}

.product-price-actions .btn-buy-now:hover {
    background: var(--flaman-red-dark);
}

.product-price-actions .btn-request-details {
    width: 100%;
    padding: var(--spacing-md);
    background: var(--flaman-blue);
    color: var(--background);
    border: none;
    border-radius: var(--radius-sm);
    font-size: 1rem;
    font-weight: 600;
    text-transform: uppercase;
    cursor: pointer;
    transition: background var(--transition-fast);
}

.product-price-actions .btn-request-details:hover {
    background: var(--flaman-blue-dark);
}

/* Specs Box */
.product-specs-box {
    background: var(--background);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: var(--spacing-lg);
}

.product-specs-box h3 {
    font-size: 1rem;
    font-weight: 700;
    margin: 0 0 var(--spacing-md) 0;
    color: var(--text-primary);
}

.product-specs-table {
    width: 100%;
}

.product-specs-table tr {
    border-bottom: 1px solid var(--border-light);
}

.product-specs-table tr:last-child {
    border-bottom: none;
}

.product-specs-table td {
    padding: var(--spacing-sm) 0;
    font-size: 0.875rem;
}

.product-specs-table td:first-child {
    color: var(--text-muted);
    width: 40%;
}

.product-specs-table td:last-child {
    color: var(--text-primary);
    font-weight: 500;
}

/* Location Box */
.product-location-box {
    background: var(--background);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: var(--spacing-lg);
}

.product-location-box h3 {
    font-size: 1rem;
    font-weight: 700;
    margin: 0 0 var(--spacing-sm) 0;
    color: var(--text-primary);
}

.product-location-name {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    font-size: 0.875rem;
    color: var(--text-primary);
    margin-bottom: var(--spacing-sm);
}

.product-location-name svg {
    color: var(--flaman-red);
    width: 16px;
    height: 16px;
}

.product-location-note {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-style: italic;
}


/* Product Description */
.product-description {
    background: var(--background);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: var(--spacing-xl);
    margin-top: var(--spacing-xl);
}

.product-description h2 {
    font-size: 1.125rem;
    font-weight: 700;
    margin: 0 0 var(--spacing-md) 0;
    padding-bottom: var(--spacing-md);
    border-bottom: 1px solid var(--border-light);
}

.product-description p {
    color: var(--text-secondary);
    line-height: 1.7;
}

/* Similar Items */
.similar-items {
    margin-top: var(--spacing-2xl);
}

.similar-items h2 {
    font-size: 1.5rem;
    font-weight: 700;
    font-style: italic;
    margin-bottom: var(--spacing-lg);
}

/* =====================================================
   Buttons
   ===================================================== */

.button,
.btn,
.btn-primary,
.btn-secondary,
.btn-outline,
.btn-buy,
.btn-buy-now,
.btn-view,
.btn-request-details,
button[type="submit"],
input[type="submit"],
.woocommerce button.button,
.woocommerce a.button {
    display: inline-block;
    padding: 8px 12px;
    background: var(--flaman-red);
    color: var(--background);
    border: 1px solid var(--flaman-red);
    border-radius: 6px;
    font-family: var(--font-primary);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.025em;
    text-align: center;
    cursor: pointer;
    transition: all var(--transition-fast);
    text-decoration: none;
    white-space: nowrap;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.button:hover,
.btn:hover,
.btn-primary:hover,
.btn-secondary:hover,
.btn-outline:hover,
.btn-buy:hover,
.btn-buy-now:hover,
.btn-view:hover,
.btn-request-details:hover,
button[type="submit"]:hover,
input[type="submit"]:hover,
.woocommerce button.button:hover,
.woocommerce a.button:hover {
    background: var(--flaman-red-dark);
    border-color: var(--flaman-red-dark);
    color: var(--background);
}

/* Primary Button (BUY NOW style — same as base, explicit for clarity) */
.button.primary,
.btn-primary,
.woocommerce .button.alt,
.woocommerce button.button.alt {
    background: var(--flaman-red);
    color: var(--background);
    border-color: var(--flaman-red);
}

.button.primary:hover,
.btn-primary:hover,
.woocommerce .button.alt:hover,
.woocommerce button.button.alt:hover {
    background: var(--flaman-red-dark);
    border-color: var(--flaman-red-dark);
}

/* Secondary Button (REQUEST DETAILS style) */
.button.secondary,
.btn-secondary {
    background: var(--flaman-blue);
    color: var(--background);
    border-color: var(--flaman-blue);
}

.button.secondary:hover,
.btn-secondary:hover {
    background: var(--flaman-blue-dark);
    border-color: var(--flaman-blue-dark);
}

/* Outline/Tertiary Button (VIEW style) */
.button.outline,
.btn-outline {
    background: transparent;
    color: var(--flaman-red);
    border: 1px solid var(--flaman-red);
}

.button.outline:hover,
.btn-outline:hover {
    background: var(--flaman-red);
    border-color: var(--flaman-red);
    color: var(--background);
}

/* Small button variant */
.button.small,
.btn-sm {
    padding: var(--spacing-xs) var(--spacing-md);
    font-size: 0.75rem;
}

/* =====================================================
   Forms
   ===================================================== */

input[type="text"],
input[type="email"],
input[type="password"],
input[type="tel"],
input[type="number"],
input[type="search"],
select,
textarea {
    width: 100%;
    padding: var(--spacing-sm) var(--spacing-md);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 1rem;
    font-family: var(--font-primary);
    transition: border-color var(--transition-fast);
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(211, 47, 47, 0.1);
}

label {
    display: block;
    margin-bottom: var(--spacing-xs);
    font-weight: 500;
    color: var(--text-primary);
}

/* =====================================================
   Grid System
   ===================================================== */

.grid {
    display: grid;
    gap: var(--spacing-lg);
}

.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

/* =====================================================
   Utility Classes
   ===================================================== */

.text-center { text-align: center; }
.text-right { text-align: right; }
.text-left { text-align: left; }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: var(--spacing-sm); }
.mt-2 { margin-top: var(--spacing-md); }
.mt-3 { margin-top: var(--spacing-lg); }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: var(--spacing-sm); }
.mb-2 { margin-bottom: var(--spacing-md); }
.mb-3 { margin-bottom: var(--spacing-lg); }

.hidden { display: none; }
.visible { display: block; }

/* =====================================================
   Responsive Design
   ===================================================== */

@media (max-width: 1024px) {
    .grid-4 { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 768px) {
    :root {
        --spacing-xl: 1.5rem;
        --spacing-2xl: 2rem;
        --text-xs: 11px;
        --text-sm: 12px;
        --text-base: 14px;
        --text-md: 14px;
        --text-lg: 18px;
        --text-xl: 20px;
        --text-2xl: 20px;
        --text-page-title: 1.4rem;
    }

    body {
        overflow-x: hidden;
    }

    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    h3 { font-size: 1.5rem; }

    .grid-3,
    .grid-4 { grid-template-columns: repeat(2, 1fr); }

    .container,
    .container-wide {
        padding: 0 var(--spacing-md);
        max-width: 100%;
    }

    .header-container {
        flex-wrap: nowrap;
        padding: 0 var(--spacing-sm);
    }

    .site-main {
        padding: var(--spacing-lg) 0;
    }

    /* Mobile Search Behavior */
    .header-search {
        position: static;
        flex: 0 0 auto;
        min-width: auto;
        display: flex;
        justify-content: flex-end;
    }

    .header-search .search-form {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100vw;
        height: 100vh;
        background: rgba(0, 0, 0, 0.9);
        z-index: 9999;
        display: none;
        flex-direction: column;
        align-items: center;
        padding: 5vh 5vw;
        padding-top: calc(60px + 2rem);
        overflow-y: auto;
        box-sizing: border-box;
    }

    .header-search .search-form.mobile-active {
        display: flex;
    }

    .header-search .search-form .search-wrapper {
        width: 100%;
        max-width: 90vw;
        margin: 0 auto;
        position: relative;
        box-sizing: border-box;
        background: var(--background);
        border: 1px solid var(--flaman-secondary-3);
        border-radius: 7px;
        overflow: hidden;
        display: flex;
        align-items: stretch;
        height: 45px;
        min-height: 45px;
    }

    .header-search .search-form .search-field {
        font-size: 1rem;
        padding: 0 1rem;
        flex: 1 1 auto;
        width: 0;
        min-width: 0;
        height: 100%;
        border: none;
        box-sizing: border-box;
    }

    .header-search .search-submit {
        min-width: 45px;
        width: 45px;
        height: 45px;
        padding: 0;
        flex-shrink: 0;
        border-radius: 0 6px 6px 0;
    }

    .header-search .search-autocomplete {
        position: relative !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        max-width: 90vw;
        width: 100%;
        margin: 0 auto;
        border-top: 1px solid var(--border-color);
        border-radius: 0 0 var(--radius-md) var(--radius-md);
        box-sizing: border-box;
    }
}

@media (max-width: 480px) {
    :root {
        --spacing-sm: 0.375rem;
        --spacing-md: 0.75rem;
        --spacing-lg: 1rem;
    }

    .grid-2,
    .grid-3,
    .grid-4 { grid-template-columns: 1fr; }

    .container,
    .container-wide {
        padding: 0 var(--spacing-md);
        max-width: 100%;
    }

    .site-header {
        /* Removed padding to prevent layout shifts - padding is on header-top instead */
    }

    .header-container {
        padding: 0 var(--spacing-sm);
        gap: var(--spacing-sm);
    }

    .site-logo {
        height: 32px;
    }
}
