* {
    box-sizing: border-box;
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
}

/* ─────────── ENCABEZADO TIENDA ─────────── */
.tienda-header {
    text-align: center;
    padding: 40px 20px 20px;
    background: #2f4c75;
    color: white;
}

.tienda-header h2 {
    font-size: 32px;
    margin-bottom: 8px;
}

.tienda-header p {
    font-size: 15px;
    opacity: 0.8;
}

/* ─────────── FILTROS ─────────── */
.tienda-filtros {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    padding: 20px;
    background: #f4f6fa;
    border-bottom: 1px solid #ddd;
}

.filtro-btn {
    background: white;
    border: 2px solid #133058;
    color: #000000;
    padding: 8px 20px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    transition: background 0.2s, color 0.2s;
}

.filtro-btn:hover,
.filtro-btn.activo {
    background: #033c8d;
    color: white;
}

/* ─────────── PRODUCTOS ─────────── */
.tienda-productos {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
    max-width: 1100px;
    margin: 30px auto;
    padding: 0 20px;
}

.producto {
    background: white;
    width: 240px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transition: transform 0.2s, box-shadow 0.2s;
}

.producto:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.producto img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.producto-body {
    padding: 15px;
}

.producto-categoria {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #888;
    margin-bottom: 5px;
}

.producto-nombre {
    font-size: 16px;
    font-weight: bold;
    color: #000000;
    margin-bottom: 6px;
}

.producto-desc {
    font-size: 13px;
    color: #666;
    margin-bottom: 12px;
    line-height: 1.5;
}

.producto-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.producto-precio {
    font-size: 20px;
    font-weight: bold;
    color: #14243b;
}

.btn-agregar {
    background: #0958c6;
    color: white;
    border: none;
    padding: 8px 14px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    transition: background 0.2s;
}

.btn-agregar:hover {
    background: #1e3a5f;
}

/* ───────────  OFERTA ─────────── */
.badge-oferta {
    position: relative;
}

.badge-oferta::after {
    content: 'OFERTA';
    position: absolute;
    top: 10px;
    left: 10px;
    background: #e74c3c;
    color: white;
    font-size: 11px;
    font-weight: bold;
    padding: 4px 8px;
    border-radius: 4px;
}

/* ─────────── CARRITO ─────────── */
.carrito-barra {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #1f5baf;
    color: white;
    padding: 14px 22px;
    border-radius: 30px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.3);
    font-size: 15px;
    cursor: pointer;
    z-index: 999;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: background 0.2s;
}

.carrito-barra:hover {
    background: #1e3a5f;
}

.carrito-count {
    background: #ffffff;
    color: rgb(0, 0, 0);
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: bold;
}

/* ─────────── MODAL CARRITO ─────────── */
.modal-fondo {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal-fondo.visible {
    display: flex;
}

.modal {
    background: white;
    width: 400px;
    max-width: 90%;
    border-radius: 12px;
    padding: 25px;
    max-height: 80vh;
    overflow-y: auto;
}

.modal h3 {
    font-size: 20px;
    color: #14243b;
    margin-bottom: 15px;
    border-bottom: 2px solid #f4f6fa;
    padding-bottom: 10px;
}

.carrito-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
    font-size: 14px;
    color: #333;
}

.carrito-item-nombre {
    flex: 1;
}

.carrito-item-precio {
    font-weight: bold;
    color: #000000;
    margin: 0 12px;
}

.btn-quitar {
    background: none;
    border: none;
    color: #e74c3c;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
}

.carrito-total {
    margin-top: 15px;
    font-size: 18px;
    font-weight: bold;
    color: #000000;
    text-align: right;
}

.modal-botones {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.btn-cerrar {
    flex: 1;
    background: #f4f6fa;
    color: #161616;
    border: none;
    padding: 10px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
}

.btn-comprar {
    flex: 1;
    background: #1353ae;
    color: white;
    border: none;
    padding: 10px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    transition: background 0.2s;
}

.btn-comprar:hover {
    background: #1e3a5f;
}

.carrito-vacio {
    text-align: center;
    color: #888;
    padding: 20px;
    font-size: 14px;
}

/* ─────────── SIN RESULTADOS ─────────── */
.sin-resultados {
    text-align: center;
    color: #ffffff;
    font-size: 15px;
    padding: 40px;
    width: 100%;
}