.ahb-header {
    width: 100%;
    position: relative;
    z-index: 1000;
    background: #fff;
}

.ahb-row {
    width: 100%;
    position: relative;
}

.ahb-row-inner {
    display: flex;
    flex-wrap: nowrap;
    flex-direction: row;
    align-items: center;
}

.ahb-col {
    display: flex;
    align-items: center;
    padding: 10px;
    gap: 20px;
    /* Use gap instead of margin-right for spacing */
}

/* Column alignment - these classes are added by the render function */
.ahb-col.justify-content-start {
    justify-content: flex-start;
}

.ahb-col.justify-content-center {
    justify-content: center;
}

.ahb-col.justify-content-end {
    justify-content: flex-end;
}

/* Remove old margin approach */
.ahb-col .ahb-component {
    /* gap handles spacing now */
}

/* Specific Row Styles */
.ahb-row-top_bar {
    background: #f8f9fa;
    border-bottom: 1px solid #ddd;
    font-size: 14px;
}

.ahb-row-main_header {
    padding: 15px 0;
    background: #fff;
}

.ahb-row-bottom_header {
    border-top: 1px solid #eee;
}

/* Component Styles */
.ahb-comp-logo img {
    max-height: 80px;
}

/* Make components respect parent alignment but don't force full width */
.ahb-component {
    display: flex;
    width: auto;
    /* Changed from 100% to auto to allow gap to work */
    flex-shrink: 0;
    /* Prevent components from shrinking */
}

/* Apply alignment to all components based on parent column */
.justify-content-start .ahb-component {
    justify-content: flex-start;
}

.justify-content-center .ahb-component {
    justify-content: center;
}

.justify-content-end .ahb-component {
    justify-content: flex-end;
}

/* Desktop Menu Styles */
@media (min-width: 992px) {
    .ahb-component.ahb-menu {
        width: 100%;
        display: flex;
    }

    .ahb-component.ahb-menu .navbar-nav {
        flex-direction: row;
        width: 100%;
        display: flex;
    }

    /* Inherit alignment from parent column for menu */
    .justify-content-start .ahb-component.ahb-menu .navbar-nav {
        justify-content: flex-start;
    }

    .justify-content-center .ahb-component.ahb-menu .navbar-nav {
        justify-content: center;
    }

    .justify-content-end .ahb-component.ahb-menu .navbar-nav {
        justify-content: flex-end;
    }

    .ahb-component.ahb-menu .nav-item {
        margin-left: 15px;
    }

    .ahb-component.ahb-menu .nav-link {
        padding-right: 0.5rem;
        padding-left: 0.5rem;
    }
}

/* Button component alignment */
.ahb-component.ahb-button {
    display: flex;
}

/* Icon component alignment */
.ahb-component.ahb-icon {
    display: flex;
}

/* Search component alignment */
.ahb-component.ahb-search {
    display: flex;
}

/* Social icons alignment */
.ahb-social-icons {
    display: flex;
    gap: 10px;
}

/* Force Sticky Text Color (User Request Fix) */
.ahb-sticky-header.is-sticky .ahb-sticky-row .navbar-nav .nav-link {
    color: var(--sticky-text, inherit) !important;
}

