/* Custom CSS for Nano Moreira (Light Theme) */

:root {
    /* Primary Brand Colors (Derived from Nano Moreira logo) */
    --clr-bg: #f8fafc;                       /* Light slate background */
    --clr-surface: #ffffff;                  /* Clean white surface */
    --clr-surface-alt: #f1f5f9;              /* Light grayish surface */
    
    --clr-primary-blue: #134094;             /* Logo royal blue */
    --clr-primary-dark: #0a255c;             /* Deep navy blue */
    --clr-primary-light: #2563eb;            /* Bright royal blue accent */
    
    --clr-accent-yellow: #e59b00;           /* Logo golden yellow */
    --clr-accent-yellow-light: #fffbeb;     /* Light gold tint */
    --clr-accent-red: #d32f2f;              /* Logo red outline accent */
    
    --clr-text: #0f172a;                     /* Dark slate text */
    --clr-text-muted: #64748b;               /* Medium slate text */
    --clr-border: #94a3b8;                   /* Stronger border line for better contrast */
    
    /* Glassmorphism & Elevation */
    --glass-bg: rgba(255, 255, 255, 0.92);
    --glass-border: rgba(19, 64, 148, 0.12);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 10px 25px -5px rgba(19, 64, 148, 0.08), 0 4px 10px -2px rgba(0, 0, 0, 0.03);
    --shadow-lg: 0 20px 40px -10px rgba(19, 64, 148, 0.12), 0 8px 20px -4px rgba(0, 0, 0, 0.05);
    
    /* Typography */
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
}

[data-theme="dark"] {
    --clr-bg: #0b1329;
    --clr-surface: #101c3d;
    --clr-surface-alt: #162650;
    
    --clr-text: #f8fafc;
    --clr-text-muted: #94a3b8;
    --clr-border: #334155;
    
    --glass-bg: rgba(16, 28, 61, 0.92);
    --glass-border: rgba(255, 255, 255, 0.1);
    
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 10px 25px -5px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 20px 40px -10px rgba(0, 0, 0, 0.5);
}

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

body {
    font-family: var(--font-body);
    background-color: var(--clr-bg);
    color: var(--clr-text);
    line-height: 1.6;
    overflow-x: hidden;
    scroll-behavior: smooth;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--clr-text);
}

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

/* --- Navbar --- */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 100;
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--clr-border);
    padding: 0.8rem 0;
    box-shadow: var(--shadow-sm);
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Logo Wrapper & Brand Design */
.logo-wrapper {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    text-decoration: none;
}

.brand-logo-img {
    height: 48px;
    width: 48px;
    object-fit: cover;
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(229, 155, 0, 0.35), 0 0 0 2px var(--clr-accent-yellow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.logo-wrapper:hover .brand-logo-img {
    transform: scale(1.06) rotate(3deg);
    box-shadow: 0 6px 16px rgba(19, 64, 148, 0.3), 0 0 0 2px var(--clr-primary-blue);
}

.brand-text-container {
    display: flex;
    flex-direction: column;
}

.logo-text {
    font-size: 1.75rem;
    font-style: italic;
    font-weight: 900;
    line-height: 1;
    letter-spacing: -0.5px;
}

.logo-text .nano {
    color: var(--clr-primary-blue);
}

.logo-text .moreira {
    color: var(--clr-accent-yellow);
    text-shadow: 1px 1px 0px rgba(211, 47, 47, 0.8);
}

.brand-subtitle {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--clr-text-muted);
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-top: 2px;
}

.logo-text-small {
    font-size: 1.5rem;
    font-style: italic;
    font-weight: 900;
}
.logo-text-small .nano { color: var(--clr-primary-blue); }
.logo-text-small .moreira { color: var(--clr-accent-yellow); }

.nav-links a {
    color: var(--clr-text);
    text-decoration: none;
    margin-right: 2rem;
    font-weight: 600;
    font-size: 0.95rem;
    transition: color 0.3s ease;
    position: relative;
}

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

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0%;
    height: 2px;
    background: var(--clr-accent-yellow);
    transition: width 0.3s ease;
}

