/* ------------------------------------------------------------------
    1. GLOBAL RESETS & VARIABLES
------------------------------------------------------------------ */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600;700&display=swap');

:root {
    /* Primary Brand Colors */
    --primary-red: #E81A24;
    --deep-red-bg: #A8000B; /* Deeper red for footer/accents */
    --gold-text: #FFD700; /* For luxurious accents */
    --active-link-pink: #FFCCCC; /* Soft pink for active navigation highlight (kept for variable definition but not used) */

    /* Text and Background Colors */
    --white: #FFFFFF;
    --light-gray: #F0F0F0;
    --gray-text: #666666;
    --dark-text: #333333;
    --light-footer-text: #FFFFFF;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', sans-serif;
    color: var(--dark-text);
    background-color: var(--white);
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: var(--dark-text);
}

ul {
    list-style: none;
}

/* ------------------------------------------------------------------
    2. BANNER CAROUSEL SECTION (Pure carousel only)
------------------------------------------------------------------ */
.banner-carousel {
    position: relative;
    width: 100%;
    height: 400px; /* Set a fixed height for the banner */
    z-index: 0;
}

.carousel-slides {
    position: relative;
    width: 100%;
    height: 100%;
}

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

.slide.active {
    opacity: 1;
}

.carousel-overlay {
    position: absolute;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
}

.carousel-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 10;
}

.carousel-dots .dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: background-color 0.3s;
}

.carousel-dots .dot.active {
    background-color: var(--white);
    width: 12px;
    height: 12px;
}

/* ------------------------------------------------------------------
    3. MAIN NAVIGATION SECTION (Below the banner)
------------------------------------------------------------------ */
.main-navigation {
    width: 100%;
    background-color: var(--white);
    border-bottom: 2px solid var(--light-gray);
    padding: 0 5%;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px 0;
    gap: 30px;
}

/* Left side: Page name and user button */
.nav-left {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-shrink: 0;
}

.page-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--dark-text);
    margin: 0;
}

.user-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: none;
    border: 2px solid var(--primary-red);
    border-radius: 6px;
    padding: 8px 15px;
    color: var(--primary-red);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.user-btn:hover {
    background-color: var(--primary-red);
    color: var(--white);
}

.user-btn i {
    font-size: 1.2rem;
}

/* Center: Main navigation menu */
.nav-menu {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 25px;
    flex-grow: 1;
}

.nav-menu a {
    color: var(--dark-text);
    font-weight: 600;
    font-size: 0.95rem;
    transition: color 0.3s;
    text-transform: uppercase;
    padding: 5px 0;
}

.nav-menu a:hover {
    color: var(--primary-red);
}

.cart-link {
    display: flex;
    align-items: center;
    gap: 5px;
}

.cart-link i {
    font-size: 1rem;
}

/* Right side: Search bar */
.nav-right {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    flex-shrink: 0;
}

.search-bar {
    display: flex;
    align-items: center;
    background-color: var(--light-gray);
    border-radius: 8px;
    padding: 8px 15px;
    width: 300px;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
}

.search-bar input {
    border: none;
    outline: none;
    flex-grow: 1;
    font-size: 1rem;
    padding: 5px 10px;
    background-color: transparent;
}

.search-bar i {
    color: var(--gray-text);
    cursor: pointer;
    font-size: 1.2rem;
}

/* ------------------------------------------------------------------
    4. MAIN LAYOUT & SECTIONS
------------------------------------------------------------------ */
.main-content {
    display: flex;
    padding: 50px 5%;
    gap: 30px;
    max-width: 1400px;
    margin: 0 auto;
}

.new-collection {
    flex: 3; /* Takes up more space */
    min-width: 65%;
}

.section-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-red);
    margin-bottom: 30px;
    border-bottom: 3px solid var(--light-gray);
    padding-bottom: 10px;
}

/* Grid for the Collection Items */
.collection-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

.see-more-btn {
    display: block;
    width: 200px;
    margin: 30px auto 0;
    padding: 12px 20px;
    background-color: var(--primary-red);
    color: var(--white);
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.2s;
    box-shadow: 0 4px 8px rgba(232, 26, 36, 0.4);
}

.see-more-btn:hover {
    background-color: #C0141C; /* Slightly darker red */
    transform: translateY(-2px);
}

/* Aside Card for Our School */
.our-school-card {
    flex: 1; /* Takes up less space */
    min-width: 300px;
    align-self: flex-start; /* Sticks to the top */
    padding: 0 !important; /* Override card padding for image placement */
}

/* ------------------------------------------------------------------
    5. SCROLL ANIMATION (Reveal & Parallax Base)
------------------------------------------------------------------ */

/* Initial state: Invisible and slightly moved down */
.card-to-animate {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

/* Active state: Visible and reset position (Parallax JS modifies transform) */
.card-to-animate.is-visible {
    opacity: 1;
    /* Base transform is 0, JS will apply parallax shift on scroll */
    transform: translateY(0); 
}

/* ------------------------------------------------------------------
    6. Product Card Styles & Nested Carousel
------------------------------------------------------------------ */
.card {
    background-color: var(--white);
    border-radius: 12px;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.05);
    padding: 20px;
    transition: box-shadow 0.3s;
}

