/* --- Basic Reset & Defaults --- */

/* Roboto Font Import (local files in /Roboto) */
@font-face {
    font-family: 'Roboto';
    src:
        local('Roboto'),
        local('Roboto Regular'),
        url('Roboto/Roboto-Regular.woff2') format('woff2'),
        url('Roboto/Roboto-Regular.woff') format('woff'),
        url('Roboto/Roboto-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Roboto';
    src:
        local('Roboto'),
        local('Roboto Italic'),
        url('Roboto/Roboto-Italic.woff2') format('woff2'),
        url('Roboto/Roboto-Italic.woff') format('woff'),
        url('Roboto/Roboto-Italic.ttf') format('truetype');
    font-weight: 400;
    font-style: italic;
    font-display: swap;
}

@font-face {
    font-family: 'Roboto';
    src:
        local('Roboto'),
        local('Roboto Medium'),
        url('Roboto/Roboto-Medium.woff2') format('woff2'),
        url('Roboto/Roboto-Medium.woff') format('woff'),
        url('Roboto/Roboto-Medium.ttf') format('truetype');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Roboto';
    src:
        local('Roboto'),
        local('Roboto Medium Italic'),
        url('Roboto/Roboto-MediumItalic.woff2') format('woff2'),
        url('Roboto/Roboto-MediumItalic.woff') format('woff'),
        url('Roboto/Roboto-MediumItalic.ttf') format('truetype');
    font-weight: 500;
    font-style: italic;
    font-display: swap;
}

@font-face {
    font-family: 'Roboto';
    src:
        local('Roboto'),
        local('Roboto Bold'),
        url('Roboto/Roboto-Bold.woff2') format('woff2'),
        url('Roboto/Roboto-Bold.woff') format('woff'),
        url('Roboto/Roboto-Bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Roboto';
    src:
        local('Roboto'),
        local('Roboto Bold Italic'),
        url('Roboto/Roboto-BoldItalic.woff2') format('woff2'),
        url('Roboto/Roboto-BoldItalic.woff') format('woff'),
        url('Roboto/Roboto-BoldItalic.ttf') format('truetype');
    font-weight: 700;
    font-style: italic;
    font-display: swap;
}

/* Ringgift Font Import */
@font-face {
    font-family: 'Ringgift';
    src: url('ringift-font/ringift.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

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

body {
    font-family: 'Roboto', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f9f9f9;
}

.container {
    max-width: 1100px;
    margin: auto; /* Restore auto margin to center content */
    overflow: hidden;
    padding: 0 20px; /* Restore original padding */
}

/* --- Header & Navigation --- */
header {
    background: #f4eae1; /* Updated menu bar background */
    color: #000; /* Changed menu bar text color to black */
    padding: 1rem 0;
    border-bottom: #701011 3px solid;
    position: sticky; /* Makes header stick on scroll */
    top: 0;
    z-index: 100; /* Ensures header is above other content */
}

header .container {
    display: flex;
    justify-content: flex-start; /* Align items to the left */
    align-items: center;
    padding-left: 25px; /* Position logo at exactly 25px from left */
    padding-right: 25px; /* Position contact at exactly 25px from right */
    max-width: none; /* Remove max-width constraint for header */
    margin: 0; /* Remove auto margin for header only */
    position: relative; /* Anchor absolutely positioned .menu-toggle on small screens */
}

header .logo {
    margin-right: 20px; /* Reduce space between logo and nav to 20px */
    color: #000; /* Changed logo text color to black */
    font-size: 1.8rem;
    font-weight: bold;
    text-decoration: none;
    display: flex;
    align-items: center; /* Fix alignment */
    gap: 10px;
}

.logo-img {
    height: 40px;
    width: auto;
}

/* header nav intentionally inherits layout from container */

/* Create separate styling for the right-side navigation group */
header .nav-right {
    display: flex;
    gap: 20px;
    margin-left: auto; /* Push to the far right */
}

header .nav-right ul {
    list-style: none;
    display: flex;
    gap: 20px;
}

header .nav-right ul li {
    margin-left: 0; /* Override the default margin */
}

header nav ul {
    list-style: none;
    display: flex;
}

header nav ul li {
    margin-left: 20px;
}

header nav ul li a {
    color: #000; /* Changed menu bar link color to black */
    text-decoration: none;
    font-size: 1.3rem;
    padding: 5px 10px;
    transition: background-color 0.3s ease;
    font-family: 'Roboto', Arial, sans-serif;
}

header nav ul li a:hover,
header nav ul li a.active { /* Style for the current page */
    background-color: #701011;
    color: #FFFFFF;
    border-radius: 5px;
}

/* Combined Styles for Contact and Student Portal buttons */
/* href$= matches both contact.html and ../contact.html (e.g. blog subpages) */
header .nav-right a[href$="contact.html"],
header .nav-right a[href*="moodlecloud.com"] {
    background-color: transparent;
    font-weight: bold;
    font-size: 1.5rem;
    text-decoration: underline;
    border-radius: 50px;
    padding: 5px 15px; /* Consistent padding */
    transition: background-color 0.3s ease, color 0.3s ease, transform 0.3s ease;
    font-family: 'Roboto', Arial, sans-serif;
}

/* Individual colors */
header .nav-right a[href$="contact.html"] {
    color: #701011;
}

header .nav-right a[href*="moodlecloud.com"] {
    color: #0c3048;
}

/* Shared Hover State */
header .nav-right a[href$="contact.html"]:hover,
header .nav-right a[href*="moodlecloud.com"]:hover {
    background-color: #f8a737;
    color: #FFFFFF;
    transform: translateY(-1px);
    text-decoration: none; /* Remove underline on hover */
    border-radius: 50px; /* Keep pill shape */
}

/* Mobile Menu Styles (Hidden by default) */
.menu-toggle {
    display: none; /* Hidden on larger screens */
    background: none;
    border: none;
    color: black;
    font-size: 1.5rem;
    cursor: pointer;
}

/* --- Footer --- */
footer {
    background: #333;
    color: #fff;
    padding: 2rem 0 1rem 0;
    margin-top: 3rem;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.footer-contact {
    text-align: center;
}

.footer-contact h3 {
    color: #f2ebe1;
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.footer-contact p {
    margin: 0.3rem 0;
}

.footer-contact a {
    color: #f2ebe1;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-contact a:hover {
    color: #f2ebe1;
}

.footer-divider {
    width: 100%;
    max-width: 200px;
    border: none;
    border-top: 1px solid #555;
    margin: 0.5rem 0;
}

.footer-social {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
}

.social-icon {
    color: #fff;
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.social-icon:hover {
    color: #f2ebe1;
}

.footer-copyright {
    text-align: center;
    padding-top: 1rem;
    border-top: 1px solid #555;
    font-size: 0.9rem;
    color: #999;
}

/* --- Utility Classes --- */
.btn {
    display: inline-block;
    padding: 12px 24px;
    background-color: var(--primary-color);
    color: var(--secondary-color);
    text-decoration: none;
    border-radius: 4px;
    transition: background-color 0.3s ease;
    font-weight: bold;
    border: none;
    cursor: pointer;
}

.btn:hover {
    background-color: #e67e22; /* Darker button on hover */
    transform: translateY(-2px);
}

.section {
    padding: 2rem 0;
    background-color: #fff;
    margin-bottom: 1rem;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.section-title {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 1.5rem;
    color: #0d304a;
}

/* --- Specific Section Styles --- */

/* Hero Slider (Homepage) */
.hero-slider {
    position: relative;
    background: #f2ebe1;
    overflow: hidden;
    height: 500px;
}

.slider-container {
    position: relative;
    width: 100%;
    height: 100%;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--text-color);
    padding: 80px 0;
    pointer-events: none;
    z-index: 1;
}

.slide.active {
    opacity: 1;
    pointer-events: auto;
    z-index: 2;
}

.slide h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    font-family: 'Roboto', Arial, sans-serif;
}

.slide p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
}

/* Slider Navigation Dots */
.slider-nav {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 10;
}

.slider-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid #fff;
    background: transparent;
    cursor: pointer;
    transition: all 0.3s ease;
}

.slider-dot.active {
    background: #fff;
}

.slider-dot:hover {
    background: rgba(255, 255, 255, 0.7);
}

/* Slider Arrows */
.slider-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.3);
    color: #fff;
    border: none;
    font-size: 24px;
    padding: 15px 10px;
    cursor: pointer;
    transition: background 0.3s ease;
    z-index: 10;
}

.slider-arrow:hover {
    background: rgba(0, 0, 0, 0.6);
}

.slider-arrow.prev {
    left: 20px;
}

.slider-arrow.next {
    right: 20px;
}

/* Hero Section (Legacy - keeping for reference) */
.hero {
    background: #f2ebe1; /* Updated color */
    color: var(--text-color);
    padding: 80px 0;
    text-align: center;
}
.hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
}
.hero p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
}

