/* assets/css/styles.css */
/* CSS Variables are now injected dynamically from the database via header.php */

/* Additional static variables */
:root {
    --light-bg: #f5f8fa;
    --white: #ffffff;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --transition: 0.3s ease;
}

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

body {
    font-family: 'Roboto', 'Segoe UI', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--light-bg);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    overflow-x: hidden;
}

html {
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

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

/* Layout */
.container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 20px;
}

header {
    background: var(--header-bg);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    position: relative;
}

.site-branding {
    display: flex;
    align-items: center;
    gap: 1rem;
}

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

.logo-img {
    max-height: 60px;
    transition: transform 0.3s ease;
}

.logo-link:hover .logo-img {
    transform: scale(1.05);
}

.site-name {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, currentColor 0%, currentColor 100%);
    -webkit-background-clip: text;
    background-clip: text;
    line-height: 1;
    transition: all 0.3s ease;
    position: relative;
}

.site-name::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: currentColor;
    transition: width 0.3s ease;
}

.site-branding:hover .site-name::after {
    width: 100%;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    font-weight: 600;
    color: var(--secondary-color);
    font-size: 0.95rem;
    text-transform: uppercase;
}

.nav-links a:hover {
    color: var(--primary-color);
}

.menu-toggle {
    display: none;
    font-size: 1.5rem;
    color: var(--secondary-color);
    cursor: pointer;
}

/* --- CAROUSEL --- */
.carousel-container {
    position: relative;
    width: 100%;
    max-width: none;
    /* Ensure it's not restricted */
    margin: 0;
    overflow: hidden;
    height: 70vh;
    min-height: 600px;
    background-color: #f0f0f0;
    border-radius: 0;
}

.carousel-slide {
    display: none;
    /* Hidden by default */
    width: 100%;
    height: 100%;
}

.carousel-slide.active {
    display: block;
    /* Show only active */
}

.carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    /* Show full content */
    display: block;
    background-color: #fff;
    /* White background for potential empty spaces */
}

.carousel-link {
    display: block;
    width: 100%;
    height: 100%;
}

