/* ===================================================
   VARIABLES Y BASE
   =================================================== */
:root {
    --negro: #0f0f0f;
    --carbon: #1a1a1a;
    --amarillo: #f5c400;
    --gris: #b5b5b5;
    --rojo: #ff4444;
}

.f-contenedor {
    max-width: 1200px;
    margin: 0 auto;
    padding: 15px;
    padding-bottom: 120px;
}

/* --- FICHA PRINCIPAL --- */
.f-producto-principal {
    display: flex !important;
    flex-direction: column !important;
    gap: 25px;
    background: var(--carbon);
    padding: 20px;
    border-radius: 20px;
}

.f-imagen img {
    width: 100%;
    border-radius: 15px;
    display: block;
}

.f-info {
    display: flex !important;
    flex-direction: column !important;
    text-align: left;
}

.f-info h1 {
    color: var(--amarillo);
    font-size: 28px;
    margin: 5px 0 10px 0;
}

.f-desc {
    color: var(--gris);
    font-size: 15px;
    margin-bottom: 20px;
    line-height: 1.5;
}

.f-precios {
    margin-bottom: 25px;
}

.f-old {
    color: #777;
    text-decoration: line-through;
    font-size: 16px;
    display: block;
}

.f-now {
    font-size: 38px;
    font-weight: bold;
    color: #fff;
}

.f-btn-main {
    background: var(--amarillo);
    color: #000;
    border: none;
    padding: 18px !important;
    border-radius: 12px;
    font-weight: bold;
    font-size: 18px;
    cursor: pointer;
}

/* --- SUGERIDOS --- */
.f-sug-titulo {
    text-align: center;
    color: #fff;
    margin: 40px 0 25px;
    font-size: 20px;
    text-transform: uppercase;
}

.f-grid {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 15px;
}

.f-card {
    background: var(--carbon);
    border-radius: 15px;
    padding: 12px !important;
    display: flex !important;
    flex-direction: column !important;
    text-decoration: none;
}

.f-card img {
    width: 100%;
    aspect-ratio: 1/1;
    object-fit: cover;
    border-radius: 10px;
}

.f-card-body h3 {
    font-size: 14px;
    color: #fff;
    margin: 8px 0;
    height: 34px;
    overflow: hidden;
}

.f-card-price {
    color: var(--amarillo);
    font-weight: bold;
    margin-bottom: 10px;
    display: block;
}

.f-btn-sug {
    background: var(--amarillo);
    border: none;
    padding: 10px;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
}

/* ===================================================
   CARRITO UI (PANEL PULIDO)
   =================================================== */
#barra-carrito {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: #000;
    border-top: 2px solid var(--amarillo);
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 2000;
}

#total-barra {
    font-size: 20px;
    color: var(--amarillo);
    font-weight: bold;
}

#btn-ver-carrito {
    background: var(--amarillo);
    color: #000;
    border: none;
    padding: 12px 25px;
    border-radius: 10px;
    font-weight: bold;
    cursor: pointer;
}

#panel-carrito {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    max-width: 420px;
    height: 100%;
    background: #0f0f0f;
    z-index: 3000;
    transition: 0.4s cubic-bezier(0.25, 1, 0.5, 1);
    display: flex;
    flex-direction: column;
    padding: 25px;
    color: white;
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.8);
}

#panel-carrito.abierto {
    right: 0;
}

.header-carrito {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.header-carrito h2 {
    font-size: 24px;
    color: #fff;
}

.cart-panel-item {
    display: flex;
    gap: 15px;
    background: #1a1a1a;
    padding: 15px;
    border-radius: 15px;
    margin-bottom: 15px;
    align-items: center;
    position: relative;
    border: 1px solid #222;
}

.cart-item-img {
    width: 70px !important;
    height: 70px !important;
    border-radius: 10px;
    overflow: hidden;
    flex-shrink: 0;
}

.cart-item-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cart-item-details {
    flex: 1;
}

.cart-item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.cart-item-header h6 {
    margin: 0;
    font-size: 16px;
    color: #fff;
}

.cart-item-price {
    color: var(--amarillo);
    font-weight: bold;
    margin: 5px 0;
}

.cart-item-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
}

.selector-cantidad {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #333;
    padding: 5px 10px;
    border-radius: 8px;
}

.selector-cantidad button {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    font-weight: bold;
}

.btn-eliminar {
    background: none;
    border: none;
    color: var(--rojo);
    cursor: pointer;
    font-size: 18px;
}

.cart-panel-footer {
    border-top: 1px solid #222;
    padding-top: 20px;
    margin-top: 10px;
}

.cart-total-row {
    display: flex;
    justify-content: space-between;
    font-size: 20px;
    margin-bottom: 15px;
}

.cart-total-row strong {
    color: var(--amarillo);
}

.btn-checkout-panel {
    width: 100%;
    background: transparent;
    color: var(--amarillo);
    border: 2px solid var(--amarillo);
    padding: 12px;
    border-radius: 10px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
    text-transform: uppercase;
}

.btn-checkout-panel:hover {
    background: rgba(245, 196, 0, 0.1);
}

#btn-finalizar-pedido {
    width: 100%;
    padding: 18px;
    background: var(--amarillo);
    color: #000;
    border: none;
    border-radius: 12px;
    font-weight: bold;
    font-size: 18px;
    cursor: pointer;
    margin-top: 10px;
}

#backdrop-carrito {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    display: none;
    z-index: 2500;
    backdrop-filter: blur(4px);
}

#backdrop-carrito.activo {
    display: block;
}

/* --- ESCRITORIO --- */
@media (min-width: 768px) {
    .f-producto-principal {
        flex-direction: row !important;
        padding: 40px;
        gap: 60px;
        align-items: center;
    }

    .f-info h1 {
        font-size: 48px;
    }

    .f-btn-main {
        width: auto;
        padding: 18px 80px !important;
    }

    .f-grid {
        grid-template-columns: repeat(4, 1fr) !important;
        gap: 25px !important;
    }
}