/* ========================
   CSS VARIABLES & SETUP
   ======================== */
:root {
    /* Colors */
    --primary: #2e7d32; /* Deep Green */
    --primary-light: #4caf50;
    --primary-dark: #1b5e20;
    --secondary: #ff9800; /* Warm Orange for accents */
    --bg-color: #f8fafc;
    --surface: #ffffff;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --border: #e2e8f0;
    
    /* WhatsApp Color */
    --whatsapp: #25d366;
    --whatsapp-dark: #128c7e;

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    
    /* Radii */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 1rem;
    --radius-full: 9999px;

    /* Transitions */
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.5;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Outfit', sans-serif;
    color: var(--text-main);
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

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

.text-center { text-align: center; }
.hidden { display: none !important; }
.w-100 { width: 100%; }

/* ========================
   BUTTONS
   ======================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    font-size: 1rem;
    border-radius: var(--radius-md);
    border: none;
    cursor: pointer;
    transition: var(--transition);
    font-family: 'Inter', sans-serif;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white;
    box-shadow: 0 4px 14px 0 rgba(76, 175, 80, 0.39);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.23);
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
}

.btn-secondary {
    background: #e2e8f0;
    color: var(--text-main);
}

.btn-secondary:hover {
    background: #cbd5e1;
}

.btn-whatsapp {
    background: var(--whatsapp);
    color: white;
    font-size: 1.1rem;
    padding: 1rem;
    box-shadow: 0 4px 14px 0 rgba(37, 211, 102, 0.39);
}

.btn-whatsapp:hover {
    background: var(--whatsapp-dark);
    transform: translateY(-2px);
}

.btn-icon {
    background: var(--primary-light);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    cursor: pointer;
    transition: var(--transition);
}

.btn-icon:hover {
    background: var(--primary);
    transform: scale(1.05);
}

/* ========================
   NAVBAR
   ======================== */
.navbar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-sm);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 100px;
    gap: 1rem;
    max-width: 98%;
    width: 100%;
    margin: 0 auto;
    padding: 0.5rem 1rem;
}

.logo {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.logo-img {
    max-height: 85px;
    max-width: 240px;
    width: auto;
    object-fit: contain;
}

.nav-search-btn {
    background: none;
    border: none;
    font-size: 1.6rem;
    color: var(--text-color);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
}

.nav-search-btn:hover {
    color: var(--primary);
    background: rgba(76, 175, 80, 0.05);
}

.nav-categories-inline {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    -ms-overflow-style: none;
    scrollbar-width: none;
    flex-grow: 1;
    justify-content: flex-start;
    padding: 0 1rem;
}

.nav-categories-inline::-webkit-scrollbar {
    display: none;
}

.nav-categories-inline li {
    padding: 0.5rem 0.8rem;
    border-radius: var(--radius-full);
    cursor: pointer;
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-muted);
    transition: var(--transition);
    white-space: nowrap;
    border: 1px solid transparent;
}

.nav-categories-inline li:hover {
    color: var(--primary);
    background: rgba(76, 175, 80, 0.05);
}

.nav-categories-inline li.active {
    background: var(--primary);
    color: white;
}

.cart-btn {
    flex-shrink: 0;
    background: none;
    border: none;
    font-size: 1.8rem;
    color: var(--text-color);
    cursor: pointer;
    position: relative;
    transition: var(--transition);
}

.cart-btn:hover {
    color: var(--primary);
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--secondary);
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid white;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-shrink: 0;
}

.nav-auth-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    font-weight: 600;
    color: var(--text-main);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    transition: var(--transition);
}

.nav-auth-btn:hover {
    background: var(--primary-light);
    color: white;
    border-color: var(--primary-light);
}

/* ========================
   HERO SLIDER SECTION
   ======================== */
.hero-slider {
    position: relative;
    height: 480px;
    margin-bottom: 3rem;
    border-bottom-left-radius: 50px;
    border-bottom-right-radius: 50px;
    overflow: hidden;
    background: #f1f5f9;
    box-shadow: var(--shadow-md);
}

.slider-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    transition: all 1s ease-in-out;
}

.slide-content {
    position: relative;
    z-index: 10;
    color: white;
    padding: 0 4rem;
}

.slide-title {
    color: #ffffff;
    font-size: 3.5rem;
    line-height: 1.2;
    margin-bottom: 1rem;
    font-weight: 800;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
}

