/* Custom Animations and Styles */

* {
    scroll-behavior: smooth;
}

body {
    overflow-x: hidden;
}

/* Smooth fade-in animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.6s ease-out;
}

/* Carousel custom styling */
.deals-carousel {
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

.deals-carousel > div {
    scroll-snap-align: start;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #1e88e5;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #1565c0;
}

/* Pulse animation for CTA buttons */
@keyframes pulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(255, 111, 0, 0.7);
    }
    50% {
        box-shadow: 0 0 0 10px rgba(255, 111, 0, 0);
    }
}

.pulse {
    animation: pulse 2s infinite;
}

/* Gradient text */
.gradient-text {
    background: linear-gradient(135deg, #1e88e5 0%, #42a5f5 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Card hover effects */
.card-hover {
    transition: all 0.3s ease;
}

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

/* Loading animation */
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.spinner {
    animation: spin 1s linear infinite;
}

/* Mobile menu styles */
.mobile-menu {
    transform: translateX(100%);
    transition: transform 0.3s ease-in-out;
}

.mobile-menu.active {
    transform: translateX(0);
}

/* Hero background parallax effect */
.hero-parallax {
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

/* Responsive utilities */
@media (max-width: 768px) {
    .hero-parallax {
        background-attachment: scroll;
    }
}

/* Badge styles */
.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 600;
}

/* Image overlay on hover */
.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;
}

/* Carousel dots active state */
.carousel-dot {
    transition: all 0.3s ease;
    cursor: pointer;
}

.carousel-dot:hover {
    transform: scale(1.2);
}

.carousel-dot.active {
    background-color: #1e88e5;
    transform: scale(1.3);
}

/* Smooth page transitions */
.page-transition {
    transition: opacity 0.3s ease-in-out;
}

/* Typography utilities */
.font-display {
    font-family: 'Playfair Display', serif;
}

.font-body {
    font-family: 'Poppins', sans-serif;
}

/* Utility classes for spacing */
.section-padding {
    padding-top: 5rem;
    padding-bottom: 5rem;
}

@media (min-width: 768px) {
    .section-padding {
        padding-top: 6rem;
        padding-bottom: 6rem;
    }
}

/* Button effects */
.btn-shine {
    position: relative;
    overflow: hidden;
}

.btn-shine::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.3),
        transparent
    );
    transition: left 0.5s;
}

.btn-shine:hover::before {
    left: 100%;
}

/* Grid auto-fit utility */
.grid-auto-fit {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

/* Backdrop blur support */
@supports (backdrop-filter: blur(10px)) or (-webkit-backdrop-filter: blur(10px)) {
    .backdrop-blur {
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
    }
}

/* Print styles */
@media print {
    nav,
    footer,
    .no-print {
        display: none !important;
    }
}

/* Accessibility improvements */
.skip-to-content {
    position: absolute;
    top: -40px;
    left: 0;
    background: #1e88e5;
    color: white;
    padding: 8px;
    text-decoration: none;
    z-index: 100;
}

.skip-to-content:focus {
    top: 0;
}

/* Focus visible for keyboard navigation */
:focus-visible {
    outline: 2px solid #1e88e5;
    outline-offset: 2px;
}

/* Reduced motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Gallery Modal Styles */
#gallery-modal {
    animation: fadeIn 0.3s ease-out;
    display: flex;
    justify-content: center;
    align-items: center;
}

#gallery-modal.hidden {
    display: none !important;
}

#gallery-modal > div {
    margin: auto;
}

#modal-gallery img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
    transition: transform 0.3s ease;
    cursor: pointer;
}

#modal-gallery img:hover {
    transform: scale(1.05);
}

/* Image Preview Modal */
#image-preview-modal {
    animation: fadeIn 0.3s ease-out;
}

#image-preview-modal.hidden {
    display: none;
}

#preview-close-btn {
    transition: color 0.2s ease;
}

#preview-close-btn:hover {
    color: #9ca3af;
}