/*
Theme Name: AB Mart
Description: A modern, responsive WooCommerce theme for online stores. Features a clean design with full e-commerce functionality.
Version: 4.0.1
Author: Le Van Y
Tags: woocommerce, e-commerce, responsive, clean, modern, shop
Text Domain: abmart
Requires PHP: 7.4
*/

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    background-color: #f5f5f5;
}

/* Ensure hero slider has no spacing */
section.hero-slider-section {
    margin: 0 !important;
    padding: 0 !important;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Header Styles */
.site-header {
    background: #1e3a8a; /* blue-900 */
    position: sticky;
    top: 0;
    z-index: 50;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.header-nav {
    width: 100%;
}

.header-container {
    max-width: 1280px; /* max-w-7xl */
    margin: 0 auto;
    padding: 0 1rem; /* px-4 */
}

@media (min-width: 640px) {
    .header-container {
        padding: 0 1.5rem; /* sm:px-6 */
    }
}

@media (min-width: 1024px) {
    .header-container {
        padding: 0 2rem; /* lg:px-8 */
    }
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem; /* gap-4 */
    padding: 1rem 0; /* py-4 */
}

/* Logo Section */
.header-logo {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 0.75rem; /* gap-3 */
}

.logo-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: white;
}

.logo-icon-wrapper {
    position: relative;
    width: 2.5rem; /* w-10 */
    height: 2.5rem; /* h-10 */
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-icon {
    width: 100%;
    height: 100%;
    color: white;
}

.logo-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.logo-roof {
    position: absolute;
    top: -0.25rem; /* -top-1 */
    left: 50%;
    transform: translateX(-50%);
    width: 1.5rem; /* w-6 */
    height: 0.5rem; /* h-2 */
    background: white;
    border-radius: 9999px 9999px 0 0; /* rounded-t-full */
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.logo-title {
    font-size: 1.5rem; /* text-2xl */
    font-weight: 700; /* font-bold */
    color: white;
    line-height: 1.25; /* leading-tight */
}

/* Search Bar Section */
.header-search-wrapper {
    flex: 1;
    margin: 0 1rem; /* mx-4 */
}

.search-box {
    display: flex;
    align-items: center;
    background: white;
    border-radius: 0.5rem; /* rounded-lg */
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06); /* shadow-md */
    overflow: hidden;
    position: relative;
}

/* Category Dropdown */
.category-dropdown-wrapper {
    position: relative;
}

.category-dropdown-btn {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem; /* px-4 py-3 */
    border-right: 1px solid #e5e7eb; /* border-r border-gray-200 */
    cursor: pointer;
    background: transparent;
    border-top: none;
    border-bottom: none;
    border-left: none;
    transition: background-color 0.2s;
    position: relative;
    z-index: 10;
}

.category-dropdown-btn:hover {
    background-color: #f9fafb; /* hover:bg-gray-50 */
}

.category-text {
    font-size: 0.875rem; /* text-sm */
    margin-right: 0.5rem; /* mr-2 */
    color: #6b7280; /* text-gray-500 */
}

.category-text.selected {
    color: #2563eb; /* text-blue-600 */
    font-weight: 500; /* font-medium */
}

.category-arrow {
    width: 1rem; /* w-4 */
    height: 1rem; /* h-4 */
    color: #6b7280; /* text-gray-500 */
    transition: transform 0.2s;
}

.category-dropdown-btn.active .category-arrow {
    transform: rotate(180deg);
}

.category-dropdown-btn.active .category-arrow,
.category-text.selected ~ .category-arrow {
    color: #2563eb; /* text-blue-600 */
}

.category-dropdown-menu {
    position: fixed;
    background: white;
    border-radius: 0.5rem; /* rounded-lg */
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25); /* shadow-2xl */
    border: 1px solid #e5e7eb; /* border border-gray-200 */
    z-index: 9999;
    display: none;
    min-width: 200px;
}

.category-dropdown-menu.active {
    display: block;
}

.category-dropdown-content {
    padding: 1rem; /* p-4 */
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem; /* gap-2 */
}

.category-item {
    text-align: left;
    padding: 0.5rem 1rem; /* px-4 py-2 */
    border-radius: 0.25rem; /* rounded */
    font-size: 0.875rem; /* text-sm */
    color: #2563eb; /* text-blue-600 */
    background: transparent;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
}

.category-item:hover {
    background-color: #f9fafb; /* hover:bg-gray-50 */
    color: #1d4ed8; /* hover:text-blue-700 */
}

.category-item.selected {
    background-color: #eff6ff; /* bg-blue-50 */
    color: #1e40af; /* text-blue-700 */
    font-weight: 600; /* font-semibold */
}

.category-empty {
    padding: 1.5rem; /* p-6 */
    text-align: center;
    color: #6b7280; /* text-gray-500 */
    grid-column: 1 / -1;
}

/* Search Input */
.search-input-wrapper {
    flex: 1;
    display: flex;
    align-items: center;
    padding: 0 1rem; /* px-4 */
}

@media (max-width: 1024px) {
    .search-input-wrapper {
        padding-left: 1rem;
    }
}

.search-input {
    width: 100%;
    outline: none;
    border: none;
    color: #374151; /* text-gray-700 */
    background: transparent;
    padding: 0.75rem 0; /* py-3 */
}

.search-input::placeholder {
    color: #9ca3af; /* placeholder-gray-400 */
}

/* Search Button */
.search-submit-btn {
    padding: 0.75rem 1rem; /* px-4 py-3 */
    background: #2563eb; /* bg-blue-600 */
    border: none;
    cursor: pointer;
    transition: background-color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-submit-btn:hover {
    background: #1d4ed8; /* hover:bg-blue-700 */
}

.search-icon {
    width: 1.25rem; /* w-5 */
    height: 1.25rem; /* h-5 */
    color: white;
}

/* Header Icons */
.header-icons {
    display: flex;
    align-items: center;
    gap: 1rem; /* gap-4 */
    flex-shrink: 0;
}

.header-cart-icon {
    position: relative;
    padding: 0.5rem; /* p-2 */
    color: white;
    text-decoration: none;
    transition: color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
}

.header-cart-icon:hover {
    color: #bfdbfe; /* hover:text-blue-200 */
}

.cart-svg-icon {
    width: 1.5rem; /* w-6 */
    height: 1.5rem; /* h-6 */
}

.cart-badge {
    position: absolute;
    top: 0;
    right: 0;
    width: 1.25rem; /* w-5 */
    height: 1.25rem; /* h-5 */
    background: #2563eb; /* bg-blue-600 */
    border-radius: 9999px; /* rounded-full */
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem; /* text-xs */
    font-weight: 700; /* font-bold */
    color: white;
}

/* User Menu */
.header-user-menu {
    position: relative;
}

.user-menu-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem; /* gap-2 */
    padding: 0.5rem; /* p-2 */
    color: white;
    background: transparent;
    border: none;
    cursor: pointer;
    transition: color 0.2s;
}

.user-menu-btn:hover {
    color: #bfdbfe; /* hover:text-blue-200 */
}

.user-avatar {
    width: 2rem; /* w-8 */
    height: 2rem; /* h-8 */
    background: #2563eb; /* bg-blue-600 */
    border-radius: 9999px; /* rounded-full */
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem; /* text-sm */
    font-weight: 600; /* font-semibold */
    color: white;
}

.user-name {
    font-size: 0.875rem; /* text-sm */
    display: none;
}

@media (min-width: 640px) {
    .user-name {
        display: block; /* sm:block */
    }
}

.user-arrow {
    width: 1rem; /* w-4 */
    height: 1rem; /* h-4 */
    transition: transform 0.2s;
}

.user-menu-btn.active .user-arrow {
    transform: rotate(180deg);
}

.user-menu-dropdown {
    position: absolute;
    right: 0;
    margin-top: 0.5rem; /* mt-2 */
    width: 12rem; /* w-48 */
    background: white;
    border-radius: 0.375rem; /* rounded-md */
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05); /* shadow-lg */
    padding: 0.25rem 0; /* py-1 */
    z-index: 50;
    display: none;
}

