/*
 * Thunder Group - Retail Catalog Styles (Premium Redesign)
 */

/* --- Variables CSS (Paleta para Retail) --- */
:root {
    --primary-color: #4F46E5; /* Indigo/Azul Eléctrico Premium */
    --primary-hover: #4338CA;
    --secondary-color: #64748b;
    --accent-color: #06B6D4; /* Cian Vibrante para acentos */
    --accent-hover: #0891B2;
    --dark-bg: #0F172A; 
    --light-bg: #F8FAFC; 
    --text-dark: #1E293B;
    --text-light: #F8FAFC;
    --success-color: #10B981;
    --danger-color: #EF4444;
    --card-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
    --card-hover-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    --border-radius: 12px; /* Más redondeado y suave */
}

/* --- Estilos Globales --- */
body {
    font-family: 'Inter', sans-serif;
    background-color: var(--light-bg);
    color: var(--text-dark);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: all 0.3s ease-in-out;
}
a:hover {
    color: var(--primary-hover);
}

h1, h2, h3, h4, h5, h6 { 
    font-family: 'Outfit', sans-serif;
    font-weight: 700; 
    letter-spacing: -0.02em;
}

.btn {
    border-radius: 8px;
    font-weight: 500;
    padding: 0.6rem 1.2rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}
.btn-primary:hover, .btn-primary:focus {
    background-color: var(--primary-hover);
    border-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

.btn-accent {
    background-color: var(--accent-color); 
    border-color: var(--accent-color); 
    color: white;
}
.btn-accent:hover, .btn-accent:focus {
    background-color: var(--accent-hover); 
    border-color: var(--accent-hover); 
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(6, 182, 212, 0.3);
}

/* --- Header / Navbar --- */
.navbar {
    background-color: rgba(255, 255, 255, 0.9) !important;
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0,0,0,0.05);
}
.navbar-brand img { max-height: 50px; transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1); }
.navbar-brand img:hover { transform: scale(1.05) rotate(-2deg); }
.navbar .form-control { border-radius: 8px; padding: 0.6rem 1rem; border-color: #E2E8F0; }
.navbar .form-control:focus { box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.2); border-color: var(--primary-color); }
.navbar .btn-outline-primary { border-color: var(--primary-color); color: var(--primary-color); }
.navbar .btn-outline-primary:hover { background-color: var(--primary-color); color: white; }

/* --- Barra de Categorías --- */
.category-bar {
    background-color: #fff; 
    padding: 1rem 0; 
    margin-bottom: 30px;
    border-bottom: 1px solid #F1F5F9; 
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}
.category-bar .nav-pills .nav-link {
    color: var(--secondary-color); 
    font-weight: 600; 
    padding: 0.6rem 1.2rem;
    border-radius: 30px; 
    margin: 0 0.4rem;
    transition: all 0.3s ease;
}
.category-bar .nav-pills .nav-link:hover { 
    background-color: #F1F5F9; 
    color: var(--primary-color);
}
.category-bar .nav-pills .nav-link.active {
    background-color: var(--primary-color); 
    color: white;
    box-shadow: 0 4px 15px rgba(79, 70, 229, 0.4);
}