/* Service Highlights (Homepage) */
.service-highlights {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    text-align: center;
}
.service-item {
    background: #f4f4f4;
    padding: 1.5rem;
    border-radius: 5px;
}
.service-item h3 {
    margin-bottom: 0.5rem;
    color: #0d304a;
}

/* Tutor Profiles */
.tutor-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}
.tutor-card {
    background: #fff;
    padding: 1.5rem;
    border-radius: 5px;
    text-align: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}
.tutor-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px var(--shadow-color);
    border-color: var(--primary-color);
}
.tutor-card img {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 1rem;
    border: 3px solid #0d304a;
}
.tutor-card h3 {
    margin-bottom: 0.5rem;
    color: #0d304a;
}
.tutor-card p.subjects {
    font-style: italic;
    color: #555;
    margin-bottom: 1rem;
}

/* Student Reviews */
.student-review {
    background: #eaf2f8; /* Light blue background */
    border-left: 5px solid #0d304a;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border-radius: 5px;
}
.student-review blockquote {
    font-style: italic;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}
.student-review .author {
    text-align: right;
    font-weight: bold;
    color: #000000 !important; /* Force color to black */
}

/* Contact Form */
.contact-form label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}
.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form textarea {
    width: 100%;
    padding: 10px;
    margin-bottom: 15px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1rem;
}
.contact-form textarea {
    height: 150px;
    resize: vertical;
}
.contact-info {
    margin-bottom: 2rem;
}
.contact-info p {
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}
.map-placeholder {
    height: 300px;
    background: #eee;
    border: 1px solid #ccc;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    margin-top: 1rem;
    text-align: center;
    border-radius: 5px;
}

