/* public/css/style.css */
:root {
    --primary-green: #2E7D32;
    --dark-green: #1B5E20;
    --light-green: #A5D6A7;
    --secondary-teal: #00897B;
    --accent-color: #F9A826;
    
    --bg-light: #F8FAF9;
    --bg-white: #FFFFFF;
    
    --text-main: #2C3E50;
    --text-muted: #64748B;
    
    --shadow-sm: 0 4px 6px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 10px 20px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 20px 40px rgba(0, 0, 0, 0.12);
    
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

html {
    overflow-x: hidden;
    width: 100%;
}

body {
    background-color: var(--bg-light);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    width: 100%;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    color: var(--dark-green);
}

/* Glassmorphism Navbar */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 9999 !important;
    background: #ffffff;
    border-bottom: 1px solid rgba(46, 125, 50, 0.1);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 15px 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 15px;
    text-decoration: none;
}

.logo-img {
    height: 60px;
    transition: var(--transition);
}

.logo-container:hover .logo-img {
    transform: scale(1.05) rotate(5deg);
}

.logo-text {
    color: var(--dark-green);
    font-size: 1.2rem;
    line-height: 1.2;
    font-weight: 600;
    font-family: 'Poppins', sans-serif;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 30px;
    align-items: center;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-main);
    font-weight: 600;
    font-size: 1rem;
    transition: var(--transition);
    position: relative;
}

.nav-links a:not(.nav-cta):not(.cart-icon)::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-green);
    transition: var(--transition);
}

.nav-links a:not(.nav-cta):not(.cart-icon):hover::after {
    width: 100%;
}

.nav-links a:not(.nav-cta):hover {
    color: var(--primary-green);
}

.nav-cta {
    background: linear-gradient(135deg, var(--primary-green), var(--secondary-teal));
    color: white !important;
    padding: 12px 25px;
    border-radius: 50px;
    box-shadow: 0 4px 15px rgba(46, 125, 50, 0.3);
}

.nav-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(46, 125, 50, 0.4);
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--primary-green);
    cursor: pointer;
    z-index: 1001;
}

@media (max-width: 1100px) {
    .nav-links {
        display: flex !important;
        position: fixed;
        top: 0;
        right: -100%;
        width: 85%;
        max-width: 360px;
        height: 100vh;
        background: #ffffff !important;
        flex-direction: column;
        justify-content: flex-start;
        align-items: flex-start;
        padding: 20px 24px 35px;
        overflow-y: auto;
        gap: 18px;
        transition: right 0.35s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: -10px 0 35px rgba(0,0,0,0.18);
        z-index: 10005 !important;
    }

    .nav-links.active {
        right: 0;
    }

    .mobile-menu-btn {
        display: block;
    }

    .nav-links li {
        margin: 0 !important;
        width: 100%;
    }
}

/* Footer responsive */
@media (max-width: 768px) {
    footer { padding: 50px 5% 20px; }
    .footer-content { grid-template-columns: 1fr; gap: 30px; text-align: center; }
    .footer-links ul li a { justify-content: center; }
    .footer-links h4 { margin-bottom: 15px; }
    .footer-bottom { margin-top: 40px; padding-top: 20px; }
    footer .footer-links div[style*="flex"] { justify-content: center; }
}

@media (max-width: 480px) {
    footer { padding: 40px 5% 15px; }
    .footer-content { gap: 25px; }
    .footer-links h4 { font-size: 1.1rem; }
}

/* Animations */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

.reveal {
    animation: fadeInUp 0.8s ease-out forwards;
}

/* Footer Premium */
footer {
    background: #0B1914; /* Darker green */
    color: #fff;
    padding: 80px 5% 30px;
    position: relative;
    overflow: hidden;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(90deg, var(--primary-green), var(--secondary-teal), var(--primary-green));
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 50px;
}

.footer-links h4 {
    color: var(--light-green);
    margin-bottom: 25px;
    font-size: 1.3rem;
}

