/* Animations for VESTIA E-commerce Site */

/* Hero Carousel Animations */
.carousel-container {
    position: relative;
    width: 100%;
    height: 80vh; /* Same as hero section height */
    overflow: hidden;
}

.carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.carousel-slide.active {
    opacity: 1;
}

.carousel-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: white;
    z-index: 1;
    background-color: rgba(0, 0, 0, 0.3);
    padding: 30px 50px;
}

.carousel-content h1 {
    font-size: 4em;
    margin-bottom: 0.2em;
    color: white;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.carousel-content p {
    font-size: 1.5em;
    margin-bottom: 1.5em;
    color: white;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

/* Product Card Hover Effect */
.product-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
}

/* Button Hover Effect (defined in styles.css, but can be extended here) */
.btn {
    transition: all 0.3s ease;
}

/* Sticky Navbar Animation (defined in styles.css, but can be extended here) */
.header.sticky {
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Fade-in on scroll (example for sections) */
.fade-in-section {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in-section.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Overlay for search/cart */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.overlay.active {
    opacity: 1;
    visibility: visible;
}

.slide-in-panel {
    position: fixed;
    top: 0;
    right: 0;
    width: 400px; /* Adjust width as needed */
    height: 100%;
    background-color: white;
    box-shadow: -5px 0 15px rgba(0,0,0,0.1);
    transform: translateX(100%);
    transition: transform 0.3s ease-out;
    z-index: 1001;
    padding: 20px;
    display: flex;
    flex-direction: column;
}

.slide-in-panel.active {
    transform: translateX(0);
}

.slide-in-panel .close-btn {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 1.5em;
    cursor: pointer;
    color: var(--text-color);
}

/* Search bar animation */
.search-bar-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.95);
    z-index: 1002;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.search-bar-container.active {
    opacity: 1;
    visibility: visible;
}

.search-input-wrapper {
    position: relative;
    width: 80%;
    max-width: 600px;
}

.search-input-wrapper input {
    width: 100%;
    padding: 15px 20px;
    font-size: 1.5em;
    border: none;
    border-bottom: 2px solid var(--accent-color);
    outline: none;
    background: transparent;
}

.search-input-wrapper input::placeholder {
    color: var(--text-color);
    opacity: 0.7;
}

.search-input-wrapper .close-btn {
    position: absolute;
    top: 50%;
    right: 20px;
    transform: translateY(-50%);
    font-size: 2em;
    cursor: pointer;
    color: var(--text-color);
}

/* Hamburger menu animation */
.hamburger-menu {
    display: none; /* Hidden on desktop */
    font-size: 1.8em;
    cursor: pointer;
    z-index: 1001;
}

.mobile-nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--background-color);
    z-index: 999;
    transform: translateX(-100%);
    transition: transform 0.3s ease-out;
    padding-top: 80px; /* Space for header */
    overflow-y: auto;
}

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

.mobile-nav-overlay ul {
    display: flex;
    flex-direction: column;
    padding: 20px;
}

.mobile-nav-overlay ul li {
    margin-bottom: 15px;
}

.mobile-nav-overlay ul li a {
    font-size: 1.5em;
    color: var(--text-color);
    text-transform: uppercase;
    display: block;
    padding: 10px 0;
}

.mobile-nav-overlay .close-mobile-nav {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 2em;
    cursor: pointer;
    color: var(--text-color);
}