.nav-links a:hover::after {
    width: 100%;
}

.cart-toggle {
    background: var(--clr-surface-alt);
    border: 1px solid var(--clr-border);
    color: var(--clr-primary-blue);
    padding: 0.65rem 1.2rem;
    border-radius: 50px;
    cursor: pointer;
    font-size: 1.1rem;
    position: relative;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
}

.cart-toggle:hover {
    background: var(--clr-primary-blue);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.cart-count {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--clr-accent-red);
    color: white;
    font-size: 0.8rem;
    font-weight: bold;
    width: 22px;
    height: 22px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
    border: 2px solid white;
}

/* --- Offers Slider --- */
.offers-slider {
    position: relative;
    width: 100%;
    height: 420px;
    margin-top: 72px; /* offset for navbar */
    overflow: hidden;
    background: #0f172a;
}

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

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

.slide::after {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.4) 0%, rgba(15, 23, 42, 0.75) 100%);
    z-index: 1;
}

.slide.active {
    opacity: 1;
    z-index: 2;
}

.slide-content {
    position: relative;
    z-index: 3;
    text-align: center;
    color: white;
    padding: 2.5rem;
    max-width: 800px;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    box-shadow: 0 15px 35px rgba(0,0,0,0.3);
}

.slide-content h2 {
    font-size: 2.8rem;
    margin-bottom: 0.8rem;
    color: var(--clr-accent-yellow);
    text-shadow: 0 2px 8px rgba(0,0,0,0.6);
}

.slide-content p {
    font-size: 1.3rem;
    color: #f1f5f9;
}

.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.4);
    color: white;
    font-size: 1.5rem;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
    backdrop-filter: blur(6px);
}

.slider-btn:hover {
    background: var(--clr-accent-yellow);
    color: var(--clr-text);
    transform: translateY(-50%) scale(1.1);
}

.prev-btn { left: 24px; }
.next-btn { right: 24px; }

/* --- Hero Section --- */
.hero {
    padding: 5rem 0 4rem;
    background: radial-gradient(circle at 80% 20%, rgba(19, 64, 148, 0.06), transparent 40%),
                radial-gradient(circle at 20% 80%, rgba(229, 155, 0, 0.08), transparent 40%);
    text-align: center;
}

.hero-title {
    font-size: 3.2rem;
    margin-bottom: 1rem;
    color: var(--clr-primary-dark);
    letter-spacing: -0.5px;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: var(--clr-text-muted);
    margin-bottom: 2.5rem;
    max-width: 650px;
    margin-inline: auto;
}

.search-glass-panel {
    background: var(--clr-surface);
    border: 1px solid var(--clr-border);
    border-radius: 20px;
    padding: 1.2rem;
    max-width: 820px;
    margin: 0 auto;
    display: flex;
    gap: 1rem;
    box-shadow: var(--shadow-md);
}

.search-bar {
    flex: 2;
    display: flex;
    align-items: center;
    background: var(--clr-surface-alt);
    border: 1px solid var(--clr-border);
    border-radius: 12px;
    padding: 0 1rem;
    transition: border-color 0.3s;
}

.search-bar:focus-within {
    border-color: var(--clr-primary-blue);
    background: white;
}

.search-bar i {
    color: var(--clr-primary-blue);
    font-size: 1.1rem;
}

.search-bar input {
    width: 100%;
    background: transparent;
    border: none;
    color: var(--clr-text);
    padding: 0.9rem;
    font-family: var(--font-body);
    font-size: 1rem;
    outline: none;
}

.filters select {
    background: var(--clr-surface-alt);
    border: 1px solid var(--clr-border);
    color: var(--clr-text);
    padding: 0.9rem 1.2rem;
    border-radius: 12px;
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 600;
    outline: none;
    cursor: pointer;
    height: 100%;
    transition: border-color 0.3s;
}

