/* ===== FUENTES ===== */
@import url('https://fonts.googleapis.com/css2?family=Fredoka+One&family=Poppins:wght@400;600;700;800&display=swap');

/* ===== VARIABLES CORPORATIVAS ===== */
:root {
    --color-primary: #f33d01;
    --color-secondary: #022E8A;
    --color-white: #ffffff;
    --color-light: #f8f9fa;
    --color-dark: #1a1a2e;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 20px 40px rgba(0, 0, 0, 0.2);
}

/* ===== RESET Y BASE ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
    font-family: 'Poppins', sans-serif;
    background: var(--color-light);
    color: var(--color-dark);
    overflow-x: hidden;
}
h1, h2, h3, h4, h5 {
    font-family: 'Fredoka One', cursive;
    letter-spacing: 0.5px;
}

/* ===== ANIMACIONES ===== */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}
.animate-on-load {
    animation: fadeInUp 0.8s ease forwards;
}
.animate-on-load:nth-child(2) { animation-delay: 0.2s; }
.animate-on-load:nth-child(3) { animation-delay: 0.4s; }
.animate-on-load:nth-child(4) { animation-delay: 0.6s; }

/* ===== HEADER ===== */
.navbar-custom {
    background: linear-gradient(135deg, #ffffff 0%, #022E8A 100%);
    padding: 10px 0;
    box-shadow: 0 4px 20px rgba(243, 61, 1, 0.3);
    position: sticky;
    top: 0;
    z-index: 1000;
}
.navbar-custom .navbar-brand {
    max-width: 180px;
    padding: 0;
    margin: 0;
}
.navbar-custom .navbar-brand img {
    width: 100% !important;
    height: auto !important;
    max-height: 55px !important;
    object-fit: contain !important;
    display: block !important;
    filter: drop-shadow(2px 2px 8px rgba(0,0,0,0.2));
    transition: transform 0.3s;
}
.navbar-custom .navbar-brand img:hover {
    transform: scale(1.05);
}
@media (max-width: 768px) {
    .navbar-custom .navbar-brand { max-width: 130px; }
    .navbar-custom .navbar-brand img { max-height: 40px !important; }
}
@media (max-width: 480px) {
    .navbar-custom .navbar-brand { max-width: 100px; }
    .navbar-custom .navbar-brand img { max-height: 35px !important; }
}
.navbar-custom .navbar-nav .nav-link {
    color: #fff !important;
    font-weight: 600;
    padding: 8px 16px;
    border-radius: 30px;
    transition: 0.3s;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.2);
}
.navbar-custom .navbar-nav .nav-link:hover {
    background: rgba(255,255,255,0.25);
    transform: translateY(-2px);
}
.btn-carrito {
    background: rgba(255,255,255,0.2);
    border: 2px solid #fff;
    border-radius: 50px;
    padding: 8px 20px;
    color: #fff;
    font-weight: 600;
    transition: 0.3s;
}
.btn-carrito:hover {
    background: #fff;
    color: var(--color-primary);
    transform: scale(1.05);
}
#contador-carrito {
    background: var(--color-secondary);
    color: #fff;
    border-radius: 50px;
    padding: 2px 10px;
    margin-left: 6px;
}

/* ===== BANNER PRINCIPAL ===== */
.banner-principal {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
    color: #fff;
    padding: 60px 20px;
    text-align: center;
    border-radius: 0 0 40px 40px;
    margin-bottom: 40px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}
.banner-principal h1 {
    font-size: 3.5rem;
    text-shadow: 2px 2px 10px rgba(0,0,0,0.3);
    animation: fadeInUp 1s ease;
}
.banner-principal p {
    font-size: 1.3rem;
    opacity: 0.9;
    animation: fadeInUp 1.2s ease;
}
.banner-principal .btn-banner {
    background: #fff;
    color: var(--color-primary);
    border: none;
    border-radius: 50px;
    padding: 14px 40px;
    font-weight: 700;
    font-size: 1.1rem;
    transition: 0.3s;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    animation: fadeInUp 1.4s ease;
}
.banner-principal .btn-banner:hover {
    transform: scale(1.05);
    background: var(--color-secondary);
    color: #fff;
}

