.carrito-btn{

    width:100%;

    margin-top:12px;

    padding:14px;

    border:none;

    border-radius:14px;

    cursor:pointer;

    font-weight:700;

    background:var(--gold);

    color:var(--black);

    transition:.3s;

}

.carrito-btn:hover{

    transform:translateY(-2px);

    background:var(--gold-light);

}
.cantidad-carrito{

    display:flex;

    align-items:center;

    gap:12px;

    margin-top:10px;

}
.cantidad-carrito button{

    width:34px;

    height:34px;

    border:none;

    border-radius:50%;

    background:var(--gold);

    color:#111;

    font-size:18px;

    font-weight:bold;

    cursor:pointer;

    transition:.25s;


}

.cantidad-carrito button:hover{

    transform:scale(1.08);

}

.cantidad-carrito span{

    min-width:26px;

    text-align:center;

    font-size:17px;

    font-weight:700;

}

.eliminar-item{

    margin-top:14px;

    border:none;

    background:none;

    color:#ff5c5c;

    cursor:pointer;

    font-size:18px;

    transition:.25s;

}

.eliminar-item:hover{

    transform:scale(1.15);

}

/*==========================================
MODAL CARRITO
==========================================*/

.modal-carrito{

    max-width:420px;

    width:90%;

    background:#161616;

    border:1px solid var(--gold);

    border-radius:22px;

    padding:35px;

    position:relative;

    box-shadow:0 20px 70px rgba(0,0,0,.55);

}

.selector-carrito{

    display:flex;

    flex-direction:column;

    gap:18px;

}

.selector-carrito h2{

    color:var(--gold);

    text-align:center;

    margin:0;

}

.selector-carrito p{

    color:#cfcfcf;

    text-align:center;

    margin:0 0 10px;

}

.size-btn{

    padding:16px;

    border:none;

    border-radius:14px;

    cursor:pointer;

    font-size:17px;

    font-weight:700;

    background:linear-gradient(
        135deg,
        var(--gold),
        #b98b19
    );

    color:#111;

    transition:.30s;

}

.size-btn:hover{

    transform:translateY(-3px);

    background:var(--gold-light);

}

.modal-cerrar{

    position:absolute;

    top:18px;

    right:18px;

    width:42px;

    height:42px;

    border:none;

    border-radius:50%;

    background:#222;

    color:var(--gold);

    cursor:pointer;

    transition:.3s;

}

.modal-cerrar:hover{

    background:var(--gold);

    color:#111;

}

/*==========================================
TOAST
==========================================*/

.toast{

    position:fixed;

    top:80px;
    right:25px;

    display:flex;
    align-items:center;
    gap:12px;

    max-width:340px;

    padding:14px 20px;

    background:#1f1f1f;

    border-left:5px solid #2ecc71;
    border-radius:14px;

    color:#fff;

    font-weight:600;

    box-shadow:
        0 12px 40px rgba(0,0,0,.35);

    transform:translateX(450px);

    opacity:0;
    visibility:hidden;
    pointer-events:none;

    transition:
        transform .30s ease,
        opacity .30s ease,
        visibility .30s ease;

    z-index:100000;

}

.toast i{

    color:#2ecc71;

    font-size:22px;

}

.toast.mostrar{

    transform:translateX(0);

    opacity:1;
    visibility:visible;

}


/*==================================================
ITEM CARRITO
==================================================*/

.item-carrito{

    display:flex;

    gap:16px;

    padding:16px;

    margin-bottom:16px;

    border-radius:18px;

    background:rgba(255,255,255,.04);

    border:1px solid rgba(212,175,55,.18);

}

.item-carrito img{

    width:80px;

    height:80px;

    object-fit:contain;

    border-radius:12px;

    background:#fff;

    padding:6px;

}

.item-info{

    flex:1;

}

.item-info h4{

    margin:0;

    color:var(--gold);

}

.item-info small{

    color:#bbb;

}

.item-info p{

    margin:10px 0;

    font-weight:700;

    color:#fff;

}

/*==========================================
BOTÓN VACIAR CARRITO
==========================================*/

