:root{
    --white: #ffffff;
    --black: #111111;
    --bronze: #b08d57;
    --bronze-dark: #8a6b3d;
    --light-bg: #f7f7f7;
}

*{
    margin:0;
    padding:0;
    box-sizing:border-box;
}

body{
    font-family:'Montserrat',sans-serif;
    color:var(--black);
    background:var(--white);
}

h1,
h2,
h3{
    font-family:'Cormorant Garamond',serif;
    color:inherit;
}

a{
    text-decoration:none;
}

.navbar{
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:30px;
    padding:15px clamp(20px, 8vw, 120px);
    border-bottom:1px solid #ececec;
}

.logo{
    display:flex;
    align-items:center;
    flex-shrink:0;
}

.logo img{
    height:clamp(50px, 5vw, 70px);
    width:auto;
    display:block;
}

.menu{
    display:flex;
    list-style:none;
    gap:clamp(15px, 3vw, 35px);
    flex-wrap:wrap;
    justify-content:flex-end;
}

.menu a{
    color:var(--black);
    font-weight:550;
    font-size:1.2rem;
}

.menu a:hover{
    color:var(--bronze);
}

.hero{
    min-height:calc(100vh - 90px);
    display:flex;
    align-items:center;
    justify-content:center;
    text-align:center;
    padding:40px 10% 20px;
    background: linear-gradient(
        rgba(255,255,255,.65),
        rgba(255,255,255,.65)
    ),
    url("/images/fondo.jpeg");
    background-size:cover;
    background-position:center 35%;
}

.hero-content{
    width:100%;
    max-width:900px;
    margin:0 auto;
    transform:none;
}

.hero-logo{
    display:block;
    width:clamp(80px, 8vw, 120px);
    height:auto;
    margin:0 auto 25px;
}

.hero h1{
    font-size:5rem;
    margin-bottom:20px;
}

.hero p{
    font-size:1.2rem;
    line-height:1.8;
    margin-bottom:35px;
}

.hero-buttons{
    display:flex;
    justify-content:center;
    gap:20px;
}

.btn-primary{
    background:var(--bronze);
    color:white;
    padding:15px 35px;
    border-radius:50px;
    transition:.3s;
}

.btn-primary:hover{
    background:var(--bronze-dark);
}

.btn-secondary{
    border:2px solid var(--bronze);
    color:var(--bronze);
    padding:15px 35px;
    border-radius:50px;
}

.categories,
.products,
.benefits{
    padding:100px 8%;
}

.categories h2,
.products h2,
.benefits h2{
    text-align:center;
    font-size:3rem;
    margin-bottom:60px;
}

.category-grid{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(300px,1fr));
    gap:30px;
}

.category-card{
    background:var(--light-bg);
    padding:70px 40px;
    text-align:center;
    border:1px solid #e8e8e8;
}

.category-card h3{
    font-size:2rem;
    color:var(--bronze);
    margin-bottom:15px;
}

.product-grid{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(340px,1fr));
    gap:40px;
}

.product-card{
    background:#fff;
    border:1px solid #ececec;
    border-radius:14px;
    overflow:hidden;
    cursor:pointer;
    transition:.35s;
    display:flex;
    flex-direction:column;
}

.product-card:hover{
    transform:translateY(-8px);
    box-shadow:0 20px 40px rgba(0,0,0,.12);
}

.product-image{
    height:315px;
    background:#f7f7f7;
    border:1px solid #f7f7f7;
    border-radius:10px;
    overflow:hidden;

    display:flex;
    justify-content:center;
    align-items:center;
}

.product-image img{
    width:100%;
    height:100%;
    object-fit:contain;
    display:block;
    transition:opacity .35s;
}

.product-card h3{
    font-size:1.5rem;
    color:var(--bronze);
    margin:18px 15px 8px;
}

.product-card span{
    display:block;
    margin:0 15px 20px;
    font-size:1.15rem;
    color:var(--black);
    font-weight:600;
}

.about{
    background:var(--black);
    color:white;
    padding:120px 10%;
}

.about-content{
    max-width:900px;
    margin:auto;
    text-align:center;
}

.about h2{
    font-size:4rem;
    color:var(--bronze);
    margin-bottom:25px;
}

.about p{
    line-height:1.9;
    font-size:1.1rem;
}

.benefits-grid{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(250px,1fr));
    gap:30px;
}

.benefit{
    border:1px solid #e8e8e8;
    padding:40px;
    text-align:center;
}

.benefit h3{
    color:var(--bronze);
    margin-bottom:15px;
    font-size:1.8rem;
}

