*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Arial, Helvetica, sans-serif;
}

html {
    scroll-behavior: smooth;
}

body {
    background: #f5f7fa;
    color: #222;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: auto;
}

/* ── Header ── */
header {
    background: #111;
    color: white;
    position: sticky;
    top: 0;
    z-index: 100;
}

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

.logo-link {
    text-decoration: none;
}

.logo {
    color: #ff4d00;
}

header nav {
    display: flex;
    gap: 20px;
    align-items: center;
}

nav a {
    color: white;
    text-decoration: none;
    transition: .3s;
}

nav a:hover {
    color: #ff4d00;
}

/* ── Carrito badge ── */
.nav-carrito {
    position: relative;
    font-size: 1.2rem;
    line-height: 1;
}

.carrito-badge {
    position: absolute;
    top: -8px;
    right: -10px;
    background: #ff4d00;
    color: #fff;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    font-size: 0.65rem;
    font-weight: 700;
    display: none;
    align-items: center;
    justify-content: center;
}

/* ── Menú hamburguesa (oculto en escritorio) ── */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.6rem;
    cursor: pointer;
    padding: 4px 8px;
}

/* ── HERO escritorio ── */
.hero {
    height: 85vh;
    background: url('../img/pagina/hero.png') center/cover no-repeat;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    position: relative;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .15);
}

.hero-content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 20px 40px;
}

@media (min-width: 769px) {
    .hero-content {
        align-items: flex-end;
        width: 70%;
    }
}


/* El texto de la página está oculto — la imagen ya tiene su propio texto */
.hero-sub,
.hero-title {
    display: none;
}

/* ── Botones ── */
.btn {
    background: rgba(255, 77, 0, .92);
    color: white;
    text-decoration: none;
    padding: 12px 28px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-weight: 700;
    font-size: 15px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, .3);
    transition: .3s;
    border: none;
    cursor: pointer;
}

.btn:hover {
    background: #e03d00;
    transform: translateY(-2px);
}

.btn-hero {
    font-size: 0.95rem;
    padding: 12px 30px;
}

/* ── Sección productos ── */
.section-title {
    text-align: center;
    margin: 60px 0 40px;
    font-size: 1.8rem;
}

/* ── Buscador ── */
.buscador-wrap {
    position: relative;
    display: flex;
    align-items: center;
    flex: 1 1 260px;
    max-width: 380px;
}

.buscador-icon {
    position: absolute;
    left: 12px;
    font-size: 15px;
    pointer-events: none;
    z-index: 1;
}

#busquedaTexto {
    width: 100%;
    padding: 10px 12px 10px 36px;
    border: 2px solid #ddd;
    border-radius: 8px;
    outline: none;
    font-size: 14px;
    background: white;
    transition: border-color .2s;
}

#busquedaTexto:focus {
    border-color: #ff4d00;
}

/* ── Filtros ── */
.filtros {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    align-items: center;
    margin-bottom: 30px;
}

.filtros select,
.filtros input[type="number"] {
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    outline: none;
    font-size: 14px;
    background: white;
    min-width: 180px;
}

.filtros input[type="number"] {
    width: 160px;
}

.filtros select:focus,
.filtros input[type="number"]:focus {
    border-color: #ff4d00;
}

/* ── Estado vacío ── */
.sin-resultados {
    text-align: center;
    padding: 60px 20px;
    color: #666;
    font-size: 1.1rem;
}

.sin-resultados p {
    margin-bottom: 20px;
}

/* ── Grid de productos ── */
.productos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    margin-bottom: 60px;
}

.card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, .1);
    transition: .3s;
    position: relative;
    cursor: pointer;
}

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

.card img {
    width: 100%;
    height: 250px;
    object-fit: contain;
    padding: 10px;
    background: white;
}

.card-body {
    padding: 20px;
}

.card-title {
    margin-bottom: 10px;
    font-size: 15px;
}

.card-price {
    color: #ff4d00;
    font-weight: bold;
    font-size: 1.2rem;
    margin-bottom: 15px;
}

.card-buttons {
    display: flex;
    gap: 8px;
}

.card-buttons button {
    flex: 1;
    border: none;
    background: #111;
    color: white;
    padding: 12px 8px;
    cursor: pointer;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    transition: background .2s;
}

.card-buttons button:hover {
    background: #ff4d00;
}

.card-buttons button.btn-carrito {
    background: #ff4d00;
}

.card-buttons button.btn-carrito:hover {
    background: #e03d00;
}

.card-buttons button:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.agotado {
    position: absolute;
    top: 10px;
    left: 10px;
    background: #e53935;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 5px 10px;
    border-radius: 6px;
    letter-spacing: .5px;
    text-transform: uppercase;
    box-shadow: 0 6px 14px rgba(0, 0, 0, .2);
}

/* ── Paginación ── */
#paginacion {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin: 30px 0 60px;
}

#paginacion button {
    padding: 8px 12px;
    border: 1px solid #ddd;
    background: white;
    cursor: pointer;
    border-radius: 6px;
    font-size: 14px;
    transition: .2s;
}

