:root {
    --negro: #000000;
    --blanco: #ffffff;
    --gris: #f2f2f2;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: 'Helvetica Neue', Arial, sans-serif;
    color: var(--negro);
}

/* HEADER */
.header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    background: var(--blanco);
    border-bottom: 1px solid var(--negro);
    position: sticky;
    top: 0;
    z-index: 100;
}

.btn-hamburger {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--negro);
    cursor: pointer;
}

.logo-header {
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: 3px;
    color: var(--negro);
    text-decoration: none;
}

.carrito-icon {
    font-size: 1.4rem;
    color: var(--negro);
    text-decoration: none;
}

/* HERO SPLIT */
.hero-split {
    display: flex;
    width: 100%;
    height: 90vh;
    gap: 15px;
    padding: 15px;
    background: var(--white);
    box-sizing: border-box;
    justify-content: center; /* centra los bloques cuando limitamos su ancho */
}

.hero-half {
    flex: 1;
    max-width: 500px; /* angosta cada mitad para acercarla a la proporción vertical real */
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
}

.hero-half::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.25);
    z-index: 1;
}

.btn-hero {
    position: relative;
    z-index: 2;
    background: transparent;
    border: 2px solid var(--blanco);
    color: var(--blanco);
    padding: 0.9rem 2.2rem;
    text-decoration: none;
    font-weight: 600;
    letter-spacing: 2px;
    transition: all 0.3s ease;
}

.btn-hero:hover {
    background: var(--blanco);
    color: var(--negro);
}

/* RESPONSIVE */
@media (max-width: 768px) {
    .hero-split {
        flex-direction: column;
        height: auto;
    }
    .hero-half {
        width: 100%;
        aspect-ratio: 9 / 16;
        flex: none;
    }
}

/* INFO BAR */
.info-bar {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
    text-align: center;
    padding: 2.5rem 1rem;
    background: var(--gris);
}

.info-item i {
    font-size: 1.8rem;
    display: block;
    margin-bottom: 0.5rem;
}

.info-link {
    color: var(--negro);
    text-decoration: none;
}

/* INFO BAR - RESPONSIVE */
@media (max-width: 768px) {
    .info-bar {
        flex-wrap: nowrap;
        padding: 1.5rem 0.5rem;
        gap: 0.3rem;
    }

    .info-item {
        flex: 1;
        min-width: 0;
    }

    .info-item i {
        font-size: 1.3rem;
        margin-bottom: 0.3rem;
    }

    .info-item p {
        font-size: 0.7rem;
        line-height: 1.2;
        margin: 0;
    }
}

/* CATALOGO */
.titulo-seccion {
    text-align: center;
    padding: 2rem 0 1rem;
    letter-spacing: 4px;
    font-weight: 700;
}

.grid-productos {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 2rem;
    padding: 0 2rem 3rem;
}

.card-producto a {
    text-decoration: none;
    color: var(--negro);
}

.card-img-wrapper {
    width: 100%;
    aspect-ratio: 3/4;
    overflow: hidden;
    background: var(--gris);
}

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

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

.card-info {
    padding: 0.8rem 0.2rem;
    text-align: center;
}

.card-nombre {
    margin: 0;
    font-weight: 600;
    letter-spacing: 1px;
}

.card-precio {
    margin: 0.2rem 0 0;
    color: #555;
}

.sin-productos {
    text-align: center;
    padding: 3rem;
    grid-column: 1/-1;
}

/* DETALLE PRODUCTO */
.detalle-producto {
    display: flex;
    flex-wrap: wrap;
    gap: 3rem;
    padding: 3rem 2rem;
    max-width: 1100px;
    margin: 0 auto;
}