.user-menu-dropdown.active {
    display: block;
}

.user-menu-header {
    padding: 0.5rem 1rem; /* px-4 py-2 */
    border-bottom: 1px solid #e5e7eb; /* border-b border-gray-200 */
}

.user-menu-name {
    font-size: 0.875rem; /* text-sm */
    font-weight: 500; /* font-medium */
    color: #111827; /* text-gray-900 */
    margin: 0;
}

.user-menu-email {
    font-size: 0.75rem; /* text-xs */
    color: #6b7280; /* text-gray-500 */
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-menu-item {
    display: block;
    width: 100%;
    text-align: left;
    padding: 0.5rem 1rem; /* px-4 py-2 */
    font-size: 0.875rem; /* text-sm */
    color: #374151; /* text-gray-700 */
    text-decoration: none;
    transition: background-color 0.2s;
}

.user-menu-item:hover {
    background-color: #f3f4f6; /* hover:bg-gray-100 */
}

.user-login-icon {
    padding: 0.5rem; /* p-2 */
    color: white;
    text-decoration: none;
    transition: color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    cursor: pointer;
}

.user-login-icon:hover {
    color: #bfdbfe; /* hover:text-blue-200 */
}

.user-svg-icon {
    width: 1.5rem; /* w-6 */
    height: 1.5rem; /* h-6 */
}

.user-login-icon {
    background: transparent;
    border: none;
    cursor: pointer;
}

/* Login Popup */
.login-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.login-popup-overlay.active {
    display: flex;
    opacity: 1;
}

.login-popup-container {
    position: relative;
    background: white;
    border-radius: 0.5rem;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    width: 90%;
    max-width: 400px;
    max-height: 90vh;
    overflow-y: auto;
    transform: scale(0.95);
    transition: transform 0.3s ease;
}

.login-popup-overlay.active .login-popup-container {
    transform: scale(1);
}

.login-popup-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    color: #6b7280;
    transition: color 0.2s;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-popup-close:hover {
    color: #111827;
}

.login-popup-close svg {
    width: 1.5rem;
    height: 1.5rem;
}

.login-popup-content {
    padding: 1rem;
}

.login-popup-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #111827;
    text-align: center;
}