/* --- Responsive Design --- */
@media (max-width: 768px) {
    header .container {
        flex-direction: column;
        align-items: flex-start;
        padding-left: 25px; /* Keep consistent left alignment */
        padding-right: 25px; /* Keep consistent right alignment */
    }

    header nav {
        margin-top: 10px;
        width: 100%;
        display: none; /* Hidden by default on mobile */
    }

    header nav.active { /* Class toggled by JS */
        display: block;
    }

    header nav ul {
        flex-direction: column;
        align-items: flex-start; /* Align items to the left */
    }

    header nav ul li {
        margin: 10px 0;
        text-align: left; /* Align text to the left */
    }

    /* Mobile styling for right navigation */
    header .nav-right {
        margin-top: 10px;
        margin-left: 0; /* Remove auto margin on mobile */
        width: 100%;
    }

    header .nav-right ul {
        flex-direction: column;
        align-items: flex-start; /* Align items to the left */
        gap: 10px; /* Reduce gap for mobile */
    }

    header .nav-right ul li {
        margin: 0;
        text-align: left; /* Align text to the left */
    }

    .menu-toggle {
        display: block; /* Show hamburger on mobile */
        position: absolute;
        top: 1rem;
        right: 1rem;
        z-index: 110; /* Stay above logo / nav so taps always hit the button */
        min-width: 44px;
        min-height: 44px;
        padding: 0.5rem;
        line-height: 1;
    }

    /* Hero Slider Responsive */
    .hero-slider {
        height: 400px;
    }

    .slide h1 {
        font-size: 2rem;
    }

    .slide p {
        font-size: 1rem;
    }

    .slider-arrow {
        padding: 10px 8px;
        font-size: 18px;
    }

    .slider-arrow.prev {
        left: 10px;
    }

    .slider-arrow.next {
        right: 10px;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .tutor-grid, .service-highlights {
         grid-template-columns: 1fr; /* Stack items on smaller screens */
    }
}

/* Remove: Resources Page Styles and .resources-content class */

:root {
    --primary-color: #f2ebe1;
    --secondary-color: #2c3e50;
    --accent-color: #e74c3c;
    --text-color: #333;
    --light-bg: #f8f9fa;
    --dark-bg: #2c3e50;
    --border-color: #ddd;
    --hover-color: #f2ebe1;
    --shadow-color: rgba(0, 0, 0, 0.1);
}

.service-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px var(--shadow-color);
    border-color: var(--primary-color);
}