/* ===== CARRUSEL DE BANNERS ===== */
.carousel-item img {
    max-height: 500px;
    object-fit: cover;
}
.carousel-caption {
    background: rgba(0,0,0,0.5);
    border-radius: 20px;
    padding: 20px;
    bottom: 30px;
}

/* ===== TARJETAS DE LÍNEAS ===== */
.card-linea {
    border: none;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: 0.4s;
    background: #fff;
    position: relative;
}
.card-linea:hover {
    transform: translateY(-12px) scale(1.02);
    box-shadow: var(--shadow-hover);
}
.card-linea img {
    width: 100%;
    height: 260px;
    object-fit: cover;
    transition: transform 0.6s;
}
.card-linea:hover img {
    transform: scale(1.08);
}
.card-linea .card-body {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(2, 46, 138, 0.9) 0%, transparent 100%);
    padding: 30px 20px 20px;
    border-radius: 0 0 24px 24px;
}
.card-linea .card-title {
    color: #fff;
    font-size: 1.8rem;
    text-shadow: 2px 2px 8px rgba(0,0,0,0.6);
    margin-bottom: 0;
}
.card-linea .card-text {
    color: rgba(255,255,255,0.9);
    font-weight: 300;
    font-size: 0.95rem;
}

/* ===== TARJETA DE PRODUCTO (CATÁLOGO) ===== */
.card-producto {
    border: none;
    border-radius: 20px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.08);
    transition: transform 0.3s, box-shadow 0.3s;
    background: #fff;
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
}
.card-producto:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.15);
}

/* Carrusel dentro de la tarjeta */
.card-producto .carousel {
    border-radius: 20px 20px 0 0;
    overflow: hidden;
}
.card-producto .carousel-item img {
    height: 250px;
    object-fit: cover;
    background: #fafafa;
}
.card-producto .carousel-control-prev-icon,
.card-producto .carousel-control-next-icon {
    background-color: rgba(0,0,0,0.4);
    border-radius: 50%;
    padding: 20px;
}
.card-producto .carousel-indicators button {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: #ccc;
    border: 1px solid #fff;
}
.card-producto .carousel-indicators .active {
    background-color: var(--color-primary);
}

.card-producto .card-body {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}
.card-producto .card-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--color-dark);
    margin-bottom: 0.5rem;
    min-height: 3rem;
    line-height: 1.3;
}
.card-producto .card-text {
    font-size: 0.9rem;
    color: #666;
    max-height: 70px;
    overflow-y: auto;
    margin-bottom: 0.5rem;
    scrollbar-width: thin;
    line-height: 1.5;
}
.card-producto .card-text::-webkit-scrollbar {
    width: 4px;
}
.card-producto .card-text::-webkit-scrollbar-thumb {
    background: var(--color-primary);
    border-radius: 10px;
}
.card-producto .card-text::-webkit-scrollbar-track {
    background: #f1f1f1;
}

/* ===== CONTENEDOR DE PRECIOS ===== */
.precio-container {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 12px 15px;
    margin-top: 5px;
    border: 1px solid #e9ecef;
}