.login-popup-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.login-form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.login-form-group label {
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
}

.login-input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    font-size: 1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.login-input:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.login-form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.875rem;
}

.login-remember {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    color: #374151;
}

.login-remember input[type="checkbox"] {
    width: 1rem;
    height: 1rem;
    cursor: pointer;
}

.login-forgot-link {
    color: #2563eb;
    text-decoration: none;
    transition: color 0.2s;
}

.login-forgot-link:hover {
    color: #1d4ed8;
    text-decoration: underline;
}

.login-submit-btn {
    width: 100%;
    padding: 0.75rem 1.5rem;
    background: #2563eb;
    color: white;
    border: none;
    border-radius: 0.375rem;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
    margin-top: 0.5rem;
}

.login-submit-btn:hover {
    background: #1d4ed8;
}

.login-submit-btn:active {
    transform: scale(0.98);
}

.login-popup-footer {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e5e7eb;
    text-align: center;
    font-size: 0.875rem;
    color: #6b7280;
}

.login-register-link {
    color: #2563eb;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.login-register-link:hover {
    color: #1d4ed8;
    text-decoration: underline;
}

/* Google Login Button in Popup */
.login-popup-google {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 1rem;
}

.login-popup-google .google {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    width: 100%;
    padding: 0.75rem 1.5rem;
    background: white;
    color: #374151;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.login-popup-google .google:hover {
    background: #f9fafb;
    border-color: #9ca3af;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    color: #111827;
}