.footer-links ul { list-style: none; }
.footer-links ul li { margin-bottom: 15px; }
.footer-links a { color: #A0AAB2; text-decoration: none; transition: var(--transition); display: inline-block; }
.footer-links a:hover { color: white; transform: translateX(5px); }

.footer-bottom {
    text-align: center;
    margin-top: 60px;
    padding-top: 30px;
    border-top: 1px solid rgba(255,255,255,0.1);
    color: #A0AAB2;
}

/* Global Buttons */
.btn {
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    text-decoration: none;
    transition: var(--transition);
}

/* Fix for SweetAlert notifications appearing behind navbar */
.swal2-container {
    z-index: 10000 !important;
    margin-top: 100px !important; /* Move below fixed header */
}

/* ═══════════════════════════════════════════════════════
   CATÁLOGO Y FILTROS BASE STYLES
   ═══════════════════════════════════════════════════════ */
.products-container {
    display: flex;
    gap: 40px;
    padding: 60px 5%;
    max-width: 1400px;
    margin: 0 auto;
    align-items: flex-start;
}

.filters-sidebar {
    flex: 0 0 290px;
    width: 290px;
    background: #ffffff;
    padding: 24px 20px;
    border-radius: 18px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    border: 1px solid #e2e8f0;
    position: sticky;
    top: 90px;
    box-sizing: border-box;
}

.filters-sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid #f1f5f9;
}

.filters-sidebar-header h3 {
    margin: 0;
    color: var(--dark-green);
    font-size: 1.15rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}

.active-filter-badge {
    background: #f0fdf4;
    color: var(--primary-green);
    border: 1px solid #bbf7d0;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 20px;
}

.filter-section {
    margin-bottom: 22px;
}

.filter-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.filter-section-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.88rem;
    font-weight: 700;
    color: #334155;
    margin-bottom: 8px;
}

.btn-toggle-all-labs {
    background: none;
    border: none;
    color: var(--primary-green);
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
    padding: 0;
    text-decoration: underline;
    transition: color 0.2s;
}
.btn-toggle-all-labs:hover { color: var(--dark-green); }

.filter-search-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.filter-search-field {
    width: 100%;
    padding: 10px 36px 10px 14px;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    font-size: 0.88rem;
    outline: none;
    transition: 0.2s;
    background: #f8fafc;
    box-sizing: border-box;
}

.filter-search-field:focus {
    background: #ffffff;
    border-color: var(--primary-green);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
}

.btn-clear-search-field {
    position: absolute;
    right: 10px;
    background: none;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    font-size: 0.85rem;
    padding: 4px;
}
.btn-clear-search-field:hover { color: #ef4444; }

.filter-labs-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 320px;
    overflow-y: auto;
    padding-right: 4px;
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 transparent;
}
.filter-labs-list::-webkit-scrollbar { width: 5px; }
.filter-labs-list::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 4px; }

.filter-lab-checkbox-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border-radius: 10px;
    border: 1.5px solid #f1f5f9;
    background: #ffffff;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}
