/*
Theme Name: FirstAED
Description: A custom WordPress theme with WooCommerce support, featuring responsive design and modern best practices.
Version: 1.0.0
Author: Your Name
Text Domain: firstaed
*/

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen,
        Ubuntu, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #fff;
}

img {
    max-width: 100%;
    height: auto;
}

a {
    color: #0073aa;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Layout Structure */
.site-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.site-header {
    background-color: #fff;
    border-bottom: 1px solid #e1e1e1;
    padding: 1rem 0;
}

.site-main {
    flex: 1;
    padding: 2rem 0;
}

.site-footer {
    background-color: #f8f9fa;
    border-top: 1px solid #e1e1e1;
    padding: 2rem 0;
    margin-top: auto;
}

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

/* Header Styles */
.site-branding {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-title {
    font-size: 1.8rem;
    font-weight: 700;
    margin: 0;
}

.site-title a {
    color: #333;
    text-decoration: none;
}

.site-description {
    font-size: 0.9rem;
    color: #666;
    margin: 0;
}

/* Navigation */
.main-navigation ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
}

.main-navigation a {
    color: #333;
    font-weight: 500;
    padding: 0.5rem 0;
    display: block;
}

.main-navigation a:hover {
    color: #0073aa;
    text-decoration: none;
}

/* Content Styles */
.content-area {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

.site-content {
    background: #fff;
}

.entry-header {
    margin-bottom: 1.5rem;
}

.entry-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    line-height: 1.2;
}

.entry-meta {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 1rem;
}

.entry-content {
    line-height: 1.7;
}

.entry-content h1,
.entry-content h2,
.entry-content h3,
.entry-content h4,
.entry-content h5,
.entry-content h6 {
    margin: 1.5rem 0 1rem;
    line-height: 1.3;
}

.entry-content p {
    margin-bottom: 1rem;
}

/* Post Navigation */
.post-navigation {
    margin: 2rem 0;
    padding: 1rem 0;
    border-top: 1px solid #e1e1e1;
}

.nav-links {
    display: flex;
    justify-content: space-between;
}

/* Pagination */
.pagination,
.woocommerce-pagination {
    text-align: center;
    margin: 2rem 0;
    display: flex;
    justify-content: center;
}

.page-numbers {
    display: inline-block;
    padding: 0.5rem 1rem;
    margin: 0 0.25rem;
    background: #f8f9fa;
    border: 1px solid #e1e1e1;
    color: #333;
}

a.page-numbers:hover,
.page-numbers.current {
    background: #0073aa;
    color: #fff;
    text-decoration: none;
}

/* Fix for pagination UL */
ul.page-numbers {
    background: none;
    border: 0;
    padding: 0;
    margin: 0;
    list-style: none;
}

ul.page-numbers li {
    display: inline;
}

/* Footer Styles */
.site-info {
    text-align: center;
    color: #666;
    font-size: 0.9rem;
}

/* Responsive Design */
@media (min-width: 768px) {
    .content-area {
        display: grid;
        grid-template-columns: 1fr 300px;
        gap: 2rem;
    }

    /* Override for cart and checkout - keep full width */
    .woocommerce-cart .content-area,
    .woocommerce-checkout .content-area {
        grid-template-columns: 1fr;
    }

    .main-navigation ul {
        gap: 3rem;
    }

    /* Reset mobile flexbox order on desktop */
    .site-content {
        order: unset;
    }

    .sidebar {
        order: unset;
    }
}

@media (max-width: 767px) {
    .site-header {
        position: sticky;
        top: 0;
        z-index: 1001;
    }

    .site-header .site-branding {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .site-branding {
        text-align: center;
        gap: 1rem;
    }

    /* Hide search by default on mobile */
    .header-search {
        display: none;
    }

    /* Show search when menu is active */
    .menu-toggle.active + .site-branding .header-search {
        display: block;
        order: 10;
        width: 100%;
        margin-top: 1rem;
    }

    .menu-toggle {
        display: block;
    }

    /* Hide desktop navigation on mobile */
    .desktop-navigation {
        display: none !important;
    }

    /* Mobile navigation styling */
    .mobile-navigation {
        display: block;
        background: white;
        border-top: 1px solid #e1e1e1;
    }

    .mobile-navigation ul.primary-menu {
        display: none;
        flex-direction: column;
        padding: 1rem;
        gap: 0;
        max-height: calc(100vh - 150px);
        overflow-y: auto;
        margin: 0;
        list-style: none;
        background: white;
    }

    .mobile-navigation ul.primary-menu.show {
        display: flex !important;
        visibility: visible !important;
    }

    /* Alternative selector in case the above doesn't work */
    .mobile-navigation .primary-menu.show {
        display: flex !important;
        visibility: visible !important;
    }

    /* Force show menu items when show class is present */
    .primary-menu.show {
        display: flex !important;
        flex-direction: column !important;
        visibility: visible !important;
        position: relative !important;
        background: white !important;
        padding: 1rem !important;
        border: 1px solid #e1e1e1 !important;
    }

    .mobile-navigation ul.primary-menu li {
        border-bottom: 1px solid #e1e1e1;
        margin: 0;
        width: 100%;
        text-align: center;
    }

    .mobile-navigation ul.primary-menu li:last-child {
        border-bottom: none;
    }

    .mobile-navigation ul.primary-menu a {
        padding: 1rem 0;
        display: block;
        color: #333;
        text-decoration: none;
    }

    /* Mobile mega menu adjustments */
    .mega-menu {
        position: static !important;
        width: 100% !important;
        box-shadow: none !important;
        border: none !important;
        background: #f8f9fa !important;
        margin-top: 0.5rem;
    }

    .mega-menu-content {
        flex-direction: column;
        gap: 1rem;
    }

    .mega-menu-section {
        margin-bottom: 1rem;
    }

    .mega-menu-section h4 {
        font-size: 1rem;
        margin-bottom: 0.5rem;
    }

    .brand-links,
    .category-links {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
    }

    .brand-links li,
    .category-links li {
        border-bottom: none;
    }

    .brand-links a,
    .category-links a {
        padding: 0.5rem 0;
        font-size: 0.9rem;
    }

    /* Ensure mobile logo is visible */
    .desktop-logo {
        display: none !important;
    }

    .mobile-logo {
        display: inline-block !important;
        max-height: 40px;
        width: auto;
    }

    .woocommerce-products-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 1rem;
    }

    .back-to-top {
        bottom: 1rem;
        right: 1rem;
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }

    /* Mobile FABs */
    .fabs-container {
        bottom: 1rem;
        right: 1rem;
        gap: 0.75rem;
    }

    .fab-whatsapp-btn {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }

    .fab-finder-btn {
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
        min-width: 160px;
        border-radius: 20px;
    }

    /* Mobile Modal */
    .modal-content {
        width: 95%;
        padding: 1.5rem;
        margin: 1rem;
        border-radius: 4px;
        max-height: 90vh;
    }

    /* Mobile AED Finder Modal */
    .aed-finder-modal-content {
        width: 95%;
        padding: 1.5rem;
        margin: 1rem;
        border-radius: 4px;
        max-height: 90vh;
    }

    .finder-contact-options {
        flex-direction: column;
        gap: 0.75rem;
    }

    .finder-contact-options .btn-new {
        width: 100%;
        text-align: center;
    }

    /* Mobile Cart Dropdown */
    .cart-dropdown {
        display: none !important;
    }

    .cart-dropdown-container:hover .cart-dropdown {
        display: none !important;
    }

    .cart-dropdown-items {
        max-height: 200px;
    }

    .cart-item-name {
        white-space: normal;
        overflow: visible;
        text-overflow: initial;
    }

    .cart-actions {
        flex-direction: column;
        gap: 0.75rem;
    }

    .cart-actions .btn {
        flex: none;
    }

    /* Mobile Product Layout */
    .single-product-container {
        padding: 1rem 0;
    }

    .custom-product-layout .product-main-content {
        display: block;
        gap: 0;
        margin-bottom: 2rem;
    }

    .product-images-section {
        margin-bottom: 2rem;
    }

    .product-gallery-container {
        max-width: 100%;
    }

    .main-product-image {
        margin-bottom: 1rem;
        border-radius: 8px;
    }

    .product-summary-section .product-title {
        font-size: 1.5rem;
        margin-bottom: 1rem;
    }

    .product-features {
        margin-bottom: 1.5rem;
    }

    .product-price {
        margin-bottom: 1.5rem;
    }

    .product-description-link {
        margin-bottom: 1.5rem;
    }

    .product-add-to-cart .quantity-wrapper {
        flex-direction: column;
        gap: 1rem;
    }

    .product-add-to-cart .quantity {
        width: 100%;
        max-width: 120px;
    }

    .product-add-to-cart .single_add_to_cart_button {
        width: 100%;
        padding: 1rem;
        font-size: 1rem;
    }

    .product-tabs-nav {
        position: sticky;
        top: 70px; /* Position below the mobile header */
        background: #f8f9fa;
        border-radius: 8px;
        margin-bottom: 1rem;
        z-index: 100;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    }

    .tabs-nav-inner {
        padding: 0.5rem;
        gap: 0.5rem;
        overflow-x: auto;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }

    .tabs-nav-inner::-webkit-scrollbar {
        display: none;
    }

    .tab-link {
        font-size: 10px;
        padding: 0.5rem 1rem;
        white-space: nowrap;
    }

    .product-tabs-content {
        padding: 0;
    }

    .tab-content {
        padding: 1rem;
    }

    .tab-content h2 {
        font-size: 1.3rem;
        margin-bottom: 1rem;
    }

    /* Mobile Filters FAB */
    .mobile-filters-fab {
        position: fixed;
        bottom: 2rem;
        left: 2rem;
        background: #0073aa;
        color: white;
        border-radius: 25px;
        padding: 0.75rem 1.5rem;
        display: flex;
        align-items: center;
        justify-content: center;
        text-decoration: none;
        box-shadow: 0 4px 12px rgba(0, 115, 170, 0.3);
        transition: all 0.3s ease;
        font-size: 0.9rem;
        font-weight: 500;
        white-space: nowrap;
        z-index: 1000;
        cursor: pointer;
        gap: 0.5rem;
    }

    .mobile-filters-fab:hover {
        background: #005a87;
        transform: translateY(-2px);
        text-decoration: none;
        color: white;
    }

    .mobile-filters-fab i {
        font-size: 1rem;
    }

    /* Mobile Page Template Layout */
    .page-template-layout {
        display: flex !important;
        flex-direction: column !important;
        margin: 1rem 0 !important;
    }

    .page-template-layout .page-sidebar {
        position: static !important;
        order: 2 !important;
        margin-bottom: 2rem !important;
    }

    .page-template-layout .page-content {
        order: 1 !important;
        margin-bottom: 1rem !important;
    }

    .page-template-layout .sidebar-section {
        padding: 1rem !important;
        margin-bottom: 1rem !important;
    }

    .page-template-layout .sidebar-section h3 {
        font-size: 1rem !important;
        margin-bottom: 0.75rem !important;
    }

    .page-template-layout .menu-section a {
        font-size: 0.9rem !important;
        padding: 0.5rem !important;
    }

    .page-template-layout .sidebar-cta {
        padding: 1rem !important;
    }

    .page-template-layout .sidebar-cta h3 {
        font-size: 1rem !important;
        margin-bottom: 0.5rem !important;
    }

    .page-template-layout .sidebar-cta p {
        font-size: 0.85rem !important;
        margin-bottom: 0.75rem !important;
    }

    .page-template-layout .cta-button {
        font-size: 0.85rem !important;
        padding: 0.5rem 1rem !important;
    }

    /* Mobile content area adjustments */
    .content-area {
        display: flex;
        flex-direction: column;
        gap: 1rem;
    }

    .site-content {
        order: 1;
        margin-bottom: 1rem;
    }

    /* Mobile sidebar adjustments */
    .sidebar {
        order: 2;
        margin-bottom: 2rem;
    }

    .sidebar .widget {
        background: #f8f9fa;
        border-radius: 8px;
        padding: 1rem;
        margin-bottom: 1rem;
        border: 1px solid #e9ecef;
    }

    .sidebar .widget-title {
        font-size: 1rem;
        margin-bottom: 0.75rem;
        color: #333;
        font-weight: 600;
    }

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

    .sidebar li {
        margin-bottom: 0.5rem;
    }

    .sidebar a {
        display: block;
        padding: 0.5rem 0;
        color: #495057;
        text-decoration: none;
        font-size: 0.9rem;
        transition: color 0.3s ease;
    }

    .sidebar a:hover {
        color: #0073aa;
        text-decoration: none;
    }

    .entry-title {
        font-size: 1.5rem;
        margin-bottom: 1rem;
    }

    .entry-content {
        font-size: 0.95rem;
        line-height: 1.6;
    }

    .entry-content h1,
    .entry-content h2,
    .entry-content h3,
    .entry-content h4,
    .entry-content h5,
    .entry-content h6 {
        margin: 1rem 0 0.75rem;
    }

    .entry-content p {
        margin-bottom: 0.75rem;
    }

    /* Mobile WooCommerce Cart Block Styles */
    .wc-block-components-sidebar-layout {
        display: flex !important;
        flex-direction: column !important;
        gap: 1rem !important;
    }

    .wc-block-cart__main {
        order: 1 !important;
        margin-bottom: 1rem !important;
    }

    .wc-block-cart__sidebar {
        order: 2 !important;
        width: 100% !important;
        max-width: none !important;
    }

    /* Cart items table responsive */
    .wc-block-cart-items {
        width: 100% !important;
        border-collapse: collapse !important;
        font-size: 0.9rem !important;
    }

    .wc-block-cart-items__header {
        display: none !important;
    }

    .wc-block-cart-items__row {
        display: block !important;
        border: 1px solid #e1e1e1 !important;
        border-radius: 8px !important;
        margin-bottom: 1rem !important;
        padding: 1rem !important;
    }

    .wc-block-cart-item__image,
    .wc-block-cart-item__product,
    .wc-block-cart-item__total {
        display: block !important;
        width: 100% !important;
        border: none !important;
        padding: 0 !important;
        margin-bottom: 0.75rem !important;
    }

    .wc-block-cart-item__image {
        text-align: center !important;
        margin-bottom: 1rem !important;
    }

    .wc-block-cart-item__image img {
        max-width: 120px !important;
        height: auto !important;
        border-radius: 8px !important;
    }

    .wc-block-cart-item__product {
        text-align: center !important;
    }

    .wc-block-cart-item__wrap {
        text-align: center !important;
        width: 100% !important;
    }

    .wc-block-components-product-name {
        font-size: 1.1rem !important;
        font-weight: 600 !important;
        margin-bottom: 0.5rem !important;
        display: block !important;
        text-align: center !important;
        color: #0073aa !important;
        text-decoration: none !important;
    }

    .wc-block-components-product-name:hover {
        color: #005a87 !important;
        text-decoration: underline !important;
    }

    .wc-block-cart-item__prices {
        margin-bottom: 1rem !important;
    }

    .wc-block-cart-item__quantity {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        gap: 0.75rem !important;
    }

    .wc-block-components-quantity-selector {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 0 !important;
        border: 2px solid #e1e1e1 !important;
        border-radius: 8px !important;
        padding: 0 !important;
        background: #f8f9fa !important;
        overflow: hidden !important;
        max-width: 200px !important;
        margin: 0 auto !important;
    }

    .wc-block-components-quantity-selector__input {
        width: 80px !important;
        height: 50px !important;
        text-align: center !important;
        border: none !important;
        border-left: 1px solid #e1e1e1 !important;
        border-right: 1px solid #e1e1e1 !important;
        font-size: 1.2rem !important;
        font-weight: 600 !important;
        background: #fff !important;
        border-radius: 0 !important;
        outline: none !important;
        color: #333 !important;
    }

    .wc-block-components-quantity-selector__input:focus {
        background: #f0f8ff !important;
        border-left-color: #0073aa !important;
        border-right-color: #0073aa !important;
    }

    .wc-block-components-quantity-selector__button {
        background: #0073aa !important;
        border: none !important;
        width: 50px !important;
        height: 50px !important;
        border-radius: 0 !important;
        font-size: 1.4rem !important;
        cursor: pointer !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        font-weight: 700 !important;
        color: white !important;
        transition: background-color 0.2s ease !important;
    }

    .wc-block-components-quantity-selector__button:hover {
        background: #005a87 !important;
    }

    .wc-block-components-quantity-selector__button:active {
        background: #004a73 !important;
        transform: scale(0.98) !important;
    }

    .wc-block-components-quantity-selector__button--minus {
        border-radius: 8px 0 0 8px !important;
    }

    .wc-block-components-quantity-selector__button--plus {
        border-radius: 0 8px 8px 0 !important;
    }

    .wc-block-cart-item__remove-link {
        background: #dc3545 !important;
        color: white !important;
        border: none !important;
        padding: 0.5rem 1rem !important;
        border-radius: 4px !important;
        font-size: 0.9rem !important;
        cursor: pointer !important;
        text-decoration: none !important;
    }

    .wc-block-cart-item__remove-link:hover {
        background: #c82333 !important;
        color: white !important;
    }

    .wc-block-cart-item__total {
        text-align: center !important;
        font-size: 1.2rem !important;
        font-weight: 600 !important;
        color: #0073aa !important;
        border-top: 1px solid #e1e1e1 !important;
        padding-top: 0.75rem !important;
        margin-top: 0.75rem !important;
    }

    /* Cart sidebar responsive */
    .wc-block-cart__sidebar {
        background: #f8f9fa !important;
        border-radius: 8px !important;
        padding: 1rem !important;
    }

    .wc-block-cart__totals-title {
        font-size: 1.3rem !important;
        margin-bottom: 1rem !important;
        text-align: center !important;
    }

    .wc-block-components-totals-item {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        padding: 0.75rem 0 !important;
        border-bottom: 1px solid #e1e1e1 !important;
        font-size: 0.95rem !important;
    }

    .wc-block-components-totals-footer-item {
        font-size: 1.1rem !important;
        font-weight: 600 !important;
        border-bottom: none !important;
        border-top: 2px solid #0073aa !important;
        padding-top: 1rem !important;
    }

    .wc-block-cart__submit-button {
        width: 100% !important;
        padding: 1rem !important;
        font-size: 1.1rem !important;
        font-weight: 600 !important;
        margin-top: 1rem !important;
        border-radius: 8px !important;
        background: #0073aa !important;
        color: white !important;
        border: none !important;
        text-decoration: none !important;
        display: block !important;
        text-align: center !important;
    }

    .wc-block-cart__submit-button:hover {
        background: #005a87 !important;
        color: white !important;
    }

    /* Coupon form responsive */
    .wc-block-components-panel__button {
        width: 100% !important;
        padding: 0.75rem !important;
        text-align: left !important;
        background: #fff !important;
        border: 1px solid #e1e1e1 !important;
        border-radius: 4px !important;
        margin-bottom: 1rem !important;
    }

    /* Hide alignwide class overflow on mobile */
    .alignwide {
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    /* WooCommerce Checkout Place Order Button */
    .wc-block-components-checkout-place-order-button {
        width: 100% !important;
        padding: 1rem !important;
        font-size: 1.1rem !important;
        font-weight: 600 !important;
        margin-top: 1rem !important;
        border-radius: 8px !important;
        background: #0073aa !important;
        color: white !important;
        border: none !important;
        text-decoration: none !important;
        display: block !important;
        text-align: center !important;
        cursor: pointer !important;
        transition: background-color 0.3s ease !important;
    }

    .wc-block-components-checkout-place-order-button:hover {
        background: #005a87 !important;
        color: white !important;
    }

    .wc-block-components-checkout-place-order-button:focus {
        outline: 2px solid #0073aa !important;
        outline-offset: 2px !important;
    }

    .wc-block-components-checkout-place-order-button.disabled {
        background: #ccc !important;
        cursor: not-allowed !important;
    }

    /* General WooCommerce Button Components */
    .wc-block-components-button {
        width: 100% !important;
        padding: 1rem !important;
        font-size: 1.1rem !important;
    }

    /* WordPress Element Button Base */
    .wp-element-button {
        width: 100% !important;
        padding: 1rem !important;
        font-size: 1.1rem !important;
    }

    /* Additional specific targeting for product name centering */
    .wc-block-cart-item__product
        .wc-block-cart-item__wrap
        .wc-block-components-product-name,
    .wc-block-cart-items__row
        .wc-block-cart-item__product
        .wc-block-components-product-name,
    .wc-block-cart-item__wrap > .wc-block-components-product-name {
        text-align: center !important;
        display: block !important;
        width: 100% !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }
}

/* Desktop styles */
@media (min-width: 768px) {
    /* Hide mobile navigation on desktop */
    .mobile-navigation {
        display: none !important;
    }

    /* Show desktop navigation */
    .desktop-navigation {
        display: block;
    }

    /* Hide mobile filters FAB on desktop */
    .mobile-filters-fab {
        display: none !important;
    }
}

/* General WooCommerce Button Components - Desktop defaults */
.wc-block-components-button {
    display: inline-block !important;
    padding: 0.75rem 1.5rem !important;
    font-size: 1rem !important;
    font-weight: 500 !important;
    border-radius: 4px !important;
    border: none !important;
    cursor: pointer !important;
    text-decoration: none !important;
    text-align: center !important;
    transition: all 0.3s ease !important;
    line-height: 1.4 !important;
}

.wc-block-components-button.contained {
    background: #0073aa !important;
    color: white !important;
}

.wc-block-components-button.contained:hover {
    background: #005a87 !important;
    color: white !important;
}

.wc-block-components-button.outlined {
    background: transparent !important;
    color: #0073aa !important;
    border: 2px solid #0073aa !important;
}

.wc-block-components-button.outlined:hover {
    background: #0073aa !important;
    color: white !important;
}

/* WordPress Element Button Base - Desktop defaults */
.wp-element-button {
    display: inline-block !important;
    padding: 0.75rem 1.5rem !important;
    font-size: 1rem !important;
    font-weight: 500 !important;
    border-radius: 4px !important;
    border: none !important;
    cursor: pointer !important;
    text-decoration: none !important;
    text-align: center !important;
    transition: all 0.3s ease !important;
    line-height: 1.4 !important;
    background: #0073aa !important;
    color: white !important;
}

.wp-element-button:hover {
    background: #005a87 !important;
    color: white !important;
}

/* WooCommerce Checkout Place Order Button - Desktop defaults */
.wc-block-components-checkout-place-order-button {
    padding: 0.75rem 1.5rem !important;
    font-size: 1rem !important;
    font-weight: 600 !important;
    border-radius: 4px !important;
    background: #0073aa !important;
    color: white !important;
    border: none !important;
    text-decoration: none !important;
    display: inline-block !important;
    text-align: center !important;
    cursor: pointer !important;
    transition: background-color 0.3s ease !important;
}

.wc-block-components-checkout-place-order-button:hover {
    background: #005a87 !important;
    color: white !important;
}

.wc-block-components-checkout-place-order-button:focus {
    outline: 2px solid #0073aa !important;
    outline-offset: 2px !important;
}

.wc-block-components-checkout-place-order-button.disabled {
    background: #ccc !important;
    cursor: not-allowed !important;
}

/* Utility Classes */
.screen-reader-text {
    position: absolute !important;
    clip: rect(1px, 1px, 1px, 1px);
    width: 1px !important;
    height: 1px !important;
    overflow: hidden;
}

.clearfix::after {
    content: '';
    display: table;
    clear: both;
}

/* WordPress Alignment Classes */
.alignleft {
    float: left;
    margin: 0 1rem 1rem 0;
}

.alignright {
    float: right;
    margin: 0 0 1rem 1rem;
}

.aligncenter {
    display: block;
    margin: 0 auto 1rem;
}

.alignwide {
    margin-left: -2rem;
    margin-right: -2rem;
}

.alignfull {
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    max-width: 100vw;
    width: 100vw;
}

/* WooCommerce Integration Styles */
.woocommerce-products-header {
    margin-bottom: 2rem;
    text-align: center;
}

.woocommerce .products .product:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.woocommerce .products .product img {
    border-radius: 4px;
    margin-bottom: 1rem;
}

.woocommerce .products .product .woocommerce-loop-product__title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.woocommerce .products .product .price {
    font-size: 1.2rem;
    font-weight: 700;
    color: #0073aa;
    margin-bottom: 1rem;
}

.woocommerce .products .product .button {
    background-color: #0073aa;
    color: #fff;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    font-weight: 500;
    text-decoration: none;
    transition: background-color 0.3s ease;
}

.woocommerce .products .product .button:hover {
    background-color: #005a87;
    color: #fff;
}

/* Single Product Layout */
.product-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin: 2rem 0;
}

@media (max-width: 768px) {
    .product-layout {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

/* 404 Page Styles */
.content-area-full-width {
    width: 100%;
}

.error-404 {
    text-align: center;
    padding: 3rem 0;
    max-width: 800px;
    margin: 0 auto;
}

.error-404 .page-title {
    font-size: 2.5rem;
    color: #dc3545;
    margin-bottom: 1rem;
}

.error-404 .error-message {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    color: #666;
}

.error-404 .search-section {
    margin-bottom: 3rem;
}

.error-404 .search-section h3 {
    margin-bottom: 1rem;
    color: #333;
}

.error-404 .helpful-links {
    margin-bottom: 3rem;
}

.error-404 .links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 1.5rem;
}

.error-404 .link-category h4 {
    color: #dc3545;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.error-404 .link-category ul {
    list-style: none;
    padding: 0;
}

.error-404 .link-category li {
    margin-bottom: 0.5rem;
}

.error-404 .link-category a {
    color: #0073aa;
    text-decoration: none;
    padding: 0.25rem 0;
    display: block;
    transition: color 0.3s ease;
}

.error-404 .link-category a:hover {
    color: #005a87;
    text-decoration: underline;
}

.error-404 .contact-section {
    background: #f8f9fa;
    padding: 2rem;
    border-radius: 8px;
    margin-top: 2rem;
}

.error-404 .contact-options {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 1rem;
}

.error-404 .contact-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: #dc3545;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 500;
    transition: background-color 0.3s ease;
}

.error-404 .contact-btn:hover {
    background: #c82333;
    color: white;
    text-decoration: none;
}

.error-404 .contact-btn i {
    font-size: 1.1rem;
}

.error-404 .page-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: #666;
}