.student-review-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px var(--shadow-color);
    border-color: var(--primary-color);
}

.social-icon:hover {
    color: #f2ebe1;
}

.footer-contact a:hover {
    color: #f2ebe1;
}

.service-item i {
    color: #0d304a;
    margin-bottom: 1rem;
}

.tutor-card h3 {
    color: #0d304a;
    margin: 1rem 0;
}

.student-review-card h3 {
    color: #0d304a;
    margin: 1rem 0;
}

.contact-info-item h3 {
    color: #0d304a;
    margin-bottom: 0.5rem;
}

.contact-form input:focus,
.contact-form textarea:focus {
    border: 3px solid #0d304a;
    outline: none;
}

.student-review-card {
    border-left: 5px solid #0d304a;
    padding: 1.5rem;
}

.footer-social a {
    color: #f2ebe1;
    margin: 0 0.5rem;
    font-size: 1.5rem;
}

.footer-contact a {
    color: #f2ebe1;
    text-decoration: none;
}

/* --- Pricing Calculator --- */
.pricing-calculator {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
}

.calculator-options {
    flex: 2;
    min-width: 300px;
}

.calculator-summary {
    flex: 1;
    min-width: 280px;
    position: relative;
}

.summary-box {
    background: #fff;
    border: 1px solid #e1e4e8;
    border-radius: 12px;
    padding: 1.5rem;
    position: sticky;
    top: 2rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.summary-box h3 {
    margin-top: 0;
    color: #0d304a;
    font-size: 1.5rem;
    border-bottom: 1px solid #e1e4e8;
    padding-bottom: 1rem;
    margin-bottom: 1rem;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
    align-items: center;
}

.summary-item span {
    color: #586069;
}

.summary-item strong {
    color: #0d304a;
    font-size: 1.1rem;
}

.summary-divider {
    border: 0;
    border-top: 1px solid #e1e4e8;
    margin: 1.5rem 0;
}

.summary-total {
    text-align: right;
}

.summary-total p {
    margin: 0;
    color: #586069;
}

.summary-total strong {
    font-size: 2.25rem;
    color: #701011;
    display: block;
}

.option-group {
    margin-bottom: 2.5rem;
}

.option-group h2 {
    color: #0d304a;
    margin-bottom: 1rem;
    font-size: 1.4rem;
}

.option-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
}

.option-card {
    background: #fff;
    border: 2px solid #e1e4e8;
    border-radius: 8px;
    padding: 1.5rem 1rem;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    text-align: center;
}

.option-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    border-color: #701011;
}

.option-card.selected {
    border-color: #701011;
    background-color: #fef4f4; /* A very light red tint */
    box-shadow: 0 0 0 3px #701011;
}

.option-card strong {
    display: block;
    font-size: 1.1rem;
    color: #0d304a;
    margin-bottom: 0.25rem;
}

.option-card small {
    color: #586069;
    font-size: 0.9rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .pricing-calculator {
        flex-direction: column;
    }
    .calculator-summary {
        width: 100%;
    }
    .summary-box {
        position: static; /* Un-stick on mobile */
    }
}

.contact-form button {
    background: #701011;
    color: #fff;
    padding: 12px 20px;
}

/* --- Product Subpage Buttons --- */
.product-subpage-buttons {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 2.5rem 0 2.5rem 0;
    gap: 5vw;
}

.subpage-btn {
    flex: 1 1 200px;
    max-width: 320px;
    min-width: 180px;
    padding: 1.2rem 0;
    font-size: 1.3rem;
    font-weight: bold;
    background: #f4eae1;
    color: #701011;
    border: 2px solid #701011;
    border-radius: 20px;
    cursor: pointer;
    transition: background 0.2s, color 0.2s, box-shadow 0.2s;
    box-shadow: 0 2px 8px rgba(112,16,17,0.07);
    font-family: 'Roboto', Arial, sans-serif;
}