.btn-vaciar{

    width:100%;

    margin-top:12px;

    padding:14px;

    border:none;

    border-radius:14px;

    background:#2b2b2b;

    color:#fff;

    font-size:15px;

    font-weight:600;

    cursor:pointer;

    transition:.30s;

}

.btn-vaciar:hover{

    background:#d32f2f;

    transform:translateY(-2px);

}
/*==================================================
PANEL DEL CARRITO
==================================================*/

.panel-carrito{

    position:fixed;

    top:0;

    right:-420px;

    width:400px;

    max-width:100%;

    height:100vh;

    background:#151515;

    border-left:2px solid var(--gold);

    display:flex;

    flex-direction:column;

    transition:right .35s ease;

    z-index:9999;

    box-shadow:-10px 0 40px rgba(0,0,0,.45);

}

.panel-carrito.mostrar{

    right:0;

}

.panel-header{

    display:flex;

    justify-content:space-between;

    align-items:center;

    padding:20px;

    border-bottom:1px solid rgba(255,255,255,.08);

}

.panel-header h2{

    margin:0;

    color:var(--gold);

    font-size:20px;

}

.cerrar-panel{

    border:none;
    background:none;

    color:#fff;

    font-size:24px;

    cursor:pointer;

    position:relative;
    z-index:40;

}

.lista-carrito{

    flex:1;

    overflow-y:auto;

    padding:20px;

}

.panel-footer{

    padding:20px;

    border-top:1px solid rgba(255,255,255,.08);

    background:#1b1b1b;

}

.total-carrito{

    display:flex;

    justify-content:space-between;

    align-items:center;

    margin-bottom:16px;

    color:#fff;

}

.btn-finalizar{

    width:100%;

    padding:14px;

    border:none;

    border-radius:14px;

    background:var(--gold);

    color:#111;

    font-weight:700;

    cursor:pointer;

    transition:.30s;

}

.btn-finalizar:hover{

    background:var(--gold-light);

}

.selector-stock{
    margin: 8px 0 18px;

    color: #d4af37;

    font-size: 13px;
    font-weight: 600;
}

.size-btn.disabled,
.size-btn:disabled{
    opacity: .35;

    cursor: not-allowed;

    filter: grayscale(.8);
}

.size-btn:disabled:hover{
    transform: none;
    box-shadow: none;
}

/* ==========================================
   CHECKOUT - DATOS DEL CLIENTE
========================================== */

.modal-checkout{
    position:fixed;
    inset:0;

    display:flex;
    align-items:center;
    justify-content:center;

    padding:20px;

    background:rgba(0,0,0,.78);
    backdrop-filter:blur(8px);

    opacity:0;
    visibility:hidden;
    pointer-events:none;

    z-index:99999;

    transition:.25s ease;
}

.modal-checkout.mostrar{
    opacity:1;
    visibility:visible;
    pointer-events:auto;
}


.checkout-card{
    position:relative;

    width:min(520px,100%);

    padding:30px;

    background:
        linear-gradient(
            145deg,
            #171717,
            #0d0d0d
        );

    border:
        1px solid rgba(212,175,55,.45);

    border-radius:22px;

    box-shadow:
        0 25px 70px rgba(0,0,0,.55);
}


.checkout-cerrar{
    position:absolute;
    top:16px;
    right:16px;

    width:38px;
    height:38px;

    border:none;
    border-radius:50%;

    background:#242424;
    color:#d4af37;

    cursor:pointer;
}


.checkout-header{
    display:flex;
    align-items:center;
    gap:14px;

    margin-bottom:26px;
}


.checkout-icon{
    width:48px;
    height:48px;

    display:flex;
    align-items:center;
    justify-content:center;

    flex:0 0 48px;

    border-radius:14px;

    background:
        rgba(212,175,55,.12);

    color:#d4af37;

    font-size:19px;
}


.checkout-header h2{
    margin:0 0 4px;

    color:#f2cf58;

    font-size:22px;
}


.checkout-header p{
    margin:0;

    color:#999;

    font-size:13px;
}


.checkout-campos{
    display:grid;

    grid-template-columns:
        repeat(2,1fr);

    gap:16px;
}


