/* ================================
   Custom Styles for Orfebres de Chile
   ================================ */

:root {
    --primary-color: #d4af37; /* Gold */
    --secondary-color: #f87171;
    --accent-purple: #a78bfa;
    --accent-orange: #fb923c;
}

* {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
}

/* ================================
   Header Animations
   ================================ */

#mainHeader.scrolled {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

/* ================================
   Hero Slider
   ================================ */

.hero-slider {
    height: 600px;
}

@media (max-width: 768px) {
    .hero-slider {
        height: 400px;
    }
}

.swiper-slide {
    position: relative;
}

.swiper-slide::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.3), rgba(0,0,0,0.6));
    z-index: 1;
}

.swiper-slide-content {
    position: relative;
    z-index: 2;
}

.swiper-pagination-bullet {
    background: white;
    opacity: 0.5;
    width: 12px;
    height: 12px;
}

.swiper-pagination-bullet-active {
    opacity: 1;
    background: var(--primary-color);
}

.swiper-button-next,
.swiper-button-prev {
    color: white;
}

/* ================================
   Cards & Hover Effects
   ================================ */

.business-card,
.news-card {
    transition: all 0.3s ease;
    overflow: hidden;
}

.business-card:hover,
.news-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.business-card img,
.news-card img {
    transition: transform 0.5s ease;
}

.business-card:hover img,
.news-card:hover img {
    transform: scale(1.1);
}

.card-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 10;
}

/* ================================
   Category Filter Buttons
   ================================ */

.category-btn {
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.category-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.category-btn.active {
    background: linear-gradient(to right, var(--primary-color), #0d9488);
    color: white;
    border-color: var(--primary-color);
}

/* ================================
   Map Styles
   ================================ */

#map {
    height: 500px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

/* Tailwind preflight pone img { max-width: 100% } y rompe iconos de controles de Google Maps (+ / −) */
#map .gm-style img {
    max-width: none !important;
}

@media (max-width: 768px) {
    #map {
        height: 350px;
    }
}

/* Mapas: Google Maps (InfoWindow usa .gm-style en el shadow DOM) */

/* ================================
   Forms
   ================================ */

.form-input,
.form-textarea,
.form-select {
    transition: all 0.3s ease;
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px -1px rgba(20, 184, 166, 0.2);
}

/* ================================
   Buttons
   ================================ */

.btn-primary {
    background: linear-gradient(to right, var(--primary-color), #0d9488);
    transition: all 0.3s ease;
}

.btn-primary:hover {
    box-shadow: 0 10px 15px -3px rgba(20, 184, 166, 0.4);
    transform: translateY(-2px);
}

.btn-secondary {
    background: linear-gradient(to right, var(--secondary-color), #ef4444);
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    box-shadow: 0 10px 15px -3px rgba(248, 113, 113, 0.4);
    transform: translateY(-2px);
}

/* ================================
   Loading Spinner
   ================================ */

.spinner {
    border: 3px solid rgba(20, 184, 166, 0.1);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ================================
   Animations
   ================================ */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* ================================
   Badge Styles
   ================================ */

.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.375rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-primary {
    background-color: rgba(20, 184, 166, 0.1);
    color: var(--primary-color);
}

.badge-secondary {
    background-color: rgba(248, 113, 113, 0.1);
    color: var(--secondary-color);
}

.badge-purple {
    background-color: rgba(167, 139, 250, 0.1);
    color: var(--accent-purple);
}

.badge-orange {
    background-color: rgba(251, 146, 60, 0.1);
    color: var(--accent-orange);
}

/* ================================
   View Toggle
   ================================ */

.view-toggle button {
    transition: all 0.3s ease;
}

.view-toggle button.active {
    background-color: var(--primary-color);
    color: white;
}

/* ================================
   Image Overlay
   ================================ */

.image-overlay {
    position: relative;
    overflow: hidden;
}

.image-overlay::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.7), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.image-overlay:hover::after {
    opacity: 1;
}

/* ================================
   Responsive Utilities
   ================================ */

@media (max-width: 640px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

/* ================================
   Scrollbar Customization
   ================================ */

::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #0d9488;
}

/* ================================
   Print Styles
   ================================ */

@media print {
    header, footer, .no-print {
        display: none;
    }
}