.error-404 .widget-area {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin: 3rem 0;
    text-align: left;
}

.error-404 .widget {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
}

.error-404 .widget-title {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: #333;
}

.error-404 .widget ul {
    list-style: none;
    padding: 0;
}

.error-404 .widget ul li {
    margin-bottom: 0.5rem;
}

.error-404 .widget ul li a {
    color: #0073aa;
    text-decoration: none;
}

.error-404 .widget ul li a:hover {
    text-decoration: underline;
}

/* Mobile Menu Styles */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
}

.menu-icon {
    display: flex;
    flex-direction: column;
    width: 24px;
    height: 18px;
    justify-content: space-between;
}

.menu-icon span {
    display: block;
    height: 3px;
    width: 100%;
    background-color: #333;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.menu-toggle.active .menu-icon span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.menu-toggle.active .menu-icon span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active .menu-icon span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background-color: #0073aa;
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 1.5rem;
    cursor: pointer;
    display: none;
    box-shadow: 0 2px 10px rgba(0, 115, 170, 0.3);
    transition: background-color 0.3s ease;
    z-index: 1000;
}

.back-to-top:hover {
    background-color: #005a87;
}

.mobile-logo {
    display: none;
}

/* Floating Action Buttons (FABs) */
.fabs-container {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    z-index: 1000;
}

