/* 
 * Costa Medidores - Accesorios de PVC
 * Estilos principales del sitio web
 */

:root {
    --costa-blue: #0066CC;
    --costa-dark-blue: #004C99;
    --costa-light-blue: #E6F2FF;
    --costa-water: #00BFFF;
    --costa-green: #28a745;
    --costa-dark: #2c3e50;
    --costa-gray: #6c757d;
}

/* General */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: #333;
    line-height: 1.6;
}

/* Header Top */
.header-top {
    background: #f8f9fa;
    font-size: 14px;
    border-bottom: 1px solid #dee2e6;
}

.contact-info a {
    color: var(--costa-dark);
    text-decoration: none;
    margin-right: 20px;
    transition: color 0.3s;
}

.contact-info a:hover {
    color: var(--costa-blue);
}

.contact-info i {
    margin-right: 5px;
    color: var(--costa-blue);
}

/* Navbar */
.bg-costa {
    background: linear-gradient(135deg, var(--costa-blue) 0%, var(--costa-dark-blue) 100%);
}

.navbar-dark .navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
}

.navbar-dark .navbar-brand strong {
    margin-left: 10px;
}

/* Buscador en Navbar */
.search-form .form-control::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.search-form .form-control:focus {
    box-shadow: 0 0 0 0.2rem rgba(255, 255, 255, 0.3);
    outline: none;
}

.search-form .btn-light {
    background: white;
    border: none;
    padding: 0.375rem 1rem;
}

.search-form .btn-light:hover {
    background: #f8f9fa;
    transform: scale(1.05);
}

.navbar-dark .navbar-nav .nav-link {
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
    padding: 0.5rem 1rem;
    transition: all 0.3s;
}

.navbar-dark .navbar-nav .nav-link:hover {
    color: white;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 5px;
}

/* Mega Menu y Dropdown */
.dropdown-menu {
    border: none;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    padding: 15px;
}

.dropdown-submenu {
    position: relative;
}

.dropdown-submenu .dropdown-menu {
    top: 0;
    left: 100%;
    margin-top: -1px;
}

.dropdown-item {
    padding: 8px 15px;
    border-radius: 5px;
    transition: all 0.3s;
}

.dropdown-item:hover {
    background: var(--costa-light-blue);
    color: var(--costa-dark-blue);
}

.dropdown-item strong {
    color: var(--costa-blue);
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, var(--costa-blue) 0%, var(--costa-dark-blue) 100%);
    min-height: 500px;
    position: relative;
    color: white;
}

/* Hero Section Compacto */
.hero-section-compact {
    background: linear-gradient(135deg, var(--costa-blue) 0%, var(--costa-dark-blue) 100%);
    position: relative;
    color: white;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('../img/hero-pattern.png') repeat;
    opacity: 0.1;
}

.min-vh-75 {
    min-height: 75vh;
}

/* Botones Costa */
.btn-costa {
    background: var(--costa-blue);
    border: none;
    color: white;
    font-weight: 600;
    padding: 10px 25px;
    transition: all 0.3s;
}

.btn-costa:hover {
    background: var(--costa-dark-blue);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 102, 204, 0.3);
}

/* Cards de Categorías */
.category-card {
    text-decoration: none;
    display: block;
    transition: transform 0.3s;
}

.category-card:hover {
    transform: translateY(-10px);
}

.category-icon {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
}

.category-icon i {
    font-size: 3rem;
}

/* Tarjetas de Categorías con Imagen de Fondo */
.category-image-card {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
    overflow: hidden;
}

.category-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0, 102, 204, 0.85) 0%, rgba(0, 76, 153, 0.9) 100%);
    z-index: 1;
    transition: all 0.3s ease;
}

.category-image-card:hover .category-overlay {
    background: linear-gradient(135deg, rgba(0, 102, 204, 0.75) 0%, rgba(0, 76, 153, 0.8) 100%);
}

.category-card:hover .category-image-card {
    transform: translateY(-5px);
}

.hover-lift {
    transition: all 0.3s;
}

.hover-lift:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15) !important;
}

/* Feature Boxes */
.feature-box {
    background: white;
    border-radius: 10px;
    transition: all 0.3s;
}

.feature-box:hover {
    background: var(--costa-light-blue);
}