.slide-title span.highlight {
    color: #a5d6a7; /* Soft bright green */
}

.slide-desc {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    max-width: 600px;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
    color: #f1f5f9;
}

.slider-control {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.15);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    z-index: 20;
}

.slider-control:hover {
    background: var(--primary);
    color: white;
}

.slider-control.prev {
    left: 2rem;
}

.slider-control.next {
    right: 2rem;
}

.slider-dots {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.5rem;
    z-index: 20;
}

.slider-dots .dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    transition: var(--transition);
}

.slider-dots .dot.active {
    background: var(--primary);
    width: 28px;
    border-radius: var(--radius-full);
}

/* Responsiveness for Slider */
@media (max-width: 768px) {
    .hero-slider {
        height: 380px;
        border-bottom-left-radius: 25px;
        border-bottom-right-radius: 25px;
    }
    
    .slide-content {
        padding: 0 2rem;
    }
    
    .slide-title {
        font-size: 2.2rem;
    }
    
    .slide-desc {
        font-size: 1rem;
        max-width: 90%;
    }
    
    .slider-control {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }
    
    .slider-control.prev {
        left: 0.5rem;
    }
    
    .slider-control.next {
        right: 0.5rem;
    }
}

/* ========================
   MAIN CONTENT (PRODUCTS)
   ======================== */
.main-content {
    margin-bottom: 4rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* Home Visual Categories (Large Grid) */
.home-categories-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* Always 2 columns */
    gap: 1.5rem;
    margin: 0 auto 2rem;
    max-width: 1368px; /* Restructured to 1368px as requested */
    width: 100%;
}

.category-grid-card {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    aspect-ratio: 2/1; /* Made them shorter/smaller */
}

.category-grid-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.category-grid-card:hover img {
    transform: scale(1.05);
}

.category-grid-card .card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.1) 100%);
    display: flex;
    align-items: flex-end;
    padding: 1rem;
}

.category-grid-card span {
    color: white;
    font-size: 1.25rem;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

/* Footer */
.main-footer {
    background: var(--surface);
    border-top: 1px solid var(--border);
    padding: 4rem 0 2rem;
    margin-top: 4rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.footer-col h3 {
    margin-bottom: 1.5rem;
    font-size: 1.25rem;
    color: var(--primary-dark);
}

.footer-col p {
    color: var(--text-muted);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.footer-col p i {
    color: var(--primary);
    font-size: 1.25rem;
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.social-links a {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bg-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    transition: var(--transition);
}

.social-links a:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-3px);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Products Area */
.products-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.search-bar {
    position: relative;
    width: 100%;
    max-width: 300px;
}

.search-bar i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.search-bar input {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 2.5rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    outline: none;
    font-family: inherit;
    transition: var(--transition);
}

.search-bar input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1.5rem;
}

/* Product Card */
.product-card {
    background: var(--surface);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(226, 232, 240, 0.6);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 24px rgba(46, 125, 50, 0.08);
    border-color: rgba(76, 175, 80, 0.2);
}

.category-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: rgba(46, 125, 50, 0.85); /* Semitransparent primary */
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: white;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 0.35rem 0.85rem;
    border-radius: var(--radius-full);
    z-index: 10;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.product-img {
    width: 100%;
    height: 180px;
    overflow: hidden;
    position: relative;
    background: #f8fafc;
}

.product-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.product-card:hover .product-img img {
    transform: scale(1.06);
}

.product-info {
    padding: 1.25rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.product-info h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-main);
    line-height: 1.4;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 3.08rem; /* fixed height for exactly 2 lines (1.4 * 1.1rem * 2) */
}

.product-desc {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin: 0;
    line-height: 1.5;
    flex-grow: 1;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 2.55rem; /* fixed height for 2 lines */
}

.product-price {
    display: flex;
    align-items: baseline;
    gap: 0.25rem;
    margin-top: 0.25rem;
    margin-bottom: 0.5rem;
}

.product-price .price {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--primary);
}

.product-price .unit {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* Premium add to cart button */
.add-to-cart {
    background: var(--bg-color) !important;
    color: var(--primary) !important;
    border: 1.5px solid rgba(76, 175, 80, 0.3) !important;
    border-radius: 10px !important;
    font-size: 0.95rem !important;
    padding: 0.65rem 1rem !important;
    font-weight: 600 !important;
    transition: all 0.2s ease !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    cursor: pointer;
    box-shadow: none !important;
}

.add-to-cart:hover {
    background: var(--primary) !important;
    color: white !important;
    border-color: var(--primary) !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.2) !important;
}