.login-popup-google .google:active {
    transform: scale(0.98);
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.login-popup-google .google svg {
    flex-shrink: 0;
}

/* User Menu Popup (similar to login popup) - works on all screen sizes */
.user-menu-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.user-menu-popup-overlay.active {
    display: flex;
    opacity: 1;
}

.user-menu-popup-container {
    position: relative;
    background: white;
    border-radius: 0.5rem;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    width: 90%;
    max-width: 400px;
    max-height: 90vh;
    overflow-y: auto;
    transform: scale(0.95);
    transition: transform 0.3s ease;
}

.user-menu-popup-overlay.active .user-menu-popup-container {
    transform: scale(1);
}

.user-menu-popup-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    color: #6b7280;
    transition: color 0.2s;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
}

.user-menu-popup-close:hover {
    color: #111827;
}

.user-menu-popup-close svg {
    width: 1.5rem;
    height: 1.5rem;
}

.user-menu-popup-content {
    padding: 2rem;
}

.user-menu-popup-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #111827;
    margin: 0 0 1.5rem 0;
    text-align: center;
}

.user-menu-popup-header {
    padding: 1rem 0;
    border-bottom: 1px solid #e5e7eb;
    margin-bottom: 1rem;
}

.user-menu-popup-name {
    font-size: 0.875rem;
    font-weight: 500;
    color: #111827;
    margin: 0 0 0.25rem 0;
}

.user-menu-popup-email {
    font-size: 0.75rem;
    color: #6b7280;
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-menu-popup-item {
    display: block;
    width: 100%;
    text-align: center;
    padding: 0.75rem 1.5rem;
    background: #2563eb;
    color: var(--abmart-primary-text, #fff) !important;
    border: none;
    border-radius: 0.375rem;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
    text-decoration: none;
    margin-top: 1rem;
}

.user-menu-popup-item:hover {
    background: #1d4ed8;
}

/* Navigation */
.main-navigation {
    display: flex;
    align-items: center;
    gap: 30px;
}

.main-navigation ul {
    display: flex;
    list-style: none;
    gap: 20px;
}

.main-navigation a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: color 0.3s;
}

.main-navigation a:hover {
    color: #2c5530;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
}

/* Header Cart */
.header-cart {
    position: relative;
}

.cart-icon {
    font-size: 24px;
    color: #2c5530;
    text-decoration: none;
    position: relative;
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #e74c3c;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
}

/* Main Content */
.site-content {
    min-height: calc(100vh - 200px);
    padding: 40px 0;
}

/* Remove padding when hero slider is present */
.site-content:has(.hero-slider-section) {
    padding-top: 0;
}

/* Fallback for browsers that don't support :has() */
.hero-slider-section + .site-content {
    padding-top: 0;
}

/* WooCommerce Product Grid */
.woocommerce .products {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin: 30px 0;
}

.woocommerce .product {
    overflow: hidden;
}

.woocommerce .product img {
    width: 100%;
    height: 150px;
    object-fit: scale-down;
}

.woocommerce .product h2 {
    font-size: 18px;
    margin-bottom: 10px;
    color: #333;
}

.woocommerce div.product .product-images img {
    width: 100%;
    border-radius: 8px;
}

.woocommerce div.product .summary {
    padding: 20px 0;
}

/* Cart Page */
.woocommerce-cart table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 30px;
}

.woocommerce-cart th,
.woocommerce-cart td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.woocommerce-cart th {
    background: #f8f9fa;
    font-weight: bold;
}

