/* =====================================================================
   ESCUELA A MANSALVA — Tienda Online
   ===================================================================== */

/* ── Layout principal ─────────────────────────────────────────────── */
.tienda-hero {
    background: linear-gradient(135deg, #0d6efd 0%, #0a58ca 100%);
    color: #fff;
    padding: 2.5rem 1rem;
    text-align: center;
    margin-bottom: 2rem;
}

.tienda-hero h1 { font-size: 2rem; font-weight: 700; margin-bottom: 0.25rem; }
.tienda-hero p  { opacity: .85; font-size: 1.05rem; }

/* ── Tarjetas de producto ─────────────────────────────────────────── */
.product-card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,.08);
    transition: transform .18s, box-shadow .18s;
    overflow: hidden;
    height: 100%;
}
.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 20px rgba(0,0,0,.13);
}
.product-card .card-img-top {
    height: 220px;
    object-fit: cover;
    background: #f8f9fa;
}
.product-card .card-img-placeholder {
    height: 220px;
    background: linear-gradient(135deg, #e9ecef 0%, #dee2e6 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #adb5bd;
    font-size: 3rem;
}
.product-card .product-price {
    font-size: 1.3rem;
    font-weight: 700;
    color: #0d6efd;
}
.product-card .product-price .iva-note {
    font-size: .75rem;
    font-weight: 400;
    color: #6c757d;
}
.product-card .badge-stock-out {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: .75rem;
}

/* ── Filtros de categoría ─────────────────────────────────────────── */
.category-pills .btn {
    border-radius: 50px;
    padding: .35rem 1rem;
    font-size: .9rem;
}

/* ── Carrito flotante (badge) ─────────────────────────────────────── */
#cart-btn { position: relative; }
#cart-count {
    position: absolute;
    top: -6px; right: -6px;
    background: #dc3545;
    color: #fff;
    border-radius: 50%;
    width: 20px; height: 20px;
    font-size: .7rem;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700;
}

/* ── Modal del carrito ────────────────────────────────────────────── */
#cartModal .cart-line img {
    width: 56px; height: 56px;
    object-fit: cover; border-radius: 6px;
}
#cartModal .item-total { min-width: 70px; text-align: right; }

/* ── Checkout ─────────────────────────────────────────────────────── */
.checkout-section {
    background: #fff;
    border-radius: 12px;
    padding: 1.75rem;
    box-shadow: 0 2px 8px rgba(0,0,0,.07);
    margin-bottom: 1.5rem;
}
.order-summary-item { display: flex; justify-content: space-between; padding: .35rem 0; }
.order-summary-total { border-top: 2px solid #0d6efd; padding-top: .75rem; margin-top: .5rem; }

/* ── Admin ────────────────────────────────────────────────────────── */
.admin-product-thumb {
    width: 64px; height: 64px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid #dee2e6;
}
.table-tienda td { vertical-align: middle; }

/* ── Estados de pedido ────────────────────────────────────────────── */
.badge-pendiente  { background-color: #fd7e14; }
.badge-pagado     { background-color: #198754; }
.badge-enviado    { background-color: #0d6efd; }
.badge-cancelado  { background-color: #dc3545; }

/* ── Responsivo ───────────────────────────────────────────────────── */
@media (max-width: 576px) {
    .tienda-hero h1 { font-size: 1.5rem; }
    .product-card .card-img-top,
    .product-card .card-img-placeholder { height: 160px; }
}