.fab-whatsapp-btn {
    background: #25d366;
    color: white;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3);
    transition: all 0.3s ease;
    font-size: 1.5rem;
}

.fab-whatsapp-btn:hover {
    background: #128c7e;
    transform: scale(1.1);
    text-decoration: none;
}

.fab-finder-wrapper {
    position: relative;
}

.fab-finder-btn {
    background: #0073aa;
    color: white;
    border-radius: 25px;
    padding: 0.75rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(0, 115, 170, 0.3);
    transition: all 0.3s ease;
    font-size: 0.9rem;
    font-weight: 500;
    white-space: nowrap;
    min-width: 200px;
}

.fab-finder-btn:hover {
    background: #005a87;
    transform: translateY(-2px);
    text-decoration: none;
}

/* Modal styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.modal-content {
    background: white;
    border-radius: 8px;
    padding: 2rem;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
}

/* AED Finder Modal Styles */
#aed-finder-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.aed-finder-modal-content {
    background: white;
    border-radius: 8px;
    padding: 2rem;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
}

.aed-finder-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e1e1e1;
}

.aed-finder-header h2 {
    margin: 0;
    color: #333;
}

.aed-finder-close-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #666;
    padding: 0.5rem;
    z-index: 1;
}

.aed-finder-close-btn:hover {
    color: #333;
}

