/**
 * Codlion Theme - Main Stylesheet
 * Professional, minimal, standards-compliant CSS
 * 
 * @package Codlion Theme
 * @version 2.0.0
 * @author Codlion Development Team
 */

/* ==========================================================================
   CSS VARIABLES
   ========================================================================== */

:root {
    /* Typography */
    --main-font: 'IBM Plex Sans', sans-serif;
    --heading-font: var(--main-font);
    --body-font-size: 14px;
    --heading-font-weight: 600;
    --body-font-weight: 400;
    --body-line-height: 1.6;
    --letter-spacing: 0.2px;
    
    /* Heading sizes */
    --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;
    
    /* Colors — defaults set dynamically in theme-colors.php inline CSS */
    /* --primary-color, --secondary-color, --text-color, --light-text-color,
       --link-color, --link-hover-color, --cl-btn-text are set via wp_head priority 1 */
    --cart-count-bg-color: #e94c39;
    
    /* Scrollbar colors */
    --scrollbar-thumb-color: #c1c1c1;
    --scrollbar-thumb-hover-color: var(--primary-color);
    --dark-scrollbar-thumb-color: #404040;
    --dark-background-color: #1a1a1a;
    
    /* Product system colors — COD button/CTA defaults to green for conversion */
    --cl-success: #16a34a;
    --cl-success-dark-2: #15803d;
    --cl-success-dark-3: #166534;
    --cl-success-bg: #ecfdf5;
    --cl-success-border: #a7f3d0;
    --cl-success-bg-light: #f0fdf4;
    --cl-surface: #ffffff;
    --cl-surface-muted: #f9fafb;
    /* --cl-btn-text is set dynamically in theme-colors.php inline CSS */
    --cl-border: #d1d5db;
    --cl-danger: #dc2626;
    --cl-warning: #d97706;
}

/* ==========================================================================
   BASE STYLES
   ========================================================================== */

/**
 * RTL Support - Basic direction handling
 */
html[dir="rtl"] {
    direction: rtl;
}

html[dir="rtl"] body {
    direction: rtl;
}

/* RTL Menu Directions */
html[dir="rtl"] .mobile-menu {
    left: auto;
    right: -400px;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
    transition: right 0.3s ease;
}

html[dir="rtl"] .mobile-menu.active {
    left: auto;
    right: 0;
}

html[dir="rtl"] .cart-panel {
    right: auto;
    left: -400px;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    transition: left 0.3s ease;
}

html[dir="rtl"] .cart-panel.active {
    right: auto;
    left: 0;
}

/* RTL Dropdown Menu Support - Comprehensive */
html[dir="rtl"] .dropdown-menu {
    direction: rtl;
}

html[dir="rtl"] .dropdown-menu .pos-search__container {
    direction: rtl;
    flex-direction: row-reverse;
}