.card:hover {
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.carousel-container {
    height: 200px;
    width: 100%;
    position: relative;
    overflow: hidden;
    border-radius: 12px 12px 0 0;
    /* DEBUGGING: Shows the container is present even if images fail to load */
    background-color: var(--light-gray); 
}

.carousel-container img {
    position: absolute; /* STACKING: Allows images to overlap perfectly */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0; /* DEFAULT: Invisible */
    transition: opacity 0.5s ease-in-out;
}

.carousel-container img.active-slide {
    opacity: 1; /* VISIBLE: Toggled by JS */
}

/* Card Body Content (Applies to Our School card) */
.card-body {
    padding: 20px;
}

.category-tag {
    display: inline-block;
    background-color: var(--primary-red);
    color: var(--white);
    padding: 4px 10px;
    border-radius: 5px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-top: 15px;
    margin-bottom: 10px;
    text-transform: uppercase;
}

.card-body p {
    color: var(--dark-text);
    font-size: 0.9rem;
    margin-bottom: 15px;
}

.color-dots {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
}

.color-dots .dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.dot-red { background-color: var(--primary-red); }
.dot-green { background-color: #28A745; }
.dot-orange { background-color: #FFC107; }

.join-btn {
    width: 100%;
    padding: 10px;
    background-color: var(--primary-red);
    color: var(--white);
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s;
}

.join-btn:hover {
    background-color: #C0141C;
}

/* Our School Card Specifics */
.our-school-card .card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background-color: var(--light-gray);
    border-radius: 12px 12px 0 0;
}

.our-school-card .card-header h3 {
    font-size: 1.1rem;
    color: var(--dark-text);
}

.our-school-card .close-btn {
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--gray-text);
}

.our-school-card img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 0; /* Remove top radius defined for carousel */
    margin-bottom: 0;
}

/* ------------------------------------------------------------------
    7. FOOTER STYLES | Golden Headings & Italicized Text
------------------------------------------------------------------ */
.footer {
    background-color: var(--deep-red-bg);
    color: var(--light-footer-text);
    padding: 50px 5%;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
}

.footer-section {
    width: 30%;
    min-width: 250px;
    margin-bottom: 30px;
}

.footer-section h4 {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--gold-text); /* GOLDEN HEADINGS */
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.footer-section p {
    font-size: 0.95rem;
    color: var(--light-footer-text);
    font-style: italic; /* ITALICIZED TEXT */
    line-height: 1.6;
}

.footer-section ul {
    padding: 0;
}

.footer-section ul li {
    margin-bottom: 12px;
}

.footer-section ul li a {
    color: var(--light-footer-text);
    font-size: 0.95rem;
    font-style: italic; /* ITALICIZED LINKS */
    transition: color 0.3s;
}

.footer-section ul li a:hover {
    color: var(--gold-text);
}

.social-icons {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.social-icons a {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 45px;
    height: 45px;
    background-color: transparent;
    border: 2px solid var(--gold-text);
    border-radius: 50%;
    transition: all 0.3s ease;
}

.social-icons a i {
    font-size: 1.3rem;
    color: var(--gold-text);
    transition: color 0.3s ease;
}

.social-icons a:hover {
    background-color: var(--gold-text);
    transform: translateY(-3px);
}

.social-icons a:hover i {
    color: var(--deep-red-bg);
}

/* ------------------------------------------------------------------
    8. MEDIA QUERIES (Responsiveness)
------------------------------------------------------------------ */
@media (max-width: 1024px) {
    .main-content {
        flex-direction: column;
        gap: 40px;
    }

    .new-collection, .our-school-card {
        min-width: 100%;
        flex: auto;
    }

    .our-school-card {
        order: -1; /* Place the school card above the collection on mobile */
    }

    .collection-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }

    .nav-container {
        gap: 20px;
    }

    .nav-menu {
        gap: 20px;
    }

    .search-bar {
        width: 250px;
    }
}

@media (max-width: 768px) {
    .banner-carousel {
        height: 300px;
    }

    .main-navigation {
        padding: 0 20px;
    }

    .nav-container {
        flex-direction: column;
        gap: 20px;
        padding: 15px 0;
    }

    .nav-left {
        width: 100%;
        justify-content: space-between;
    }

    .page-title {
        font-size: 2rem;
    }

    .nav-menu {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
        gap: 15px;
    }

    .nav-menu a {
        font-size: 0.85rem;
    }

    .nav-right {
        width: 100%;
        justify-content: center;
    }

    .search-bar {
        width: 100%;
        max-width: 400px;
    }

    .footer {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 40px 20px;
    }
    
    .footer-section {
        width: 100%;
        min-width: auto;
        margin-bottom: 30px;
    }

    .social-icons {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .banner-carousel {
        height: 250px;
    }

    .page-title {
        font-size: 1.8rem;
    }

    .user-btn span {
        display: none; /* Hide text on very small screens */
    }

    .user-btn {
        padding: 8px;
    }

    .nav-menu {
        gap: 10px;
    }

    .nav-menu a {
        font-size: 0.8rem;
    }

    .section-title {
        font-size: 1.7rem;
    }

    .collection-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}