.subpage-btn.active, .subpage-btn:hover {
    background: #701011;
    color: #fff;
}

/* --- Product Grid & Cards --- */
.product-section {
    padding: 0 0 3rem 0;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 2rem;
    justify-items: stretch;
    align-items: stretch;
    margin-top: 2rem;
}

.product-card {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 2px 12px rgba(44,44,44,0.08);
    padding: 1.2rem 1rem 1.25rem 1rem;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    max-width: 260px;
    margin-left: auto;
    margin-right: auto;
    height: 100%;
    min-height: 0;
    transition: box-shadow 0.2s, transform 0.2s;
}
.product-card:hover {
    box-shadow: 0 6px 24px rgba(112,16,17,0.13);
    transform: translateY(-4px) scale(1.03);
}

/* Top block: image + title — grows so price + button align across the row */
.product-card .product-clickable-area {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    align-items: center;
    text-align: center;
    cursor: pointer;
}

.product-preview {
    width: 100%;
    max-width: 200px;
    height: 260px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 0.75rem;
    flex-shrink: 0;
    background: #f4eae1;
}
.product-info {
    text-align: center;
    width: 100%;
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}
.product-info h3 {
    font-size: 1.05rem;
    line-height: 1.35;
    margin: 0;
    padding: 0 0.15rem;
    color: #0c3048;
    font-weight: 600;
    /* Same vertical space for every card so FREE / $ / button line up in the grid */
    min-height: 4.2em;
    max-height: 4.2em;
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    line-clamp: 3;
}

/* Price / FREE badges — same footprint and spacing above the button */
.free-label,
.price-label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    align-self: center;
    min-height: 2.35rem;
    min-width: 5.5rem;
    margin: 0.5rem 0 0.65rem 0;
    padding: 0.35rem 0.9rem;
    box-sizing: border-box;
    font-size: 0.95rem;
    font-weight: bold;
    border-radius: 12px;
    letter-spacing: 0.5px;
}

.free-label {
    background: #f8a737;
    color: #fff;
}

.price-label {
    background: #0c3048;
    color: #fff;
    box-shadow: 0 1px 4px rgba(12,48,72,0.10);
}

@media (max-width: 600px) {
    .product-subpage-buttons {
        flex-direction: column;
        gap: 1.2rem;
    }
    .subpage-btn {
        width: 100%;
        min-width: 0;
        max-width: none;
        /* Important: when stacked vertically, `flex: 1 1 200px` turns into
           a big height basis, making the buttons overly tall on iPhone. */
        flex: 0 0 auto;
        /* Make buttons less tall on iPhone; text should be prominent */
        padding: 0.7rem 0;
        font-size: 1.6rem;
        line-height: 1.05;
        border-radius: 16px;
    }
    .product-grid {
        grid-template-columns: 1fr;
        gap: 1.2rem;
    }
}