.add-to-cart:active {
    transform: translateY(0);
}

/* ========================
   CART SIDEBAR
   ======================== */
.cart-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.4);
    backdrop-filter: blur(2px);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.cart-overlay.active {
    opacity: 1;
    visibility: visible;
}

.cart-sidebar {
    position: fixed;
    top: 0;
    right: -400px;
    width: 100%;
    max-width: 400px;
    height: 100vh;
    background: var(--surface);
    z-index: 1000;
    box-shadow: -5px 0 25px rgba(0,0,0,0.1);
    transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
}

.cart-sidebar.active {
    right: 0;
}

.cart-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.close-cart {
    background: none;
    border: none;
    font-size: 1.25rem;
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition);
}

.close-cart:hover {
    color: red;
    transform: rotate(90deg);
}

.cart-items {
    flex-grow: 1;
    overflow-y: auto;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.cart-item {
    display: flex;
    gap: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

.cart-item-img {
    width: 70px;
    height: 70px;
    border-radius: var(--radius-md);
    object-fit: cover;
}

.cart-item-info {
    flex-grow: 1;
}

.cart-item-title {
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 0.25rem;
}

.cart-item-price {
    color: var(--primary);
    font-weight: 600;
}

.cart-item-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.qty-btn {
    width: 24px;
    height: 24px;
    border-radius: 4px;
    border: 1px solid var(--border);
    background: var(--bg-color);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.qty-btn:hover {
    background: #e2e8f0;
}

.remove-item {
    background: none;
    border: none;
    color: #ef4444;
    cursor: pointer;
    font-size: 0.875rem;
    margin-left: auto;
}

.cart-empty-msg {
    text-align: center;
    color: var(--text-muted);
    margin-top: 2rem;
}

.cart-footer {
    padding: 1.5rem;
    border-top: 1px solid var(--border);
    background: var(--surface);
}

.cart-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.toast {
    background: var(--primary);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
    transform: translateX(120%);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.toast.show {
    transform: translateX(0);
}

/* Mobile Bottom Nav */
.mobile-bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: white;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
    z-index: 1000;
    justify-content: space-around;
    padding: 0.5rem 0;
    padding-bottom: env(safe-area-inset-bottom, 0.5rem);
}

.mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.75rem;
    gap: 0.25rem;
    padding: 0.25rem;
    transition: var(--transition);
}

.mobile-nav-item i {
    font-size: 1.25rem;
    margin-bottom: 2px;
}

.mobile-nav-item.active,
.mobile-nav-item:hover {
    color: var(--primary);
}

.mobile-nav-item .icon-wrapper {
    position: relative;
}

.mobile-nav-item .cart-count {
    position: absolute;
    top: -8px;
    right: -10px;
    background: var(--primary);
    color: white;
    font-size: 0.6rem;
    padding: 2px 5px;
    border-radius: 10px;
    font-weight: bold;
}

/* Mobile Views */
.mobile-view {
    display: block; /* Desktop shows all or home */
}

.mobile-page-container {
    padding: 2rem 1rem;
    min-height: calc(100vh - 160px);
}

.mobile-page-title {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--primary-dark);
    text-align: center;
}

.mobile-category-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.mobile-category-list li {
    background: var(--surface);
    padding: 1rem 1.5rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 500;
    color: var(--text-color);
    cursor: pointer;
    border-left: 4px solid transparent;
}

.mobile-category-list li:hover, .mobile-category-list li.active {
    border-left-color: var(--primary);
    color: var(--primary);
}

.mobile-search-page-bar {
    display: flex;
    align-items: center;
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    padding: 0.75rem 1.5rem;
    box-shadow: var(--shadow-sm);
    max-width: 100%;
}

.mobile-search-page-bar input {
    border: none;
    background: transparent;
    flex-grow: 1;
    margin-left: 0.75rem;
    font-size: 1rem;
    outline: none;
}

.mobile-contact-card {
    background: white;
    padding: 2rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.mobile-contact-card p {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    color: var(--text-color);
}

#view-categories, #view-search, #view-contact, #view-products {
    display: none; /* Hidden by default until selected */
}

#view-categories.active-view,
#view-search.active-view,
#view-contact.active-view,
#view-products.active-view {
    display: block;
}