footer{
    background:var(--black);
    color:white;
    text-align:center;
    padding:50px 20px;
}

footer h2{
    color:var(--bronze);
    margin-bottom:15px;
}

footer p{
    margin:10px 0;
}

.page-hero{
    background:#111;
    color:white;
    text-align:center;
    padding:50px 20px 45px;
}

.page-hero h1{
    font-size:4rem;
    color:#b08d57;
    margin-bottom:20px;
}

.page-hero p{
    font-size:1.1rem;
}

.products-page{
    padding:50px 8%;
}

.about-section{
    padding:100px 10%;
    background:#fff;
}

.about-container{
    max-width:900px;
    margin:auto;
    text-align:center;
}

.about-container h2{
    font-size:3rem;
    color:var(--bronze);
    margin-bottom:30px;
}

.about-container p{
    font-size:1.1rem;
    line-height:1.8;
    margin-bottom:20px;
}

.about-values{
    padding:80px 10%;
    background:#f7f7f7;
}

.values-grid{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(250px,1fr));
    gap:30px;
}

.value-card{
    background:white;
    padding:40px;
    text-align:center;
    border:1px solid #e8e8e8;
}

.value-card h3{
    color:var(--bronze);
    margin-bottom:15px;
}

.contact-section{
    padding:100px 10%;
    background:#fff;
}

.contact-container{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:60px;
    max-width:1100px;
    margin:auto;
}

.contact-form{
    display:flex;
    flex-direction:column;
    gap:15px;
}

.contact-form input,
.contact-form textarea{
    padding:15px;
    border:1px solid #ddd;
    font-family:inherit;
    font-size:1rem;
}

.contact-form button{
    padding:15px;
    background:var(--bronze);
    color:white;
    border:none;
    cursor:pointer;
    transition:0.3s;
}

.contact-form button:hover{
    background:var(--bronze-dark);
}

.contact-info{
    padding:20px;
}

.contact-info h3{
    color:var(--bronze);
    margin-bottom:20px;
}

/* ADMIN WRAPPER */
.admin-wrapper{
    min-height:100vh;
    display:flex;
    justify-content:center;
    align-items:center;
    background:#111;
    color:white;
    font-family:Montserrat, sans-serif;
}

/* LOGIN */
.admin-login{
    background:#1a1a1a;
    padding:40px;
    width:350px;
    display:flex;
    flex-direction:column;
    gap:15px;
    text-align:center;
    border:1px solid #333;
}

.admin-login input{
    padding:12px;
    border:none;
}

.admin-login button{
    padding:12px;
    background:#b08d57;
    border:none;
    cursor:pointer;
    color:white;
}

/* DASHBOARD */
.admin-dashboard{
    width:90%;
    max-width:1000px;
}

.admin-header{
    display:flex;
    justify-content:space-between;
    align-items:center;
    margin-bottom:30px;
}

.admin-header button{
    background:#b08d57;
    border:none;
    padding:10px 20px;
    color:white;
    cursor:pointer;
}

/* GRID */
.admin-grid{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(250px,1fr));
    gap:20px;
}

.admin-card{
    background:#1a1a1a;
    padding:20px;
    border:1px solid #333;
}

.admin-card h3{
    color:#b08d57;
}

/* MODAL */
.admin-modal{
    position:fixed;
    top:0;
    left:0;
    width:100%;
    height:100%;
    background:rgba(0,0,0,0.8);
    display:flex;
    justify-content:center;
    align-items:center;
}

.hidden{
    display:none;
}

.cart-container{
    max-width:900px;
    margin:50px auto;
    padding:20px;
}

.cart-item{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:20px;
    background:#1c1c1c;
    padding:15px;
    margin-bottom:10px;
    border-radius:8px;
    color:white;
}

.cart-item img{
    width:120px;
    height:120px;
    object-fit:cover;
    border-radius:8px;
}

.cart-item h3{
    color:white;
    margin-bottom:5px;
}

.cart-item .upload-box{
    color:white;
}

.cart-total{
    margin-top:30px;
    text-align:right;
}

.cart-total button{
    background:#c9a24f;
    border:none;
    padding:12px 20px;
    font-weight:bold;
    cursor:pointer;
}

.checkout-form{
    display:flex;
    flex-direction:column;
    gap:12px;
    margin-top:40px;
}

.checkout-form input,
.checkout-form textarea{
    padding:12px;
    border:1px solid #ddd;
    border-radius:6px;
    font-size:16px;
}

.checkout-form textarea{
    min-height:120px;
}