.filter-divider {
    border: none;
    border-top: 2px solid #e0e0e0;
    margin: 1.2rem 0 2rem 0;
    width: 100%;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.product-section-flex {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 2.5rem;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto 2rem auto;
}
.product-section-flex .product-filter {
    flex: 0 0 220px;
    max-width: 220px;
    min-width: 180px;
}
.product-section-flex .vertical-divider {
    flex: 0 0 2px;
}
.product-section-flex .product-section {
    flex: 1 1 0;
    width: auto;
    min-width: 0;
    padding: 0;
    margin: 0;
}
.product-section-flex .product-grid {
    margin-top: 0;
}
@media (max-width: 900px) {
    .product-section-flex {
        flex-direction: column;
        gap: 1.2rem;
    }
    .vertical-divider {
        display: none;
    }
    .product-section-flex .product-filter,
    .product-section-flex .product-section {
        max-width: 100%;
        width: 100%;
    }
}

.subject-filter-dropdown {
    position: relative;
    width: 100%;
    margin-bottom: 1.5rem;
}
.subject-filter-toggle {
    width: 100%;
    background: #f4eae1;
    color: #701011;
    font-weight: bold;
    font-size: 1.1rem;
    border: 2px solid #701011;
    border-radius: 5px;
    padding: 0.7rem 1.2rem;
    text-align: left;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    display: flex;
    align-items: center;
    gap: 0.7rem;
}
.subject-filter-toggle:after {
    content: '\25BC';
    margin-left: auto;
    font-size: 1rem;
    color: #701011;
    transition: transform 0.2s;
}
.subject-filter-dropdown.open .subject-filter-toggle:after {
    transform: rotate(180deg);
}
.subject-filter-options {
    position: absolute;
    left: 0;
    top: 110%;
    width: 100%;
    background: #fff;
    border: 1.5px solid #e0e0e0;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(44,44,44,0.10);
    z-index: 10;
    padding: 0.7rem 0.5rem;
    margin-top: 0.2rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.subject-filter-options label {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    font-size: 1rem;
    color: #0c3048;
    cursor: pointer;
    padding: 0.2rem 0.5rem;
    border-radius: 6px;
    transition: background 0.15s;
}
.subject-filter-options label:hover {
    background: #f4eae1;
}
.subject-filter-options input[type="checkbox"] {
    accent-color: #701011;
    width: 1.1em;
    height: 1.1em;
    border-radius: 4px;
    margin-right: 0.5em;
}
@media (max-width: 900px) {
    .subject-filter-dropdown {
        width: 100%;
    }
    .subject-filter-options {
        left: 0;
        width: 100%;
    }
}

.year-filter-dropdown {
    position: relative;
    width: 100%;
    margin-bottom: 1.5rem;
}
.year-filter-toggle {
    width: 100%;
    background: #f4eae1;
    color: #701011;
    font-weight: bold;
    font-size: 1.1rem;
    border: 2px solid #701011;
    border-radius: 5px;
    padding: 0.7rem 1.2rem;
    text-align: left;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    display: flex;
    align-items: center;
    gap: 0.7rem;
}
.year-filter-toggle:after {
    content: '\25BC';
    margin-left: auto;
    font-size: 1rem;
    color: #701011;
    transition: transform 0.2s;
}
.year-filter-dropdown.open .year-filter-toggle:after {
    transform: rotate(180deg);
}
.year-filter-options {
    position: absolute;
    left: 0;
    top: 110%;
    width: 100%;
    background: #fff;
    border: 1.5px solid #e0e0e0;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(44,44,44,0.10);
    z-index: 10;
    padding: 0.7rem 0.5rem;
    margin-top: 0.2rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.year-filter-options label {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    font-size: 1rem;
    color: #0c3048;
    cursor: pointer;
    padding: 0.2rem 0.5rem;
    border-radius: 6px;
    transition: background 0.15s;
}
.year-filter-options label:hover {
    background: #f4eae1;
}
.year-filter-options input[type="checkbox"] {
    accent-color: #701011;
    width: 1.1em;
    height: 1.1em;
    border-radius: 4px;
    margin-right: 0.5em;
}
@media (max-width: 900px) {
    .year-filter-dropdown {
        width: 100%;
    }
    .year-filter-options {
        left: 0;
        width: 100%;
    }
}

.subpage-divider {
    border: none;
    border-top: 2px solid #e0e0e0;
    margin: 0 auto 3rem auto;
    width: 100%;
    max-width: 1200px;
}

/* --- Shopping Cart Styles --- */
.cart-icon {
    background: none;
    border: none;
    color: #701011;
    cursor: pointer;
    position: relative;
    padding: 5px;
    border-radius: 50%;
    transition: background-color 0.2s;
}
.cart-icon:hover {
    background-color: rgba(112, 16, 17, 0.1);
}
.cart-count {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #f8a737;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: bold;
}
.cart-sidebar {
    position: fixed;
    top: 0;
    right: -400px;
    width: 400px;
    height: 100vh;
    background: white;
    box-shadow: -2px 0 10px rgba(0,0,0,0.1);
    z-index: 1000;
    transition: right 0.3s ease;
    display: flex;
    flex-direction: column;
}
.cart-sidebar.open {
    right: 0;
}
.cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid #e0e0e0;
    background: #f4eae1;
}
.cart-header h3 {
    margin: 0;
    color: #701011;
}
.cart-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #701011;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s;
}
.cart-close:hover {
    background-color: rgba(112, 16, 17, 0.1);
}
.cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
}
.cart-item {
    display: flex;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid #f0f0f0;
    gap: 1rem;
}
.cart-item img {
    width: 60px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
}
.cart-item-info {
    flex: 1;
}
.cart-item-name {
    font-weight: bold;
    margin-bottom: 0.5rem;
    color: #0c3048;
}
.cart-item-price {
    color: #701011;
    font-weight: bold;
}
.cart-item-remove {
    background: #ff4444 !important;
    border: none !important;
    color: white !important;
    cursor: pointer;
    padding: 8px 12px !important;
    border-radius: 6px !important;
    transition: background-color 0.2s;
    font-size: 0.9rem !important;
    font-weight: bold !important;
    min-width: 70px !important;
    height: 35px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin: 0 !important;
    outline: none !important;
}
.cart-item-remove:hover {
    background: #ff0000 !important;
    transform: scale(1.05);
}
.cart-footer {
    padding: 1.5rem;
    border-top: 1px solid #e0e0e0;
    background: #f9f9f9;
}
.cart-total {
    margin-bottom: 1rem;
    font-size: 1.2rem;
    color: #0c3048;
}
.checkout-btn {
    width: 100%;
    background: #701011;
    color: white;
    border: none;
    padding: 1rem;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.2s;
}
.checkout-btn:hover {
    background: #5a0d0e;
}
.cart-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 999;
    display: none;
}
.cart-overlay.open {
    display: block;
}
.add-to-cart-btn {
    background: #701011;
    color: white;
    border: none;
    padding: 0.75rem 1.25rem;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.2s;
    margin-top: 0;
    width: 100%;
    flex-shrink: 0;
    box-sizing: border-box;
}
.add-to-cart-btn:hover {
    background: #5a0d0e;
}