.prev-slide,
.next-slide {
    cursor: pointer;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 24px;
    transition: all 0.3s ease;
    border-radius: 50%;
    user-select: none;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 100;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.prev-slide {
    left: 20px;
}

.next-slide {
    right: 20px;
}

.prev-slide:hover,
.next-slide:hover {
    background-color: var(--primary-color);
    transform: translateY(-50%) scale(1.1);
    border-color: white;
    box-shadow: 0 4px 15px rgba(0, 118, 188, 0.5);
}

/* --- CATEGORY GRID (ICONS) --- */
.category-icons-section {
    padding: 4rem 0;
    background: linear-gradient(to bottom, #ffffff 0%, #f8f9fa 100%);
    border-bottom: 1px solid #eee;
}

.category-icons-grid {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.cat-icon-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 140px;
    padding: 20px 15px;
    border: 2px solid #eee;
    border-radius: 12px;
    transition: all 0.3s ease;
    background: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.cat-icon-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(0, 118, 188, 0.15);
    border-color: var(--primary-color);
}

.cat-icon-card i {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 0.8rem;
    transition: all 0.3s ease;
}

.cat-icon-card:hover i {
    transform: scale(1.1);
    color: var(--secondary-color);
}

.cat-icon-card span {
    font-size: 0.95rem;
    text-align: center;
    font-weight: 600;
    color: #333;
    line-height: 1.3;
}

/* --- COMMON COMPONENTS --- */
.btn {
    display: inline-block;
    padding: 12px 30px;
    background: var(--button-bg);
    color: var(--button-text);
    border-radius: 5px;
    font-weight: 600;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    text-align: center;
}

.btn:hover {
    background: var(--button-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.btn-sm {
    padding: 5px 15px;
    font-size: 0.85rem;
}

/* Products Grid */
.products-section {
    padding: 4rem 0;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    color: var(--heading-color);
    margin-bottom: 2rem;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background: var(--primary-color);
    margin: 1rem auto 0;
    border-radius: 2px;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.product-card {
    background: var(--white);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    position: relative;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

.product-image {
    height: 250px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    padding: 20px;
}

.product-image img {
    max-height: 100%;
    object-fit: contain;
}

.product-info {
    padding: 1.5rem;
    text-align: center;
}

.product-category {
    font-size: 0.85rem;
    color: #888;
    margin-bottom: 0.5rem;
    display: block;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.product-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

.product-price {
    font-size: 1.2rem;
    color: var(--primary-color);
    font-weight: bold;
    margin-bottom: 1rem;
}

/* Badges */
.badge {
    position: absolute;
    top: 15px;
    left: 15px;
    padding: 5px 12px;
    border-radius: 4px;
    color: white;
    font-size: 0.8rem;
    font-weight: bold;
    z-index: 10;
}

.badge.offer {
    background-color: #e74c3c;
}

.badge.featured {
    background-color: #f1c40f;
    color: #333;
    left: auto;
    right: 15px;
}


/* --- FOOTER (Redesign) --- */
footer {
    background: var(--footer-bg);
    color: var(--footer-text);
    padding: 2rem 0 0.5rem;
    margin-top: auto;
    font-size: 0.9rem;
}

.footer-container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    padding-bottom: 1.5rem;
}

.footer-col h3 {
    margin-bottom: 1.5rem;
    color: white;
    font-size: 0.95rem;
    font-weight: 700;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 8px;
}

.footer-col ul li {
    margin-bottom: 8px;
}

.footer-col ul li a {
    color: rgba(255, 255, 255, 0.9);
    transition: 0.3s;
}

.footer-col ul li a:hover {
    color: white;
    padding-left: 5px;
}

.footer-logo img {
    height: 70px;
    background: white;
    padding: 5px;
    border-radius: 50%;
    margin-bottom: 1rem;
}

.branding-col {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.social-links {
    margin-bottom: 1rem;
}

.social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 35px;
    height: 35px;
    background: white;
    color: var(--secondary-color);
    border-radius: 50%;
    margin-right: 8px;
    font-size: 1rem;
}

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

.nav-links a {
    color: var(--header-text);
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: var(--transition);
}

.nav-links a:hover {
    background: var(--primary-color);
    color: white;
}

.btn-download {
    background: rgba(0, 0, 0, 0.2);
    color: white;
    padding: 10px 15px;
    border-radius: 4px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.btn-download:hover {
    background: rgba(0, 0, 0, 0.4);
}

.contact-list li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 12px;
}

.contact-list li i {
    margin-top: 4px;
}

.copyright-bar {
    background: var(--footer-dark);
    padding: 1rem 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
}

/* 404 Page */
.error-page-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
    text-align: center;
    padding: 2rem;
}

.error-code {
    font-size: 8rem;
    font-weight: bold;
    color: var(--primary-color);
    line-height: 1;
}

.error-text {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: #555;
}

/* Sidebar for Products */
.sidebar-category h4 {
    cursor: pointer;
    padding: 5px 0;
    font-weight: 600;
    color: var(--secondary-color);
}

.sidebar-subcategories {
    padding-left: 15px;
    margin-bottom: 10px;
}

.sidebar-subcategories li a {
    font-size: 0.9rem;
    color: #666;
    display: block;
    padding: 3px 0;
}

.sidebar-subcategories li a.active-filter,
.sidebar-subcategories li a:hover {
    color: var(--primary-color);
    font-weight: 600;
}

.active-cat {
    text-decoration: underline;
}

/* WhatsApp Float */
.whatsapp-float {
    position: fixed;
    width: 60px;
    height: 60px;
    bottom: 20px;
    right: 20px;
    background-color: #25d366;
    color: #FFF;
    border-radius: 50%;
    text-align: center;
    font-size: 30px;
    box-shadow: 2px 2px 3px #999;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
}

.whatsapp-float:hover {
    background-color: #1fe063;
}

#scrollTopBtn {
    display: none;
    position: fixed;
    bottom: 90px;
    right: 30px;
    z-index: 99;
    font-size: 18px;
    border: none;
    outline: none;
    background-color: var(--secondary-color);
    color: white;
    cursor: pointer;
    padding: 10px;
    border-radius: 4px;
    width: 40px;
    height: 40px;
    transition: var(--transition);
}

#scrollTopBtn:hover {
    background-color: var(--primary-color);
}


/* Responsive */
@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }

    .nav-links {
        display: none;
        flex-direction: column;
        width: 100%;
        position: absolute;
        top: 100%;
        left: 0;
        background: white;
        text-align: center;
        padding: 1rem 0;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
        z-index: 999;
    }

    .nav-links.active {
        display: flex;
    }

    .carousel-container {
        height: 45vh;
    }

    .footer-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .copyright-bar {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
}

/* contactanos.php styles */
.contact-container {
    padding: 3rem 0;
    max-width: 1200px;
    margin: 0 auto;
}

.contact-header {
    background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
    color: white;
    padding: 4rem 1rem;
    text-align: center;
    border-radius: 0 0 50% 50% / 20px;
    margin-bottom: 2rem;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    padding: 20px;
}

@media (max-width: 768px) {
    .contact-grid {
        grid-template-columns: 1fr;
    }
}

.contact-card {
    background: white;
    padding: 2.5rem;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease;
}

.contact-card:hover {
    transform: translateY(-5px);
}

.contact-info-item {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.contact-icon {
    width: 50px;
    height: 50px;
    background: rgba(0, 118, 188, 0.1);
    color: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.contact-info-text h4 {
    margin-bottom: 0.3rem;
    color: var(--secondary-color);
    font-size: 1.1rem;
}

.contact-info-text p {
    color: #666;
    line-height: 1.4;
}

.styled-form label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #444;
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #e1e1e1;
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.95rem;
    transition: 0.3s;
    background: #f9f9f9;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    background: white;
    box-shadow: 0 0 0 3px rgba(0, 118, 188, 0.1);
}

.map-container {
    overflow: hidden;
    border-radius: 15px;
    box-shadow: var(--shadow);
    height: 100%;
    min-height: 300px;
}

.btn-submit {
    width: 100%;
    padding: 14px;
    font-size: 1.1rem;
    margin-top: 1rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: 0.3s;
    font-weight: 600;
    transition: 0.3s;
}

.btn-submit:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
}

.whatsapp-float:hover {
    background-color: #1fe063;
}

#scrollTopBtn {
    display: none;
    position: fixed;
    bottom: 90px;
    right: 30px;
    z-index: 99;
    font-size: 18px;
    border: none;
    outline: none;
    background-color: var(--secondary-color);
    color: white;
    cursor: pointer;
    padding: 10px;
    border-radius: 4px;
    width: 40px;
    height: 40px;
    transition: var(--transition);
}

#scrollTopBtn:hover {
    background-color: var(--primary-color);
}