.checkout-steps{
    display:flex;
    justify-content:center;
    gap:20px;
    margin:40px 0;
    background:white;
    color:#222;
}

.step{
    padding:10px 20px;
    border:1px solid #c9a24f;
    border-radius:30px;
}

.step.active{
    background:#c9a24f;
    color:black;
}

.checkout-step{
    max-width:900px;
    margin:auto;
    padding:20px;
    background:white;
    color:#222;
    border-radius:10px;
    margin-bottom:30px;
}

.checkout-step h2,
.checkout-step h3,
.checkout-step p{
    color:#222;
}

.upload-box{
    background:#f5f5f5;
    color:#222;
    padding:15px;
    border-radius:8px;
    margin-top:15px;
    min-width:260px;
}

.upload-box input[type="file"]{
    color:#111;
    width:100%;
}

.upload-box input[type="file"]::file-selector-button{
    background:var(--bronze);
    color:white;
    border:none;
    padding:2px 8px;
    border-radius:6px;
    cursor:pointer;
    margin-right:10px;
}

.upload-box p{
    color:#222;
    font-weight:600;
}

.payment-options{
    display:flex;
    flex-direction:column;
    gap:15px;
    margin:30px 0;
}

/* =========================
   PRODUCT MODAL
========================= */

.product-modal-content{
    width:100%;
    max-width:1300px;
    height:90vh;

    display:flex;
    flex-direction:column;
}

.product-detail{
    display:grid;
    grid-template-columns:minmax(0, 1.7fr) minmax(0, 1fr);
    gap:30px;
    align-items:start;
    min-width:0;
}

.product-gallery{
    display:flex;
    flex-direction:column;
    gap:15px;
}

.product-main-image{
    width:100%;
    height:70vh;
    display:flex;
    justify-content:center;
    align-items:center;
    background:#f8f8f8;
    border-radius:10px;
    overflow:hidden;
}

.product-main-image img{
    width:100%;
    height:100%;
    max-width:100%;
    max-height:100%;
    object-fit:contain;
    cursor:zoom-in;
    transition:.3s;
}

.gallery-wrapper{
    position:relative;
}

.gallery-arrow{
    backdrop-filter:blur(8px);
    position:absolute;
    top:50%;
    transform:translateY(-50%);
    width:48px;
    height:48px;
    border:none;
    border-radius:50%;
    background:rgba(255,255,255,.75);
    color:#111;
    font-size:28px;
    cursor:pointer;
    transition:.2s;
    z-index:5;
}

.gallery-arrow:hover{
    background:rgba(0,0,0,.8);
}

.gallery-arrow.prev{
    left:15px;
}

.gallery-arrow.next{
    right:15px;
}

/* miniaturas */

.product-thumbnails{
    display:flex;
    gap:10px;
    overflow-x:auto;
    padding:5px 0;
    justify-content:center;
}

.product-thumbnails img{
    width:90px;
    height:90px;
    object-fit:contain;
    background:#f7f7f7;
    border:2px solid transparent;
    border-radius:8px;
    cursor:pointer;
    transition:.2s;
}

.product-thumbnails img:hover{
    border-color:var(--bronze);
}

.thumb-btn.active{
    border:2px solid var(--bronze);
    transform:scale(1.05);
}

.contact-button{
    margin: 20px 0;
    padding-top:30px;
}

.product-info{
    position:sticky;
    top:20px;
    display:flex;
    flex-direction:column;
    min-width:0;
    max-width:100%;
}

.product-info h2{
    margin-bottom:10px;
}

.product-price{
    font-size:36px;
    font-weight:bold;
    margin:20px 0;
    color:#c9a24f;
    padding-bottom:20px;
    border-bottom:1px solid #ececec;
}

.product-description{
    margin:10px 0;
    line-height:1.8;
}

.add-cart-btn{
    background:#c9a24f;
    border:none;
    padding:15px 30px;
    cursor:pointer;
    font-size:16px;
}

.product-specifications{
    margin-top:15px;
    padding-top:10px;
    border-top:1px solid #eee;
}

.product-specifications strong{
    display:block;
    margin-bottom:10px;
}
/* =========================
   MODAL
========================= */

.modal{
    display:none;
    position:fixed;
    inset: 0;
    width:100%;
    height:100%;
    background:rgba(0,0,0,.7);
    z-index:9999;
}

.modal-content{
    background:white;
    color:#111;
    width:95%;
    max-width:1300px;
    height:90vh;
    margin:50px auto;
    padding:20px;
    border-radius:10px;
    overflow:auto;
}