html[dir="rtl"] .dropdown-menu input[type="search"],
html[dir="rtl"] .dropdown-menu .pos-search__input {
    direction: rtl;
    text-align: right;
    border-radius: 0 5px 5px 0;
    border-right: 1px solid var(--cl-border, #ddd);
    border-left: none;
}

html[dir="rtl"] .dropdown-menu .pos-search__submit {
    order: -1;
    border-radius: 5px 0 0 5px;
}

html[dir="rtl"] .dropdown-menu form {
    direction: rtl;
}

/* RTL Search Overlay Logo - Move to right for RTL branding */
html[dir="rtl"] .search-overlay-logo {
    left: auto;
    right: 30px;
}

/* RTL Close Button - Move to left side */
html[dir="rtl"] .dialog-lightbox-close-button {
    right: auto;
    left: 20px;
}

/* RTL Search Clear Button - Move to left side of input */
html[dir="rtl"] .search-clear {
    right: auto;
    left: 60px;
}

/* RTL Mobile Responsive Overrides */
@media (max-width: 991px) {
    /* RTL Mobile Close Button - Maximum specificity to override mobile styles */
    html[dir="rtl"] body .dropdown-menu .dialog-lightbox-close-button.dialog-close-button,
    html[dir="rtl"] .dialog-lightbox-close-button,
    html[dir="rtl"] body .dialog-lightbox-close-button {
        right: auto;
        left: 5px;
    }
    
    /* RTL Mobile Search Container */
    html[dir="rtl"] .pos-search__container {
        direction: rtl;
        flex-direction: row-reverse;
    }
    
    /* RTL Mobile Search Input */
    html[dir="rtl"] .pos-search__input {
        direction: rtl;
        text-align: right;
        border-radius: 0 5px 5px 0;
        border-right: 1px solid var(--cl-border, #ddd);
        border-left: none;
    }
    
    /* RTL Mobile Search Submit Button */
    html[dir="rtl"] body .dropdown-menu form .pos-search__container .pos-search__submit {
        order: -1;
        border-radius: 5px 0 0 5px;
    }
    
    /* RTL Mobile Search Clear Button */
    html[dir="rtl"] .search-clear {
        right: auto;
        left: 50px;
    }
}

/* RTL Navigation Menu Support */
html[dir="rtl"] .nav-menu {
    direction: rtl;
}

html[dir="rtl"] .nav-menu ul {
    direction: rtl;
}

html[dir="rtl"] .nav-menu li {
    float: right;
}

html[dir="rtl"] .nav-menu a {
    text-align: right;
}

/* RTL Top Bar Support */
html[dir="rtl"] .announcement-bar {
    direction: rtl;
}

html[dir="rtl"] .announcement-content {
    direction: rtl;
}

html[dir="rtl"] .announcement-marquee {
    direction: rtl;
    animation: announcement-marquee-rtl 20s linear infinite;
}

html[dir="rtl"] .announcement-text {
    direction: rtl;
    text-align: right;
    unicode-bidi: embed;
}

html[dir="rtl"] .announcement-separator {
    direction: rtl;
}

/* Enhanced RTL text support for top bar */
html[dir="rtl"] .announcement-marquee span {
    direction: rtl;
    text-align: right;
    unicode-bidi: embed;
}

html[dir="rtl"] .announcement-content * {
    direction: rtl;
}

/* RTL Marquee Animation - Left to Right (Same speed as LTR) */
@keyframes announcement-marquee-rtl {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(50%);
    }
}

/* RTL Mobile Responsive */
@media (max-width: 991px) {
    html[dir="rtl"] .mobile-menu {
        right: -100%;
        left: auto;
    }
    
    html[dir="rtl"] .cart-panel {
        left: -100%;
        right: auto;
    }
}

/**
 * Typography foundation
 */
body {
    font-family: var(--main-font);
    font-size: var(--body-font-size);
    font-weight: var(--body-font-weight);
    line-height: var(--body-line-height);
    color: var(--text-color);
    letter-spacing: var(--letter-spacing);
    background-color: #ffffff;
}

/**
 * Headings
 */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--heading-font);
    font-weight: var(--heading-font-weight);
    margin: 0 0 1rem 0;
    line-height: 1.2;
}

h1 { font-size: var(--h1-font-size); }
h2 { font-size: var(--h2-font-size); }
h3 { font-size: var(--h3-font-size); }
h4 { font-size: var(--h4-font-size); }
h5 { font-size: var(--h5-font-size); }
h6 { font-size: var(--h6-font-size); }

/**
 * Links
 */
a {
    color: var(--link-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--link-hover-color);
}

/**
 * Generic .button class (used on 404 page, etc.)
 */