.filters select:focus {
    border-color: var(--clr-primary-blue);
    background: white;
}

.filters select option {
    background: white;
    color: var(--clr-text);
}

/* --- Catalog Section --- */
#catalogo {
    padding: 3.5rem 1.5rem 5rem;
}

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

.catalog-header h3 {
    font-size: 2rem;
    color: var(--clr-primary-dark);
}

.catalog-header span {
    color: var(--clr-text-muted);
    font-weight: 600;
}

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

/* Product Card */
.product-card {
    background: var(--clr-surface);
    border: 1px solid var(--clr-border);
    border-radius: 16px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-sm);
}

.product-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(19, 64, 148, 0.3);
}

.product-img {
    height: 210px;
    background: var(--clr-surface-alt);
    position: relative;
    overflow: hidden;
}

.product-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

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

.product-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: var(--clr-primary-blue);
    color: white;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 0.35rem 0.7rem;
    border-radius: 6px;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 6px rgba(19, 64, 148, 0.3);
}

.product-info {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-marca {
    color: var(--clr-accent-yellow);
    font-size: 0.82rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.4rem;
}

.product-title {
    font-size: 1.15rem;
    margin-bottom: 0.5rem;
    color: var(--clr-text);
    line-height: 1.4;
}

.product-desc {
    color: var(--clr-text-muted);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    flex: 1;
}

.btn-add {
    width: 100%;
    background: var(--clr-surface-alt);
    color: var(--clr-primary-blue);
    border: 1px solid rgba(19, 64, 148, 0.2);
    padding: 0.85rem;
    border-radius: 10px;
    cursor: pointer;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.btn-add:hover {
    background: var(--clr-primary-blue);
    color: white;
    border-color: var(--clr-primary-blue);
    box-shadow: 0 4px 12px rgba(19, 64, 148, 0.25);
}

/* --- Cart Sidebar --- */
.cart-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(6px);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s;
}

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

.cart-sidebar {
    position: fixed;
    top: 0;
    right: -420px;
    width: 100%;
    max-width: 420px;
    height: 100%;
    background: var(--clr-surface);
    border-left: 1px solid var(--clr-border);
    z-index: 1001;
    transition: right 0.4s cubic-bezier(0.77, 0, 0.175, 1);
    display: flex;
    flex-direction: column;
    box-shadow: -10px 0 35px rgba(0,0,0,0.1);
}

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

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

.cart-header h3 {
    font-size: 1.3rem;
    color: var(--clr-primary-dark);
}

.close-cart {
    background: transparent;
    border: none;
    color: var(--clr-text-muted);
    font-size: 1.5rem;
    cursor: pointer;
    transition: color 0.2s;
}

.close-cart:hover {
    color: var(--clr-accent-red);
}

.cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
}

.empty-cart-msg {
    text-align: center;
    color: var(--clr-text-muted);
    margin-top: 3rem;
    font-weight: 500;
}

.cart-item {
    display: flex;
    gap: 1rem;
    background: var(--clr-surface-alt);
    border: 1px solid var(--clr-border);
    padding: 1rem;
    border-radius: 12px;
    margin-bottom: 1rem;
    align-items: center;
}

.cart-item-img {
    width: 64px;
    height: 64px;
    border-radius: 8px;
    object-fit: cover;
}

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

.cart-item-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--clr-text);
    margin-bottom: 0.2rem;
}

.cart-item-marca {
    font-size: 0.82rem;
    color: var(--clr-text-muted);
}

.remove-item {
    background: transparent;
    border: none;
    color: var(--clr-accent-red);
    cursor: pointer;
    font-size: 1.1rem;
    padding: 0.5rem;
    border-radius: 6px;
    transition: background 0.2s;
}

.remove-item:hover {
    background: rgba(211, 47, 47, 0.1);
}

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

.btn-whatsapp {
    width: 100%;
    background: #25D366; /* WhatsApp Green */
    color: white;
    border: none;
    padding: 1rem;
    border-radius: 12px;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.05rem;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.6rem;
    box-shadow: 0 4px 14px rgba(37, 211, 102, 0.3);
    transition: all 0.3s ease;
}