.feature-icon {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.feature-icon i {
    font-size: 2rem;
}

/* Product Cards */
.product-card {
    transition: all 0.3s;
    overflow: hidden;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15) !important;
}

.product-card .card-img-top {
    transition: transform 0.3s;
}

.product-card:hover .card-img-top {
    transform: scale(1.05);
}

.product-card .badge {
    font-size: 0.7rem;
    padding: 5px 10px;
}

/* CTA Section */
.cta-section {
    background: linear-gradient(135deg, var(--costa-green) 0%, #218838 100%);
    color: white;
}

/* Footer */
.footer {
    border-top: 5px solid var(--costa-blue);
}

.footer h5 {
    color: var(--costa-blue);
    font-weight: 700;
}

.footer a {
    transition: all 0.3s;
}

.footer a:hover {
    color: var(--costa-blue) !important;
    padding-left: 5px;
}

.social-icons a {
    transition: transform 0.3s;
    display: inline-block;
}

.social-icons a:hover {
    transform: translateY(-3px);
}

/* WhatsApp Float Button */
.whatsapp-float {
    position: fixed;
    width: 60px;
    height: 60px;
    bottom: 30px;
    right: 30px;
    background-color: #25d366;
    color: white;
    border-radius: 50%;
    text-align: center;
    font-size: 30px;
    box-shadow: 2px 2px 15px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    animation: pulse 2s infinite;
}

.whatsapp-float:hover {
    background-color: #128c7e;
    transform: scale(1.1);
    color: white;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7);
    }
    70% {
        box-shadow: 0 0 0 15px rgba(37, 211, 102, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
    }
}

/* Breadcrumb */
.breadcrumb {
    background: transparent;
    padding: 0;
}

.breadcrumb-item a {
    color: var(--costa-blue);
    text-decoration: none;
}

.breadcrumb-item a:hover {
    text-decoration: underline;
}

/* Product Detail */
.product-image-container img {
    width: 100%;
    max-height: 500px;
    object-fit: contain;
}

/* Badges Personalizados */
.badge {
    font-weight: 600;
    padding: 6px 12px;
}

/* Responsive */
@media (max-width: 768px) {
    .hero-section {
        min-height: 400px;
        padding: 40px 0;
    }
    
    .hero-section h1 {
        font-size: 2rem;
    }
    
    .category-icon {
        width: 70px;
        height: 70px;
    }
    
    .category-icon i {
        font-size: 2rem;
    }
    
    .whatsapp-float {
        width: 50px;
        height: 50px;
        font-size: 25px;
        bottom: 20px;
        right: 20px;
    }
    
    .navbar-brand img {
        height: 35px !important;
    }
}

/* Scroll suave */
html {
    scroll-behavior: smooth;
}

/* Animaciones de entrada */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Utilidades adicionales */
.text-costa {
    color: var(--costa-blue) !important;
}

.bg-costa-light {
    background: var(--costa-light-blue) !important;
}

.border-costa {
    border-color: var(--costa-blue) !important;
}

/* Loading Spinner */
.spinner-costa {
    border: 3px solid var(--costa-light-blue);
    border-top: 3px solid var(--costa-blue);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Tablas Responsive */
@media (max-width: 768px) {
    .table-responsive {
        border: none;
    }
}

/* Cards con efecto glassmorphism */
.glass-card {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Mejoras de accesibilidad */
.btn:focus,
.form-control:focus,
.form-select:focus {
    box-shadow: 0 0 0 0.2rem rgba(0, 102, 204, 0.25);
    border-color: var(--costa-blue);
}

/* Sticky navbar con sombra */
.navbar.sticky-top {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Mejora visual de inputs */
.form-control,
.form-select {
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 10px 15px;
    transition: all 0.3s;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--costa-blue);
    box-shadow: 0 0 0 0.2rem rgba(0, 102, 204, 0.15);
}

/* Alertas personalizadas */
.alert {
    border: none;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

/* Botón Back to Top */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 45px;
    height: 45px;
    background: var(--costa-blue);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 102, 204, 0.4);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background: var(--costa-dark-blue);
    transform: translateY(-5px);
    box-shadow: 0 6px 16px rgba(0, 102, 204, 0.5);
}

@media (max-width: 768px) {
    .back-to-top {
        width: 40px;
        height: 40px;
        font-size: 18px;
        bottom: 90px;
        right: 20px;
    }
}
