/* ================================================================
   APP.CSS — Plataforma E-Commerce / Pre-Commerce
   ================================================================ */

:root {
    --primary: #2563EB;
    --primary-dark: #1D4ED8;
    --secondary: #64748B;
    --accent: #F97316;
    --danger: #DC2626;
    --success: #059669;
    --font-display: 'Montserrat', sans-serif;
    --font-body: 'Nunito', sans-serif;
}

/* ─── Base ────────────────────────────────────────────── */
body {
    font-family: var(--font-body);
    color: #1E293B;
    background-color: #FFFFFF;
}

h1, h2, h3, h4, h5, h6, .display-1, .display-2, .display-3, .display-4, .display-5 {
    font-family: var(--font-display);
    font-weight: 700;
}

a { color: var(--primary); }
a:hover { color: var(--primary-dark); }

.btn-primary {
    background-color: var(--primary);
    border-color: var(--primary);
}
.btn-primary:hover {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
}

/* ─── Top Bar ────────────────────────────────────────── */
.top-bar { font-size: 0.82rem; }
.top-bar a { text-decoration: none; }
.top-bar a:hover { text-decoration: underline; }

/* ─── Navbar ─────────────────────────────────────────── */
.navbar { padding: 0.6rem 0; }
.navbar-brand img { max-height: 45px; }
.navbar .nav-link {
    font-weight: 600;
    font-size: 0.95rem;
    padding: 0.5rem 1rem;
    transition: color 0.2s;
}
.navbar .nav-link:hover,
.navbar .nav-link.active {
    color: var(--primary);
}

/* ─── Hero ───────────────────────────────────────────── */
.hero-section .carousel-item img {
    max-height: 500px;
    object-fit: cover;
}
.hero-section .carousel-caption {
    background: rgba(0,0,0,0.4);
    border-radius: 12px;
    padding: 1.5rem 2rem;
    bottom: 15%;
}

@media (max-width: 768px) {
    .hero-section .carousel-item img { max-height: 280px; }
    .hero-section .carousel-caption { padding: 0.8rem 1rem; bottom: 10%; }
    .hero-section .carousel-caption h2 { font-size: 1.2rem; }
}

/* ─── Categorías ─────────────────────────────────────── */
.card-categoria {
    border: 1px solid #E2E8F0;
    transition: transform 0.2s, box-shadow 0.2s;
    overflow: hidden;
}
.card-categoria:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
}
.card-categoria .card-img-top {
    height: 140px;
    object-fit: cover;
}

/* ─── Product Card ───────────────────────────────────── */
.card-producto {
    transition: transform 0.2s, box-shadow 0.2s;
    border-radius: 12px;
    overflow: hidden;
}
.card-producto:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0,0,0,0.12);
}
.card-producto .producto-img {
    height: 200px;
    object-fit: cover;
    transition: transform 0.3s;
}
.card-producto:hover .producto-img {
    transform: scale(1.05);
}
.card-producto .card-body { padding: 1rem; }

@media (max-width: 576px) {
    .card-producto .producto-img { height: 150px; }
    .card-producto .card-body { padding: 0.7rem; }
    .card-producto .fs-5 { font-size: 1rem !important; }
}

/* ─── Badges ─────────────────────────────────────────── */
.badge { font-weight: 600; font-size: 0.72rem; }

/* ─── Footer ─────────────────────────────────────────── */
footer a.text-white-50:hover { color: #fff !important; }

/* ─── WhatsApp Float ─────────────────────────────────── */
/* El botón flotante ya se define inline en footer.php */

/* ─── Product Detail ─────────────────────────────────── */
.product-gallery-thumb {
    width: 70px;
    height: 70px;
    object-fit: cover;
    border: 2px solid transparent;
    cursor: pointer;
    border-radius: 6px;
    transition: border-color 0.2s;
}
.product-gallery-thumb:hover,
.product-gallery-thumb.active {
    border-color: var(--primary);
}

.product-price-old {
    font-size: 0.9rem;
    color: #94A3B8;
}
.product-price-current {
    font-size: 1.6rem;
    font-weight: 800;
}

/* ─── Stars ──────────────────────────────────────────── */
.text-warning .bi-star-fill { color: #F59E0B; }
.text-warning .bi-star { color: #D1D5DB; }

/* ─── Forms ──────────────────────────────────────────── */
.form-control:focus,
.form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 0.2rem rgba(37,99,235,0.15);
}

/* ─── Pagination ─────────────────────────────────────── */
.page-link { color: var(--primary); }
.page-item.active .page-link {
    background-color: var(--primary);
    border-color: var(--primary);
}

/* ─── Content blocks (tabs/accordion) ────────────────── */
.nav-tabs .nav-link {
    font-weight: 600;
    color: var(--secondary);
}
.nav-tabs .nav-link.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
    border-bottom-width: 3px;
}

/* ─── Cart Table ─────────────────────────────────────── */
.cart-qty-input {
    width: 60px;
    text-align: center;
}

/* ─── Scroll to top ──────────────────────────────────── */
.btn-scroll-top {
    position: fixed;
    bottom: 90px;
    right: 20px;
    z-index: 1030;
    display: none;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    font-size: 1.2rem;
}

/* ─── Loading skeleton ───────────────────────────────── */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 4px;
}
@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

/* ─── Toast notifications ────────────────────────────── */
.toast-container {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 1060;
}
