/* Fuentes */
@font-face {
    font-family: "PrintuartNormal";
    src: url(../fuentes/coolvetica/coolvetica\ rg.ttf);
    font-weight: normal;
}
@font-face {
    font-family: "PrintuartNegrita";
    src: url(../fuentes/coolvetica/coolvetica\ rg.ttf);
    font-weight: bold;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "PrintuartNormal", sans-serif;
    background-image: url(../img/FondoPP.jpg);
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center center;
    background-attachment: fixed;
    color: #fff;
}

/* ----- Cabecera ----- */
.cabecera {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2%;
    background: rgba(0, 0, 0, 0.5);
}

.logo img {
    height: 60px;
}

.menu ul {
    list-style: none;
    display: flex;
    gap: 25px;
    margin: 0;
    padding: 0;
}

.menu a {
    text-decoration: none;
    color: white;
    font-weight: bold;
    transition: 0.3s;
}

.menu a:hover {
    color: #ff3300;
}

/* ----- Banner del catálogo ----- */
.catalogo-banner {
    text-align: center;
    padding: 60px 20px;
    background: linear-gradient(135deg, rgba(212, 67, 0, 0.7), rgba(255, 72, 0, 0.5));
    margin: 20px 0;
}

.catalogo-banner h1 {
    font-family: "PrintuartNegrita", sans-serif;
    font-size: 3.5em;
    margin-bottom: 15px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.catalogo-banner p {
    font-size: 1.3em;
    max-width: 700px;
    margin: 0 auto;
}

/* ----- Contenedor principal ----- */
.catalogo-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 20px;
}

/* ----- Filtros y Carrito ----- */
.controles-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    flex-wrap: wrap;
    gap: 20px;
    background: rgba(0, 0, 0, 0.5);
    padding: 20px;
    border-radius: 10px;
}

.filtros {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.btn-filtro {
    padding: 12px 25px;
    background: rgba(255, 72, 0, 0.3);
    border: 2px solid #ff4800;
    color: #fff;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s;
    font-family: "PrintuartNormal", sans-serif;
    font-size: 1em;
}

.btn-filtro:hover {
    background: rgba(255, 72, 0, 0.6);
    transform: translateY(-2px);
}

.btn-filtro.active {
    background: #ff4800;
    box-shadow: 0 4px 15px rgba(255, 72, 0, 0.5);
}

.carrito-widget {
    position: relative;
    background: rgba(255, 72, 0, 0.7);
    padding: 12px 25px;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 10px;
}

.carrito-widget:hover {
    background: #ff4800;
    transform: scale(1.05);
}

.carrito-count {
    background: #fff;
    color: #ff4800;
    border-radius: 50%;
    width: 25px;
    height: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.9em;
}

/* ----- Grid de productos ----- */
.productos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
    margin-bottom: 60px;
}

.producto-card {
    background: rgba(0, 0, 0, 0.6);
    border-radius: 15px;
    overflow: hidden;
    transition: all 0.3s;
    cursor: pointer;
    border: 2px solid transparent;
}

.producto-card:hover {
    transform: translateY(-10px);
    border-color: #ff4800;
    box-shadow: 0 10px 30px rgba(255, 72, 0, 0.3);
}

.producto-img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    transition: transform 0.3s;
}

.producto-card:hover .producto-img {
    transform: scale(1.05);
}

.producto-info {
    padding: 20px;
}

.producto-categoria {
    display: inline-block;
    background: rgba(255, 72, 0, 0.7);
    padding: 5px 15px;
    border-radius: 15px;
    font-size: 0.85em;
    margin-bottom: 10px;
}

.producto-titulo {
    font-size: 1.4em;
    margin-bottom: 10px;
    font-family: "PrintuartNegrita", sans-serif;
}

.producto-descripcion {
    font-size: 0.95em;
    line-height: 1.5;
    margin-bottom: 15px;
    opacity: 0.9;
}

.producto-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.producto-precio {
    font-size: 1.5em;
    color: #ff4800;
    font-weight: bold;
}

.btn-agregar {
    background: #ff4800;
    color: #fff;
    padding: 10px 20px;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s;
    font-family: "PrintuartNormal", sans-serif;
}

.btn-agregar:hover {
    background: #ff3300;
    transform: scale(1.05);
}