/* ========================
   RESPONSIVE DESIGN
   ======================== */
@media (max-width: 1230px) and (min-width: 769px) {
    .nav-container {
        flex-wrap: wrap;
        min-height: auto;
        padding: 0.75rem 1.5rem;
        gap: 0.5rem;
    }
    
    .logo {
        order: 1;
    }
    
    .nav-actions {
        order: 2;
    }
    
    .nav-categories-inline {
        order: 3;
        width: 100%;
        justify-content: center;
        padding: 0.75rem 0 0.25rem 0;
        border-top: 1px solid var(--border);
        margin-top: 0.5rem;
    }

    .nav-categories-inline li {
        font-weight: 500;
        font-size: 1rem !important;
        padding: 0.5rem 0.75rem !important;
    }

    .logo-img {
        max-height: 65px !important;
    }
}

@media (max-width: 992px) {
    .logo-img {
        max-height: 55px !important;
    }
}

@media (max-width: 768px) {
    .mobile-bottom-nav {
        display: flex;
    }
    
    body {
        padding-bottom: 60px; /* Space for bottom nav */
    }

    .nav-container {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        padding: 0.5rem 1rem;
        min-height: auto;
    }

    .logo-img {
        max-height: 45px !important;
        max-width: 130px !important;
    }

    .toast-container {
        top: 20px;
        bottom: auto;
        left: 20px;
        right: 20px;
        align-items: center;
    }
    
    .toast {
        transform: translateY(-120%);
    }
    
    .toast.show {
        transform: translateY(0);
    }

    #cart-toggle, .nav-search-btn, .nav-categories-inline {
        display: none !important; /* Hide desktop elements on mobile */
    }

    /* Mobile SPA view toggling */
    .mobile-view.hidden-view {
        display: none !important;
    }
    
    .mobile-view.active-view {
        display: block !important;
    }

    .main-content {
        display: flex;
        flex-direction: column;
        gap: 1.5rem;
    }
    
    .hero {
        padding: 3rem 0;
        border-bottom-left-radius: 30px;
        border-bottom-right-radius: 30px;
        margin-bottom: 2rem;
    }

    .hero h1 {
        font-size: 2rem;
    }
    
    .hero p {
        font-size: 1rem;
    }

    .products-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .cart-sidebar {
        max-width: 100%; /* Full screen on mobile */
    }

    .footer-content {
        grid-template-columns: 1fr; /* Stack footer cols on mobile */
        gap: 1.5rem;
    }
    
    .footer-col h3 {
        margin-bottom: 0.75rem;
    }
}

@media (max-width: 480px) {
    .nav-container {
        padding: 0 0.5rem;
    }
    
    .mobile-nav-item {
        font-size: 0.65rem;
        padding: 0.15rem;
    }
    
    .mobile-nav-item i {
        font-size: 1.1rem;
    }
    
    .home-categories-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .category-grid-card span {
        font-size: 0.95rem;
        padding: 0;
    }
    
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); /* smaller cards on very small screens */
        gap: 1rem;
    }
    
    .product-img {
        height: 150px;
    }
    
    .product-title {
        font-size: 1rem;
    }
    
    .product-price {
        font-size: 1.1rem;
    }
}

/* Alpine.js Transition Helper Classes */
.transition {
    transition-property: opacity, transform !important;
}
.ease-out {
    transition-timing-function: cubic-bezier(0, 0, 0.2, 1) !important;
}
.ease-in {
    transition-timing-function: cubic-bezier(0.4, 0, 1, 1) !important;
}
.duration-1000 {
    transition-duration: 1000ms !important;
}
.duration-500 {
    transition-duration: 500ms !important;
}
.opacity-0 {
    opacity: 0 !important;
}
.opacity-100 {
    opacity: 1 !important;
}
.scale-105 {
    transform: scale(1.05) !important;
}
.scale-100 {
    transform: scale(1) !important;
}

/* ========================
   PRODUCT CAROUSEL SECTION
   ======================== */
.product-carousel-section {
    margin-top: 4rem;
    margin-bottom: 2rem;
    position: relative;
    padding: 0 1.5rem;
}

.product-carousel-section .section-title {
    font-size: 2rem;
    color: var(--primary-dark);
    margin-bottom: 1.5rem;
    font-weight: 700;
    position: relative;
    display: inline-block;
}