/* Footer */
.site-footer {
    background: var(--abmart-header-bg, #1e3a8a);
    color: var(--abmart-header-text, #ffffff);
    padding: 40px 0 20px;
    margin-top: 60px;
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 30px;
    align-items: start;
}

.footer-section {
    text-align: left;
}

.footer-section-title {
    color: var(--abmart-header-text, #ffffff);
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 20px 0;
}

/* Contact Section */
.footer-contact {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.footer-logo {
    margin-bottom: 5px;
}

.footer-logo-image {
    max-width: 200px;
    height: auto;
    max-height: 60px;
    object-fit: contain;
}

.footer-social-links {
    display: flex;
    gap: 12px;
    margin-bottom: 10px;
}

.footer-social-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--abmart-header-text, #ffffff);
    text-decoration: none;
    transition: all 0.3s;
    font-size: 18px;
}

.footer-social-icon:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.footer-contact-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    color: var(--abmart-header-text, #ffffff);
    font-size: 14px;
    line-height: 1.6;
    opacity: 0.9;
}

.footer-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    margin-top: 2px;
    color: var(--abmart-header-text, #ffffff);
}

.footer-contact-item a {
    color: var(--abmart-header-text, #ffffff);
    text-decoration: none;
    transition: opacity 0.3s;
}

.footer-contact-item a:hover {
    opacity: 1;
    text-decoration: underline;
}

/* Company Links Section */
.footer-company-links {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-company-links li {
    margin: 0;
}

.footer-company-links a {
    color: var(--abmart-header-text, #ffffff);
    text-decoration: none;
    transition: opacity 0.3s, color 0.3s;
    opacity: 0.8;
    font-size: 14px;
    display: inline-block;
}

.footer-company-links a:hover {
    opacity: 1;
    color: var(--abmart-header-hover, #bfdbfe);
    padding-left: 5px;
}

/* Map Section */
.footer-map-container {
    width: 100%;
    height: 250px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.footer-map-container iframe {
    width: 100%;
    height: 100%;
    border: 0;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--abmart-header-text, #ffffff);
    opacity: 0.8;
}

@media (max-width: 1024px) {
    .footer-content {
        grid-template-columns: 1fr 1fr;
        gap: 30px;
    }
    
    .footer-map {
        grid-column: 1 / -1;
    }
}

@media (max-width: 768px) {
    .footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .footer-section {
        text-align: center;
    }
    
    .footer-social-links {
        justify-content: center;
    }
    
    .footer-contact-item {
        justify-content: center;
    }
    
    .footer-company-links {
        align-items: center;
    }
    
    .footer-map-container {
        height: 200px;
    }
}

/* Hamburger Menu Button */
    .mobile-menu-toggle {
    display: none;
    background: transparent;
    border: none;
    color: white;
    cursor: pointer;
    padding: 0.5rem;
    margin-right: 0.5rem;
    transition: color 0.2s;
}

.mobile-menu-toggle:hover {
    color: #bfdbfe;
}

.hamburger-icon {
    width: 1.5rem;
    height: 1.5rem;
}

/* Mobile Category Sidebar */
.mobile-category-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    visibility: hidden;
    opacity: 0;
    transition: visibility 0.3s, opacity 0.3s;
}

.mobile-category-sidebar.active {
    visibility: visible;
    opacity: 1;
}

.mobile-sidebar-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(2px);
}

.mobile-sidebar-content {
    position: absolute;
    top: 0;
    left: 0;
    width: 280px;
    max-width: 85vw;
    height: 100%;
    background: white;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    transform: translateX(-100%);
    transition: transform 0.3s ease-in-out;
    display: flex;
    flex-direction: column;
    z-index: 1;
}

.mobile-category-sidebar.active .mobile-sidebar-content {
    transform: translateX(0);
}

.mobile-sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    border-bottom: 1px solid #e5e7eb;
    background: #fff;
    color: var(--abmart-header-bg);
    gap: 1rem;
    padding-top: 38px;
}

.mobile-sidebar-logo {
    flex-shrink: 0;
}

.mobile-logo-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: white;
}

.mobile-logo-icon-wrapper {
    position: relative;
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-logo-icon {
    width: 100%;
    height: 100%;
    color: white;
}

.mobile-logo-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.mobile-logo-roof {
    position: absolute;
    top: -0.25rem;
    left: 50%;
    transform: translateX(-50%);
    width: 1.5rem;
    height: 0.5rem;
    background: white;
    border-radius: 9999px 9999px 0 0;
}

.mobile-logo-text {
    display: flex;
    flex-direction: column;
}

.mobile-logo-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--abmart-header-bg);
    line-height: 1.25;
}

.mobile-sidebar-header-right {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex: 1;
}

.mobile-sidebar-close {
    background: transparent;
    border: none;
    color: var(--abmart-header-bg);
    cursor: pointer;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
}

.close-icon {
    width: 1.5rem;
    height: 1.5rem;
}

.mobile-sidebar-body {
    flex: 1;
    overflow-y: auto;
    padding: 1rem 0;
}

.mobile-category-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.mobile-category-item {
    margin: 0;
    border-bottom: 1px solid #f3f4f6;
}

.mobile-category-link {
        display: block;
    padding: 1rem 1.5rem;
    color: #374151;
    text-decoration: none;
    font-size: 1rem;
    transition: background-color 0.2s, color 0.2s;
}

.mobile-category-link:hover {
    background-color: #f9fafb;
    color: #2563eb;
}

.mobile-category-empty {
    padding: 2rem 1.5rem;
    text-align: center;
    color: #6b7280;
}

/* Responsive Design */
@media (max-width: 1024px) {
    /* Hide category dropdown from search on tablet and mobile */
    .category-dropdown-wrapper {
        display: none;
    }

    /* Show hamburger menu */
    .mobile-menu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    
    .search-box {
        border-radius: 0.5rem;
    }
    
    .search-input-wrapper {
        border-left: none;
        padding-left: 1rem;
    }
    
    /* Hide logo from main header on tablet */
    .header-logo {
        display: none !important;
    }
    
    /* Hide user menu and icons on tablet */
    .header-icons {
        display: none !important;
    }
    
    .header-user-menu {
        display: none !important;
    }
}

@media (max-width: 768px) {
    /* Show hamburger menu */
    .mobile-menu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .header-content {
        flex-wrap: wrap;
        gap: 0.75rem;
    }
    
    /* Hide logo from main header on mobile */
    .header-logo {
        display: none !important;
    }
    
    .header-search-wrapper {
        order: 3;
        width: 100%;
        margin: 0.5rem 0 0 0;
        max-width: 100%;
    }
    
    /* Hide cart and user icons from header on mobile */
    .header-icons {
        display: none !important;
    }
    
    /* Hide user menu completely on mobile */
    .header-user-menu {
        display: none !important;
    }
    
    .category-dropdown-content {
        grid-template-columns: 1fr;
    }
    
    .woocommerce .products {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 20px;
    }
    
    .woocommerce div.product {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .container {
        padding: 0 10px;
    }
    
    .logo-title {
        font-size: 1.25rem;
    }
    
    .logo-icon-wrapper {
        width: 2rem;
        height: 2rem;
    }
}

/* Mobile Bottom Navigation */
.mobile-bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    border-top: 1px solid #e5e7eb;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    padding: 0.5rem 0;
}

/* Show bottom nav only on mobile and tablet */
@media (max-width: 1024px) {
    .mobile-bottom-nav {
        display: flex;
        justify-content: space-around;
        align-items: center;
    }
    
    /* Add padding to site-content to prevent content from being hidden behind bottom nav */
    .site-content {
        padding-bottom: 80px;
    }
}

.mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: #6b7280;
    padding: 0.5rem 1rem;
    position: relative;
    transition: color 0.2s;
    flex: 1;
    max-width: 25%;
    background: transparent;
    border: none;
    cursor: pointer;
    font-family: inherit;
    font-size: inherit;
}

.mobile-nav-item:hover,
.mobile-nav-item:focus {
    color: #1e3a8a;
    outline: none;
}

.mobile-nav-item.active {
    color: #1e3a8a;
}

.mobile-nav-icon {
    width: 1.5rem;
    height: 1.5rem;
}

.mobile-nav-label {
    font-size: 0.75rem;
    font-weight: 500;
}

.mobile-nav-badge {
    position: absolute;
    top: -0.25rem;
    right: -0.75rem;
    background: #dc2626;
    color: white;
    border-radius: 9999px;
    width: 1.25rem;
    height: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.625rem;
    font-weight: 700;
}

.mobile-nav-cart {
    position: relative;
}

.mobile-nav-user {
    background: transparent;
    border: none;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #6b7280;
    padding: 0.5rem 1rem;
    position: relative;
    transition: color 0.2s;
    flex: 1;
    max-width: 25%;
}

.mobile-nav-user:hover,
.mobile-nav-user:focus {
    color: #1e3a8a;
    outline: none;
}

.mobile-nav-user-avatar {
    width: 1.5rem;
    height: 1.5rem;
    background: #2563eb;
    border-radius: 9999px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 600;
    color: white;
    margin-bottom: 0.25rem;
}

@media (max-width: 480px) {
    .woocommerce .products {
        grid-template-columns: 1fr;
    }
    
    .site-logo {
        font-size: 24px;
    }
    
    .woocommerce-cart table {
        font-size: 14px;
    }
    
    .woocommerce-cart th,
    .woocommerce-cart td {
        padding: 10px 8px;
    }
}

/* Hero Slider Styles */
.hero-slider-section {
    position: relative;
    height: 350px;
    overflow: hidden;
    display: block;
    max-width: 100vw;
}

/* Break out of container */
/* .container .hero-slider-section,
.site-content .hero-slider-section {
    margin-left: calc(-50vw + 50%) !important;
    margin-right: calc(-50vw + 50%) !important;
    width: 100vw;
    max-width: 100vw;
} */

@media (min-width: 1024px) {
    .hero-slider-section {
        height: 400px;
    }
}

/* Hide hero slider on mobile and tablet */
@media (max-width: 1024px) {
    .hero-slider-section {
        /* display: none !important; */
        max-height: 240px;
    }
}

.hero-slider-container {
    position: relative;
    width: 100%;
    height: 100%;
    margin: 0 !important;
    padding: 0 !important;
}

.hero-slider-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    margin: 0 !important;
    padding: 0 !important;
}

.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.hero-slide.active {
    opacity: 1;
}

.hero-slide-image {
    width: 100%;
    height: 100%;
    position: relative;
}

.hero-slide-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.hero-slide-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom right, rgba(30, 58, 138, 0.4), rgba(30, 58, 138, 0.4));
    pointer-events: none;
}