.close-btn{
    float:right;
    font-size:32px;
    cursor:pointer;
}

.cart-item h3{
    color:#c9a24f !important;
}

.cart-item p{
    color:#c9a24f !important;
}

.cart-item div{
    flex:1;
}

.cart-item div h3{
    color:#c9a24f;
}

.cart-item div p{
    color:#ddd;
}

.upload-box input{
    color:#111;
}

.upload-box p{
    color:#111;
}


.modal-content h1,
.modal-content h2,
.modal-content h3,
.modal-content h4,
.modal-content p{
    color:#111;
}

@media(max-width:768px){
    .navbar{
        flex-direction:column;
        gap:20px;
    }

    .menu{
        flex-wrap:wrap;
        justify-content:center;
    }

    .hero h1{
        font-size:3rem;
    }

    .hero-buttons{
        flex-direction:column;
        align-items:center;
    }
    .hero{
    min-height:calc(100vh - 200px);
    padding:10px 20px;
    }

    .hero-content{
        transform:none;
    }

    .page-hero{
        padding:60px 20px 50px;
    }

    .contact-container{
        grid-template-columns:1fr;
    }

    /* MODAL COMPLETO EN MÓVIL */

    .modal {
        overflow-y: auto;
        padding: 10px 0;
    }

    .modal-content {

        width: 90%;
        max-width: none;
        height: auto;
        max-height: calc(100vh - 20px);
        margin: 10px auto;
        padding: 15px;
        overflow-y: auto;
        overflow-x: hidden;
        border-radius: 12px;
    }

    /* PRODUCTO EN UNA SOLA COLUMNA */

    .product-detail {
        display: flex;
        flex-direction: column;
        gap: 20px;
    }

    /* GALERÍA */

    .product-gallery {
        width: 100%;
    }

    .product-main-image {
        width: 100%;
        height: 42vh;
        min-height: 240px;
        max-height: 420px;
    }

    .product-main-image img {
        width: 100%;
        height: 100%;
        object-fit: contain;
    }

    /* FLECHAS */

    .gallery-arrow {
        width: 40px;
        height: 40px;
        font-size: 24px;
    }

    .gallery-arrow.prev {
        left: 8px;
    }

    .gallery-arrow.next {
        right: 8px;
    }

    /* MINIATURAS */

    .product-thumbnails {
        justify-content: flex-start;
        overflow-x: auto;
        padding: 5px 0 10px;
    }

    .product-thumbnails img {
        width: 65px;
        height: 65px;
    }

    /* INFORMACIÓN */

    .product-info {
        width: 100%;
        position: static;
        height: auto;
    }

    .product-info h2 {
        font-size: 1.8rem;
        margin-top: 5px;
    }

    .product-price {
        font-size: 28px;
        margin: 15px 0;
    }

    .product-description {
        font-size: 1rem;
        line-height: 1.6;
    }

    .product-specifications {
        font-size: .95rem;
        line-height: 1.6;
    }

    .contact-button {
        padding-top: 15px;
        padding-bottom: 20px;
    }
}

@media (max-width:1100px) and (min-width:769px){

    .navbar{
        padding-left:30px;
        padding-right:30px;
    }

    .menu{
        gap:18px;
    }

    .menu a{
        font-size:1rem;
    }

    .product-modal-content{
        width:95%;
        height:90vh;
        padding:20px;
    }

    .product-detail{
        grid-template-columns:minmax(0, 1.4fr) minmax(260px, 1fr);
        gap:25px;
    }

    .product-main-image{
        height:55vh;
    }

    .product-thumbnails img{
        width:70px;
        height:70px;
    }

}

/* =========================
   IMAGE LIGHTBOX
========================= */

.image-lightbox{
    position:fixed;
    inset:0;
    background:rgba(0,0,0,.95);
    display:none;
    justify-content:center;
    align-items:center;
    z-index:99999;
}
.image-lightbox.active{
    display:flex;
}

.image-lightbox img{
    max-width:95vw;
    max-height:95vh;
    object-fit:contain;
}

.image-lightbox .close-lightbox{
    position:absolute;
    top:20px;
    right:30px;
    color:white;
    font-size:50px;
    cursor:pointer;
}

.lightbox-thumbnails{
    position:absolute;
    bottom:30px;
    display:flex;
    gap:10px;
}

.lightbox-thumb{
    width:80px;
    height:80px;
    object-fit:cover;
    cursor:pointer;
    border:2px solid transparent;
}

.lightbox-thumb.active{
    border-color:#b08d57;
}