/* Responsive */
@media (max-width: 768px) {

    /* Header Reordering: Menu Left (1), Search Center (2), Cart Right (3) */
    header .container {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 5px;
        /* Reduced gap */
        padding: 5px 10px;
        /* Reduced padding */
        width: 100% !important;
        /* Force full width */
        max-width: 100% !important;
        /* Remove constraints */
    }

    .site-branding {
        display: none;
    }

    .menu-toggle {
        display: block;
        order: 1;
        margin-right: 5px;
        font-size: 1.4rem;
    }

    .header-actions {
        order: 2;
        flex: 1;
        display: flex;
        align-items: center;
        justify-content: center;
        /* Center content */
        width: 100%;
        gap: 5px !important;
    }

    .search-box {
        flex: 1;
        width: 100% !important;
        max-width: none;
    }

    .search-box form {
        width: 100%;
    }

    .search-box input {
        width: 100% !important;
        font-size: 0.9rem;
        padding: 8px 10px !important;
        /* Better padding */
    }

    .cart-icon {
        order: 3;
        flex-shrink: 0;
        margin-left: 5px;
    }

    .nav-links {
        display: none;
        flex-direction: column;
        width: 100%;
        position: absolute;
        top: 100%;
        left: 0;
        background: white;
        text-align: center;
        padding: 1rem 0;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
        z-index: 999;
    }

    .nav-links.active {
        display: flex;
    }

    .carousel-container {
        height: auto !important;
        /* Let image define height */
        min-height: 0 !important;
        /* Remove min limits */
        aspect-ratio: 16/9;
        /* Maintain a reasonable ratio (or 3/2 etc) */
        margin-top: 0 !important;
        margin-bottom: 0 !important;
    }

    .carousel-slide {
        height: 100%;
    }

    .carousel-slide img {
        height: 100%;
        object-fit: cover;
        /* Fill the aspect ratio area */
    }


    .footer-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .copyright-bar {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
}

/* contactanos.php styles */
.contact-container {
    padding: 3rem 0;
    max-width: 1200px;
    margin: 0 auto;
}

.contact-header {
    background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
    color: white;
    padding: 4rem 1rem;
    text-align: center;
    border-radius: 0 0 50% 50% / 20px;
    margin-bottom: 2rem;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    padding: 20px;
}

@media (max-width: 768px) {
    .contact-grid {
        grid-template-columns: 1fr;
    }
}

.contact-card {
    background: white;
    padding: 2.5rem;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease;
}

.contact-card:hover {
    transform: translateY(-5px);
}

.contact-info-item {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.contact-icon {
    width: 50px;
    height: 50px;
    background: rgba(0, 118, 188, 0.1);
    color: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.contact-info-text h4 {
    margin-bottom: 0.3rem;
    color: var(--secondary-color);
    font-size: 1.1rem;
}

.contact-info-text p {
    color: #666;
    line-height: 1.4;
}

.styled-form label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #444;
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #e1e1e1;
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.95rem;
    transition: 0.3s;
    background: #f9f9f9;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    background: white;
    box-shadow: 0 0 0 3px rgba(0, 118, 188, 0.1);
}

.map-container {
    overflow: hidden;
    border-radius: 15px;
    box-shadow: var(--shadow);
    height: 100%;
    min-height: 300px;
}

.btn-submit {
    width: 100%;
    padding: 14px;
    font-size: 1.1rem;
    margin-top: 1rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: 0.3s;
}

.btn-submit:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
}

/* --- ABOUT US PAGE (New Styles) --- */
.about-hero {
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--primary-color) 100%);
    color: white;
    padding: 6rem 0 4rem;
    text-align: center;
    border-radius: 0 0 50% 50% / 20px;
    margin-bottom: 4rem;
    position: relative;
    overflow: hidden;
}

