html {
    scroll-behavior: smooth;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --bg: #ffffff;
    --text: #222222;
    --header-bg: #0b3d2e;
    --card-bg: #ffffff;
    --card-border: #eeeeee;
}

[data-theme="dark"] {
    --bg: #121212;
    --text: #e0e0e0;
    --header-bg: #0a2e22;
    --card-bg: #1e1e1e;
    --card-border: #333333;
}

body {
    font-family: 'Segoe UI', Arial, sans-serif;
    color: #222;
    line-height: 1.6;
}

/* ---------- HEADER ---------- */
.site-header {
    background: var(--header-bg);
    color: #fff;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 20px;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: #fff;
    text-decoration: none;
}
.logo span { color: #ffcf40; }

.main-nav ul {
    list-style: none;
    display: flex;
    gap: 25px;
}
.theme-toggle {
    background: none;
    border: none;
    color: #fff;
    font-size: 1.3rem;
    cursor: pointer;
    margin-left: 15px;
}


.main-nav > ul > li {
    position: relative;
}

.main-nav a {
    color: #fff;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.main-nav a:hover { color: #ffcf40; }

/* Dropdown mejorado */
.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: #fff;
    min-width: 220px;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);

    max-height: 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: max-height 0.35s ease, opacity 0.3s ease, transform 0.3s ease;
}

.dropdown.active .dropdown-menu {
    max-height: 400px;
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu li a {
    color: #222;
    display: block;
    padding: 12px 18px;
    transition: background 0.2s ease;
}
.dropdown-menu li a:hover { background: #f2f2f2; color: #0b3d2e; }


@keyframes fadeSlide {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: translateY(0); }
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: #fff;
    font-size: 1.6rem;
    cursor: pointer;
}

/* ---------- HERO ---------- */
.hero {
    background: linear-gradient(135deg, #0b3d2e 0%, #145c46 100%);
    color: #fff;
    text-align: center;
    padding: 90px 20px;
    animation: fadeIn 1s ease;
}

.hero h1 {
    font-size: 2.6rem;
    margin-bottom: 15px;
}

.hero p {
    max-width: 700px;
    margin: 0 auto 25px;
    font-size: 1.1rem;
    opacity: 0.95;
}

.btn-primary {
    background: #ffcf40;
    color: #0b3d2e;
    padding: 14px 32px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: bold;
    transition: transform 0.2s ease;
    display: inline-block;
}
.btn-primary:hover { transform: translateY(-3px); }

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ---------- PRODUCTOS ---------- */
.productos-destacados {
    max-width: 1200px;
    margin: 60px auto;
    padding: 0 20px;
}

.productos-destacados h2 {
    text-align: center;
    margin-bottom: 40px;
    color: #0b3d2e;
}

.grid-productos {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.card-producto {
    border: 1px solid var(--card-border);
    border-radius: 10px;
    overflow: hidden;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background: var(--card-bg);
}


.card-producto:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 25px rgba(0,0,0,0.1);
}

.card-producto img {
    width: 100%;
    height: 220px;
    object-fit: cover;
}

.card-producto .info { padding: 20px; }
.card-producto h3 { color: #0b3d2e; margin-bottom: 8px; }
.card-producto .precio { font-size: 1.3rem; color: #145c46; font-weight: bold; margin: 10px 0; }

/* ---------- FOOTER ---------- */
.site-footer {
    background: #0b3d2e;
    color: #eee;
    padding: 50px 20px 20px;
    margin-top: 60px;
}
.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    justify-content: space-between;
}
.footer-col h4 { color: #ffcf40; margin-bottom: 12px; }
.footer-col ul { list-style: none; }
.footer-col a { color: #ccc; text-decoration: none; }
.footer-col a:hover { color: #ffcf40; }
.footer-bottom {
    text-align: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
    font-size: 0.85rem;
    color: #aaa;
}

/* ---------- MOBILE ---------- */
@media (max-width: 768px) {
    .main-nav { display: none; }
    .menu-toggle { display: block; }
    .main-nav.active {
        display: block;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: #0b3d2e;
    }
    .main-nav.active ul { flex-direction: column; padding: 20px; }
    .dropdown-menu { position: static; box-shadow: none; }
}
