/* input(1331,5): run-time error CSS1019: Unexpected token, found '}' */

/* Helper class added to replace the inline style on the logo anchor.
   Keeps the existing `.logo` typographic styles intact. */
.logo-link,
.logo-link:hover,
.logo-link:focus {
    color: inherit;
    text-decoration: none;
}

/* Visually-hidden utility — content is rendered for screen readers but
   removed from visual flow. Standard pattern from a11y-project.com. Use on
   <label> elements when a placeholder-only design is required. */
.visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

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

body {
    /* System font stack — zero web-font requests means no FOUT/FOIT and no
       font-swap layout shift. Same look, much faster on mobile. */
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
                 "Helvetica Neue", Arial, "Noto Sans", sans-serif,
                 "Apple Color Emoji", "Segoe UI Emoji";
    background: linear-gradient(135deg, #f4f5f7 0%, #f4f5f7 100%);
    color: #1a1a1a;
    line-height: 1.6;
    overflow-x: hidden;
}

/* Modal Message Styles */
#modalError {
    color: #c8102e !important;
    background: #fbe7ea !important;
    border: 1px solid #f5ccd3 !important;
    padding: 10px !important;
    border-radius: 4px !important;
    margin: 10px 0 !important;
    font-size: 14px !important;
    animation: slideDown 0.3s ease-out;
}

#modalSuccess {
    color: #0f5233 !important;
    background: #dcefe5 !important;
    border: 1px solid #dcefe5 !important;
    padding: 10px !important;
    border-radius: 4px !important;
    margin: 10px 0 !important;
    font-size: 14px !important;
    animation: slideDown 0.3s ease-out;
}

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

/* Header */
.header {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    z-index: 1000;
    border-bottom: 1px solid rgba(100, 116, 139, 0.1);
    transition: all 0.3s ease;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    /* Prevent wrapping on desktop */
    white-space: nowrap;
}