.finder-question h3 {
    margin-bottom: 1.5rem;
    color: #333;
    font-size: 1.2rem;
}

.finder-progress {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 1rem;
}

.finder-answers {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.finder-answer-btn {
    background: #f8f9fa;
    border: 2px solid #e1e1e1;
    padding: 1rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
    font-size: 1rem;
}

.finder-answer-btn:hover {
    background: #e9ecef;
    border-color: #0073aa;
}

.finder-loading {
    text-align: center;
    padding: 2rem;
}

.loading-spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #0073aa;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

.finder-results h3 {
    margin-bottom: 1.5rem;
    color: #333;
}

.finder-result-card {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 1.5rem;
    text-align: center;
    margin-bottom: 1rem;
}

.finder-result-card img {
    max-width: 100%;
    height: 150px;
    object-fit: contain;
    margin-bottom: 1rem;
}

.finder-result-card h4 {
    margin-bottom: 0.5rem;
    color: #333;
}

.finder-product-price {
    font-size: 1.2rem;
    font-weight: bold;
    color: #0073aa;
    margin-bottom: 1rem;
}

.finder-product-features ul,
.finder-product-tech ul {
    list-style: none;
    padding: 0;
    margin: 1rem 0;
    text-align: left;
}

.finder-product-features li,
.finder-product-tech li {
    padding: 0.25rem 0;
    font-size: 0.9rem;
}

.finder-product-tech li {
    color: #666;
}

.finder-contact-options {
    display: flex;
    gap: 1rem;
    margin: 1.5rem 0;
    justify-content: center;
}

.btn-new {
    background: #0073aa;
    color: white;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 4px;
    text-decoration: none;
    display: inline-block;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.btn-new:hover {
    background: #005a87;
    color: white;
    text-decoration: none;
}

.btn-new.btn-outline {
    background: transparent;
    color: #0073aa;
    border: 2px solid #0073aa;
}

.btn-new.btn-outline:hover {
    background: #0073aa;
    color: white;
}

/* Cart Dropdown Styles */
.cart-dropdown-container {
    position: relative;
}

.cart-dropdown-container:hover .cart-dropdown {
    display: block;
}

.cart-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border: 1px solid #e1e1e1;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    min-width: 320px;
    max-width: 400px;
    z-index: 1000;
    display: none;
}

.cart-dropdown-header {
    padding: 1rem;
    border-bottom: 1px solid #e1e1e1;
}

.cart-dropdown-header h4 {
    margin: 0;
    font-size: 1.1rem;
    color: #333;
}

.cart-dropdown-items {
    max-height: 300px;
    overflow-y: auto;
}

.cart-dropdown-item {
    display: flex;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid #f0f0f0;
    gap: 1rem;
}

.cart-dropdown-item:last-child {
    border-bottom: none;
}

.cart-item-image {
    flex-shrink: 0;
    width: 50px;
    height: 50px;
}

.cart-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 4px;
}