.checkout-campo{
    display:flex;
    flex-direction:column;
    gap:7px;
}


.checkout-campo label{
    color:#cfcfcf;

    font-size:12px;
    font-weight:600;
}


.checkout-campo input{
    width:100%;
    box-sizing:border-box;

    padding:13px 14px;

    background:#111;

    border:
        1px solid #333;

    border-radius:11px;

    outline:none;

    color:#fff;

    font-size:13px;

    transition:.2s ease;
}


.checkout-campo input:focus{
    border-color:#d4af37;

    box-shadow:
        0 0 0 3px
        rgba(212,175,55,.07);
}


.checkout-continuar{
    width:100%;

    margin-top:22px;
    padding:14px;

    border:none;
    border-radius:12px;

    background:#25d366;
    color:#fff;

    font-weight:800;

    cursor:pointer;

    transition:.2s ease;
}


.checkout-continuar:hover{
    transform:translateY(-2px);
}


@media(max-width:600px){

    .checkout-campos{
        grid-template-columns:1fr;
    }

    .checkout-card{
        padding:25px 20px;
    }

}

/* =========================================
   PRECIO Y SUBTOTAL DEL PRODUCTO
========================================= */

.carrito-precios-item{
    display:flex;
    flex-direction:column;
    gap:4px;

    margin-top:4px;
}

.carrito-precio-unitario{
    color:#aaa;
    font-size:13px;
}

.carrito-subtotal{
    color:#fff;
    font-size:13px;
}

.carrito-subtotal strong{
    color:#e4bd32;
    font-size:14px;
    font-weight:700;
}

/* =========================================
   RESUMEN SUPERIOR DEL CARRITO
========================================= */

.resumen-carrito{
    margin-top:4px;

    color:#9b9b9b;

    font-size:13px;
    font-weight:500;

    letter-spacing:.2px;
}

/* =========================================
   PROBLEMA DE STOCK EN CARRITO
========================================= */

.item-carrito.stock-problema{
    border-color:rgba(255,91,91,.45);

    box-shadow:
        0 0 0 1px rgba(255,91,91,.08);
}

.carrito-alerta-stock{
    display:flex;
    flex-direction:column;
    gap:3px;

    margin-top:8px;
    padding:8px 10px;

    border-radius:8px;

    background:rgba(255,91,91,.08);
    border:1px solid rgba(255,91,91,.20);
}

.carrito-alerta-stock strong{
    color:#ff6666;
    font-size:11px;
}

.carrito-alerta-stock span{
    color:#aaa;
    font-size:10px;
}

.btn-finalizar.disabled,
.btn-finalizar:disabled{
    opacity:.45;
    cursor:not-allowed;

    background:#3a3a3a;
    color:#999;
}

/* =========================================
   CHECKOUT - RESUMEN DEL PEDIDO
========================================= */

.checkout-resumen{
    margin-bottom:22px;
    padding:16px;

    background:#111;

    border:
        1px solid rgba(212,175,55,.25);

    border-radius:14px;
}

.checkout-resumen-header{
    display:flex;
    justify-content:space-between;
    align-items:center;

    padding-bottom:12px;

    border-bottom:
        1px solid rgba(255,255,255,.08);

    color:#d4af37;

    font-size:13px;
    font-weight:700;
}

.checkout-resumen-productos{
    display:flex;
    flex-direction:column;

    gap:10px;

    padding:12px 0;
}

.checkout-resumen-total{
    display:flex;
    justify-content:space-between;
    align-items:center;

    padding-top:12px;

    border-top:
        1px solid rgba(255,255,255,.08);

    color:#fff;
}

.checkout-resumen-total strong{
    color:#e4bd32;

    font-size:18px;
}

/* =========================================
   ITEMS DEL RESUMEN CHECKOUT
========================================= */

.checkout-resumen-item{
    display:flex;
    justify-content:space-between;
    align-items:center;

    gap:15px;

    padding:9px 0;

    border-bottom:
        1px solid rgba(255,255,255,.05);
}

.checkout-resumen-item:last-child{
    border-bottom:none;
}

.checkout-resumen-item > div{
    display:flex;
    flex-direction:column;
    gap:3px;
}