.filter-lab-checkbox-item:hover { border-color: #cbd5e1; background: #f8fafc; }
.filter-lab-checkbox-item.is-selected { background: #f0fdf4; border-color: var(--primary-green); }

.lab-check-input { display: none; }

.custom-check-box {
    width: 18px;
    height: 18px;
    border-radius: 5px;
    border: 2px solid #cbd5e1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    transition: all 0.2s ease;
    flex-shrink: 0;
}
.custom-check-box i { font-size: 0.65rem; color: white; display: none; }
.filter-lab-checkbox-item.is-selected .custom-check-box { background: var(--primary-green); border-color: var(--primary-green); }
.filter-lab-checkbox-item.is-selected .custom-check-box i { display: block; }

.lab-label-text {
    font-size: 0.85rem;
    font-weight: 500;
    color: #334155;
    flex: 1;
    line-height: 1.3;
}
.filter-lab-checkbox-item.is-selected .lab-label-text { color: var(--dark-green); font-weight: 700; }

.filter-actions-wrap {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1.5px solid #f1f5f9;
}

.btn-apply-filters {
    width: 100%;
    background: var(--primary-green);
    color: white;
    border: none;
    padding: 12px 18px;
    border-radius: 10px;
    font-weight: 800;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.25s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 6px 18px rgba(16, 185, 129, 0.28);
}
.btn-apply-filters:hover {
    background: var(--dark-green);
    transform: translateY(-2px);
    box-shadow: 0 10px 22px rgba(16, 185, 129, 0.38);
}

.btn-clear-all-filters {
    width: 100%;
    background: #fff;
    color: #ef4444;
    border: 1.5px dashed #fca5a5;
    padding: 10px 16px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    text-decoration: none;
    box-sizing: border-box;
}
.btn-clear-all-filters:hover {
    background: #fef2f2;
    border-color: #ef4444;
    color: #dc2626;
}

.filter-toggle-btn {
    display: none;
    align-items: center;
    gap: 8px;
    background: var(--primary-green);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: 0.3s;
    width: 100%;
    justify-content: center;
    font-family: inherit;
    font-size: 0.95rem;
    box-shadow: 0 10px 20px rgba(46, 125, 50, 0.2);
}
.filter-toggle-btn:hover { transform: translateY(-2px); box-shadow: 0 15px 25px rgba(46, 125, 50, 0.3); }
.filter-toggle-btn.active i.fa-chevron-down { transform: rotate(180deg); }

/* Product Grid & Cards */
.product-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; }
.product-card:hover { transform: translateY(-10px); box-shadow: 0 20px 40px rgba(0,0,0,0.1); border-color: var(--primary-green); }
.product-card:hover .product-img-wrapper img { transform: scale(1.1); }

.qty-selector { display: flex; align-items: center; background: #f8fafc; border-radius: 12px; border: 1px solid #e2e8f0; overflow: hidden; }
.qty-selector button { border: none; background: transparent; padding: 12px; cursor: pointer; color: #64748b; transition: 0.3s; }
.qty-selector button:hover { background: #e2e8f0; color: var(--primary-green); }
.qty-selector input { width: 40px; border: none; background: transparent; text-align: center; font-weight: 800; color: #1e293b; font-size: 1rem; }

.btn-add-cart { 
    background: var(--primary-green); color: white; border: none; padding: 15px 25px; 
    border-radius: 12px; font-weight: 800; flex: 1; display: flex; align-items: center; 
    justify-content: center; gap: 10px; cursor: pointer; transition: 0.3s; 
    box-shadow: 0 10px 20px rgba(46, 125, 50, 0.2); 
}
.btn-add-cart:hover { transform: scale(1.05); box-shadow: 0 15px 30px rgba(46, 125, 50, 0.3); }

/* Pagination */
.pagination { display: flex; padding-left: 0; list-style: none; justify-content: center; gap: 8px; margin-top: 20px; flex-wrap: wrap; }
.page-item .page-link { 
    position: relative; display: block; padding: 10px 18px; color: #475569; background-color: #fff; 
    border: 1px solid #e2e8f0; border-radius: 12px; font-weight: 600; text-decoration: none; transition: 0.3s;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05);
}
.page-item.active .page-link { 
    z-index: 3; color: #fff; background-color: var(--primary-green); border-color: var(--primary-green); 
    box-shadow: 0 10px 15px -3px rgba(46, 125, 50, 0.3);
}
.page-item.disabled .page-link { color: #94a3b8; pointer-events: none; background-color: #f8fafc; border-color: #e2e8f0; }
.page-item .page-link:hover { background-color: #f1f5f9; color: var(--primary-green); transform: translateY(-2px); }

/* Responsive adjustments */
@media (max-width: 1024px) {
    .product-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
    .product-grid { grid-template-columns: 1fr; }
    .products-container { flex-direction: column !important; padding: 30px 4% !important; }
    .filters-sidebar { width: 100% !important; flex: auto !important; position: static !important; display: none; }
    .filters-sidebar.open { display: block; }
    .filter-toggle-btn { display: flex !important; }
}
@media (max-width: 480px) {
    #floating-cart { width: 55px !important; height: 55px !important; bottom: 20px !important; right: 20px !important; }
    #floating-cart i { font-size: 1.2rem !important; }
    .product-img-wrapper { height: 160px !important; padding: 15px !important; }
    .product-card h3 { font-size: 1rem !important; min-height: 2.5rem !important; margin-bottom: 10px !important; }
    .product-card .btn-add-cart { padding: 10px 15px !important; font-size: 0.9rem !important; }
    .qty-selector input { font-size: 0.9rem !important; width: 30px !important; }
    .qty-selector button { padding: 8px !important; }
}