/* --- "Added to cart" mascot popup (product page) --- */
.cart-added-toast {
    position: fixed;
    left: 50%;
    bottom: 1.5rem;
    z-index: 10050;
    max-width: min(420px, calc(100vw - 2rem));
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transform: translateX(-50%) translateY(110%);
    transition: opacity 0.25s ease, visibility 0.25s ease, transform 0.45s cubic-bezier(0.34, 1.45, 0.64, 1);
}

.cart-added-toast.show {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.cart-added-toast-inner {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.85rem 1.1rem;
    background: #fff;
    border-radius: 18px;
    border: 2px solid #701011;
    box-shadow: 0 10px 40px rgba(12, 48, 72, 0.18);
}

.cart-added-toast-mascot {
    width: 88px;
    height: auto;
    flex-shrink: 0;
    object-fit: contain;
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.12));
}

.cart-added-toast.show .cart-added-toast-mascot {
    animation: cartMascotCelebrate 0.85s ease-out both;
}

.cart-added-toast-text {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: #0c3048;
    line-height: 1.35;
    font-family: 'Roboto', Arial, sans-serif;
}

/* Bounce up + quick wobble — friendly confirmation */
@keyframes cartMascotCelebrate {
    0% {
        transform: translateY(28px) scale(0.35) rotate(-6deg);
        opacity: 0;
    }
    55% {
        transform: translateY(-4px) scale(1.08) rotate(2deg);
        opacity: 1;
    }
    72% {
        transform: translateY(0) scale(1) rotate(-5deg);
    }
    84% {
        transform: translateY(0) scale(1) rotate(4deg);
    }
    100% {
        transform: translateY(0) scale(1) rotate(0deg);
        opacity: 1;
    }
}

.cart-added-toast.cart-added-toast--warn .cart-added-toast-inner {
    border-color: #c48c00;
    background: #fffdf8;
}

@media (max-width: 768px) {
    .cart-sidebar {
        width: 100%;
        /* Keep cart hidden on mobile until JS adds `.open` */
        right: -100%;
    }
    .cart-sidebar.open {
        right: 0;
    }
    .cart-added-toast {
        bottom: 1rem;
        max-width: calc(100vw - 1.25rem);
    }
    .cart-added-toast-mascot {
        width: 72px;
    }
    .cart-added-toast-text {
        font-size: 0.95rem;
    }
}