/* Professional Desktop Dropdown Styles */
@media (min-width: 992px) {

    /* Dropdown Container */
    .ahb-component.ahb-menu .dropdown-menu {
        border: none;
        border-radius: 8px;
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
        padding: 5px 0;
        /* Reduced vertical container padding */
        margin-top: 10px;
        /* Gap from link */
        background: var(--dropdown-bg, #ffffff);
        min-width: 220px;

        /* Animation Base State */
        display: block;
        /* Override BS display:none to handle via opacity */
        opacity: 0;
        visibility: hidden;
        transform: translateY(15px);
        transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
        pointer-events: none;
        /* Prevent clicks when hidden */
    }

    /* Show on Hover (Parent LI) */
    .ahb-component.ahb-menu .nav-item:hover>.dropdown-menu {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
        pointer-events: auto;
    }

    /* Dropdown Items */
    .ahb-component.ahb-menu .dropdown-item {
        padding-top: var(--dropdown-padding, 8px);
        /* Reduced default */
        padding-bottom: var(--dropdown-padding, 8px);
        padding-left: 20px;
        padding-right: 20px;
        font-size: 15px;
        color: var(--dropdown-text, #555);
        font-weight: 500;
        border-bottom: 1px solid transparent;
        transition: all 0.2s ease;
        background: transparent;
    }

    .ahb-component.ahb-menu .dropdown-item:hover {
        background-color: var(--dropdown-hover-bg, #f7f9fc);
        color: var(--dropdown-hover-text, #000);
        /* Darker text on hover */
        padding-left: 25px;
        /* Slide effect */
    }

    /* Remove arrow from toggle if desired, or keep it */
    /* Font Awesome Arrow */
    .ahb-component.ahb-menu .dropdown-toggle::after {
        display: inline-block;
        width: auto;
        height: auto;
        margin-left: 0.4em;
        vertical-align: middle;
        content: "\f107";
        /* fa-angle-down */
        font-family: "Font Awesome 6 Free";
        font-weight: 900;
        border: none !important;
        background-image: none !important;
        opacity: 1;
        font-size: 0.8em;
        /* Adjust size relative to text */
    }
}

/* Mobile Menu Offcanvas Styling */
.offcanvas {
    background-color: #ffffff;
    /* Ensure white background */
    color: #333;
    max-width: 85%;
    /* Don't take full width on very small screens */
}

/* Header inside offcanvas */
.offcanvas-header {
    border-bottom: 1px solid #eee;
    padding: 1rem 1.5rem;
}

.offcanvas-title {
    font-weight: 700;
    font-size: 1.25rem;
}

/* Menu items in offcanvas */
.offcanvas-body .navbar-nav {
    margin-top: 0;
    flex-direction: column !important;
    /* Force vertical stack */
}

.offcanvas-body .nav-item {
    border-bottom: 1px solid #f5f5f5;
    margin-left: 0 !important;
}

.offcanvas-body .nav-link {
    padding: 12px 0;
    font-size: 16px;
    font-weight: 500;
    color: #333;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Submenu Handling */
.offcanvas-body .dropdown-menu {
    border: none;
    background: #f9f9f9;
    padding-left: 15px;
    box-shadow: none;
    margin: 0;
    position: static !important;
    /* Ensure it flows in document */
    float: none;
}

.offcanvas-body .dropdown-item {
    padding: 10px 0;
    color: #555;
    font-size: 15px;
}

/* Toggler Icon Styling */
.navbar-toggler {
    border: none;
    padding: 0;
}

.navbar-toggler:focus {
    box-shadow: none;
}

/* Sticky Header Styles */
.ahb-sticky-header {
    position: sticky;
    top: 0;
    z-index: 1030;
    transition: transform 0.3s ease, background-color 0.3s ease, box-shadow 0.3s ease;
    transform: translateY(0);
}

/* When active sticky state (scrolled) */
.ahb-sticky-header.is-sticky {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    /* No default background here, handled by rows */
}

/* Hidden State for Revenge Scroll (added via JS) */
.ahb-sticky-header.header-hidden {
    transform: translateY(-100%);
    box-shadow: none;
}

/* HIDE Top Bar when sticky (User Request) */
.ahb-sticky-header.is-sticky .ahb-row-top_bar {
    display: none !important;
}

/* Main Header Row Sticky Logic */
/* By default it might have white bg, but valid sticky var overrides it */
.ahb-sticky-row {
    transition: background-color 0.3s, color 0.3s;
}

/* Only apply when parent header is stuck */
.ahb-header.is-sticky .ahb-sticky-row {
    background-color: var(--sticky-bg, #ffffff) !important;
    color: var(--sticky-text, inherit) !important;
}

/* Force text colors when sticky */
.ahb-header.is-sticky .ahb-sticky-row .nav-link,
.ahb-header.is-sticky .ahb-sticky-row .ahb-social-link,
.ahb-header.is-sticky .ahb-sticky-row a {
    color: var(--sticky-text, inherit);
}

.ahb-header.is-sticky .ahb-sticky-row .ahb-social-link:hover,
.ahb-header.is-sticky .ahb-sticky-row .nav-link:hover {
    opacity: 0.8;
}

/* Specific component overrides for sticky text/icons */
.ahb-header.is-sticky .ahb-sticky-row .ahb-cart-icon i,
.ahb-header.is-sticky .ahb-sticky-row .ahb-account-icon i,
.ahb-header.is-sticky .ahb-sticky-row .search-icon i {
    color: var(--sticky-icon, var(--sticky-text, inherit));
}

/* Ensure rows inside sticky header are transparent so the header background shows */
/* REMOVED: .ahb-sticky-header.is-sticky .ahb-row { background-color: transparent !important; } */
/* We want granular control now */


/* Ensure sticky header stays on top with Admin Bar */
body.admin-bar .ahb-sticky-header {
    top: 32px;
}

@media screen and (max-width: 782px) {
    body.admin-bar .ahb-sticky-header {
        top: 46px;
    }
}

/* Transparent Header Logic */
.ahb-transparent-header {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    background: transparent;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* When Transparent Header becomes Sticky */
.ahb-transparent-header.is-sticky {
    position: fixed;
    border-bottom: none;
    animation: slideDown 0.3s ease-out;
    background: transparent;
    /* Rely on row styling */
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
    }

    to {
        transform: translateY(0);
    }
}

/* Rows inside transparent header */
.ahb-transparent-header:not(.is-sticky) .ahb-row {
    background-color: transparent !important;
}

/* LOGO HANDLING */
.ahb-logo-link {
    display: inline-block;
    position: relative;
    z-index: 20;
    /* Ensure clickable */
    cursor: pointer;
}

.ahb-logo-link img {
    height: var(--logo-h-d, 80px);
    width: auto;
    object-fit: contain;
    max-height: none !important;
}

@media (max-width: 991px) {
    .ahb-logo-link img {
        height: var(--logo-h-m, 50px);
    }
}

/* Hide Alternate Logos by Default */
.ahb-logo-sticky,
.ahb-logo-transparent {
    display: none;
}

/* Sticky Logo Trigger */
.ahb-header.is-sticky .ahb-logo-standard {
    display: none;
}

.ahb-header.is-sticky .ahb-logo-sticky {
    display: inline-block;
}

/* If no sticky logo, prevent hiding standard one if it's the only one, but logic in render should handle this? No, CSS is cleaner. */
.ahb-header.is-sticky .ahb-logo-link:not(:has(.ahb-logo-sticky)) .ahb-logo-standard {
    display: inline-block !important;
}

/* Transparent Logo Trigger */
.ahb-transparent-header:not(.is-sticky) .ahb-logo-standard {
    display: none;
}

.ahb-transparent-header:not(.is-sticky) .ahb-logo-transparent {
    display: inline-block;
}

/* Fallback if no transparent logo */
.ahb-transparent-header:not(.is-sticky) .ahb-logo-link:not(:has(.ahb-logo-transparent)) .ahb-logo-standard {
    display: inline-block !important;
}

/* Social Icons */
.ahb-social-icons {
    display: flex;
    gap: 10px;
    align-items: center;
}

.ahb-social-link {
    color: inherit;
    font-size: 16px;
    text-decoration: none;
    transition: color 0.3s ease;
}

.ahb-social-link:hover {
    color: #007bff;
    /* Primary Color or theme color */
}

/* Styles */
.ahb-social-circle .ahb-social-link {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 32px;
    height: 32px;
    background: #f1f1f1;
    border-radius: 50%;
}

.ahb-social-square .ahb-social-link {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 32px;
    height: 32px;
    background: #f1f1f1;
    border-radius: 4px;
}

/* Mobile Responsive - Reset column widths */
@media (max-width: 991px) {

    /* On mobile, ignore desktop column widths */
    .ahb-col {
        width: auto !important;
        flex: 1 1 auto !important;
        max-width: none !important;
    }

    /* First column (logo) takes minimal space */
    .ahb-col:first-child {
        flex: 0 0 auto !important;
    }

    /* Last column (menu/buttons) takes remaining space and aligns right */
    .ahb-col:last-child {
        flex: 1 1 auto !important;
        justify-content: flex-end !important;
    }

    /* Hide desktop-only rows on mobile */
    .ahb-row.d-none.d-lg-block {
        display: none !important;
    }
}

/* Mobile Header Button - appears next to hamburger on mobile only */
.ahb-component.ahb-button {
    display: inline-flex;
    /* Show on desktop by default */
}

@media (max-width: 991px) {

    /* Hide regular buttons on mobile by default */
    .ahb-component.ahb-button {
        display: none !important;
    }

    /* Show button with specific class for mobile header */
    .ahb-component.ahb-button.mobile-header-btn {
        display: inline-flex !important;
        margin-left: 0.5rem;
    }
}

/* Mobile Header Button - hidden on desktop, visible on mobile */
.mobile-header-btn {
    display: none !important;
}

@media (max-width: 991px) {
    .mobile-header-btn {
        display: inline-flex !important;
        margin-left: 0.5rem;
    }
}

/* Button Styles */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1.5rem;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.btn-solid:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.btn-outline:hover {
    opacity: 0.8;
}

.btn i {
    font-size: 1em;
}

/* Plain text link style */
.btn-plain {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    font-weight: 500;
    transition: opacity 0.3s ease;
}

.btn-plain:hover {
    opacity: 0.7;
    text-decoration: underline;
}

/* Remove padding from main header row */
.ahb-row-main_header {
    padding: 0 !important;
}

/* Remove padding from logo component */
.ahb-component.ahb-logo {
    padding: 0 !important;
}

/* Mobile offcanvas dropdown menu z-index fix */
.offcanvas {
    z-index: 1045;
}

.offcanvas .dropdown-menu {
    position: relative !important;
    z-index: 1050;
    transform: none !important;
    border: none;
    box-shadow: none;
    background: transparent;
    padding-left: 1rem;
}

.offcanvas .dropdown-menu .dropdown-item {
    padding: 0.5rem 1rem;
    color: inherit;
}

.offcanvas .dropdown-toggle::after {
    float: right;
    margin-top: 0.5rem;
}

/* Modern Mobile Menu Styling */
.offcanvas {
    background: #ffffff;
    padding: 2rem 1.5rem;
}

.offcanvas-header {
    padding: 0 0 1.5rem 0;
    border-bottom: none;
}

.offcanvas-body {
    padding: 1.5rem 0;
}

/* Mobile menu items */
.offcanvas .navbar-nav {
    width: 100%;
}

.offcanvas .nav-item {
    border-bottom: 1px solid #f0f0f0;
    margin-bottom: 0;
}

.offcanvas .nav-link {
    padding: 1rem 0;
    font-size: 1.125rem;
    font-weight: 500;
    color: #1a1a1a;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.offcanvas .nav-link:hover {
    color: #00b4a8;
    background: transparent;
}

/* Dropdown toggle arrow */
.offcanvas .dropdown-toggle::after {
    content: "›";
    border: none;
    font-size: 1.5rem;
    font-weight: 300;
    margin-left: auto;
    transform: rotate(0deg);
    transition: transform 0.3s ease;
}

.offcanvas .dropdown-toggle[aria-expanded="true"]::after {
    content: "⌄";
    color: #00b4a8;
}

/* Dropdown menu */
.offcanvas .dropdown-menu {
    position: static !important;
    transform: none !important;
    border: none;
    box-shadow: none;
    background: transparent;
    padding: 0 0 0 1.5rem;
    margin: 0;
}

.offcanvas .dropdown-item {
    padding: 0.75rem 0;
    font-size: 1rem;
    font-weight: 400;
    color: #666;
    border: none;
    background: transparent;
}

.offcanvas .dropdown-item:hover {
    color: #00b4a8;
    background: transparent;
}

/* Close button */
.offcanvas .btn-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    opacity: 0.5;
}

.offcanvas .btn-close:hover {
    opacity: 1;
}

/* Mobile menu buttons at bottom */
.mobile-offcanvas-button,
.mobile-offcanvas-whatsapp {
    margin-top: 1.5rem;
}

.mobile-offcanvas-button .btn,
.mobile-offcanvas-whatsapp .btn {
    width: 100%;
    padding: 1rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 50px;
}

.mobile-offcanvas-button .btn-primary {
    background: linear-gradient(135deg, #ffa726 0%, #ff9800 100%);
    border: none;
}

.mobile-offcanvas-button .btn-outline-primary {
    background: transparent;
    border: 2px solid #00b4a8;
    color: #00b4a8;
}

.mobile-offcanvas-whatsapp .btn-success {
    background: #25d366;
    border: none;
}

/* Refined Mobile Menu Styling */



/* Submenu Vertical Line */
.offcanvas .dropdown-menu {
    border-left: 2px solid #e0e0e0;
    margin-left: 0.5rem;
    padding-left: 1rem;
    border-radius: 0;
}

.offcanvas .dropdown-item {
    position: relative;
    padding-left: 1rem;
}

/* Active State for Modules (Simulated based on image) */
.offcanvas .nav-link.active,
.offcanvas .nav-link[aria-expanded="true"] {
    color: #00b4a8;
}

/* Buttons at bottom */
.mobile-offcanvas-button .btn {
    background: #ffb74d;
    /* Light orange */
    border: none;
    color: #333;
    font-weight: 600;
}

.mobile-offcanvas-button .btn:hover {
    background: #ffa726;
}

.mobile-offcanvas-whatsapp .btn {
    background: #fff;
    border: 1px solid #00b4a8;
    color: #00b4a8;
}

.mobile-offcanvas-whatsapp .btn:hover {
    background: #f0fdff;
    color: #008f85;
    border-color: #008f85;
}

/* Remove default close btn if it still exists via specificity */
.offcanvas .btn-close {
    display: none;
}

/* Fix Offcanvas Layout for Bottom Footer */
.offcanvas-body {
    display: flex;
    flex-direction: column;
    padding: 1.5rem 0 0 0;
    /* Removing bottom padding to let footer sit flush if needed */
}

.mobile-menu-container {
    overflow-y: auto;
    padding: 0 1.5rem;
    /* Scrollable area padding */
}

.mobile-offcanvas-footer {
    padding: 1.5rem;
    border-top: 1px solid #f0f0f0;
    margin-top: auto;
    background: #fff;
    width: 100%;
    flex-shrink: 0;
}

/* 3rd Level Menu Fix & Styling */
.offcanvas .dropdown-menu {
    border-left: 2px solid #e0e0e0;
    margin-left: 0.5rem;
    padding-left: 1rem;
    border-radius: 0;
    /* Ensure nested dropdowns are visible when parent is open */
}

/* Fix nested dropdown toggles */
.offcanvas .dropdown-menu .dropdown-toggle {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.offcanvas .dropdown-menu .dropdown-toggle::after {
    margin-left: auto;
}

/* Force show nested dropdowns when parent is active/clicked (Bootstrap 5 workaround) */
/* Note: Standard BS5 js might close parent. If so, JS is transparently needed. 
   But for CSS-only visual fix if structure exists: */
.offcanvas .dropdown-menu .dropdown-menu {
    display: none;
    /* Hidden by default */
    border-left: 2px solid #e0e0e0;
    /* Continue line for 3rd level */
    margin-left: 0.5rem;
}

.offcanvas .dropdown-menu .show>.dropdown-menu {
    display: block;
}

/* If standard bootstrap JS is used, clicking a submenu toggle might not work as expected.
   However, styling the line is the priority here. */


/* Fix missing arrows for nested dropdowns */
.offcanvas .menu-item-has-children>a {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.offcanvas .menu-item-has-children>a::after {
    content: "›";
    /* Arrow content */
    border: none;
    font-size: 1.5rem;
    font-weight: 300;
    margin-left: auto;
    transition: transform 0.3s ease;
    display: inline-block;
}

/* Rotate arrow when open (using custom class or aria attribute) */
.offcanvas .menu-item-has-children>a[aria-expanded="true"]::after {
    transform: rotate(90deg);
}

/* Ensure submenu styling is consistent */
.offcanvas .sub-menu {
    display: none;
    /* Hidden by default */
    list-style: none;
    padding-left: 0;
    margin: 0;
    border-left: 2px solid #e0e0e0;
    margin-left: 0.5rem;
}

.offcanvas .sub-menu .nav-link {
    padding: 0.5rem 0 0.5rem 1rem;
    font-size: 1rem;
    color: #666;
}

.offcanvas .sub-menu .nav-link:hover {
    color: #00b4a8;
}

/* Mobile Offcanvas Search Styling */
.mobile-offcanvas-search .search-form {
    position: relative;
    width: 100%;
}

.mobile-offcanvas-search .search-field {
    width: 100%;
    padding: 12px 40px 12px 20px;
    font-size: 1rem;
    color: #333;
    background-color: #f5f5f5;
    border: 1px solid #eee;
    border-radius: 50px;
    /* Pill shape */
    transition: all 0.3s ease;
}

.mobile-offcanvas-search .search-field:focus {
    background-color: #fff;
    border-color: #00b4a8;
    /* Teal border on focus */
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 180, 168, 0.1);
}

.mobile-offcanvas-search .search-submit {
    position: absolute;
    top: 50%;
    right: 5px;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #666;
    padding: 10px;
    font-size: 1rem;
    cursor: pointer;
    transition: color 0.3s ease;
}

.mobile-offcanvas-search .search-submit:hover {
    color: #00b4a8;
}

/* Hide default text in search submit if it's there, rely on icon or add one if needed */
/* Assuming theme search form uses standard WP structure or font-awesome icon */

/* Fix Arrow Icon Glitch - Use Font Awesome */
.offcanvas .dropdown-toggle::after,
.offcanvas .menu-item-has-children>a::after {
    content: "\f054";
    /* Font Awesome Chevron Right */
    font-family: "Font Awesome 5 Free";
    /* Ensure this matches your FA version */
    font-weight: 900;
    font-size: 0.9rem;
    /* Smaller, cleaner size */
    border: none;
    margin-left: auto;
    transform: rotate(0deg);
    transition: transform 0.3s ease;
}

/* Rotate when open */
.offcanvas .dropdown-toggle[aria-expanded="true"]::after,
.offcanvas .menu-item-has-children>a[aria-expanded="true"]::after {
    transform: rotate(90deg);
}

/* Fix Search Styling Specificity */
.mobile-offcanvas-search input[type="search"],
.mobile-offcanvas-search input[type="text"] {
    width: 100%;
    padding: 12px 20px;
    font-size: 1rem;
    color: #333;
    background-color: #f5f5f5;
    border: 1px solid #eee;
    border-radius: 50px;
    outline: none;
    -webkit-appearance: none;
    /* Remove iOS default styles */
}

.mobile-offcanvas-search input[type="search"]:focus {
    background-color: #fff;
    border-color: #00b4a8;
}

/* Hide default button if it looks bad, or style it */
.mobile-offcanvas-search .search-submit {
    display: none;
    /* Hide default submit button for cleaner look if preferred, or style it */
}

/* Optional: Add search icon inside input via background image or wrapper if needed, 
   but for now just clean input */



/* Remove Offcanvas Padding */
.offcanvas {
    padding: 0 !important;
}

/* Footer Natural Flow (Not Fixed) */
.offcanvas-body {
    display: block !important;
    /* Reset flex column that pinned footer */
    overflow-y: auto !important;
    /* Allow body to scroll */
}

.mobile-menu-container {
    padding: 0 1.5rem;
    overflow: visible !important;
    /* Remove internal scroll */
    flex-grow: 0 !important;
    margin-bottom: 2rem;
}

.mobile-offcanvas-footer {
    margin-top: 0 !important;
    /* Don't push to bottom */
    border-top: none !important;
    /* Remove visual separator if desired, or keep */
    padding: 0 1.5rem 2rem 1.5rem;
    /* Add bottom padding */
    background: transparent !important;
}

/* WooCommerce Cart Component */
.ahb-component.ahb-woocommerce_cart {
    display: flex;
    align-items: center;
}

.ahb-cart-icon {
    display: flex;
    align-items: center;
    color: inherit;
    text-decoration: none;
    font-size: 16px;
    transition: color 0.3s ease;
}

.ahb-cart-icon:hover {
    color: #007bff;
}

.cart-icon-wrapper {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.cart-icon-wrapper i {
    font-size: 1.25rem;
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -10px;
    background-color: #dc3545;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 5px;
    border-radius: 10px;
    min-width: 16px;
    text-align: center;
    line-height: 1;
}

.cart-total {
    font-size: 0.95rem;
    font-weight: 600;
    margin-left: 8px;
}

/* Account Icon Component */
.ahb-component.ahb-account_icon {
    display: flex;
    align-items: center;
}

.ahb-account-icon {
    display: flex;
    align-items: center;
    color: inherit;
    text-decoration: none;
    font-size: 16px;
    transition: color 0.3s ease;
}

.ahb-account-icon:hover {
    color: #007bff;
}

.ahb-account-icon i {
    font-size: 1.25rem;
}

.account-text {
    font-size: 0.95rem;
    font-weight: 500;
    margin-left: 8px;
}

/* Mobile Menu Z-Index Fix */
.offcanvas.offcanvas-start.d-lg-none {
    z-index: 99999 !important;
}

.offcanvas-backdrop {
    z-index: 99990 !important;
}

/* =========================================
   MOBILE MENU & OFFCANVAS REFINEMENTS
   ========================================= */

/* 1. Ensure Full Screen Height & Top Placement */
.offcanvas.offcanvas-start.d-lg-none {
    top: 0 !important;
    bottom: 0 !important;
    height: 100vh !important;
    z-index: 999999 !important;
    /* Maximized z-index */
    border-right: none;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.2);
    /* Premium shadow */
    width: 85%;
    max-width: 380px;
    /* Cap width for larger mobile phones */
    background-color: #ffffff;
}

/* 2. Admin Bar Correction */
body.admin-bar .offcanvas.offcanvas-start.d-lg-none {
    top: 32px !important;
    /* Move down for WP Admin Bar */
    height: calc(100vh - 32px) !important;
}

@media screen and (max-width: 782px) {
    body.admin-bar .offcanvas.offcanvas-start.d-lg-none {
        top: 46px !important;
        height: calc(100vh - 46px) !important;
    }
}

/* 3. Header Styling (Logo + Close) */
.offcanvas-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 25px;
    background-color: #ffffff;
    border-bottom: 1px solid #f5f5f5;
    min-height: 70px;
    /* Ensure touch target size */
}



/* 5. Navigation Links Styling */
.offcanvas-body {
    padding: 0;
    /* Remove default padding to let links touch edges */
    overflow-y: auto;
}

.mobile-menu-container {
    padding: 10px 0;
}

/* Menu Items */
.offcanvas-body .nav-item {
    border-bottom: 1px solid #f9f9f9;
    margin: 0 !important;
    width: 100%;
}

.offcanvas-body .nav-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 25px;
    font-size: 16px;
    font-weight: 600;
    color: #2c3e50;
    transition: background 0.2s, padding-left 0.2s;
}

.offcanvas-body .nav-link:hover,
.offcanvas-body .nav-link:focus {
    background-color: #fafafa;
    color: #00b4a8;
    /* Theme Color */
    padding-left: 30px;
    /* Slide effect */
}

/* =========================================
   DROPDOWN ARROW FINAL FIX
   ========================================= */

/* Default State: Closed -> Pointing DOWN (v) */
.offcanvas-body .dropdown-toggle::after {
    content: '' !important;
    display: inline-block !important;
    width: 8px !important;
    height: 8px !important;

    /* Arrow Shape */
    border: none !important;
    border-right: 2px solid #333 !important;
    border-bottom: 2px solid #333 !important;

    /* Initial Position: Down (45deg) */
    transform: rotate(45deg) !important;

    /* Animations */
    transition: transform 0.3s ease, border-color 0.3s ease, margin-bottom 0.3s ease !important;

    /* Placement */
    margin-left: auto !important;
    vertical-align: middle !important;
    margin-bottom: 3px !important;
    /* Center the 'V' shape vertically */
}

/* Active State: Open -> Pointing UP (^) */
/* We target multiple possible active states to be safe */
.offcanvas-body .dropdown-toggle[aria-expanded="true"]::after,
.offcanvas-body .dropdown-toggle.show::after,
.offcanvas-body .nav-item.show .dropdown-toggle::after {
    /* Rotate to Up (225deg) */
    transform: rotate(225deg) !important;

    /* Change color */
    border-color: #00b4a8 !important;

    /* Adjust shifting caused by rotation to keep it perfectly centered */
    margin-bottom: -3px !important;
}

/* FORCE REVERT - High Specificity */
.offcanvas-body .dropdown-toggle:not([aria-expanded='true']):not(.show)::after {
    transform: rotate(45deg) !important;
    border-color: #333 !important;
    margin-bottom: 3px !important;
}

/* =========================================
   SIMPLE CLOSE BUTTON RESET
   ========================================= */

.custom-close-btn {
    border: none !important;
    background: transparent !important;
    /* Remove background circle */
    padding: 10px !important;
    /* Add touch area */
    margin: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer;
    box-shadow: none !important;
    /* Remove any shadow */
    width: auto !important;
    /* Reset width */
    height: auto !important;
    /* Reset height */
    color: inherit !important;
    /* Inherit text color */
}

/* Ensure content flow */
.custom-close-btn i {
    font-size: 1.5rem !important;
    /* Consistent icon size */
    color: #333 !important;
    /* Force readable color */
    line-height: 1 !important;
    vertical-align: middle !important;
    display: block !important;
}

/* Optional: Subtle hover effect */
.custom-close-btn:hover {
    opacity: 0.7;
    transform: none !important;
    /* Remove rotation */
}