#paginacion button:hover {
    border-color: #ff4d00;
    color: #ff4d00;
}

#paginacion button.active {
    background: #ff4d00;
    color: white;
    border-color: #ff4d00;
}

/* ── Toast ── */
#toast {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: #ff4d00;
    color: white;
    padding: .7rem 1.5rem;
    border-radius: 25px;
    font-weight: 600;
    font-size: .9rem;
    opacity: 0;
    transition: all .3s;
    pointer-events: none;
    z-index: 999;
    white-space: nowrap;
}

#toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ── Nosotros ── */
.about {
    background: white;
    padding: 80px 20px;
}

.about .container {
    max-width: 900px;
    margin: auto;
}

.about h2 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 30px;
}

.about p {
    text-align: left;
    line-height: 1.7;
    margin-bottom: 15px;
    color: #333;
    font-size: 15px;
}

.about ul {
    margin-top: 15px;
    padding-left: 20px;
    list-style: none;
}

.about ul li {
    position: relative;
    padding-left: 20px;
    margin-bottom: 10px;
    font-size: 15px;
    color: #333;
}

.about ul li::before {
    content: "✔";
    position: absolute;
    left: 0;
    color: #ff4d00;
    font-weight: bold;
}

/* ── Contacto ── */
.contacto {
    background: #111;
    color: white;
    padding: 80px 20px;
    text-align: center;
}

.contacto h2 {
    font-size: 2rem;
    margin-bottom: 10px;
}

.contacto-texto {
    max-width: 600px;
    margin: 0 auto 40px;
    color: #ccc;
    line-height: 1.6;
}

.contacto-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    max-width: 800px;
    margin: auto;
}

.contacto-card {
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 12px;
    padding: 25px;
    text-decoration: none;
    color: white;
    transition: .3s;
}

.contacto-card:hover {
    transform: translateY(-5px);
    border-color: #ff4d00;
}

.contacto-card h3 {
    margin-bottom: 8px;
    color: #ff4d00;
}

.contacto-card p {
    margin-bottom: 10px;
    color: #ccc;
}

.contacto-card span {
    font-size: 14px;
    font-weight: bold;
    color: white;
}

/* ── Footer ── */
footer {
    background: #111;
    color: white;
    text-align: center;
    padding: 30px 20px 20px;
}

.footer-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
}

.social-icons {
    display: flex;
    gap: 28px;
    align-items: center;
}

.social-icons a {
    color: #ffffff;
    transition: color 0.3s, transform 0.2s;
    display: flex;
    align-items: center;
}

.social-icons a:hover {
    color: #ff4d00;
    transform: translateY(-3px);
}

footer p {
    color: #aaa;
    font-size: 13px;
}

footer strong {
    color: #ff4d00;
}

/* ── Breadcrumb ── */
.breadcrumb {
    padding: 16px 0 0;
    font-size: 13px;
    color: #888;
}

.breadcrumb a {
    color: #ff4d00;
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

/* ══════════════════════════════
   RESPONSIVE MÓVIL
══════════════════════════════ */
@media (max-width: 768px) {

    /* Nav */
    .nav {
        flex-wrap: nowrap;
        justify-content: space-between;
        align-items: center;
        padding: 14px 0;
        position: relative;
    }

    .menu-toggle {
        display: block;
    }

    header nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #111;
        flex-direction: column;
        align-items: flex-start;
        padding: 10px 20px 20px;
        gap: 14px;
        border-top: 1px solid #333;
        z-index: 200;
    }

    header nav.open {
        display: flex;
    }

    /* Hero móvil: imagen completa sin recortes */
    /* Hero móvil: imagen completa sin recortes */
    .hero {
        height: auto;
        background: none;
        display: block;
        position: static;
    }

    .hero-overlay {
        display: none;
    }

    .hero::before {
        content: "";
        display: block;
        width: 100%;
        aspect-ratio: 5 / 3;
        background: url('../img/pagina/hero_mobile.png') center/cover no-repeat;
        background-color: #111;
    }

    .hero-content {
        display: flex;
        justify-content: center;
        padding: 14px 20px;
        background: #111;
    }

    .btn-hero {
        font-size: 0.85rem;
        padding: 10px 24px;
    }

    /* Filtros */
    .filtros {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .buscador-wrap {
        grid-column: 1 / -1;
        max-width: 100%;
    }

    #filtroCategoria,
    .filtros select,
    .filtros input[type="number"],
    #busquedaTexto {
        width: 100%;
        min-width: 0;
    }

    /* Productos: 2 por fila */
    .productos-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .card img {
        height: 150px;
    }

    .card-body {
        padding: 12px;
    }

    .card-title {
        font-size: 13px;
    }

    .card-price {
        font-size: 15px;
    }

    .card-buttons {
        flex-direction: column;
        gap: 6px;
    }

    .card-buttons button {
        padding: 8px;
        font-size: 12px;
    }

}

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        transition: none !important;
    }
}