.about-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGNpcmNsZSBjeD0iMiIgY3k9IjIiIHI9IjIiIGZpbGw9InJnYmEoMjU1LDI1NSwyNTUsMC4wNSkiLz48L3N2Zz4=');
    opacity: 0.3;
}

.about-hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    font-weight: 800;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.about-hero p {
    font-size: 1.2rem;
    max-width: 600px;
    margin: 0 auto;
    opacity: 0.9;
}

.about-intro {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    margin-bottom: 5rem;
}

.about-image img {
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease;
}

.about-image img:hover {
    transform: scale(1.02);
}

.about-text h2 {
    font-size: 2.2rem;
    color: var(--secondary-color);
    margin-bottom: 1.5rem;
    position: relative;
    padding-bottom: 10px;
}

.about-text h2::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 80px;
    height: 4px;
    background: var(--primary-color);
    border-radius: 2px;
}

.about-text p {
    font-size: 1.05rem;
    color: #555;
    line-height: 1.8;
    margin-bottom: 1rem;
}

.mv-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 3rem;
}

.mv-card {
    background: white;
    padding: 3rem;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    text-align: center;
    transition: all 0.3s ease;
    border-bottom: 4px solid transparent;
}

.mv-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    border-bottom-color: var(--primary-color);
}

.mv-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, rgba(0, 118, 188, 0.1), rgba(0, 86, 145, 0.1));
    color: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    margin: 0 auto 1.5rem;
    transition: all 0.3s ease;
}

.mv-card:hover .mv-icon {
    background: var(--primary-color);
    color: white;
    transform: scale(1.1);
}

.mv-card h3 {
    font-size: 1.5rem;
    color: var(--secondary-color);
    margin-bottom: 1rem;
}