.detalle-img {
    flex: 1 1 400px;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.detalle-img img {
    width: 100%;
    object-fit: cover;
}

.detalle-info {
    flex: 1 1 350px;
}

.detalle-precio {
    font-size: 1.4rem;
    margin: 0.5rem 0 1.5rem;
}

.detalle-descripcion {
    line-height: 1.6;
    margin-bottom: 2rem;
}

.cantidad-selector {
    margin-bottom: 1.5rem;
}

.cantidad-selector input {
    width: 70px;
    padding: 0.4rem;
    margin-left: 0.8rem;
    border: 1px solid var(--negro);
}

.btn-negro {
    background: var(--negro);
    color: var(--blanco);
    border: none;
    padding: 0.9rem 2.2rem;
    letter-spacing: 2px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.3s ease;
}

.btn-negro:hover {
    opacity: 0.8;
}

.sin-stock {
    color: #c0392b;
    font-weight: 600;
}

/* CARRITO BADGE EN HEADER */
.carrito-icon {
    position: relative;
}

.carrito-badge {
    position: absolute;
    top: -8px;
    right: -10px;
    background: var(--negro);
    color: var(--blanco);
    font-size: 0.7rem;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* CARRITO PAGE */
.carrito-page {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 2rem 3rem;
}

.carrito-lista {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.carrito-item {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    border-bottom: 1px solid #ddd;
    padding-bottom: 1.5rem;
}

.carrito-item img {
    width: 90px;
    height: 110px;
    object-fit: cover;
}

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

.carrito-item-nombre {
    margin: 0;
    font-weight: 600;
}

.carrito-item-precio {
    margin: 0.2rem 0 0.6rem;
    color: #555;
}

.carrito-item-form {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-right: 1rem;
}

.carrito-item-form input {
    width: 55px;
    padding: 0.2rem;
    border: 1px solid var(--negro);
}

.btn-link {
    background: none;
    border: none;
    text-decoration: underline;
    cursor: pointer;
    font-size: 0.85rem;
}

.btn-eliminar {
    color: #c0392b;
}

.carrito-item-subtotal {
    font-weight: 600;
    min-width: 70px;
    text-align: right;
}

.carrito-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 2rem;
    font-size: 1.2rem;
}

.carrito-vacio {
    text-align: center;
    padding: 3rem 0;
}

/* CARRITO - RESPONSIVE */
@media (max-width: 768px) {
    .carrito-item {
        flex-wrap: wrap;
        position: relative;
        padding-bottom: 2.5rem;
    }

    .carrito-item img {
        width: 70px;
        height: 90px;
    }

    .carrito-item-info {
        flex: 1;
        min-width: 0;
    }

    .carrito-item-subtotal {
        position: absolute;
        bottom: 0.5rem;
        right: 0;
        text-align: right;
    }

    .carrito-item-form {
        display: flex;
        margin-right: 0;
        margin-bottom: 0.5rem;
    }

    .carrito-total {
        flex-wrap: wrap;
        gap: 1rem;
    }
}

/* UPCYCLING */
.upcycling-page {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 2rem 4rem;
    text-align: center;
}

.upcycling-hero {
    margin-bottom: 2rem;
}

.upcycling-pregunta {
    font-size: 1.2rem;
    color: #555;
    margin: 1rem 0 0.2rem;
}

.upcycling-destacado {
    font-size: 1.7rem;
    font-weight: 700;
    letter-spacing: 1px;
    margin: 0;
}

.upcycling-intro {
    max-width: 650px;
    margin: 0 auto 3rem;
    line-height: 1.8;
    color: #444;
    font-size: 1.05rem;
}

.upcycling-requisito {
    max-width: 650px;
    margin: 0 auto 3.5rem;
    padding: 2rem;
    border: 1px solid #000;
}

.upcycling-requisito h2 {
    letter-spacing: 2px;
    margin: 0 0 1rem;
    font-size: 1.1rem;
}

.upcycling-requisito p {
    line-height: 1.7;
    color: #444;
    margin: 0;
}

.upcycling-pasos {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2.5rem;
    text-align: left;
    margin-bottom: 3.5rem;
}

.paso-numero {
    display: block;
    font-size: 1.8rem;
    font-weight: 700;
    color: #ccc;
    margin-bottom: 0.5rem;
}

.paso h3 {
    margin: 0 0 0.5rem;
    letter-spacing: 1px;
    font-size: 1rem;
}

.paso p {
    line-height: 1.6;
    color: #555;
    margin: 0;
    font-size: 0.92rem;
}

.upcycling-cta {
    margin-top: 1rem;
}

.upcycling-cta .btn-negro {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
}


/* CHECKOUT */
.checkout-page {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 2rem 4rem;
}

.checkout-wrapper {
    display: flex;
    gap: 3rem;
    flex-wrap: wrap;
}

.checkout-form {
    flex: 1 1 400px;
}

.form-row {
    display: flex;
    gap: 1rem;
}

.form-row .form-group {
    flex: 1;
}

.form-group {
    margin-bottom: 1.2rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.3rem;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
}

.form-input,
.checkout-form input,
.checkout-form select {
    width: 100%;
    padding: 0.7rem;
    border: 1px solid var(--negro);
    font-family: inherit;
}

.checkout-resumen {
    flex: 1 1 280px;
    background: var(--gris);
    padding: 1.5rem;
    align-self: flex-start;
}

.checkout-resumen h2 {
    font-size: 1rem;
    letter-spacing: 1px;
    margin-bottom: 1rem;
}

.resumen-item {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    margin-bottom: 0.6rem;
    color: #333;
}

.resumen-total {
    display: flex;
    justify-content: space-between;
    border-top: 1px solid var(--negro);
    padding-top: 1rem;
    margin-top: 1rem;
}

/* RESULTADO DE PAGO */
.resultado-pago {
    max-width: 500px;
    margin: 4rem auto;
    text-align: center;
    padding: 0 2rem;
}

.resultado-icon {
    font-size: 3.5rem;
    display: block;
    margin-bottom: 1.5rem;
}

.resultado-exito { color: #2e7d32; }
.resultado-fallo { color: #c0392b; }
.resultado-pendiente { color: #e0a800; }

.resultado-pago h1 {
    margin-bottom: 1rem;
}

.resultado-pago p {
    line-height: 1.6;
    color: #444;
    margin-bottom: 2rem;
}