/* Badge OFERTA grande */
.badge-oferta-grande {
    background: linear-gradient(135deg, #e63946, #c62828);
    color: #fff;
    font-weight: 700;
    font-size: 0.9rem;
    padding: 5px 18px;
    border-radius: 50px;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 4px 10px rgba(230, 57, 70, 0.3);
    display: inline-block;
}

/* Badge porcentaje descuento */
.badge-descuento {
    background: #ffd60a;
    color: #1a1a2e;
    font-weight: 800;
    font-size: 1.1rem;
    padding: 4px 16px;
    border-radius: 50px;
    box-shadow: 0 4px 8px rgba(255, 214, 10, 0.4);
    display: inline-block;
}

/* Precios en oferta */
.precios-oferta {
    display: flex;
    align-items: baseline;
    gap: 12px;
    flex-wrap: wrap;
    margin: 8px 0 4px;
}
.precio-oferta {
    font-size: 2rem;
    font-weight: 800;
    color: #e63946;
    letter-spacing: -0.5px;
    text-shadow: 0 2px 4px rgba(230, 57, 70, 0.15);
}
.precio-tachado {
    font-size: 1.2rem;
    color: #999;
    text-decoration: line-through;
    font-weight: 400;
}

/* Precio normal (sin oferta) */
.precio-normal .precio {
    font-size: 2rem;
    font-weight: 800;
    color: var(--color-primary);
}

/* Contador de oferta moderno */
.contador-oferta-moderno {
    background: linear-gradient(135deg, #1a1a2e, #2d2d44);
    color: #fff;
    font-weight: 700;
    font-size: 1rem;
    padding: 6px 16px;
    border-radius: 50px;
    display: inline-block;
    margin-top: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    font-family: 'Courier New', monospace;
    letter-spacing: 1px;
    border: 1px solid #4a4a6a;
}

/* Botón agregar */
.btn-agregar {
    background: var(--color-primary);
    color: #fff;
    border: none;
    border-radius: 50px;
    padding: 12px 20px;
    font-weight: 700;
    transition: 0.3s;
    box-shadow: 0 4px 15px rgba(243, 61, 1, 0.3);
    margin-top: auto;
}
.btn-agregar:hover {
    background: #d63800;
    transform: scale(1.02);
    box-shadow: 0 6px 20px rgba(243, 61, 1, 0.4);
    color: #fff;
}

/* ===== FOOTER ===== */
.footer-custom {
    background: var(--color-secondary);
    color: #ddd;
    padding: 40px 0 20px;
    margin-top: 60px;
}
.footer-custom h5 {
    color: #fff;
    font-family: 'Fredoka One', cursive;
}
.footer-custom a {
    color: var(--color-primary);
    transition: 0.3s;
}
.footer-custom a:hover {
    color: #fff;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .banner-principal h1 { font-size: 2.2rem; }
    .banner-principal p { font-size: 1rem; }
    .card-linea img { height: 180px; }
    .card-linea .card-title { font-size: 1.3rem; }
    .card-producto .carousel-item img { height: 180px; }
    .card-producto .card-title { font-size: 1rem; min-height: 2.5rem; }
    .precio-oferta { font-size: 1.6rem; }
    .precio-tachado { font-size: 1rem; }
    .badge-oferta-grande { font-size: 0.75rem; padding: 4px 12px; }
    .badge-descuento { font-size: 0.9rem; padding: 3px 12px; }
    .contador-oferta-moderno { font-size: 0.85rem; padding: 4px 12px; }
    .btn-agregar { padding: 10px 16px; font-size: 0.95rem; }
}
/* ===== FOOTER PROFESIONAL ===== */
.footer-custom {
    background: linear-gradient(135deg, #1a1a2e 0%, #2d2d44 100%);
    color: #e0e0e0;
    padding: 50px 0 25px;
    margin-top: 60px;
    border-top: 4px solid var(--color-primary);
}

.footer-title {
    color: #ffffff;
    font-family: 'Fredoka One', cursive;
    font-size: 1.3rem;
    margin-bottom: 1.2rem;
    letter-spacing: 0.5px;
    position: relative;
    padding-bottom: 10px;
}
.footer-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 3px;
    background: var(--color-primary);
    border-radius: 2px;
}

.footer-text {
    color: #c0c0c0;
    font-size: 0.95rem;
    line-height: 1.6;
}

.footer-links {
    padding: 0;
    margin: 0;
}
.footer-links li {
    margin-bottom: 8px;
}
.footer-link {
    color: #c0c0c0 !important;
    text-decoration: none !important;
    font-size: 0.95rem;
    transition: 0.3s;
    display: inline-block;
    position: relative;
}
.footer-link:hover {
    color: var(--color-primary) !important;
    transform: translateX(5px);
}
.footer-link::before {
    content: '› ';
    color: var(--color-primary);
    font-weight: 700;
    opacity: 0;
    transition: 0.3s;
}
.footer-link:hover::before {
    opacity: 1;
}

.footer-divider {
    border-color: rgba(255,255,255,0.1);
    margin: 20px 0;
}

.footer-copy {
    color: #888;
    font-size: 0.85rem;
    letter-spacing: 0.3px;
}