.product-carousel-section .section-title::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 0;
    width: 60px;
    height: 4px;
    background: var(--primary);
    border-radius: var(--radius-full);
}

.carousel-container {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
}

.carousel-track {
    display: flex;
    gap: 1.5rem;
    overflow-x: auto;
    scroll-behavior: smooth;
    -ms-overflow-style: none; /* IE/Edge */
    scrollbar-width: none; /* Firefox */
    padding: 0.5rem 0.25rem;
    width: 100%;
}

.carousel-track::-webkit-scrollbar {
    display: none; /* Chrome/Safari/Webkit */
}

.carousel-card {
    flex: 0 0 280px; /* fixed card width inside carousel */
    max-width: 280px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.carousel-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.carousel-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: white;
    border: 1px solid var(--border);
    width: 45px;
    height: 45px;
    border-radius: 50%;
    color: var(--text-color);
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    z-index: 10;
}

.carousel-nav-btn:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
}

.carousel-nav-btn.prev {
    left: -22px;
}

.carousel-nav-btn.next {
    right: -22px;
}

@media (max-width: 768px) {
    .carousel-card {
        flex: 0 0 220px;
        max-width: 220px;
    }
    
    .carousel-nav-btn {
        display: none; /* Allow touch swipe on mobile, hide arrow buttons */
    }
    
    .carousel-track {
        gap: 1rem;
    }
}

/* Card Action Row - Side by side selector and button */
.card-action-row {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    margin-top: auto;
    width: 100%;
}

.card-qty-selector {
    display: flex;
    align-items: center;
    border: 1.5px solid rgba(76, 175, 80, 0.3);
    border-radius: 8px;
    overflow: hidden;
    background: var(--bg-color);
    height: 40px;
    width: 115px;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.card-qty-selector:focus-within,
.card-qty-selector:hover {
    border-color: rgba(76, 175, 80, 0.6);
}

.card-qty-btn {
    background: none;
    border: none;
    width: 30px;
    height: 100%;
    cursor: pointer;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.card-qty-btn:hover {
    background: rgba(76, 175, 80, 0.08);
    color: var(--primary);
}

.card-qty-value {
    flex-grow: 1;
    text-align: center;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text-main);
    user-select: none;
    white-space: nowrap;
}

.add-to-cart-btn {
    flex-grow: 1;
    height: 40px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    background: var(--primary);
    color: white;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 6px rgba(46, 125, 50, 0.15);
}

.add-to-cart-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(46, 125, 50, 0.25);
}

.add-to-cart-btn:active {
    transform: translateY(0);
}

/* ========================
   RESPONSIVE NAVBAR
   ======================== */
@media (max-width: 1200px) {
    .nav-container {
        gap: 0.5rem;
        padding: 0.5rem 1rem;
    }
    .logo-img {
        max-width: 180px;
        max-height: 60px;
    }
    .nav-categories-inline li {
        font-size: 0.9rem;
        padding: 0.4rem 0.6rem;
    }
}

@media (max-width: 992px) {
    .logo-img {
        max-width: 150px;
        max-height: 50px;
    }
    .nav-auth-btn {
        padding: 0.4rem 0.8rem;
        font-size: 0.85rem;
    }
    .cart-btn {
        font-size: 1.5rem;
    }
    .nav-search-btn {
        font-size: 1.4rem;
        width: 35px;
        height: 35px;
    }
}

@media (max-width: 768px) {
    .nav-container {
        flex-wrap: wrap;
        min-height: auto;
        padding: 0.75rem 0.5rem;
        justify-content: space-between;
    }
    
    .logo {
        order: 1;
        width: auto;
        margin-bottom: 0;
    }
    
    .nav-actions {
        order: 2;
        width: auto;
        gap: 0.75rem;
        margin-bottom: 0;
    }

    .nav-categories-inline {
        order: 3;
        width: 100%;
        margin-top: 0.75rem;
        padding-top: 0.75rem;
        border-top: 1px solid var(--border);
        padding-left: 0;
        padding-right: 0;
    }
}

/* Scroll to Top Button */
.scroll-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: var(--primary);
    color: white;
    border: none;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
    z-index: 999;
}
.scroll-to-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.scroll-to-top:hover {
    background-color: var(--primary-dark);
    transform: translateY(-3px);
}