a.button,
.button {
    display: inline-block;
    padding: var(--button-padding, 12px 24px);
    background: var(--primary-color, #a67c52);
    color: var(--cl-btn-text, #fff);
    border: none;
    border-radius: var(--button-border-radius, 4px);
    font-size: 14px;
    font-weight: var(--button-font-weight, 500);
    letter-spacing: var(--button-letter-spacing, 0.5px);
    text-decoration: none;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.2s ease;
}

a.button:hover,
.button:hover {
    background: var(--link-hover-color, #8a6642);
    color: var(--cl-btn-text, #fff);
    transform: translateY(-1px);
}

/**
 * Paragraphs
 */
p {
    margin: 0 0 1rem 0;
}

/* ==========================================================================
   LAYOUT COMPONENTS
   ========================================================================== */

/**
 * Container
 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 12px;
}

/**
 * Site header - Simplified approach
 */
.site-header {
    position: fixed;
    top: 30px; /* Position below announcement bar */
    left: 0;
    right: 0;
    z-index: 1000;
    height: var(--header-height, 72px);
    background: var(--header-bg-color, transparent);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

/* Header positioning adjustments */
body.enable-top-bar .site-header {
    top: 30px; /* Below announcement bar */
}

body:not(.enable-top-bar) .site-header {
    top: 0; /* At top when no announcement bar */
}

/* Scrolled state */
body.scrolled .site-header {
    top: 0; /* Move to top when scrolled */
    background: var(--header-bg-color-scroll, #ffffff);
}

/* Home page specific styling */
body.home .site-header {
    background: transparent;
    box-shadow: none;
}

body.home.scrolled .site-header {
    background: var(--header-bg-color-scroll, #ffffff);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/**
 * Header content
 */
.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    padding: 0 20px;
}

/**
 * Logo
 */
.site-branding {
    flex: 1;
    text-align: center;
}

.custom-logo {
    height: 40px;
    width: auto;
    object-fit: contain;
}

/**
 * Navigation
 */
.main-navigation {
    display: none;
}

@media (min-width: 992px) {
    .main-navigation {
        display: block;
    }
    
    .menu-toggle {
        display: none;
    }
}

/**
 * Header actions
 */
.header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.search-toggle,
.cart-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    color: var(--text-color);
    transition: color 0.3s ease;
}

.search-toggle:hover,
.cart-link:hover {
    color: var(--primary-color);
}

/**
 * Cart count - Moved to header-styles.css for better specificity and consolidation
 */
/* Cart count styles now consolidated in header-styles.css */

/* ==========================================================================
   CONTENT AREAS
   ========================================================================== */

/**
 * Body padding for fixed header
 */
body {
    padding-top: 0; /* Reset - let main content handle spacing */
}

/* Main content spacing instead of body padding */
.site-main {
    padding-top: 102px; /* Desktop: Top bar (30px) + Header (72px) */
    min-height: calc(100vh - 102px);
}

body:not(.enable-top-bar) .site-main {
    padding-top: 72px; /* Header only */
    min-height: calc(100vh - 72px);
}

body.scrolled .site-main {
    padding-top: 72px; /* Header only when scrolled */
    min-height: calc(100vh - 72px);
}

/**
 * Main content - Simple approach
 */
.site-main {
    padding-top: 102px; /* Desktop: Top bar (30px) + Header (72px) */
    min-height: calc(100vh - 102px);
}

/* Home page - no padding to allow hero to start from top */
body.home .site-main {
    padding-top: 0;
    min-height: 100vh;
}

body:not(.enable-top-bar) .site-main {
    padding-top: 72px; /* Header only */
    min-height: calc(100vh - 72px);
}

/* Home page without top bar - no padding */
body.home:not(.enable-top-bar) .site-main {
    padding-top: 0;
    min-height: 100vh;
}

body.scrolled .site-main {
    padding-top: 72px; /* Header only when scrolled */
    min-height: calc(100vh - 72px);
}

/* Home page scrolled - no padding */
body.home.scrolled .site-main {
    padding-top: 0;
    min-height: 100vh;
}

/* ==========================================================================
   FOOTER STYLES
   ========================================================================== */

/**
 * Site footer - Match codlion.com reference design
 */
.site-footer {
    background: var(--footer-background-color, #f8f8f8);
    color: var(--footer-text-color, var(--text-color, #333));
    padding: 40px 0 30px 0;
    clear: both;
    width: 100%;
    position: relative;
    z-index: 100;
    margin-top: auto;
}

/**
 * Footer container
 */
.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/**
 * Footer grid layout
 */
.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 60px;
    margin-bottom: 40px;
}

/**
 * Footer brand section (left column)
 */
.footer-brand {
    padding-right: 20px;
}

.footer-brand .footer-logo {
    font-size: 2rem;
    font-weight: 700;
    color: var(--footer-text-color, var(--text-color, #333));
    letter-spacing: 2px;
}

.footer-brand .brand-description {
    color: var(--footer-text-color, var(--light-text-color, #666));
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 30px;
}

/**
 * Newsletter section
 */
.newsletter-section h4 {
    color: var(--footer-text-color, var(--text-color, #333));
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.newsletter-section p {
    color: var(--footer-text-color, var(--light-text-color, #666));
    font-size: 13px;
    margin-bottom: 15px;
}

.newsletter-form {
    display: flex;
    gap: 0;
}

.newsletter-form input {
    flex: 1;
    padding: 12px 15px;
    border: 1px solid var(--cl-border, #ddd);
    border-right: none;
    font-size: 13px;
    outline: none;
}

.newsletter-form button {
    background: var(--primary-color, #a67c52);
    color: white;
    border: 1px solid var(--primary-color, #a67c52);
    padding: 12px 20px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease;
}

.newsletter-form button:hover {
    background: var(--link-hover-color, #6B4F0A);
}

/**
 * Footer widget columns
 */
.footer-widget h3 {
    color: #333;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.footer-widget ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-widget li {
    margin-bottom: 12px;
}

.footer-widget a {
    color: var(--footer-text-color, var(--light-text-color, #666));
    text-decoration: none;
    font-size: 13px;
    line-height: 1.5;
    transition: color 0.3s ease;
}

.footer-widget a:hover {
    color: var(--link-hover-color, #333);
}

/**
 * Contact info styling
 */
.contact-info {
    margin-bottom: 20px;
}

.contact-info .contact-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 12px;
    color: var(--footer-text-color, var(--light-text-color, #666));
    font-size: 13px;
    line-height: 1.5;
}

.contact-info .contact-item i {
    margin-right: 10px;
    margin-top: 2px;
    color: var(--primary-color, #a67c52);
}

/**
 * Social media icons
 */
.social-icons {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.social-icons a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: auto;
    height: auto;
    background: transparent;
    color: var(--social-icon-color, var(--footer-text-color, #4a4a4a));
    text-decoration: none;
    border-radius: 0;
    transition: opacity 0.25s ease, fill 0.25s ease;
}

.social-icons a:hover {
    background: transparent;
    opacity: 0.7;
    color: var(--primary-color, #a67c52);
}

/**
 * Footer bottom
 */
.footer-bottom {
    border-top: 1px solid var(--cl-border, #e0e0e0);
    padding: 25px 0;
    text-align: center;
}

.footer-bottom-content {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px 16px;
}

.footer-bottom .copyright {
    color: var(--copyright-text-color, var(--light-text-color, #666));
    font-size: 13px;
    margin: 0;
}

.footer-powered-by {
    color: var(--copyright-text-color, var(--light-text-color, #666));
    font-size: 13px;
    margin: 0;
}

.footer-powered-by a {
    color: var(--copyright-text-color, var(--light-text-color, #666));
    text-decoration: none;
    font-weight: 600;
    transition: opacity 0.2s ease;
}

.footer-powered-by a:hover {
    opacity: 0.8;
}

/**
 * Simple page content
 */
.simple-page-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 40px 20px;
}

.simple-page-content h1 {
    margin-bottom: 30px;
    color: var(--text-color);
}

.simple-page-content p {
    margin-bottom: 20px;
    color: var(--text-color);
}

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

/**
 * Mobile styles
 */
@media (max-width: 991px) {
    .header-content {
        padding: 0 15px;
    }
    
    .simple-page-content {
        padding: 20px 15px;
    }
    
    .custom-logo {
        height: 35px;
    }

    /* Mobile header: align to 30px announcement bar */
    body.enable-top-bar .site-header {
        top: 30px;
    }
    
    body.enable-top-bar.scrolled .site-header,
    body.scrolled .site-header {
        top: 0;
    }

    /* Mobile main content spacing — exact match: 30px bar + 55px header */
    .site-main {
        padding-top: 85px;
        min-height: calc(100vh - 85px);
    }
    
    body:not(.enable-top-bar) .site-main {
        padding-top: 55px;
        min-height: calc(100vh - 55px);
    }
    
    /* Mobile home page without top bar - no padding like desktop */
    body.home:not(.enable-top-bar) .site-main {
        padding-top: 0;
        min-height: 100vh;
    }
    
    body.scrolled .site-main {
        padding-top: 55px;
        min-height: calc(100vh - 55px);
    }
    
    /* Ensure footer visibility on mobile */
    .site-footer {
        position: relative;
        z-index: 1;
    }
    
    /* Mobile footer adjustments */
    .site-footer {
        padding: 20px 0 20px 0;
    }
    
    .footer-container {
        padding: 0 15px;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .footer-brand {
        text-align: center;
        padding-right: 0;
    }
    
    .footer-brand .footer-logo {
        font-size: 1.8rem;
    }
    
    .newsletter-form {
        flex-direction: column;
        gap: 10px;
    }
    
    .newsletter-form input {
        border-right: 1px solid var(--cl-border, #ddd);
    }
    
    .footer-widget {
        text-align: center;
    }
    
    .contact-info .contact-item {
        justify-content: center;
    }
    
    .social-icons {
        justify-content: center;
    }
}

/**
 * Large screens
 */
@media (min-width: 1200px) {
    .container {
        padding: 0 30px;
    }
}

/* ==========================================================================
   WORDPRESS CUSTOMIZER FOOTER ALIGNMENT SUPPORT
   ========================================================================== */

/**
 * Tablet, iPad, and Desktop footer alignment classes - Professional WordPress-Compliant Solution
 * Support for desktop-specific footer alignment settings using proper CSS specificity
 * Targets the actual classes generated by WordPress Customizer: desktop-footer-left, desktop-footer-center, desktop-footer-right
 * 
 * IMPORTANT: According to WordPress Customizer settings:
 * - Desktop Footer Alignment applies to screens wider than 767px (includes tablets, iPads, and desktop)
 * - Mobile Footer Alignment applies to screens 767px and narrower
 * 
 * Therefore, tablets and iPads should use the desktop alignment setting from Customizer
 */
@media (min-width: 768px) {
    /* Tablet/iPad footer widget alignment using correct Customizer class names - Complete Coverage */
    body.desktop-footer-left .site-footer .footer-widget,
    body.desktop-footer-left .site-footer .footer-widget h3,
    body.desktop-footer-left .site-footer .footer-bottom,
    body.desktop-footer-left .site-footer .footer-brand,
    body.desktop-footer-left .site-footer .footer-brand .footer-logo,
    body.desktop-footer-left .site-footer .footer-brand .brand-description,
    body.desktop-footer-left .site-footer .newsletter-section {
        text-align: left;
    }
    
    body.desktop-footer-center .site-footer .footer-widget,
    body.desktop-footer-center .site-footer .footer-widget h3,
    body.desktop-footer-center .site-footer .footer-bottom,
    body.desktop-footer-center .site-footer .footer-brand,
    body.desktop-footer-center .site-footer .footer-brand .footer-logo,
    body.desktop-footer-center .site-footer .footer-brand .brand-description,
    body.desktop-footer-center .site-footer .newsletter-section {
        text-align: center;
    }
    
    body.desktop-footer-right .site-footer .footer-widget,
    body.desktop-footer-right .site-footer .footer-widget h3,
    body.desktop-footer-right .site-footer .footer-bottom,
    body.desktop-footer-right .site-footer .footer-brand,
    body.desktop-footer-right .site-footer .footer-brand .footer-logo,
    body.desktop-footer-right .site-footer .footer-brand .brand-description,
    body.desktop-footer-right .site-footer .newsletter-section {
        text-align: right;
    }
    
    /* Tablet/iPad contact info and social icons alignment */
    body.desktop-footer-left .site-footer .contact-info .contact-item,
    body.desktop-footer-left .site-footer .social-icons {
        justify-content: flex-start;
    }
    
    body.desktop-footer-center .site-footer .contact-info .contact-item,
    body.desktop-footer-center .site-footer .social-icons {
        justify-content: center;
    }
    
    body.desktop-footer-right .site-footer .contact-info .contact-item,
    body.desktop-footer-right .site-footer .social-icons {
        justify-content: flex-end;
    }
    
    /* Footer brand section alignment with proper specificity */
    body.desktop-footer-left .site-footer .footer-brand,
    body.desktop-footer-left .site-footer .footer-brand .footer-logo,
    body.desktop-footer-left .site-footer .footer-brand .brand-description {
        text-align: left;
    }
    
    body.desktop-footer-center .site-footer .footer-brand,
    body.desktop-footer-center .site-footer .footer-brand .footer-logo,
    body.desktop-footer-center .site-footer .footer-brand .brand-description {
        text-align: center;
    }
    
    body.desktop-footer-right .site-footer .footer-brand,
    body.desktop-footer-right .site-footer .footer-brand .footer-logo,
    body.desktop-footer-right .site-footer .footer-brand .brand-description {
        text-align: right;
    }
    
    /* Contact info alignment with proper specificity */
    body.desktop-footer-left .site-footer .contact-info .contact-item {
        justify-content: flex-start;
    }
    
    body.desktop-footer-center .site-footer .contact-info .contact-item {
        justify-content: center;
    }
    
    body.desktop-footer-right .site-footer .contact-info .contact-item {
        justify-content: flex-end;
    }
    
    /* Social icons alignment with proper specificity */
    body.desktop-footer-left .site-footer .social-icons {
        justify-content: flex-start;
    }
    
    body.desktop-footer-center .site-footer .social-icons {
        justify-content: center;
    }
    
    body.desktop-footer-right .site-footer .social-icons {
        justify-content: flex-end;
    }
    
    /* Newsletter section alignment with proper specificity */
    body.desktop-footer-left .site-footer .newsletter-section {
        text-align: left;
    }
    
    body.desktop-footer-center .site-footer .newsletter-section {
        text-align: center;
    }
    
    body.desktop-footer-right .site-footer .newsletter-section {
        text-align: right;
    }
}



/**
 * Mobile and Tablet footer alignment classes - Professional WordPress-Compliant Solution
 * Support for mobile-specific footer alignment settings using proper CSS specificity
 * Tablets grouped with mobile for cleaner, more professional alignment control
 */
@media (max-width: 991px) {
    body.mobile-footer-left .site-footer .footer-widget h3 {
        text-align: left;
        margin-left: 0;
        margin-right: auto;
        display: block;
        width: 100%;
    }
    
    body.mobile-footer-center .site-footer .footer-widget h3 {
        text-align: center;
        margin-left: auto;
        margin-right: auto;
        display: block;
        width: 100%;
    }
    
    body.mobile-footer-right .site-footer .footer-widget h3 {
        text-align: right;
        margin-left: auto;
        margin-right: 0;
        display: inline-block;
    }
    
    /* Footer content alignment with proper specificity */
    body.mobile-footer-left .site-footer .footer-widget {
        text-align: left;
    }
    
    body.mobile-footer-center .site-footer .footer-widget {
        text-align: center;
    }
    
    body.mobile-footer-right .site-footer .footer-widget {
        text-align: right;
    }
    
    /* Footer bottom alignment with proper specificity */
    body.mobile-footer-left .site-footer .footer-bottom {
        text-align: left;
    }
    
    body.mobile-footer-center .site-footer .footer-bottom {
        text-align: center;
    }
    
    body.mobile-footer-right .site-footer .footer-bottom {
        text-align: right;
    }
    
    /* Contact info alignment with proper specificity */
    body.mobile-footer-left .site-footer .contact-info .contact-item {
        justify-content: flex-start;
    }
    
    body.mobile-footer-center .site-footer .contact-info .contact-item {
        justify-content: center;
    }
    
    body.mobile-footer-right .site-footer .contact-info .contact-item {
        justify-content: flex-end;
    }
    
    /* Social icons alignment with proper specificity */
    body.mobile-footer-left .site-footer .social-icons {
        justify-content: flex-start;
    }
    
    body.mobile-footer-center .site-footer .social-icons {
        justify-content: center;
    }
    
    body.mobile-footer-right .site-footer .social-icons {
        justify-content: flex-end;
    }
    
    /* Footer menu title underline alignment for mobile - Professional Solution */
    body.mobile-footer-left .site-footer .footer-widget h3::after {
        left: 0;
        right: auto;
        transform: none;
    }
    
    body.mobile-footer-center .site-footer .footer-widget h3::after {
        left: 50%;
        right: auto;
        transform: translateX(-50%);
    }
    
    body.mobile-footer-right .site-footer .footer-widget h3::after {
        right: 0;
        left: auto;
        transform: none;
    }
}

/**
 * Footer menu title underline alignment for tablet and desktop - Professional WordPress-Compliant Solution
 */
@media (min-width: 768px) {
    /* Body-based underline alignment using correct WordPress Customizer class names */
    body.desktop-footer-left .site-footer .footer-widget h3::after {
        left: 0;
        right: auto;
        transform: none;
    }
    
    body.desktop-footer-center .site-footer .footer-widget h3::after {
        left: 50%;
        right: auto;
        transform: translateX(-50%);
    }
    
    body.desktop-footer-right .site-footer .footer-widget h3::after {
        right: 0;
        left: auto;
        transform: none;
    }
}

/**
 * Desktop-specific footer alignment - Ensures footer alignment works on desktop screens
 * Uses the standard desktop breakpoint (992px) consistent with theme architecture
 */
@media (min-width: 992px) {
    /* Desktop footer widget alignment */
    body.desktop-footer-left .site-footer .footer-widget,
    body.desktop-footer-left .site-footer .footer-widget h3,
    body.desktop-footer-left .site-footer .footer-bottom,
    body.desktop-footer-left .site-footer .footer-brand,
    body.desktop-footer-left .site-footer .footer-brand .footer-logo,
    body.desktop-footer-left .site-footer .footer-brand .brand-description,
    body.desktop-footer-left .site-footer .newsletter-section {
        text-align: left;
    }
    
    body.desktop-footer-center .site-footer .footer-widget,
    body.desktop-footer-center .site-footer .footer-widget h3,
    body.desktop-footer-center .site-footer .footer-bottom,
    body.desktop-footer-center .site-footer .footer-brand,
    body.desktop-footer-center .site-footer .footer-brand .footer-logo,
    body.desktop-footer-center .site-footer .footer-brand .brand-description,
    body.desktop-footer-center .site-footer .newsletter-section {
        text-align: center;
    }
    
    body.desktop-footer-right .site-footer .footer-widget,
    body.desktop-footer-right .site-footer .footer-widget h3,
    body.desktop-footer-right .site-footer .footer-bottom,
    body.desktop-footer-right .site-footer .footer-brand,
    body.desktop-footer-right .site-footer .footer-brand .footer-logo,
    body.desktop-footer-right .site-footer .footer-brand .brand-description,
    body.desktop-footer-right .site-footer .newsletter-section {
        text-align: right;
    }
    
    /* Desktop right alignment: Reverse footer grid order for visual right-to-left layout */
    body.desktop-footer-right .site-footer .footer-grid {
        direction: rtl;
    }
    
    body.desktop-footer-right .site-footer .footer-grid > * {
        direction: ltr;
    }
    
    /* Desktop contact info and social icons alignment */
    body.desktop-footer-left .site-footer .contact-info .contact-item,
    body.desktop-footer-left .site-footer .social-icons {
        justify-content: flex-start;
    }
    
    body.desktop-footer-center .site-footer .contact-info .contact-item,
    body.desktop-footer-center .site-footer .social-icons {
        justify-content: center;
    }
    
    body.desktop-footer-right .site-footer .contact-info .contact-item,
    body.desktop-footer-right .site-footer .social-icons {
        justify-content: flex-end;
    }
    
    /* Desktop footer title underline alignment */
    body.desktop-footer-left .site-footer .footer-widget h3::after {
        left: 0;
        right: auto;
        transform: none;
    }
    
    body.desktop-footer-center .site-footer .footer-widget h3::after {
        left: 50%;
        right: auto;
        transform: translateX(-50%);
    }
    
    body.desktop-footer-right .site-footer .footer-widget h3::after {
        right: 0;
        left: auto;
        transform: none;
    }
}

/* Anti-spam honeypot: positioned off-screen rather than display:none,
   which the more careful bots specifically check for and skip. */
html body .cl-hp-wrap {
    position: absolute;
    left: -9999px;
    top: auto;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* ==========================================================================
   Unified Theme Colors (merged from style.css to eliminate extra HTTP request)
   These rules apply the primary color to multiple UI elements while allowing
   individual customization through the Customizer.
   ========================================================================== */

/* Footer Link Hover */
body .site-footer a:hover {
    color: var(--footer-link-hover-color);
}

/* Footer Title Underline */
body .site-footer .footer-widget .widget-title:after {
    background-color: var(--footer-title-underline-color);
}

/* Social Icon Hover — primary color on hover */
body .site-footer .codlion-social-icon:hover,
body .codlion-social-icon:hover {
    background: transparent;
    opacity: 0.7;
}

body .site-footer .codlion-social-icon:hover svg,
body .codlion-social-icon:hover svg {
    fill: var(--primary-color, #a67c52);
}

/* Newsletter Button */
body .site-footer .newsletter-form input[type="submit"],
body .newsletter-form input[type="submit"] {
    background-color: var(--newsletter-button-color);
}

/* Cart Count Badge */
.cart-count {
    background-color: var(--cart-count-bg-color, #919191);
}

/* Search Submit Button */
.search-form .search-submit,
.pos-search__submit {
    background-color: var(--header-text-color-scroll, #000000);
}

/* Search Submit Button Hover */
html body .search-form .search-submit:hover,
html body .pos-search__submit:hover {
    background-color: var(--link-hover-color, #8a6642);
}