.checkout-resumen-item strong{
    color:#fff;

    font-size:12px;
}

.checkout-resumen-item span{
    color:#8f8f8f;

    font-size:11px;
}

.checkout-resumen-item > strong{
    color:#e4bd32;

    white-space:nowrap;
}

/* =========================================
   VALIDACIÓN VISUAL CHECKOUT
========================================= */

.checkout-campo input.campo-valido{
    border-color:#2ecc71;

    box-shadow:
        0 0 0 3px
        rgba(46,204,113,.08);
}


.checkout-campo input.campo-invalido{
    border-color:#ff5b5b;

    box-shadow:
        0 0 0 3px
        rgba(255,91,91,.08);
}


.checkout-continuar:disabled,
.checkout-continuar.disabled{
    opacity:.40;

    cursor:not-allowed;

    transform:none;

    background:#3b3b3b;

    color:#888;
}


.checkout-continuar:disabled:hover{
    transform:none;
}

/* =========================================
   CHECKOUT - MÉTODO DE ENTREGA
========================================= */

.checkout-metodo{
    margin-bottom:20px;
}

.checkout-metodo-titulo{
    display:block;

    margin-bottom:10px;

    color:#cfcfcf;

    font-size:12px;
    font-weight:600;
}

.checkout-metodo-opciones{
    display:grid;
    grid-template-columns:1fr 1fr;

    gap:10px;
}

.checkout-metodo-btn{
    display:flex;
    align-items:center;

    gap:10px;

    padding:13px;

    background:#111;

    border:
        1px solid #333;

    border-radius:12px;

    color:#aaa;

    cursor:pointer;

    text-align:left;

    transition:.25s ease;
}

.checkout-metodo-btn i{
    font-size:18px;
}

.checkout-metodo-btn span{
    display:flex;
    flex-direction:column;

    gap:2px;
}

.checkout-metodo-btn strong{
    font-size:12px;
}

.checkout-metodo-btn small{
    color:#777;

    font-size:9px;
}

.checkout-metodo-btn:hover{
    border-color:
        rgba(212,175,55,.55);
}

.checkout-metodo-btn.activo{
    border-color:#d4af37;

    background:
        rgba(212,175,55,.10);

    color:#e4bd32;

    box-shadow:
        0 0 0 2px
        rgba(212,175,55,.05);
}

.checkout-metodo-btn.activo small{
    color:#aaa;
}

.modal-vaciar {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.75);
    z-index: 9999;
    align-items: center;
    justify-content: center;
}

.modal-vaciar.activo {
    display: flex;
}

.modal-vaciar-contenido {
    background: #0d0d0d;
    border: 1px solid #c9a227;
    border-radius: 12px;
    padding: 32px 28px;
    max-width: 340px;
    width: 90%;
    text-align: center;
    box-shadow: 0 0 30px rgba(201,162,39,0.25);
    font-family: 'Raleway', sans-serif;
    animation: apareceModalVaciar 0.25s ease;
}

@keyframes apareceModalVaciar {
    from { opacity: 0; transform: scale(0.92); }
    to { opacity: 1; transform: scale(1); }
}

.icono-vaciar {
    font-size: 34px;
    color: #c9a227;
    margin-bottom: 12px;
}

.modal-vaciar-contenido h3 {
    font-family: 'Cinzel', serif;
    color: #f5e6b8;
    font-size: 19px;
    margin-bottom: 10px;
    letter-spacing: 0.5px;
}

.modal-vaciar-contenido p {
    color: #cfcfcf;
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 22px;
}

.modal-vaciar-botones {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.btn-cancelar-vaciar {
    background: transparent;
    border: 1px solid #555;
    color: #ddd;
    padding: 10px 18px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: 0.2s;
}

.btn-cancelar-vaciar:hover {
    border-color: #c9a227;
    color: #c9a227;
}

.btn-confirmar-vaciar {
    background: linear-gradient(135deg, #c9a227, #e8cf7a);
    border: none;
    color: #111;
    padding: 10px 18px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: 0.2s;
}

.btn-confirmar-vaciar:hover {
    filter: brightness(1.08);
}