.mv-card p {
    color: #666;
    line-height: 1.6;
}

@media (max-width: 768px) {
    .about-hero {
        padding: 4rem 1rem;
        border-radius: 0 0 30px 30px;
    }

    .about-hero h1 {
        font-size: 2.2rem;
    }

    .about-intro {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

/* --- PRODUCTS PAGE REDESIGN --- */
.products-wrapper {
    display: flex;
    gap: 1rem;
    /* Compact gap */
    align-items: flex-start;
    padding: 2rem 0 4rem;
}

.products-sidebar {
    width: 280px;
    flex-shrink: 0;
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 100px;
}

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

.sidebar-header h3 {
    font-size: 1.1rem;
    color: var(--secondary-color);
    font-weight: 700;
    margin: 0;
}

.sidebar-reset {
    font-size: 0.85rem;
    color: #888;
    transition: 0.3s;
}

.sidebar-reset:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

.sidebar-list {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.sidebar-item h4 {
    margin: 0;
    position: relative;
    cursor: pointer;
}

.sidebar-link {
    display: block;
    padding: 10px 14px;
    border-radius: 8px;
    color: #555;
    font-weight: 500;
    transition: all 0.2s ease;
    background: #f8f9fa;
}

.sidebar-link:hover,
.sidebar-link.active-cat {
    background: var(--primary-color);
    color: white;
    padding-left: 18px;
    box-shadow: 0 4px 10px rgba(0, 118, 188, 0.2);
}

.sidebar-subs {
    margin-top: 0.5rem;
    padding-left: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    border-left: 2px solid #eee;
    margin-left: 10px;
}

.sub-link {
    font-size: 0.9rem;
    color: #666;
    transition: 0.2s;
    display: block;
    padding: 2px 0;
}

.sub-link:hover,
.sub-link.active-filter {
    color: var(--primary-color);
    font-weight: 600;
    padding-left: 5px;
}

.products-main {
    flex: 1;
    width: 100%;
}

/* Enhanced Product Card */
/* Enhanced Product Card */
.product-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    /* Explicit 3 columns */
    gap: 1.5rem;
    /* Tighter gap */
    width: 100%;
}

@media (max-width: 992px) {
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        /* 2 cols */
    }
}

@media (max-width: 576px) {
    .product-grid {
        grid-template-columns: 1fr;
        /* 1 col */
    }
}

.product-card {
    border: 1px solid #f0f0f0;
    /* Define border instead of none */
    box-shadow: none;
    /* Cleaner look */
    transition: all 0.3s ease;
    background: white;
    border-radius: 8px;
    /* Slightly less rounded */
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.08);
    border-color: #ddd;
}