/* Tutor Quote Styling */
.tutor-quote {
    color: #ca3841 !important;
    font-style: italic;
    font-weight: 600;
    font-size: 0.9rem;
    margin-top: 0.5rem;
    text-align: center;
    padding: 0.5rem;
    background-color: rgba(202, 56, 65, 0.1);
    border-radius: 8px;
    border-left: 3px solid #ca3841;
    position: relative;
}


/* Filter Reset Button Styling */
.filter-reset-btn {
    background-color: #f0f0f0;
    color: #333;
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 4px 8px;
    font-size: 0.8rem;
    cursor: pointer;
    margin-top: 5px;
    transition: all 0.3s ease;
    display: block;
    width: 100%;
    text-align: center;
}

.filter-reset-btn:hover {
    background-color: #e0e0e0;
    border-color: #999;
}

.filter-reset-btn:active {
    background-color: #d0d0d0;
    transform: translateY(1px);
}

/* Filter reset option styling when inside dropdown */
.filter-reset-option {
    border-top: 1px solid #eee;
    padding-top: 8px;
    margin-top: 8px;
}

.filter-reset-option .filter-reset-btn {
    background-color: #ff6b6b;
    color: white;
    border: 1px solid #ff5252;
    font-weight: 500;
    margin-top: 0;
}

.filter-reset-option .filter-reset-btn:hover {
    background-color: #ff5252;
    border-color: #ff1744;
}

.filter-reset-option .filter-reset-btn:active {
    background-color: #ff1744;
    transform: translateY(1px);
}

/* Update filter dropdown positioning to accommodate reset button */
.subject-filter-dropdown,
.year-filter-dropdown {
    position: relative;
    margin-bottom: 10px;
}

.subject-filter-options,
.year-filter-options {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    z-index: 1000;
    max-height: 200px;
    overflow-y: auto;
    margin-top: 2px;
}

/* Product Preview Modal Styles */
.product-preview-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.product-preview-modal.open {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: white;
    border-radius: 12px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    transform: scale(0.7);
    transition: transform 0.3s ease;
}

.product-preview-modal.open .modal-content {
    transform: scale(1);
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 28px;
    font-weight: bold;
    color: #666;
    cursor: pointer;
    z-index: 1;
    transition: color 0.3s ease;
}

.modal-close:hover {
    color: #333;
}

.modal-body {
    padding: 30px;
}

.modal-image {
    text-align: center;
    margin-bottom: 25px;
}

.modal-image img {
    max-width: 100%;
    max-height: 300px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.modal-info h2 {
    color: #333;
    margin-bottom: 20px;
    font-size: 1.8rem;
    text-align: center;
}

.modal-details {
    line-height: 1.6;
}

.modal-details p {
    margin-bottom: 15px;
    color: #555;
}

.modal-details strong {
    color: #333;
    font-weight: 600;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay.open {
    opacity: 1;
    visibility: visible;
}

/* Product Clickable Area Styles */
.product-clickable-area {
    cursor: pointer;
    transition: transform 0.2s ease;
}

.product-clickable-area:hover {
    transform: translateY(-2px);
}

.product-clickable-area img {
    transition: filter 0.2s ease;
}

.product-clickable-area:hover img {
    filter: brightness(1.1);
}

/* Responsive Modal */
@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        max-height: 90vh;
    }
    
    .modal-body {
        padding: 20px;
    }
    
    .modal-info h2 {
        font-size: 1.5rem;
    }
    
    .modal-image img {
        max-height: 200px;
    }
}

/* ATAR Score Styling */
.atar-score {
    background: linear-gradient(135deg, #701011, #8b1a1a);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    text-align: center;
    margin: 8px 0;
    display: inline-block;
    box-shadow: 0 2px 8px rgba(112, 16, 17, 0.3);
    transition: all 0.3s ease;
}

.atar-score:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(112, 16, 17, 0.4);
}

/* Responsive ATAR Score */
@media (max-width: 768px) {
    .atar-score {
        font-size: 0.8rem;
        padding: 3px 10px;
    }
}
