/* =========================================================
   ESTILOS GENERALES — Tienda de Minerales y Rocas
   ========================================================= */

:root{
    --color-primario:    #5b3a8e;   /* violeta amatista */
    --color-primario-os: #432a6b;
    --color-secundario:  #c89b3c;   /* dorado / cuarzo */
    --color-dark:        #221830;
    --color-bg-suave:    #f7f4fb;
    --color-text:        #2e2438;
    --color-muted:       #756a82;
    --radius:            14px;
    --shadow-soft:       0 10px 30px rgba(34, 24, 48, 0.08);
    --shadow-hover:      0 16px 40px rgba(34, 24, 48, 0.16);
}

*{ box-sizing: border-box; }

body{
    font-family: 'Jost', sans-serif;
    color: var(--color-text);
    background: #fff;
}

h1, h2, h3, h4, h5, h6, .font-heading{
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    color: var(--color-dark);
}

a{ text-decoration: none; }

.btn-primario{
    background: var(--color-primario);
    border: none;
    color: #fff;
}
.btn-primario:hover{ background: var(--color-primario-os); color:#fff; }

.text-gold{ color: var(--color-secundario); }
.bg-soft{ background: var(--color-bg-suave); }

/* ===================== TOP BAR ===================== */
.top-bar{
    background: var(--color-dark);
    color: #efe9f7;
    font-size: .82rem;
}
.top-bar-social a{
    color: #efe9f7;
    margin-left: 12px;
    font-size: 1rem;
    transition: color .2s;
}
.top-bar-social a:hover{ color: var(--color-secundario); }

/* ===================== NAVBAR ===================== */
.main-header{ box-shadow: 0 2px 14px rgba(0,0,0,.06); z-index: 1030; }
.logo-text{
    font-family: 'Poppins', sans-serif;
    font-weight: 800;
    font-size: 1.4rem;
    color: var(--color-primario);
    display: flex;
    align-items: center;
    gap: 8px;
}
.main-nav .nav-link{
    color: var(--color-text);
    font-weight: 500;
    margin: 0 6px;
    position: relative;
}
.main-nav .nav-link::after{
    content:'';
    position:absolute; left:0; bottom:2px;
    width:0; height:2px; background:var(--color-secundario);
    transition: width .25s;
}
.main-nav .nav-link:hover::after{ width:100%; }
.main-nav .nav-link.active{ color: var(--color-primario); font-weight:600; }

.search-box{
    background: var(--color-bg-suave);
    border-radius: 30px;
    overflow:hidden;
    padding: 2px 4px 2px 14px;
}
.search-box input{ border:none; background:transparent; box-shadow:none; }
.search-box .btn{ color: var(--color-primario); border:none; background:transparent; }

.btn-icon{
    background: var(--color-bg-suave);
    border: none;
    width: 42px; height:42px;
    border-radius: 50%;
    display:flex; align-items:center; justify-content:center;
    color: var(--color-primario);
    font-size: 1.1rem;
}
.btn-icon:hover{ background: var(--color-primario); color:#fff; }

.cart-badge{
    position:absolute; top:-4px; right:-4px;
    background: var(--color-secundario);
    color: #1a1320;
    font-size:.65rem;
    min-width: 20px; height:20px;
    display:flex; align-items:center; justify-content:center;
}

/* ===================== HERO / SLIDER ===================== */
.hero-slider{
    position: relative;
}
.hero-slide{
    height: 480px;
    background-size: cover;
    background-position: center;
    display:flex; align-items:center;
    position: relative;
}
.hero-slide::before{
    content:'';
    position:absolute; inset:0;
    background: linear-gradient(90deg, rgba(34,24,48,.72) 0%, rgba(34,24,48,.2) 70%);
}
.hero-caption{
    position: relative;
    z-index: 2;
    color:#fff;
    max-width: 560px;
}
.hero-caption h2{ color:#fff; font-size: 2.6rem; }
.hero-caption p{ color:#ece6f5; font-size:1.1rem; }
@media (max-width: 768px){
    .hero-slide{ height: 360px; }
    .hero-caption h2{ font-size: 1.8rem; }
}

/* ===================== SECCIONES ===================== */
.section-title{
    text-align:center;
    margin-bottom: 2.2rem;
}
.section-title .eyebrow{
    color: var(--color-secundario);
    text-transform: uppercase;
    font-weight:600;
    letter-spacing: 2px;
    font-size:.8rem;
}
.section-title h2{ font-size: 2rem; margin-top:.3rem; }
.section-title p{ color: var(--color-muted); max-width: 620px; margin: .6rem auto 0; }

.section-py{ padding: 64px 0; }

/* ===================== CATEGORÍAS HOME ===================== */
.cat-card{
    position: relative;
    border-radius: var(--radius);
    overflow:hidden;
    aspect-ratio: 3/4;
    display:block;
    box-shadow: var(--shadow-soft);
}
.cat-card img{
    width:100%; height:100%; object-fit:cover;
    transition: transform .5s ease;
}
.cat-card:hover img{ transform: scale(1.08); }
.cat-card .cat-overlay{
    position:absolute; inset:0;
    background: linear-gradient(180deg, rgba(34,24,48,0) 40%, rgba(34,24,48,.85) 100%);
    display:flex; align-items:flex-end; justify-content:center;
    padding-bottom: 18px;
}
.cat-card .cat-overlay span{
    color:#fff; font-family:'Poppins',sans-serif; font-weight:700; font-size:1.1rem;
    text-transform: uppercase; letter-spacing:1px;
}

/* ===================== PRODUCT CARD + ZOOM EFFECT ===================== */
.product-card{
    border: 1px solid #efe9f7;
    border-radius: var(--radius);
    overflow: hidden;
    background:#fff;
    height: 100%;
    transition: box-shadow .3s, transform .3s;
    position: relative;
}
.product-card:hover{
    box-shadow: var(--shadow-hover);
    transform: translateY(-4px);
}
.product-card .img-zoom-wrap{
    position: relative;
    overflow: hidden;
    aspect-ratio: 1/1;
    background: var(--color-bg-suave);
    display:block;
}
.product-card .img-zoom-wrap img{
    width:100%; height:100%;
    object-fit: cover;
    transition: transform .55s ease, opacity .35s ease;
}
.product-card .img-zoom-wrap:hover img.img-main{
    transform: scale(1.15);
}
.product-card .img-zoom-wrap img.img-hover{
    position:absolute; inset:0;
    opacity:0;
}
.product-card .img-zoom-wrap:hover img.img-hover{
    opacity:1;
    transform: scale(1.15);
}
.product-card .badge-offer{
    position:absolute; top:10px; left:10px;
    background: var(--color-secundario);
    color: #1a1320; font-weight:700; font-size:.72rem;
    padding: 4px 10px; border-radius: 30px;
    z-index: 3;
}
.product-card .badge-soldout{
    position:absolute; top:10px; right:10px;
    background: var(--color-dark);
    color:#fff; font-weight:600; font-size:.7rem;
    padding: 4px 10px; border-radius: 30px;
    z-index: 3;
}
.product-card .product-body{
    padding: 14px 16px 18px;
}
.product-card .product-cat{
    font-size: .72rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--color-muted);
}
.product-card .product-title{
    font-family:'Poppins',sans-serif;
    font-weight:600;
    font-size: .98rem;
    color: var(--color-dark);
    margin: 4px 0 8px;
    display:block;
    min-height: 42px;
}
.product-card .product-title:hover{ color: var(--color-primario); }
.product-card .price-old{
    text-decoration: line-through;
    color: var(--color-muted);
    font-size: .85rem;
    margin-right: 6px;
}
.product-card .price-now{
    color: var(--color-primario);
    font-weight: 700;
    font-size: 1.05rem;
}
.product-card .btn-add-cart{
    width:100%;
    margin-top:10px;
    background: var(--color-bg-suave);
    border: none;
    color: var(--color-primario);
    font-weight:600;
    border-radius: 30px;
    padding: 7px 0;
    transition: background .25s, color .25s;
}
.product-card .btn-add-cart:hover{
    background: var(--color-primario);
    color:#fff;
}

/* ===================== TRUST STRIP ===================== */
.trust-strip{
    background: var(--color-bg-suave);
    padding: 50px 0;
}
.trust-strip i{
    font-size: 2.2rem;
    color: var(--color-primario);
    margin-bottom: 10px;
}
.trust-strip h6{ font-weight:700; }
.trust-strip p{ color: var(--color-muted); font-size:.9rem; max-width: 320px; margin: 0 auto; }

/* ===================== NEWSLETTER ===================== */
.newsletter-section{
    background: linear-gradient(120deg, var(--color-primario), var(--color-primario-os));
    color:#fff;
    padding: 42px 0;
}
.newsletter-section h4{ color:#fff; }
.newsletter-section input{ border-radius: 30px; border:none; padding: 10px 18px; }
.newsletter-section button{ border-radius: 30px; padding: 10px 24px; }

/* ===================== FOOTER ===================== */
.site-footer{ background: var(--color-dark); color:#cfc6db; }
.footer-brand{ color:#fff; display:flex; align-items:center; gap:8px; }
.site-footer h6{ color:#fff; font-weight:600; margin-bottom: 14px;}
.footer-links{ list-style:none; padding:0; margin:0; }
.footer-links li{ margin-bottom: 8px; color:#bdb2cb; font-size:.92rem; }
.footer-links a{ color:#bdb2cb; transition: color .2s; }
.footer-links a:hover{ color: var(--color-secundario); }
.footer-social a{
    display:inline-flex; align-items:center; justify-content:center;
    width:36px; height:36px; border-radius:50%;
    background: rgba(255,255,255,.08);
    color:#fff; margin-right:8px; font-size:1rem;
}
.footer-social a:hover{ background: var(--color-secundario); color:#1a1320; }
.footer-bottom{
    background: #1a1227;
    color: #9d92ad;
    font-size: .85rem;
}

/* ===================== WHATSAPP FLOAT ===================== */
.whatsapp-float{
    position: fixed;
    bottom: 22px; right: 22px;
    background: #25D366;
    color:#fff;
    width: 58px; height:58px;
    border-radius: 50%;
    display:flex; align-items:center; justify-content:center;
    font-size: 1.7rem;
    box-shadow: 0 8px 20px rgba(0,0,0,.25);
    z-index: 1040;
    animation: pulse-wa 2.4s infinite;
}
@keyframes pulse-wa{
    0%{ box-shadow: 0 0 0 0 rgba(37,211,102,.5); }
    70%{ box-shadow: 0 0 0 14px rgba(37,211,102,0); }
    100%{ box-shadow: 0 0 0 0 rgba(37,211,102,0); }
}

/* ===================== BREADCRUMB ===================== */
.breadcrumb-bar{
    background: var(--color-bg-suave);
    padding: 14px 0;
    font-size: .88rem;
}
.breadcrumb-bar a{ color: var(--color-muted); }
.breadcrumb-bar a:hover{ color: var(--color-primario); }
.breadcrumb-bar .current{ color: var(--color-primario); font-weight:600; }

/* ===================== PÁGINA DE PRODUCTO ===================== */
.product-gallery-main{
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--color-bg-suave);
    aspect-ratio: 1/1;
    cursor: zoom-in;
}
.product-gallery-main img{
    width:100%; height:100%; object-fit: cover;
    transition: transform .2s ease;
}
.product-gallery-thumbs{
    display:flex; gap:10px; margin-top: 14px; flex-wrap: wrap;
}
.product-gallery-thumbs img{
    width: 74px; height:74px; object-fit:cover;
    border-radius: 10px; cursor:pointer;
    border: 2px solid transparent;
    opacity: .75;
    transition: opacity .2s, border-color .2s;
}
.product-gallery-thumbs img:hover,
.product-gallery-thumbs img.active{
    opacity:1; border-color: var(--color-primario);
}

.product-info-box .cat-tag{
    color: var(--color-primario);
    font-weight:600; text-transform: uppercase;
    font-size:.78rem; letter-spacing:1px;
}
.product-info-box h1{ font-size: 1.8rem; margin: 6px 0 14px; }
.product-info-box .price-now{ font-size: 1.9rem; color: var(--color-primario); font-weight:800; }
.product-info-box .price-old{ font-size: 1.1rem; text-decoration: line-through; color: var(--color-muted); margin-right:10px; }
.product-info-box .stock-info{ font-size:.9rem; }
.product-info-box .stock-info.ok{ color:#2e7d32; }
.product-info-box .stock-info.low{ color:#c89b3c; }
.product-info-box .stock-info.out{ color:#b3261e; }

.qty-selector{
    display:inline-flex; align-items:center;
    border: 1px solid #e3dcee; border-radius: 30px;
    overflow:hidden;
}
.qty-selector button{
    width:38px; height:38px; border:none; background:#fff;
    color: var(--color-primario); font-size:1.1rem;
}
.qty-selector button:hover{ background: var(--color-bg-suave); }
.qty-selector input{
    width: 48px; text-align:center; border:none;
    -moz-appearance: textfield;
}
.qty-selector input::-webkit-outer-spin-button,
.qty-selector input::-webkit-inner-spin-button{ -webkit-appearance:none; margin:0; }

.specs-table tr td{ padding: 6px 0; }
.specs-table tr td:first-child{ color: var(--color-muted); width:140px; }

.countdown-box{
    background: var(--color-bg-suave);
    border-radius: var(--radius);
    padding: 18px 20px;
    text-align:center;
}
.countdown-box .timer{
    display:flex; gap:14px; justify-content:center; margin-top:8px;
}
.countdown-box .timer div{ min-width:50px; }
.countdown-box .timer span{ display:block; font-size:1.4rem; font-weight:700; color: var(--color-primario); }
.countdown-box .timer small{ color: var(--color-muted); font-size:.7rem; text-transform:uppercase;}

/* Testimonios */
.testimonial-card{
    background:#fff;
    border: 1px solid #efe9f7;
    border-radius: var(--radius);
    padding: 20px;
    height:100%;
    box-shadow: var(--shadow-soft);
}
.testimonial-card .stars{ color: var(--color-secundario); margin-bottom:10px; }
.testimonial-card p{ font-style: italic; color: var(--color-text); }
.testimonial-card .author{ font-weight:600; margin-top:10px; display:block; }

/* Formularios */
.form-control:focus, .form-select:focus{
    border-color: var(--color-primario);
    box-shadow: 0 0 0 .2rem rgba(91,58,142,.15);
}

/* Carrito items */
.cart-item{
    display:flex; gap:12px; padding: 12px 0; border-bottom:1px solid #f0ecf6;
}
.cart-item img{ width:64px; height:64px; object-fit:cover; border-radius:8px; }
.cart-item .cart-item-name{ font-weight:600; font-size:.92rem; }
.cart-item .cart-item-remove{ color:#b3261e; font-size:.8rem; cursor:pointer; }

/* Paginación */
.pagination .page-link{ color: var(--color-primario); }
.pagination .page-item.active .page-link{ background: var(--color-primario); border-color: var(--color-primario); }

/* Filtros sidebar categoría */
.filter-box{
    border: 1px solid #efe9f7;
    border-radius: var(--radius);
    padding: 18px;
}
.filter-box h6{ font-weight:700; margin-bottom: 12px; }

/* Loader simple */
.loader-overlay{
    position: fixed; inset:0; background: rgba(255,255,255,.85);
    display:flex; align-items:center; justify-content:center; z-index:2000;
}