.logo {
    font-size: 2rem;
    font-weight: 800;
    background: linear-gradient(135deg, #12315c 0%, #1b4278 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.02em;
    /* Prevent logo from shrinking */
    flex-shrink: 0;
}

/* The <nav> wrapper around .nav-menu needs to be a centered flex container
   itself — otherwise its block-level default lets the inner <ul>'s browser
   margins inflate the <nav>'s height past the cart/greeting/logout column,
   and align-items:center on .nav-container then anchors each child at a
   slightly different visual y. */
.nav-container > nav {
    display: flex;
    align-items: center;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    /* Prevent menu items from wrapping */
    flex-shrink: 0;
    white-space: nowrap;
    /* Kill UA defaults — <ul> ships with margin: 1em 0 + padding-inline-start: 40px.
       Without this reset the menu sits inside a taller box than .nav-buttons, and
       align-items:center on .nav-container puts the link text on a higher baseline
       than the cart icon + greeting + logout button to its right. */
    margin: 0;
    padding: 0;
    align-items: center;
}

    .nav-menu a {
        color: #565b64;
        text-decoration: none;
        font-weight: 500;
        transition: all 0.3s ease;
        position: relative;
        padding: 0.5rem 0;
    }

        .nav-menu a:hover {
            color: #12315c;
            transform: translateY(-2px);
        }

        .nav-menu a::after {
            content: '';
            position: absolute;
            bottom: 0;
            left: 0;
            width: 0;
            height: 2px;
            background: linear-gradient(135deg, #12315c, #1b4278);
            transition: width 0.3s ease;
        }

        .nav-menu a:hover::after {
            width: 100%;
        }

.nav-buttons {
    display: flex;
    gap: 1rem;
    align-items: center;
    /* Prevent buttons from wrapping */
    flex-shrink: 0;
    white-space: nowrap;
}

/* All direct children of .nav-buttons need a predictable vertical anchor or they
   end up sitting at slightly different y-positions (text baseline vs button center
   vs icon baseline). Force inline-flex + center on the cart link and the logout
   form so the whole row reads as one visually aligned cluster.
   line-height MUST match .nav-menu a (1.5) — using 1 here makes the FontAwesome
   icon glyph sit higher than the surrounding text baseline because the icon's
   <i> renders inside a smaller line-box. */
.nav-buttons .cart-icon-link,
.nav-buttons form {
    display: inline-flex;
    align-items: center;
    line-height: 1.5;
}

/* Base cart-icon-link rule — match the menu-link vertical padding so the icon
   sits inside a box the same height as the surrounding .nav-menu a items.
   Without this, .nav-menu a has padding: 0.5rem 0 and the cart link has 0,
   so flex centering still works mathematically but the icon visually appears
   to "float" above the greeting + button row at desktop width. */
.cart-icon-link {
    padding: 0.5rem 0;
    color: #565b64;
    font-size: 1.15rem;
    text-decoration: none;
    position: relative;
}
.cart-icon-link:hover { color: #0B2244; }

/* Scoped: shrink the Logout button's vertical padding only inside the nav row.
   The site-wide .btn-primary uses padding: 1rem 2rem which makes .nav-buttons
   taller than <nav> (the menu links), so flex centering anchors the greeting
   to a lower y-baseline than the menu links. By making the button match the
   menu-link box height (padding: 0.5rem 1.25rem), both flex children of
   .nav-container become the same height, and align-items: center lines up
   greeting text and link text on the exact same row. The site-wide .btn-primary
   keeps its larger padding everywhere else. */
.nav-buttons .btn-primary {
    padding: 0.5rem 1.25rem;
    line-height: 1.5;
    box-shadow: none;
}
.nav-buttons .btn-primary:hover {
    transform: none;
    box-shadow: 0 4px 12px rgba(18, 49, 92, 0.35);
}

.btn-login {
    background: transparent;
    border: 2px solid #dcdee3;
    padding: 0.75rem 1.5rem;
    color: #565b64;
    font-weight: 600;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

    .btn-login:hover {
        border-color: #12315c;
        color: #12315c;
        transform: translateY(-2px);
    }

.btn-cta {
    background: linear-gradient(135deg, #12315c 0%, #1b4278 100%);
    border: none;
    padding: 0.75rem 1.5rem;
    color: white;
    font-weight: 600;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(18, 49, 92, 0.4);
}

    .btn-cta:hover {
        transform: translateY(-3px);
        box-shadow: 0 8px 25px rgba(18, 49, 92, 0.5);
    }

/* Hero Section */
.hero {
    padding: 120px 0 80px;
    position: relative;
    overflow: hidden;
    /* Reserve height so the page doesn't grow when fonts/images settle.
       contain: layout style isolates this section from upstream reflows. */
    min-height: 720px;
    contain: layout style;
}

    .hero::before {
        content: '';
        position: absolute;
        top: -50%;
        right: -20%;
        width: 100%;
        height: 200%;
        background: linear-gradient(45deg, rgba(18, 49, 92, 0.05), rgba(27, 66, 120, 0.05));
        border-radius: 50%;
        animation: float 20s linear infinite;
        /* Promote to its own compositor layer; otherwise the rotating element
           triggers layout work on every paint (one of the 13 non-composited
           animations Lighthouse flagged). */
        will-change: transform;
        transform: translateZ(0);
        pointer-events: none;
    }

    /* Respect users who prefer reduced motion: pause the float entirely. */
    @media (prefers-reduced-motion: reduce) {
        .hero::before { animation: none; }
        .floating-card { animation: none !important; }
        .hero-badge { animation: none !important; }
    }

@keyframes float {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.hero-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 4rem;
    /* Reserve vertical space matching the visual column so the grid doesn't
       grow when the floating cards and h1 lay out. Was the #1 CLS culprit. */
    min-height: 520px;
}

.hero-content {
    z-index: 2;
    position: relative;
}

.hero-badge {
    background: linear-gradient(135deg, #b26a00, #b26a00);
    color: white;
    padding: 0.5rem 1.5rem;
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 600;
    display: inline-block;
    margin-bottom: 2rem;
    animation: bounce 2s infinite;
    /* Composite the badge so its 'bounce' keyframes don't repaint the parent. */
    will-change: transform;
    transform: translateZ(0);
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }

    40% {
        transform: translateY(-10px);
    }

    60% {
        transform: translateY(-5px);
    }
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    color: #1a1a1a;
    letter-spacing: -0.02em;
}

.hero .gradient-text {
    background: linear-gradient(135deg, #12315c 0%, #1b4278 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero p {
    font-size: 1.125rem;
    color: #565b64;
    margin-bottom: 2.5rem;
    line-height: 1.7;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn-primary {
    background: linear-gradient(135deg, #12315c 0%, #1b4278 100%);
    border: none;
    padding: 1rem 2rem;
    color: white;
    font-weight: 600;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(18, 49, 92, 0.4);
    text-decoration: none;
    display: inline-block;
}

.btn-secondary {
    background: white;
    border: 2px solid #dcdee3;
    padding: 1rem 2rem;
    color: #565b64;
    font-weight: 600;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(18, 49, 92, 0.5);
}

.btn-secondary:hover {
    background: #f4f5f7;
    border-color: #12315c;
    color: #12315c;
    transform: translateY(-3px);
}

.hero-visual {
    position: relative;
    z-index: 2;
}

.floating-cards {
    position: relative;
    height: 500px;
}

.floating-card {
    position: absolute;
    background: white;
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(100, 116, 139, 0.1);
    /* Limit transitions to compositor-friendly properties. transition: all
       previously animated layout-affecting properties — flagged by Lighthouse. */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    /* will-change hints the browser to promote each card to its own
       compositor layer up-front, avoiding mid-animation reflows. */
    will-change: transform;
    width: 200px;
    text-align: center;
    /* Force GPU layer creation on iOS too. */
    transform: translateZ(0);
}

    .floating-card:hover {
        transform: translate3d(0, -10px, 0);
        box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    }

    .floating-card:nth-child(1) {
        top: 50px;
        left: 0;
        animation: floatUp 6s ease-in-out infinite;
    }

    .floating-card:nth-child(2) {
        top: 200px;
        right: 50px;
        animation: floatUp 6s ease-in-out infinite 2s;
    }

    .floating-card:nth-child(3) {
        bottom: 100px;
        left: 100px;
        animation: floatUp 6s ease-in-out infinite 4s;
    }

@keyframes floatUp {
    0%, 100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-20px);
    }
}

.card-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 1rem;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.card-title {
    font-weight: 600;
    color: #1a1a1a;
    font-size: 0.9rem;
}

/* Categories Section */
.categories {
    padding: 80px 0;
    background: white;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-badge {
    background: linear-gradient(135deg, #157347, #157347);
    color: white;
    padding: 0.5rem 1.5rem;
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 600;
    display: inline-block;
    margin-bottom: 1rem;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: #1a1a1a;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}

.section-subtitle {
    font-size: 1.125rem;
    color: #565b64;
    max-width: 600px;
    margin: 0 auto;
}

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

.category-card {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    border: 1px solid rgba(100, 116, 139, 0.1);
    transition: all 0.4s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

    .category-card::before {
        content: '';
        position: absolute;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100%;
        background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
        transition: left 0.6s ease;
    }

    .category-card:hover::before {
        left: 100%;
    }

    .category-card:hover {
        transform: translateY(-8px);
        box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
        border-color: var(--accent-color);
    }

.category-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.category-icon {
    width: 60px;
    height: 60px;
    border-radius: 15px;
    background: var(--accent-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
}

.category-name {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1a1a1a;
}

.category-description {
    color: #565b64;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.category-features {
    list-style: none;
    margin-bottom: 2rem;
}

    .category-features li {
        padding: 0.5rem 0;
        color: #565b64;
        display: flex;
        align-items: center;
        gap: 0.75rem;
    }

        .category-features li::before {
            content: '✓';
            color: white;
            background: var(--accent-gradient);
            border-radius: 50%;
            width: 20px;
            height: 20px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 0.75rem;
            font-weight: bold;
        }

.category-btn {
    width: 100%;
    background: var(--accent-gradient);
    border: none;
    color: white;
    padding: 0.875rem 1.5rem;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

    .category-btn:hover {
        transform: translateY(-2px);
        box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    }

/* Category Colors
   NOTE: --accent-gradient is scoped to each category class, not :root. A card
   without its own block leaves .category-btn with an unresolved var(), which
   makes the background invalid — the button renders transparent with white
   text and disappears into the card. Every category-card variant needs an
   entry here. */
.school-category {
    --accent-color: #12315c;
    --accent-gradient: linear-gradient(135deg, #12315c, #0b2244);
}

/* School supplies — the red side of the catalog, matching the supply line
   badges used across the storefront. */
.supplies-category {
    --accent-color: #c8102e;
    --accent-gradient: linear-gradient(135deg, #c8102e, #a30d26);
}

.security-category {
    --accent-color: #1f4a86;
    --accent-gradient: linear-gradient(135deg, #1f4a86, #12315c);
}

.corporate-category {
    --accent-color: #1f4a86;
    --accent-gradient: linear-gradient(135deg, #1f4a86, #1f4a86);
}

.sports-category {
    --accent-color: #157347;
    --accent-gradient: linear-gradient(135deg, #157347, #157347);
}

.medical-category {
    --accent-color: #c8102e;
    --accent-gradient: linear-gradient(135deg, #c8102e, #c8102e);
}

.hospitality-category {
    --accent-color: #b26a00;
    --accent-gradient: linear-gradient(135deg, #b26a00, #8c5300);
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    z-index: 2000;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    border-radius: 20px;
    padding: 2rem;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        transform: translate(-50%, -60%);
        opacity: 0;
    }

    to {
        transform: translate(-50%, -50%);
        opacity: 1;
    }
}

.close-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #565b64;
    transition: color 0.3s ease;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .close-btn:hover {
        color: #1a1a1a;
        background: #f4f5f7;
    }

/* School Modal */
.modal-header {
    text-align: center;
    margin-bottom: 2rem;
}

.modal-title {
    font-size: 1.875rem;
    font-weight: 800;
    color: #1a1a1a;
    margin-bottom: 0.5rem;
}

.modal-subtitle {
    color: #565b64;
}

.search-container {
    position: relative;
    margin-bottom: 2rem;
}

.search-input {
    width: 100%;
    padding: 1rem 1.5rem;
    border: 2px solid #dcdee3;
    border-radius: 50px;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.3s ease;
}

    .search-input:focus {
        border-color: #b26a00;
    }

.schools-list {
    display: grid;
    gap: 1rem;
    max-height: 400px;
    overflow-y: auto;
}

.school-option {
    background: #f4f5f7;
    border: 1px solid #dcdee3;
    border-radius: 15px;
    padding: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 1rem;
}

    .school-option:hover {
        background: white;
        border-color: #b26a00;
        transform: translateX(4px);
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    }

.school-avatar {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #b26a00, #8c5300);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 1.125rem;
    overflow: hidden;
    position: relative;
}

.school-avatar .school-logo-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
}

.school-details h3 {
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 0.25rem;
}

.school-details p {
    color: #565b64;
    font-size: 0.875rem;
}

/* Login Modal */
.login-content {
    max-width: 450px;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    position: relative;
}

.form-input {
    width: 100%;
    padding: 1rem 1.5rem;
    border: 2px solid #dcdee3;
    border-radius: 50px;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.3s ease;
    color: #1a1a1a;
    background-color: white;
}

    .form-input:focus {
        border-color: #12315c;
        color: #1a1a1a;
        background-color: white;
    }

/* Fix for autofill and input text color */
.login-form .form-input,
.login-form input[type="email"],
.login-form input[type="password"] {
    color: #1a1a1a !important;
    background-color: white !important;
    -webkit-text-fill-color: #1a1a1a !important;
}

.login-form .form-input::placeholder {
    color: #8b909a;
    opacity: 1;
}

/* Chrome autofill override */
.login-form input:-webkit-autofill,
.login-form input:-webkit-autofill:hover,
.login-form input:-webkit-autofill:focus,
.login-form input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 30px white inset !important;
    -webkit-text-fill-color: #1a1a1a !important;
    box-shadow: 0 0 0 30px white inset !important;
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 1rem 0;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #565b64;
    font-size: 0.875rem;
}

.checkbox {
    accent-color: #12315c;
}

.forgot-password {
    color: #12315c;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: color 0.3s ease;
}

    .forgot-password:hover {
        color: #0b2244;
    }

.login-btn {
    background: linear-gradient(135deg, #12315c 0%, #1b4278 100%);
    border: none;
    padding: 1rem;
    color: white;
    font-weight: 600;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 1rem;
}

    .login-btn:hover {
        transform: translateY(-2px);
        box-shadow: 0 8px 25px rgba(18, 49, 92, 0.4);
    }

.signup-link {
    text-align: center;
    margin-top: 2rem;
    color: #565b64;
}

    .signup-link a {
        color: #12315c;
        text-decoration: none;
        font-weight: 600;
    }

/* Stats Section */
.stats {
    padding: 80px 0;
    background: linear-gradient(135deg, #12315c 0%, #1b4278 100%);
    color: white;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    text-align: center;
}

.stat-item {
    padding: 1rem;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 900;
    margin-bottom: 0.5rem;
}

.stat-label {
    opacity: 0.9;
    font-weight: 500;
}

/* Footer */
.footer {
    background: #1a1a1a;
    color: white;
    padding: 4rem 0 2rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    font-weight: 700;
    margin-bottom: 1rem;
    color: #12315c;
}

.footer-section a {
    color: #b9bdc6;
    text-decoration: none;
    display: block;
    margin-bottom: 0.5rem;
    transition: color 0.3s ease;
}

    .footer-section a:hover {
        color: #12315c;
    }

.footer-bottom {
    border-top: 1px solid #565b64;
    padding-top: 2rem;
    text-align: center;
    color: #8b909a;
}

/* Responsive */
@media (max-width: 768px) {
    .nav-menu {
        display: none;
    }

    .nav-container {
        padding: 0 1rem;
    }

    .logo {
        font-size: 1.25rem;
    }

    .nav-buttons {
        gap: 0.75rem;
    }

    .btn-login, .btn-primary {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }

    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
        padding: 2rem 1rem;
        /* Reserve mobile hero height too — content + 300px floating-cards column. */
        min-height: 760px;
    }

    .hero-content h1 {
        font-size: 2rem;
    }

    .hero-content p {
        font-size: 1rem;
    }

    .hero-buttons {
        flex-direction: column;
        gap: 1rem;
    }

    .btn-primary, .btn-secondary {
        width: 100%;
        padding: 1rem;
    }

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

    .hero-buttons {
        justify-content: center;
    }

    .floating-cards {
        height: 300px;
    }

    .floating-card {
        width: 150px;
        padding: 1rem;
    }

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

    .categories-grid {
        grid-template-columns: 1fr;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Login Message Styles */
    .login-message {
        display: flex;
        align-items: center;
        gap: 0.75rem;
        padding: 1rem;
        border-radius: 0.75rem;
        margin-bottom: 1.5rem;
        font-weight: 500;
        animation: slideDown 0.3s ease;
    }

    @keyframes slideDown {
        from {
            opacity: 0;
            transform: translateY(-10px);
        }

        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    .login-success {
        background: linear-gradient(135deg, #dcefe5 0%, #dcefe5 100%);
        color: #0f5233;
        border: 1px solid #3d9169;
    }

    .login-error {
        background: linear-gradient(135deg, #fbe7ea 0%, #f5ccd3 100%);
        color: #a30d26;
        border: 1px solid #d94257;
    }

    .message-icon {
        font-size: 1.25rem;
        flex-shrink: 0;
    }

    .message-text {
        flex: 1;
        line-height: 1.4;
    }

    /* Enhanced form input focus states */
    .form-input:focus {
        border-color: #12315c;
        box-shadow: 0 0 0 3px rgba(18, 49, 92, 0.1);
        transform: translateY(-1px);
    }

    .form-input.error {
        border-color: #c8102e;
        box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
    }

    /* Login button disabled state */
    .login-btn:disabled {
        opacity: 0.7;
        cursor: not-allowed;
        transform: none !important;
        box-shadow: none !important;
    }

    /* Enhanced modal animations */
    .modal-content {
        animation: modalSlideIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    }

    @keyframes modalSlideIn {
        from {
            transform: translate(-50%, -60%);
            opacity: 0;
            scale: 0.9;
        }

        to {
            transform: translate(-50%, -50%);
            opacity: 1;
            scale: 1;
        }
    }

    /* Loading indicator for login button */
    .login-btn.loading {
        position: relative;
        color: transparent;
    }

        .login-btn.loading::after {
            content: '';
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            width: 20px;
            height: 20px;
            border: 2px solid transparent;
            border-top: 2px solid currentColor;
            border-radius: 50%;
            animation: buttonSpin 1s linear infinite;
            color: white;
        }

    @keyframes buttonSpin {
        from {
            transform: translate(-50%, -50%) rotate(0deg);
        }

        to {
            transform: translate(-50%, -50%) rotate(360deg);
        }
    }

    /* Form validation styles */
    .form-group.has-error .form-input {
        border-color: #c8102e;
        box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
    }

    .form-group.has-success .form-input {
        border-color: #157347;
        box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
    }

    /* Responsive adjustments for mobile */
    @media (max-width: 768px) {
        .modal-content {
            width: 95%;
            margin: 0.5rem;
            max-height: 95vh;
            padding: 1.5rem;
            border-radius: 15px;
            top: 50%;
            transform: translate(-50%, -50%);
        }

        .login-content {
            max-width: none;
            width: 95%;
        }

        .modal-header {
            margin-bottom: 1.5rem;
        }

        .modal-title {
            font-size: 1.5rem;
        }

        .modal-subtitle {
            font-size: 0.9rem;
        }

        .login-message {
            padding: 0.75rem;
            font-size: 0.9rem;
        }

        .form-input {
            padding: 0.875rem;
            font-size: 1rem;
        }

        .close-btn {
            top: 1rem;
            right: 1rem;
            width: 35px;
            height: 35px;
            font-size: 1.2rem;
        }

        .schools-list {
            max-height: 40vh;
        }

        .school-item {
            padding: 1rem;
        }

        .search-input {
            padding: 0.875rem;
            font-size: 1rem;
        }
    }

        .message-icon {
            font-size: 1.1rem;
        }

        .form-input {
            padding: 0.875rem 1.25rem;
        }

        .login-btn {
            padding: 0.875rem;
            font-size: 0.95rem;
        }
    }

    /* Login Message Styles */
    .login-message {
        display: flex;
        align-items: center;
        gap: 0.75rem;
        padding: 1rem;
        border-radius: 0.75rem;
        margin-bottom: 1.5rem;
        font-weight: 500;
        animation: slideDown 0.3s ease;
    }

    @keyframes slideDown {
        from {
            opacity: 0;
            transform: translateY(-10px);
        }

        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    .login-success {
        background: linear-gradient(135deg, #dcefe5 0%, #dcefe5 100%);
        color: #0f5233;
        border: 1px solid #3d9169;
    }

    .login-error {
        background: linear-gradient(135deg, #fbe7ea 0%, #f5ccd3 100%);
        color: #a30d26;
        border: 1px solid #d94257;
    }

    .message-icon {
        font-size: 1.25rem;
        flex-shrink: 0;
    }

    .message-text {
        flex: 1;
        line-height: 1.4;
    }

    /* Enhanced form input focus states */
    .form-input:focus {
        border-color: #12315c;
        box-shadow: 0 0 0 3px rgba(18, 49, 92, 0.1);
        transform: translateY(-1px);
    }

    .form-input.error {
        border-color: #c8102e;
        box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
    }

    /* Login button disabled state */
    .login-btn:disabled {
        opacity: 0.7;
        cursor: not-allowed;
        transform: none !important;
        box-shadow: none !important;
    }

    /* Enhanced modal animations */
    .modal-content {
        animation: modalSlideIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    }

    @keyframes modalSlideIn {
        from {
            transform: translate(-50%, -60%);
            opacity: 0;
            scale: 0.9;
        }

        to {
            transform: translate(-50%, -50%);
            opacity: 1;
            scale: 1;
        }
    }

    /* Loading indicator for login button */
    .login-btn.loading {
        position: relative;
        color: transparent;
    }

        .login-btn.loading::after {
            content: '';
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            width: 20px;
            height: 20px;
            border: 2px solid transparent;
            border-top: 2px solid currentColor;
            border-radius: 50%;
            animation: buttonSpin 1s linear infinite;
            color: white;
        }

    @keyframes buttonSpin {
        from {
            transform: translate(-50%, -50%) rotate(0deg);
        }

        to {
            transform: translate(-50%, -50%) rotate(360deg);
        }
    }

    /* Form validation styles */
    .form-group.has-error .form-input {
        border-color: #c8102e;
        box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
    }

    .form-group.has-success .form-input {
        border-color: #157347;
        box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
    }

    /* Matches the nav-menu links' typography so the greeting sits on the same
       row visually. The actual height-matching with the rest of the row is done
       on the Logout button (see .nav-buttons .btn-primary below) — that's the
       single point of control. */
    .user-greeting {
        color: #565b64;
        font-weight: 500;
        margin-right: 1rem;
        padding: 0.5rem 0;
        line-height: 1.5;
        display: inline-flex;
        align-items: center;
    }

    .btn-logout {
        background: transparent;
        border: 2px solid #c8102e;
        padding: 0.75rem 1.5rem;
        color: #c8102e;
        font-weight: 600;
        border-radius: 50px;
        cursor: pointer;
        transition: all 0.3s ease;
        text-decoration: none;
        font-family: inherit;
    }

        .btn-logout:hover {
            background: #c8102e;
            color: white;
            transform: translateY(-2px);
        }

    .user-dropdown {
        display: none;
        position: absolute;
        right: 0;
        top: calc(100% + 0.5rem);
        background: white;
        border-radius: 0.75rem;
        box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
        border: 1px solid #dcdee3;
        min-width: 220px;
        z-index: 9999;
        overflow: hidden;
        opacity: 0;
        transform: translateY(-10px);
        transition: all 0.2s ease-out;
    }
    
    /* When dropdown is shown */
    .user-dropdown.show,
    .user-dropdown[style*="block"] {
        display: block !important;
        opacity: 1 !important;
        transform: translateY(0) !important;
        visibility: visible !important;
    }

    @keyframes dropdownSlide {
        from {
            opacity: 0;
            transform: translateY(-10px);
        }

        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    .dropdown-item {
        display: block;
        padding: 0.875rem 1.25rem;
        color: #565b64;
        text-decoration: none;
        border: none;
        background: transparent;
        width: 100%;
        text-align: left;
        cursor: pointer;
        font-size: 0.95rem;
        transition: all 0.2s ease;
        font-family: inherit;
        border-bottom: 1px solid #f4f5f7;
    }
    
        .dropdown-item:last-child {
            border-bottom: none;
        }

        .dropdown-item:hover {
            background: #f4f5f7;
            color: #12315c;
            padding-left: 1.5rem;
        }

    .logout-btn {
        border-top: 1px solid #dcdee3 !important;
        color: #c8102e !important;
        margin-top: 0.25rem;
    }

        .logout-btn:hover {
            background: #fdf3f5 !important;
            color: #c8102e !important;
            padding-left: 1.5rem !important;
        }
        
    /* Fix form inside dropdown */
    .user-dropdown form {
        margin: 0;
        padding: 0;
        width: 100%;
        display: block;
    }
    
    .user-dropdown form button {
        width: 100%;
        text-align: left;
        font-size: 0.95rem;
    }

    /* Notification styles */
    .notification {
        position: fixed;
        top: 1rem;
        right: 1rem;
        background: white;
        border-radius: 0.75rem;
        padding: 1rem 1.5rem;
        box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
        border: 1px solid #dcdee3;
        z-index: 9999;
        max-width: 350px;
        animation: notificationSlide 0.3s ease-out;
    }

    @keyframes notificationSlide {
        from {
            opacity: 0;
            transform: translateX(100%);
        }

        to {
            opacity: 1;
            transform: translateX(0);
        }
    }

    .notification.success {
        border-left: 4px solid #157347;
    }

    .notification.error {
        border-left: 4px solid #c8102e;
    }

    .notification.warning {
        border-left: 4px solid #b26a00;
    }

    .notification.info {
        border-left: 4px solid #1f4a86;
    }

    /* Loading spinner */
    .loading-spinner {
        width: 40px;
        height: 40px;
        border: 4px solid #f4f5f7;
        border-left: 4px solid #1f4a86;
        border-radius: 50%;
        animation: spin 1s linear infinite;
        margin: 0 auto;
    }

    @keyframes spin {
        0% {
            transform: rotate(0deg);
        }

        100% {
            transform: rotate(360deg);
        }
    }

    /* Desktop styles to ensure navigation stays on one line */
    @media (min-width: 1200px) {
        .nav-container {
            padding: 1rem 2rem;
        }
        
        .nav-menu {
            gap: 1.5rem;
        }
        
        .nav-menu a {
            font-size: 0.95rem;
        }
    }
    
    @media (min-width: 992px) and (max-width: 1199px) {
        .nav-container {
            padding: 1rem 1.5rem;
        }
        
        .nav-menu {
            gap: 1.25rem;
        }
        
        .nav-menu a {
            font-size: 0.9rem;
        }
        
        .logo {
            font-size: 1.75rem;
        }
        
        .btn-login, .btn-primary {
            padding: 0.6rem 1.25rem;
            font-size: 0.875rem;
        }
        
        .user-greeting {
            font-size: 0.875rem;
            margin-right: 0.75rem;
        }
    }
    
    @media (min-width: 769px) and (max-width: 991px) {
        .nav-container {
            padding: 1rem;
            max-width: 100%;
        }
        
        .nav-menu {
            gap: 1rem;
        }
        
        .nav-menu a {
            font-size: 0.875rem;
        }
        
        .logo {
            font-size: 1.5rem;
        }
        
        .nav-buttons {
            gap: 0.75rem;
        }
        
        .btn-login, .btn-primary {
            padding: 0.5rem 1rem;
            font-size: 0.8rem;
        }
        
        .user-greeting {
            font-size: 0.8rem;
            margin-right: 0.5rem;
        }
        
        .cart-icon-link {
            font-size: 1.1rem;
            margin-right: 0.75rem;
        }
    }

    /* Responsive adjustments for mobile */
    @media (max-width: 768px) {
        .nav-menu {
            display: none;
        }

        .user-menu {
            position: static;
        }

        .user-dropdown {
            position: fixed;
            top: 60px;
            right: 1rem;
            left: 1rem;
            width: auto;
            min-width: auto;
        }

        .login-message {
            padding: 0.75rem;
            font-size: 0.9rem;
        }

        .message-icon {
            font-size: 1.1rem;
        }

        .form-input {
            padding: 0.875rem 1.25rem;
        }

        .login-btn {
            padding: 0.875rem;
            font-size: 0.95rem;
        }

        .user-greeting {
            font-size: 0.9rem;
            margin-right: 0.5rem;
        }

        .dropdown-item {
            padding: 1rem;
            font-size: 1rem;
        }

        .notification {
            top: auto;
            bottom: 1rem;
            left: 1rem;
            right: 1rem;
            max-width: none;
        }
    }

    /* Focus styles for accessibility */
    .btn-login:focus,
    .btn-cta:focus,
    .btn-primary:focus,
    .btn-secondary:focus,
    .form-input:focus,
    .dropdown-item:focus {
        outline: 2px solid #12315c;
        outline-offset: 2px;
    }

    /* High contrast mode support */
    @media (prefers-contrast: high) {
        .login-success {
            background: #dcefe5;
            color: #0f5233;
            border: 2px solid #157347;
        }

        .login-error {
            background: #fdf3f5;
            color: #7d0a1d;
            border: 2px solid #c8102e;
        }

        .user-dropdown {
            border: 2px solid #565b64;
        }

        .dropdown-item:hover {
            background: #dcdee3;
            color: #1a1a1a;
        }
    }

    /* Reduced motion support */
    @media (prefers-reduced-motion: reduce) {
        .login-message,
        .modal-content,
        .user-dropdown,
        .notification {
            animation: none;
        }

        .btn-primary:hover,
        .btn-secondary:hover,
        .btn-login:hover,
        .btn-cta:hover {
            transform: none;
        }

        .form-input:focus {
            transform: none;
        }
    }

    /* Featured Bundles Carousel - Now uses school-bundles.css */
    /* School Logo Styling for Featured Bundles */
    .featured-bundles .bundle-title-section {
        display: flex;
        align-items: center;
        gap: 0.75rem;
        margin-bottom: 0.75rem;
    }

    .featured-bundles .bundle-title-section .bundle-name {
        margin: 0;
        flex: 1;
    }

    .featured-bundles .bundle-title-section .school-logo {
        width: 14px !important;
        height: 14px !important;
        border-radius: 50%;
        object-fit: cover;
        flex-shrink: 0;
        box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
        border: 1px solid rgba(0, 0, 0, 0.05);
        max-width: 14px !important;
        max-height: 14px !important;
    }

    /* Touch and Mobile Optimizations */
    @media (max-width: 768px) {
        /* Touch target sizes */
        .btn-primary, .btn-secondary, .btn-login, .view-bundle-btn {
            min-height: 44px;
            min-width: 44px;
        }

        /* Bundle card touch improvements */
        .bundle-card {
            cursor: pointer;
            -webkit-tap-highlight-color: rgba(0, 0, 0, 0.1);
        }

        .bundle-card:active {
            transform: scale(0.98);
        }

        /* Featured bundles carousel mobile styles */
        .bundles-carousel-container {
            margin: 0 -1rem;
        }

        .bundles-track {
            gap: 1rem;
            padding: 0 1rem;
        }

        .carousel-btn {
            width: 40px;
            height: 40px;
            font-size: 1rem;
        }

        .carousel-btn-prev {
            left: 0.5rem;
        }

        .carousel-btn-next {
            right: 0.5rem;
        }

        /* School logo responsive */
        .featured-bundles .bundle-title-section .school-logo {
            width: 12px !important;
            height: 12px !important;
            max-width: 12px !important;
            max-height: 12px !important;
        }

        .featured-bundles .bundle-title-section {
            gap: 0.5rem;
        }

        /* Categories section mobile */
        .categories-grid {
            grid-template-columns: 1fr;
            gap: 1.5rem;
            padding: 0 1rem;
        }

        .category-card {
            padding: 2rem 1.5rem;
        }

        /* Stats section mobile */
        .stats-grid {
            grid-template-columns: repeat(2, 1fr);
            gap: 1rem;
        }

        .stat-card {
            padding: 1.5rem 1rem;
        }

        .stat-number {
            font-size: 1.5rem;
        }

        /* Footer mobile */
        .footer-content {
            grid-template-columns: 1fr;
            gap: 2rem;
            text-align: center;
        }

        .footer-section {
            padding: 1rem 0;
        }
    }

    /* Extra small screens */
    @media (max-width: 480px) {
        .container {
            padding: 0 0.75rem;
        }

        .hero-content h1 {
            font-size: 1.75rem;
        }

        .modal-content {
            width: 98%;
            margin: 0.25rem;
            padding: 1.25rem;
        }

        .form-input {
            font-size: 16px; /* Prevents zoom on iOS */
        }

        .search-input {
            font-size: 16px; /* Prevents zoom on iOS */
        }
    }

    /* Print styles */
    @media print {
        .header,
        .footer,
        .modal,
        .user-dropdown,
        .notification {
            display: none !important;
        }

        .login-message {
            border: 1px solid #000 !important;
            background: white !important;
            color: black !important;
        }
    }