/* ----- Modal del carrito ----- */
.modal-carrito {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal-carrito.active {
    display: flex;
}

.modal-contenido {
    background: #222;
    padding: 40px;
    border-radius: 20px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    border-bottom: 2px solid #ff4800;
    padding-bottom: 15px;
}

.modal-header h2 {
    font-family: "PrintuartNegrita", sans-serif;
    color: #ff4800;
}

.btn-cerrar {
    background: none;
    border: none;
    color: #fff;
    font-size: 2em;
    cursor: pointer;
    transition: color 0.3s;
}

.btn-cerrar:hover {
    color: #ff4800;
}

/* 🔧 CORRECCIÓN 2: Items del carrito con controles de cantidad */
.carrito-item {
    display: flex;
    gap: 15px;
    padding: 15px;
    background: rgba(255, 72, 0, 0.1);
    border-radius: 10px;
    margin-bottom: 15px;
    align-items: center;
}

.carrito-item-img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
    flex-shrink: 0;
}

.carrito-item-info {
    flex: 1;
}

.carrito-item-titulo {
    font-weight: bold;
    margin-bottom: 5px;
}

.carrito-item-cantidad {
    font-size: 0.9em;
    opacity: 0.8;
    margin-bottom: 5px;
}

.carrito-item-precio {
    color: #ff4800;
    font-size: 1.1em;
}

/* Controles de cantidad */
.carrito-item-controles {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: center;
}

.cantidad-controles {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 72, 0, 0.2);
    padding: 5px 10px;
    border-radius: 20px;
}

.btn-cantidad {
    background: #ff4800;
    color: #fff;
    border: none;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.1em;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.btn-cantidad:hover {
    background: #ff3300;
    transform: scale(1.1);
}

.cantidad-numero {
    min-width: 30px;
    text-align: center;
    font-weight: bold;
    font-size: 1.1em;
}

.btn-eliminar-todo {
    background: #ff3300;
    color: #fff;
    border: none;
    padding: 6px 12px;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 0.85em;
}

.btn-eliminar-todo:hover {
    background: #cc0000;
}

.carrito-total {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 2px solid #ff4800;
    text-align: right;
}

.carrito-total h3 {
    font-size: 1.8em;
    color: #ff4800;
}

.btn-whatsapp {
    background: #25D366;
    color: #fff;
    padding: 15px 30px;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-size: 1.1em;
    margin-top: 20px;
    width: 100%;
    transition: all 0.3s;
    font-family: "PrintuartNormal", sans-serif;
}

.btn-whatsapp:hover {
    background: #128C7E;
    transform: scale(1.02);
}

.carrito-vacio {
    text-align: center;
    padding: 40px;
    opacity: 0.7;
}

/* ----- Footer ----- */
#contacto {
    background-color: #333;
    color: #f7f7f7;
    padding: 40px 20px;
    font-family: sans-serif;
}

.footer-container {
    display: flex;
    justify-content: space-around;
    align-items: flex-start;
    max-width: 1200px;
    margin: 0 auto;
    flex-wrap: wrap;
}

.footer-brand, .footer-info, .footer-social {
    padding: 15px;
    min-width: 200px;
}

.footer-brand .brand-name {
    font-family: "PrintuartNegrita", sans-serif;
    font-size: 1.8em;
    color: #ff4800;
    margin-bottom: 10px;
}

.footer-info h4, .footer-social h4 {
    font-size: 1.2em;
    border-bottom: 2px solid #555;
    padding-bottom: 5px;
    margin-bottom: 15px;
}

.footer-info p {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
    line-height: 1.5;
}

.footer-info a {
    color: #f7f7f7;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-info a:hover {
    color: #ff4800;
}

.contact-icon {
    width: 20px;
    height: 20px;
    margin-right: 10px;
}

.footer-social p.social-link-group {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.social-icon {
    width: 30px;
    height: 30px;
    margin-right: 10px;
    transition: opacity 0.3s;
}

.social-icon:hover {
    opacity: 0.8;
}

/* ----- Responsividad ----- */
@media (max-width: 768px) {
    .cabecera {
        flex-direction: column;
        gap: 15px;
    }

    .catalogo-banner h1 {
        font-size: 2.5em;
    }

    .catalogo-banner p {
        font-size: 1.1em;
    }

    .controles-top {
        flex-direction: column;
    }

    .filtros {
        width: 100%;
        justify-content: center;
    }

    .productos-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 20px;
    }

    .modal-contenido {
        padding: 20px;
        width: 95%;
    }

    .carrito-item {
        flex-wrap: wrap;
    }

    .footer-container {
        flex-direction: column;
        align-items: center;
    }

    .footer-brand, .footer-info, .footer-social {
        min-width: 100%;
        text-align: center;
        margin-bottom: 20px;
        border-bottom: 1px solid #555;
    }

    .footer-info p, .footer-social p.social-link-group {
        justify-content: center;
    }

    .footer-social {
        border-bottom: none;
        padding-bottom: 0;
    }
}