.product-image {
    background: #fff;
    padding: 10px;
    /* Reduced padding */
    height: 220px;
    /* Consistent height */
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-image img {
    transition: transform 0.5s ease;
    max-height: 100%;
    max-width: 100%;
    object-fit: contain;
    /* Maintain aspect ratio */
}

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

.product-info {
    padding: 1rem;
    /* Compact padding */
    background: white;
    position: relative;
    z-index: 2;
    text-align: left;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.product-category {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #999;
    margin-bottom: 0.2rem;
    /* Reduced space */
    display: block;
    font-weight: 600;
}

.product-title {
    font-size: 1rem;
    /* Optimized size */
    font-weight: 700;
    margin-bottom: 0.4rem;
    /* Reduced space */
    color: #333;
    line-height: 1.3;
}

.price-box {
    margin-bottom: 0.8rem;
}

.current-price {
    font-size: 1.2rem;
    color: var(--primary-color);
    font-weight: 700;
}

.old-price {
    font-size: 0.85rem;
    text-decoration: line-through;
    color: #aaa;
}

/* Pagination Styles */
.pagination {
    margin-top: 2rem;
    text-align: center;
}

.pagination a {
    text-decoration: none;
    padding: 8px 12px;
    margin: 0 4px;
    border-radius: 4px;
    font-weight: 600;
    transition: 0.2s;
}



.btn-consult {
    display: block;
    width: 100%;
    text-align: center;
    background: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    padding: 10px;
    border-radius: 8px;
    font-weight: 600;
    transition: 0.3s;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
}

.btn-consult:hover {
    background: var(--primary-color);
    color: white;
    box-shadow: 0 5px 15px rgba(0, 118, 188, 0.3);
}

.btn-consult i {
    margin-right: 5px;
}

/* Badge Tweaks */
.badge {
    top: 20px;
    left: 20px;
    padding: 6px 14px;
    font-size: 0.75rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.badge.featured {
    left: auto;
    right: 20px;
}

/* Responsive */
@media (max-width: 900px) {
    .products-wrapper {
        flex-direction: column;
    }

    .products-sidebar {
        width: 100%;
        position: static;
        margin-bottom: 2rem;
    }
}


/* Search Results in Header - Refined */
.search-results-header {
    background: white;
    border: 1px solid #ddd;
    border-radius: 0 0 10px 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    max-height: 400px;
    overflow-y: auto;
    z-index: 1000;
}

.search-results-header .search-item {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    padding: 10px 15px;
    border-bottom: 1px solid #f0f0f0;
    text-decoration: none;
    transition: background 0.2s;
    width: 100%;
}

.search-results-header .search-item:last-child {
    border-bottom: none;
}

.search-results-header .search-item:hover {
    background-color: #f7f9fa;
}

.search-results-header .search-item img {
    width: 50px !important;
    height: 50px !important;
    object-fit: cover;
    border-radius: 6px;
    margin-right: 15px;
    flex-shrink: 0;
}

.search-results-header .search-item span {
    font-size: 0.95rem;
    color: #333;
    font-weight: 500;
    text-align: left;
    white-space: normal;
    /* Allow text wrapping if needed */
}

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

.modal-overlay.active {
    display: flex;
}

.modal-content {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    width: 90%;
    max-width: 450px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    position: relative;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    margin-bottom: 1.5rem;
    text-align: center;
}

.modal-header h3 {
    color: var(--secondary-color);
    margin: 0;
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 1.5rem;
    cursor: pointer;
    color: #999;
    transition: 0.2s;
}

.modal-close:hover {
    color: var(--primary-color);
}

/* Enhanced Search Bar Input */
#product-search,
input[name="q"] {
    font-family: inherit;
    font-weight: 500;
    color: #333;
}

#product-search::placeholder,
input[name="q"]::placeholder {
    color: #666;
    /* Darker placeholder */
    font-weight: 500;
    /* Bolder placeholder */
    opacity: 0.8;
}

.search-box form {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    /* Subtle shadow like the image */
    transition: all 0.3s ease;
}

.search-box form:hover,
.search-box form:focus-within {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

/* Footer Logo Adjustments */
.footer-logo {
    width: 150px;
    /* Adjust size */
    height: auto;
    margin-bottom: 10px;
    border-radius: 10px;
    /* Less circular */
    overflow: hidden;
    background: white;
    padding: 5px;
    display: inline-block;
    /* Ensure it centers with text-align center */
}

.footer-logo img {
    width: 100%;
    height: auto;
    object-fit: contain;
    /* Show full content */
    border-radius: 5px;
    display: block;
}

/* Product Card Refinements */
.product-grid {
    justify-content: center;
    /* Center cards if fewer than row */
}

.product-info {
    text-align: left !important;
    /* Left join as requested */
    padding-left: 1.5rem !important;
    /* Ensure styling matches */
}

.product-title {
    margin-bottom: 0.4rem !important;
}

.product-price {
    margin-bottom: 0.5rem !important;
}

h2.section-title {
    color: var(--primary-color) !important;
}

.price-container {
    align-items: flex-start !important;
    /* Left align price/offer */
    margin-bottom: 2px !important;
}

/* WhatsApp Float Button */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background-color: #25d366;
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50px;
    text-align: center;
    font-size: 30px;
    box-shadow: 2px 2px 3px #999;
    z-index: 3000;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.3s ease;
    overflow: hidden;
}

.whatsapp-float span {
    display: none;
    /* Hidden by default */
    font-size: 16px;
    margin-left: 10px;
    font-weight: bold;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.whatsapp-float:hover {
    width: auto;
    padding: 0 25px;
    background-color: #20ba5a;
    color: white;
}

.whatsapp-float:hover span {
    display: inline-block;
    opacity: 1;
}

.whatsapp-float i {
    margin: 0;
}

/* Mobile Tweaks */
@media (max-width: 768px) {
    .whatsapp-float {
        width: 60px;
        height: 60px;
        border-radius: 50px;
        text-align: center;
        font-size: 30px;
        box-shadow: 2px 2px 3px #999;
        z-index: 3000;
        display: flex;
        align-items: center;
        justify-content: center;
        text-decoration: none;
        transition: all 0.3s ease;
        overflow: hidden;
    }

    .whatsapp-float span {
        display: none;
        /* Hidden by default */
        font-size: 16px;
        margin-left: 10px;
        font-weight: bold;
        white-space: nowrap;
        opacity: 0;
        transition: opacity 0.3s ease;
    }

    .whatsapp-float:hover {
        width: auto;
        padding: 0 25px;
        background-color: #20ba5a;
        color: white;
    }

    .whatsapp-float:hover span {
        display: inline-block;
        opacity: 1;
    }

    .whatsapp-float i {
        margin: 0;
    }

}

/* Mobile Tweaks */
@media (max-width: 768px) {
    .whatsapp-float {
        width: 50px;
        height: 50px;
        bottom: 20px;
        right: 20px;
        font-size: 24px;
    }

    .whatsapp-float:hover {
        width: 50px;
        /* Don't expand on mobile touch */
        padding: 0;
    }

    .whatsapp-float:hover span {
        display: none;
    }
}

/* --- Responsive Cart (New) --- */
.cart-table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    width: 100%;
    margin-bottom: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.cart-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

.cart-table th {
    padding: 15px;
    text-align: left;
    background: #f8f9fa;
    border-bottom: 2px solid #e9ecef;
    font-weight: 600;
    color: var(--secondary-color);
}

.cart-table td {
    padding: 15px;
    border-bottom: 1px solid #e9ecef;
    vertical-align: middle;
}

.quantity-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.quantity-controls button {
    width: 32px;
    height: 32px;
    border: 1px solid #ddd;
    background: white;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    color: #555;
    transition: all 0.2s;
}

.quantity-controls button:hover {
    background: #f0f0f0;
    border-color: #ccc;
}

.subtotal-cell {
    font-weight: bold;
    color: var(--primary-color);
}

.btn-remove {
    color: #e74c3c;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.1rem;
    padding: 5px;
    transition: transform 0.2s;
}

.btn-remove:hover {
    transform: scale(1.1);
}

.total-row {
    background: #f8f9fa;
}

.total-label {
    text-align: right;
    padding: 20px;
    font-weight: bold;
    font-size: 1.1rem;
}

.total-amount {
    padding: 20px;
    font-weight: bold;
    font-size: 1.3rem;
    color: var(--primary-color);
}

/* Checkout Actions */
.checkout-actions {
    margin-top: 30px;
    text-align: right;
}

@media (max-width: 768px) {
    .checkout-actions {
        text-align: center;
        /* Center on mobile */
        margin-top: 20px;
    }

    .checkout-actions .btn {
        width: 100%;
        /* Full width button */
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 10px;
        padding: 15px;
        font-size: 1.1rem;
    }

    /* Adjust container padding too if needed */
    /* Assuming #cart-page container */
    .container {
        padding-left: 15px;
        padding-right: 15px;
    }

    /* Card Layout for Cart Table */
    .cart-table-wrapper {
        border: none;
        box-shadow: none;
        background: transparent;
    }

    .cart-table thead {
        display: none;
        /* Hide headers */
    }

    .cart-table,
    .cart-table tbody,
    .cart-table tr,
    .cart-table td {
        display: block;
        width: 100%;
    }

    .cart-table tr {
        margin-bottom: 20px;
        background: white;
        border-radius: 10px;
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
        border: 1px solid #eee;
        overflow: hidden;
    }

    .cart-table tr.total-row {
        background: transparent;
        box-shadow: none;
        border: none;
    }

    .cart-table td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        text-align: right;
        padding: 12px 15px;
        border-bottom: 1px solid #f9f9f9;
        min-height: 48px;
        /* Ensure easy tapping */
    }

    .cart-table td:last-child {
        border-bottom: none;
    }

    .cart-table td::before {
        content: attr(data-label);
        font-weight: 600;
        color: #888;
        font-size: 0.9rem;
        text-transform: uppercase;
        margin-right: 15px;
        text-align: left;
    }

    /* Specific adjustments */
    .cart-table td[data-label="Producto"] {
        background: #fdfdfd;
        border-bottom: 1px solid #eee;
        font-weight: 600;
        color: var(--primary-color);
    }

    .quantity-controls {
        justify-content: flex-end;
    }

    .cart-table tr.total-row td {
        display: flex;
        padding: 5px 0;
        justify-content: space-between;
        border: none;
    }

    .cart-table tr.total-row .total-label {
        text-align: left;
        width: auto;
    }

    .cart-table tr.total-row .total-amount {
        padding: 0;
        width: auto;
    }

    /* Hide empty cells in total row */
    .cart-table tr.total-row td:empty {
        display: none;
    }
}

/* --- Mobile Cart Refactoring (Card View) --- */
@media (max-width: 768px) {
    .cart-table-wrapper {
        border-radius: 8px;
        overflow: hidden;
    }

    .cart-table thead {
        display: none;
        /* Hide headers */
    }

    .cart-table,
    .cart-table tbody,
    .cart-table tr,
    .cart-table td {
        display: block;
        width: 100%;
    }

    .cart-table tr {
        margin-bottom: 20px;
        background: #fff;
        border: 1px solid #eee;
        border-radius: 12px;
        padding: 15px;
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.03);
    }

    .cart-table td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        text-align: right;
        padding: 12px 0;
        border-bottom: 1px solid #f5f5f5;
        font-size: 1rem;
    }

    .cart-table td:last-child {
        border-bottom: none;
    }

    /* Pseudo-element for labels */
    .cart-table td::before {
        content: attr(data-label);
        font-weight: 600;
        color: #666;
        text-transform: uppercase;
        font-size: 0.85rem;
        text-align: left;
    }

    /* Specific adjustments */
    .cart-table td[data-label="Producto"] {
        font-weight: bold;
        color: var(--primary-color);
        font-size: 1.1rem;
    }

    .quantity-controls {
        margin: 0;
    }

    .cart-table td[data-label="Eliminar"] {
        justify-content: center;
        padding-top: 15px;
        margin-top: 5px;
        border-top: 1px dashed #eee;
    }

    .cart-table td[data-label="Eliminar"]::before {
        display: none;
    }

    .cart-table .btn-remove {
        width: 100%;
        padding: 10px;
        background-color: #ffeaea;
        color: #e74c3c;
        border-radius: 6px;
        border: 1px solid #fadbd8;
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 8px;
        transition: 0.3s;
    }

    .cart-table .btn-remove:hover {
        background-color: #e74c3c;
        color: white;
    }

    .cart-table .btn-remove::after {
        content: "Eliminar Producto";
        font-weight: 600;
        font-size: 0.9rem;
    }

    /* Total Row Styling for Mobile */
    .cart-table tr.total-row {
        background: transparent;
        box-shadow: none;
        border: none;
        padding: 0;
    }

    .cart-table tr.total-row td {
        display: flex;
        justify-content: space-between;
        width: 100%;
        padding: 15px 20px;
        background: #fff;
        border-radius: 12px;
        margin-bottom: 20px;
        border: 2px solid var(--primary-color);
    }

    .cart-table tr.total-row .total-label {
        font-weight: bold;
        font-size: 1.2rem;
    }

    .cart-table tr.total-row .total-amount {
        font-weight: bold;
        font-size: 1.5rem;
        color: var(--primary-color);
    }

    /* Ensure checkout actions are visible */
    #checkout-actions {
        display: block !important;
        margin-top: 20px;
    }

    #checkout-actions .btn {
        width: 100%;
        padding: 15px;
        font-size: 1.2rem;
    }
}