.hero-slide-content {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 1rem;
    z-index: 1;
}

.hero-slide-text {
    color: white;
}

.hero-slide-title {
    font-size: 1.875rem; /* text-3xl */
    font-weight: 700; /* font-bold */
    margin-bottom: 0.5rem; /* mb-2 */
    color: white;
}

@media (min-width: 1024px) {
    .hero-slide-title {
        font-size: 2.25rem; /* lg:text-4xl */
    }
}

.hero-slide-subtitle {
    font-size: 1.125rem; /* text-lg */
    color: #bfdbfe; /* text-blue-100 */
}

@media (min-width: 1024px) {
    .hero-slide-subtitle {
        font-size: 1.25rem; /* lg:text-xl */
    }
}

/* Navigation Arrows */
.hero-slider-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.2);
    color: white;
    padding: 0.5rem;
    border-radius: 9999px;
    border: none;
    cursor: pointer;
    transition: all 0.3s;
    opacity: 0;
    z-index: 10;
    backdrop-filter: blur(4px);
}

.hero-slider-container:hover .hero-slider-nav {
    opacity: 1;
}

.hero-slider-nav:hover {
    background: rgba(255, 255, 255, 0.3);
}

.hero-slider-prev {
    left: 1rem; /* left-4 */
}

.hero-slider-next {
    right: 1rem; /* right-4 */
}