/* --- Tarjeta de Producto (Product Card) --- */
.product-card {
    background-color: #fff; 
    border: 1px solid #F1F5F9; 
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow); 
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    margin-bottom: 25px; 
    overflow: hidden;
    position: relative;
}
.product-card:hover { 
    transform: translateY(-8px); 
    box-shadow: var(--card-hover-shadow); 
    border-color: #E2E8F0;
}
.product-card .card-img-top {
    width: 100%; height: 240px; object-fit: cover;
    border-bottom: 1px solid #F8FAFC; 
    transition: transform 0.6s ease;
}
.product-card:hover .card-img-top { transform: scale(1.08); }
.product-card .card-body {
    padding: 1.5rem; 
    display: flex; flex-direction: column;
    justify-content: space-between; 
    min-height: 200px;
    background: linear-gradient(to bottom, #ffffff 0%, #F8FAFC 100%);
}
.product-card .card-title {
    font-size: 1.1rem; font-family: 'Outfit', sans-serif; font-weight: 700; color: var(--text-dark);
    margin-bottom: 0.5rem; min-height: 48px; line-height: 1.4;
}
.product-card .card-title a { color: inherit; }
.product-card .card-title a:hover { color: var(--primary-color); }
.product-card .price {
    font-size: 1.5rem; font-family: 'Outfit', sans-serif; font-weight: 800; color: var(--success-color); margin-bottom: 0.5rem;
}
.product-card .stock {
    font-size: 0.85rem; color: var(--secondary-color); margin-bottom: 1rem; font-weight: 500;
}
.product-card .stock.out-of-stock { color: var(--danger-color); font-weight: 700; }
.product-card .quantity-input {
    width: 70px; text-align: center; border-radius: 8px; border: 1px solid #CBD5E1;
}
.product-card .add-to-cart-btn {
    font-size: 0.95rem; padding: 0.6rem 1rem; white-space: nowrap; font-weight: 600;
}

/* --- Página de Detalle del Producto --- */
.product-gallery .carousel-item img { max-height: 500px; object-fit: cover; border-radius: var(--border-radius); border: 1px solid #F1F5F9; box-shadow: 0 10px 25px rgba(0,0,0,0.05); }
.product-gallery .carousel-control-prev-icon, .product-gallery .carousel-control-next-icon {
    background-color: rgba(15, 23, 42, 0.5); border-radius: 50%; padding: 15px; backdrop-filter: blur(5px);
}
.product-details h1 { font-size: 2.5rem; font-weight: 800; margin-bottom: 0.75rem; color: var(--text-dark); }
.product-details .price { font-size: 2.2rem; color: var(--success-color); font-weight: 800; margin-bottom: 1rem; }
.product-details .stock { font-size: 1.1rem; color: var(--secondary-color); margin-bottom: 1rem; font-weight: 500;}
.product-details .stock.out-of-stock { color: var(--danger-color); font-weight: 700; }
.product-details .description { font-size: 1.05rem; line-height: 1.8; color: #475569; margin-bottom: 2rem; }
.product-details .quantity-input { width: 80px; padding: 0.5rem; border-radius: 8px; border: 1px solid #CBD5E1; }
.product-details .add-to-cart-btn { font-size: 1.1rem; padding: 0.8rem 1.5rem; font-weight: 600;}

/* --- Carrito Flotante --- */
.cart-icon {
    position: fixed; bottom: 30px; right: 30px; width: 65px; height: 65px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    color: white; border-radius: 50%;
    display: flex; align-items: center; justify-content: center; font-size: 1.6rem;
    box-shadow: 0 10px 25px rgba(79, 70, 229, 0.4); cursor: pointer; z-index: 1050;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.cart-icon:hover {
    transform: scale(1.15) translateY(-5px);
    box-shadow: 0 15px 35px rgba(79, 70, 229, 0.5);
}
.cart-count {
    position: absolute; top: -5px; right: -5px; background-color: var(--danger-color);
    color: white; font-size: 0.8rem; font-weight: bold; padding: 4px 8px;
    border-radius: 50%; line-height: 1; border: 2px solid white;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

/* --- Modal del Carrito --- */
.modal-content { border-radius: 16px; box-shadow: 0 20px 50px rgba(0,0,0,0.2); border: none; }
.modal-header {
    background: linear-gradient(135deg, var(--dark-bg), #1E293B); color: white;
    border-top-left-radius: 16px; border-top-right-radius: 16px; border-bottom: none;
    padding: 1.5rem;
}
.modal-header .btn-close { filter: invert(1) grayscale(100%) brightness(200%); }
.modal-title { font-weight: 700; font-family: 'Outfit', sans-serif;}
#cartModalBody table img { width: 60px; height: 60px; object-fit: cover; border-radius: 8px; margin-right: 15px; box-shadow: 0 2px 5px rgba(0,0,0,0.1); }
#cartModalBody .cart-item-quantity { width: 70px; border-radius: 6px; border: 1px solid #E2E8F0; }
#cartTotal { font-weight: 800; font-size: 1.4em; color: var(--success-color); }
.modal-footer { border-top: 1px solid #F1F5F9; padding: 1.5rem; }
.modal-footer .btn-success { background-color: var(--success-color); border-color: var(--success-color); padding: 0.6rem 1.5rem; font-weight: 600;}
.modal-footer .btn-success:hover { background-color: #059669; border-color: #059669; transform: translateY(-2px); box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);}

/* --- Footer --- */
.footer {
    background-color: var(--dark-bg); color: #94A3B8; padding-top: 4rem; padding-bottom: 2rem; font-size: 0.95rem;
}
.footer h5 { color: white; margin-bottom: 1.5rem; font-weight: 700; font-family: 'Outfit', sans-serif;}
.footer p { margin-bottom: 0.75rem; }
.footer a { color: #CBD5E1; text-decoration: none; transition: color 0.2s; }
.footer a:hover { color: var(--accent-color); text-decoration: none; }
.footer .bottom-bar { border-top: 1px solid #1E293B; padding-top: 2rem; margin-top: 2rem; text-align: center; font-size: 0.85rem;}
.footer .bottom-bar p { margin-bottom: 0; }

/* --- Responsive Adjustments --- */
@media (max-width: 768px) {
    .product-card .card-title { font-size: 1rem; min-height: 44px; }
    .product-card .price { font-size: 1.3rem; }
    .product-details h1 { font-size: 2rem; }
    .product-details .price { font-size: 1.8rem; }
    .category-bar .nav-pills .nav-link { font-size: 0.95rem; padding: 0.5rem 1rem; }
    .cart-icon { width: 55px; height: 55px; font-size: 1.4rem; bottom: 20px; right: 20px; }
}
@media (max-width: 576px) {
    .product-card .card-body { padding: 1rem; }
    .product-card .add-to-cart-btn, .product-card .quantity-input { font-size: 0.85rem; padding: 0.5rem; }
    .product-card .quantity-input { width: 60px; }
}