.btn-whatsapp:hover:not(:disabled) {
    background: #128C7E;
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(18, 140, 126, 0.4);
}

.btn-whatsapp:disabled {
    background: #cbd5e1;
    cursor: not-allowed;
    color: #94a3b8;
    box-shadow: none;
}

.cart-note {
    font-size: 0.8rem;
    color: var(--clr-text-muted);
    text-align: center;
    margin-top: 1rem;
}

/* --- Footer --- */
footer {
    background: #0b1329; /* Deep Navy Footer for elegance */
    color: #f8fafc;
    padding: 4rem 0 1.5rem;
    margin-top: 4rem;
}

footer h1, footer h2, footer h3, footer h4 {
    color: #ffffff;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 2.5rem;
    margin-bottom: 2.5rem;
}

.footer-info, .footer-contact {
    flex: 1;
    min-width: 260px;
}

.footer-info p {
    color: #94a3b8;
    margin-top: 1rem;
    line-height: 1.7;
}

.footer-contact h4 {
    margin-bottom: 1.2rem;
    color: var(--clr-accent-yellow);
    font-size: 1.2rem;
}

.footer-contact p {
    color: #cbd5e1;
    margin-bottom: 0.7rem;
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.footer-contact i {
    width: 22px;
    color: var(--clr-accent-yellow);
}

.footer-bottom {
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 1.8rem;
    color: #64748b;
    font-size: 0.9rem;
}

/* --- Institucional & Servicios --- */
.info-section {
    padding: 4rem 1.5rem;
}

.section-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.section-header h3 {
    font-size: 2.5rem;
    color: var(--clr-primary-dark);
    position: relative;
    display: inline-block;
}

.section-header h3::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: var(--clr-accent-yellow);
    margin: 0.5rem auto 0;
    border-radius: 2px;
}

.glass-card {
    background: var(--clr-surface);
    border: 1px solid var(--clr-border);
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: var(--shadow-md);
}

.info-content {
    max-width: 850px;
    margin: 0 auto;
    text-align: center;
    font-size: 1.15rem;
    color: var(--clr-text);
}

.info-content p {
    margin-bottom: 1.2rem;
    line-height: 1.8;
}

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

.service-card {
    text-align: center;
    padding: 2.5rem 1.5rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.service-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(19, 64, 148, 0.25);
}

.service-card i {
    font-size: 3rem;
    color: var(--clr-primary-blue);
    margin-bottom: 1.2rem;
    background: var(--clr-surface-alt);
    width: 80px;
    height: 80px;
    line-height: 80px;
    border-radius: 50%;
    display: inline-block;
    box-shadow: var(--shadow-sm);
}

.service-card h4 {
    font-size: 1.25rem;
    margin-bottom: 0.8rem;
    color: var(--clr-primary-dark);
}

.service-card p {
    color: var(--clr-text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

.product-card {
    animation: fadeIn 0.4s ease backwards;
}

/* Responsive */
.mobile-menu-btn {
    display: none;
    background: transparent;
    border: none;
    font-size: 1.5rem;
    color: var(--clr-text);
    cursor: pointer;
    margin-right: 1rem;
}

@media (max-width: 768px) {
    .mobile-menu-btn { display: block; }
    .nav-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 72px;
        left: 0;
        width: 100%;
        background: var(--clr-surface);
        padding: 1.5rem;
        box-shadow: 0 4px 10px rgba(0,0,0,0.1);
        z-index: 1000;
        border-bottom: 1px solid var(--clr-border);
    }
    .nav-links.active { display: flex; }
    .nav-links a {
        margin-right: 0;
        margin-bottom: 1rem;
        font-size: 1.1rem;
        text-align: center;
    }
    .search-glass-panel {
        flex-direction: column;
    }
    .hero-title {
        font-size: 2.4rem;
    }
}