.hero-slider-nav-icon {
    width: 1.5rem; /* w-6 */
    height: 1.5rem; /* h-6 */
}

/* Dots Indicator */
.hero-slider-dots {
    position: absolute;
    bottom: 1rem; /* bottom-4 */
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.5rem; /* gap-2 */
    z-index: 10;
}

.hero-slider-dot {
    height: 0.5rem; /* h-2 */
    border-radius: 9999px;
    border: none;
    cursor: pointer;
    transition: all 0.3s;
    background: rgba(255, 255, 255, 0.5);
    width: 0.5rem; /* w-2 */
    padding: 0;
}

.hero-slider-dot:hover {
    background: rgba(255, 255, 255, 0.75);
}

.hero-slider-dot.active {
    background: white;
    width: 2rem; /* w-8 */
}

/* Home Page Sections */
.home-page-content {
    padding: 2rem 0;
}

.home-page-content .container {
    padding: 0 15px;
}

/* Section Titles */
.section-title {
    font-size: 2rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 2rem;
    color: #1e3a8a;
}

/* Featured Products Section */
.home-featured-products {
    padding: 3rem 0;
}

/* Latest Products Section */
.home-latest-products {
    padding: 3rem 0;
}

/* Home page products use the same grid as archive */
.home-featured-products .woocommerce ul.products,
.home-featured-products ul.products,
.home-latest-products .woocommerce ul.products,
.home-latest-products ul.products {
    margin-top: 2rem;
}