.cart-item-details {
    flex: 1;
    min-width: 0;
}

.cart-item-name {
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 0.25rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cart-item-quantity-price {
    font-size: 0.8rem;
    color: #666;
}

.cart-item-remove {
    flex-shrink: 0;
}

.cart-item-remove .remove-item {
    color: #dc3545;
    text-decoration: none;
    font-size: 1.2rem;
    font-weight: bold;
    padding: 0.25rem;
}

.cart-dropdown-footer {
    padding: 1rem;
    border-top: 1px solid #e1e1e1;
}

.cart-total {
    margin-bottom: 1rem;
    text-align: center;
}

.cart-actions {
    display: flex;
    gap: 0.5rem;
}

.cart-actions .btn {
    flex: 1;
    text-align: center;
    padding: 0.5rem;
    border-radius: 4px;
    text-decoration: none;
    font-size: 0.9rem;
}

.btn-outline {
    background: transparent;
    border: 1px solid #0073aa;
    color: #0073aa;
}

.btn-outline:hover {
    background: #0073aa;
    color: white;
}

.btn-primary {
    background: #0073aa;
    color: white;
    border: 1px solid #0073aa;
}

.btn-primary:hover {
    background: #005a87;
}

.cart-dropdown-empty {
    padding: 2rem;
    text-align: center;
}

.cart-dropdown-empty p {
    margin-bottom: 1rem;
    color: #666;
}

/* WooCommerce Account Page Templates */
.page-template-layout {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 2rem;
    margin: 2rem 0;
}

.page-template-layout .page-sidebar {
    position: sticky;
    top: 2rem;
    height: fit-content;
    order: 1;
}

.page-template-layout .page-content {
    order: 2;
}

.page-template-layout .sidebar-section {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border: 1px solid #e9ecef;
}

.page-template-layout .sidebar-section h3 {
    margin: 0 0 1rem 0;
    font-size: 1.1rem;
    color: #333;
    font-weight: 600;
}

.page-template-layout .menu-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.page-template-layout .menu-section li {
    margin-bottom: 0.5rem;
}

.page-template-layout .menu-section a {
    display: block;
    padding: 0.5rem 0.75rem;
    color: #495057;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.3s ease;
    font-size: 0.95rem;
}

.page-template-layout .menu-section a:hover {
    background: #e9ecef;
    color: #212529;
    text-decoration: none;
}

.page-template-layout .menu-section a.current {
    background: #dc3545;
    color: white;
    font-weight: 500;
}

.page-template-layout .sidebar-cta {
    background: #dc3545;
    color: white;
    border-radius: 8px;
    padding: 1.5rem;
    text-align: center;
}

.page-template-layout .sidebar-cta h3 {
    margin: 0 0 0.75rem 0;
    font-size: 1.1rem;
    color: white;
}

.page-template-layout .sidebar-cta p {
    margin: 0 0 1rem 0;
    font-size: 0.9rem;
    line-height: 1.4;
}

.page-template-layout .cta-button {
    display: inline-block;
    background: white;
    color: #dc3545;
    padding: 0.75rem 1.5rem;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.page-template-layout .cta-button:hover {
    background: #f8f9fa;
    color: #c82333;
    text-decoration: none;
    transform: translateY(-1px);
}

.page-template-layout .page-header {
    margin-bottom: 2rem;
}

.page-template-layout .page-title {
    font-size: 2rem;
    margin: 0;
    color: #333;
}