.section-footer {
    text-align: center;
    margin-top: 2rem;
}

.section-footer .btn {
    display: inline-block;
    padding: 0.75rem 2rem;
    background: var(--abmart-primary, #2563eb);
    color: white;
    text-decoration: none;
    border-radius: 0.5rem;
    font-weight: 600;
    transition: background 0.3s ease;
}

.section-footer .btn:hover {
    background: var(--abmart-primary-hover, #1d4ed8);
}

/* Categories Section */
.home-categories {
    padding: 3rem 0;
    background: #f9fafb;
}

/* Hide Shop by Category on mobile and tablet */
@media (max-width: 1024px) {
    .home-categories {
        display: none !important;
    }
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-top: 2rem;
}

@media (max-width: 1024px) {
    .categories-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .categories-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Category Card - Based on Next.js CategoryCard component */
.category-card-wrapper {
    width: 100%;
}

.category-card-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.category-card {
    position: relative;
    height: 192px; /* h-48 */
    border-radius: 0.75rem; /* rounded-xl */
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06); /* shadow-md */
    transition: all 0.3s ease;
    cursor: pointer;
}

.category-card:hover {
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04); /* shadow-xl */
}

/* Image Wrapper */
.category-card-image-wrapper {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.category-card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.category-card:hover .category-card-image {
    transform: scale(1.1); /* group-hover:scale-110 */
}

/* Gradient Overlay - from black/70 at bottom to transparent at top */
.category-card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0.3) 50%, transparent 100%);
    pointer-events: none;
}

/* Content */
.category-card-content {
    position: relative;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 1.5rem; /* p-6 */
    color: white;
    z-index: 1;
}

.category-card-title {
    font-size: 1.25rem; /* text-xl */
    font-weight: 600; /* font-semibold */
    margin-bottom: 0.5rem; /* mb-2 */
    color: white;
    line-height: 1.3;
}

.category-card-cta {
    color: white;
    font-weight: 500; /* font-medium */
    display: inline-flex;
    align-items: center;
    gap: 0.25rem; /* gap-1 */
    transition: transform 0.3s ease;
}

.category-card:hover .category-card-cta {
    transform: translateX(0.5rem); /* group-hover:translate-x-2 */
}

/* Custom Content Section */
.home-custom-content {
    padding: 3rem 0;
}

.custom-content-wrapper {
    max-width: 800px;
    margin: 0 auto;
}

.custom-content-wrapper h1,
.custom-content-wrapper h2,
.custom-content-wrapper h3 {
    margin-bottom: 1rem;
    color: #1e3a8a;
}

.custom-content-wrapper p {
    margin-bottom: 1rem;
    line-height: 1.8;
}

/* Home Page Content Section */
.home-page-content-section {
    padding: 3rem 0;
}

/* Responsive Design for Home Page Sections */
@media (max-width: 768px) {
    .section-title {
        font-size: 1.5rem;
    }
    
    .categories-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 1rem;
    }
    
    .category-card {
        height: 160px;
    }
    
    .category-card-content {
        padding: 1rem;
    }
    
    .category-card-title {
        font-size: 1.125rem;
    }
}

/* Utility Classes */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.mb-20 { margin-bottom: 20px; }
.mt-20 { margin-top: 20px; }
.hidden { display: none; }

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #2c5530;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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