/* ============================================================
   ZARQUIN COLLEGE LIFESTYLE - Core Stylesheet
   Premium, Modern, Collegiate Navy, Charcoal & Gold Theme
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Lato:ital,wght@0,300;0,400;0,700;0,900;1,400&family=Playfair+Display:ital,wght@0,400;0,500;0,600;0,700;1,400&display=swap');

:root {
    /* Zarquin Core Palette */
    --black: #111111;
    --white: #ffffff;
    --grey: #757575;
    --light-grey: #e2e8f0;
    --lighter-grey: #f1f5f9;
    --off-white: #f8fafc;
    
    /* College Lifestyle Theme Tokens */
    --cl-primary: #0f172a;        /* Deep Slate Navy / Zarquin Black */
    --cl-primary-light: #1e293b;  /* Slate Charcoal */
    --cl-primary-hover: #020617;
    --cl-accent: #c9a96e;         /* Premium Zarquin Gold */
    --cl-accent-light: #dfc28d;
    --cl-accent-dark: #a68b4b;
    --cl-surface: #ffffff;
    --cl-bg: #f8f7f5;             /* Zarquin Signature Off-White */
    --cl-text: #0f172a;
    --cl-text-light: #64748b;
    --cl-border: #e2e8f0;
    
    --success: #10b981;
    --success-bg: #ecfdf5;
    --error: #ef4444;
    --error-bg: #fef2f2;
    --warning: #f59e0b;

    --font-sans: 'Lato', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-serif: 'Playfair Display', Georgia, serif;
    
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 16px;
    --radius-full: 9999px;
    
    --shadow-sm: 0 2px 8px rgba(15, 23, 42, 0.04);
    --shadow-md: 0 6px 20px rgba(15, 23, 42, 0.08);
    --shadow-lg: 0 16px 36px rgba(15, 23, 42, 0.12);
    --shadow-xl: 0 24px 48px rgba(15, 23, 42, 0.16);
    
    --transition-fast: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* --- CSS Reset & Global Rules --- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-sans);
    color: var(--cl-text);
    background: var(--cl-bg);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1 0 auto;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-fast);
}

ul, ol {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

button, input, select, textarea {
    font-family: inherit;
    font-size: inherit;
}

/* --- Typography --- */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-serif);
    font-weight: 500;
    line-height: 1.25;
    color: var(--cl-primary);
}

h1 { font-size: clamp(2.2rem, 4.5vw, 3.8rem); letter-spacing: -0.015em; }
h2 { font-size: clamp(1.8rem, 3.5vw, 2.6rem); letter-spacing: -0.01em; }
h3 { font-size: clamp(1.25rem, 2.2vw, 1.75rem); }
h4 { font-size: clamp(1.1rem, 1.8vw, 1.35rem); }
h5 { font-size: 1rem; }

.subtitle {
    font-family: var(--font-sans);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: var(--cl-accent);
    font-weight: 700;
    margin-bottom: 12px;
    display: block;
}

/* --- Container & Layout --- */
.container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

@media (max-width: 640px) {
    .container {
        padding: 0 16px;
    }
}

.section {
    padding: 80px 0;
}

@media (max-width: 768px) {
    .section {
        padding: 48px 0;
    }
}

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 28px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    border-radius: var(--radius-sm);
    border: 1.5px solid transparent;
    cursor: pointer;
    transition: var(--transition-fast);
    text-align: center;
    gap: 8px;
    line-height: 1;
    white-space: nowrap;
}

.btn-primary {
    background: var(--cl-primary);
    color: var(--white);
    border-color: var(--cl-primary);
}
.btn-primary:hover {
    background: var(--cl-accent);
    border-color: var(--cl-accent);
    color: var(--white);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-outline {
    background: transparent;
    border: 1.5px solid var(--white);
    color: var(--white);
}
.btn-outline:hover {
    background: var(--white);
    color: var(--cl-primary);
    border-color: var(--white);
    transform: translateY(-1px);
}

.btn-outline-dark {
    background: transparent;
    border: 1.5px solid var(--cl-primary);
    color: var(--cl-primary);
}
.btn-outline-dark:hover {
    background: var(--cl-primary);
    color: var(--white);
    transform: translateY(-1px);
}

.btn-accent {
    background: var(--cl-accent);
    color: var(--white);
    border-color: var(--cl-accent);
}
.btn-accent:hover {
    background: var(--cl-accent-dark);
    border-color: var(--cl-accent-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

/* --- Forms --- */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--cl-text);
}

.form-control, .form-select, .form-input {
    width: 100%;
    padding: 12px 16px;
    font-size: 14px;
    border: 1px solid var(--cl-border);
    border-radius: var(--radius-sm);
    background: var(--white);
    color: var(--cl-text);
    transition: var(--transition-fast);
    outline: none;
}

.form-control:focus, .form-select:focus, .form-input:focus {
    border-color: var(--cl-accent);
    box-shadow: 0 0 0 3px rgba(201, 169, 110, 0.18);
}

.form-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23475569' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 36px;
    cursor: pointer;
}

/* --- Enhanced Navbar --- */
.navbar {
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 76px;
}

.nav-logo {
    font-family: var(--font-serif);
    font-size: 24px;
    font-weight: 700;
    color: var(--cl-primary);
    display: flex;
    flex-direction: column;
    line-height: 1;
    text-decoration: none;
    letter-spacing: 0.5px;
}

.nav-logo span {
    font-family: var(--font-sans);
    color: var(--cl-accent);
    font-weight: 700;
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: 3.5px;
    margin-top: 4px;
}

.nav-links {
    display: flex;
    gap: 28px;
    align-items: center;
    margin-left: auto;
    margin-right: 28px;
}

.nav-link {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: var(--cl-text);
    position: relative;
    padding: 6px 0;
    transition: color 0.2s;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--cl-accent);
    transition: width 0.3s ease;
}

.nav-link:hover::after, .nav-link.active::after {
    width: 100%;
}

.nav-link:hover {
    color: var(--cl-accent);
}

/* Category Mega Dropdown */
.nav-dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(12px);
    background: var(--white);
    box-shadow: var(--shadow-xl);
    width: 620px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: var(--radius-md);
    padding: 20px;
    z-index: 1001;
    border: 1px solid var(--cl-border);
    border-top: 3px solid var(--cl-accent);
}

.nav-dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.dropdown-menu li {
    list-style: none;
    border-radius: var(--radius-sm);
    transition: background 0.15s;
}

.dropdown-menu li:hover {
    background: var(--lighter-grey);
}

.dropdown-menu a {
    font-size: 13px;
    font-weight: 600;
    color: var(--cl-text);
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    transition: color 0.15s;
}

.dropdown-menu a::before {
    content: "•";
    color: var(--cl-accent);
    font-size: 14px;
    line-height: 1;
}

.dropdown-menu a:hover {
    color: var(--cl-accent);
}

/* Nav Actions */
.nav-actions {
    display: flex;
    align-items: center;
    gap: 18px;
}

.cart-icon-wrapper {
    position: relative;
    color: var(--cl-text);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    transition: background 0.2s, color 0.2s;
}

.cart-icon-wrapper:hover {
    background: var(--lighter-grey);
    color: var(--cl-accent);
}

.cart-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    background: var(--cl-accent);
    color: var(--white);
    font-size: 10px;
    font-weight: 700;
    height: 18px;
    min-width: 18px;
    border-radius: var(--radius-full);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--cl-primary);
    padding: 8px;
    border-radius: var(--radius-sm);
}

.mobile-menu-btn:hover {
    background: var(--lighter-grey);
}

/* Mobile Drawer Overlay */
.nav-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    z-index: 1050;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

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

/* --- Universal 4-Column Footer --- */
.footer {
    background: #0f172a;
    color: #f8fafc;
    padding: 64px 0 28px;
    margin-top: auto;
    border-top: 1px solid #1e293b;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.2fr;
    gap: 48px;
    margin-bottom: 48px;
}

.footer-col h3 {
    color: var(--white);
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 16px;
}

.footer-col h3 span {
    color: var(--cl-accent);
}

.footer-col h4 {
    color: var(--white);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 20px;
    font-family: var(--font-sans);
    font-weight: 700;
}

.footer-col p {
    color: #94a3b8;
    font-size: 14px;
    line-height: 1.7;
}

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

.footer-links a {
    color: #94a3b8;
    font-size: 14px;
    transition: var(--transition-fast);
}

.footer-links a:hover {
    color: var(--cl-accent);
    padding-left: 4px;
}

.footer-contact li {
    margin-bottom: 12px;
    color: #94a3b8;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer-bottom {
    border-top: 1px solid #1e293b;
    padding-top: 24px;
    font-size: 13px;
    color: #94a3b8;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

.footer-bottom a {
    color: #94a3b8;
    transition: color 0.2s;
}

.footer-bottom a:hover {
    color: var(--cl-accent);
}

/* --- Category Grid Cards (For Hub / Home) --- */
.cat-grid-12 {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 20px;
    margin-top: 36px;
}

@media (max-width: 1024px) {
    .cat-grid-12 {
        grid-template-columns: repeat(4, 1fr);
    }
}
@media (max-width: 768px) {
    .cat-grid-12 {
        grid-template-columns: repeat(3, 1fr);
        gap: 14px;
    }
}
@media (max-width: 480px) {
    .cat-grid-12 {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
}

.cat-box {
    background: var(--white);
    border: 1px solid var(--cl-border);
    border-radius: var(--radius-md);
    padding: 24px 16px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    transition: var(--transition-fast);
    text-decoration: none;
    color: var(--cl-text);
}

.cat-box:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--cl-accent);
}

.cat-box-icon {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: var(--cl-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--cl-primary);
    font-size: 22px;
    transition: var(--transition-fast);
}

.cat-box:hover .cat-box-icon {
    background: var(--cl-primary);
    color: var(--cl-accent);
}

.cat-box-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--cl-primary);
}

/* --- Toast Notifications --- */
#toast-container {
    position: fixed;
    bottom: 28px;
    right: 28px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 360px;
    width: calc(100% - 40px);
}

.toast {
    background: var(--white);
    color: var(--cl-primary);
    padding: 16px 20px;
    font-size: 14px;
    font-weight: 600;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-xl);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    animation: slideInUp 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
    border-left: 4px solid var(--cl-primary);
}

.toast-success { border-left-color: var(--success); }
.toast-error { border-left-color: var(--error); }

.toast button {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    color: var(--cl-text-light);
    line-height: 1;
}

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

/* --- Responsive Navbar (Drawer on Mobile) --- */
@media (max-width: 860px) {
    .nav-logo { font-size: 20px; }
    .nav-logo span { font-size: 8px; letter-spacing: 2.5px; }

    .mobile-menu-btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .nav-links {
        position: fixed;
        top: 0;
        left: -300px;
        width: 280px;
        height: 100vh;
        background: var(--white);
        flex-direction: column;
        align-items: flex-start;
        padding: 80px 24px 32px;
        gap: 20px;
        box-shadow: var(--shadow-xl);
        z-index: 1060;
        transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        overflow-y: auto;
        margin: 0;
    }

    .nav-links.active {
        left: 0;
    }

    .nav-dropdown {
        width: 100%;
    }

    .dropdown-menu {
        position: static;
        transform: none;
        width: 100%;
        box-shadow: none;
        grid-template-columns: 1fr;
        padding: 10px 0;
        border: none;
        border-left: 2px solid var(--cl-accent);
        margin-top: 8px;
        display: none;
        opacity: 1;
        visibility: visible;
    }

    .nav-dropdown.open .dropdown-menu {
        display: grid;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 36px;
    }
}

@media (max-width: 580px) {
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }
    
    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
}

/* --- Auth Dropdown in Navbar --- */
.auth-dropdown-wrapper {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.auth-trigger {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-weight: 700;
    font-size: 13px;
    padding: 8px 14px;
    border-radius: var(--radius-full);
    background: var(--cl-bg);
    color: var(--cl-primary);
    border: 1px solid var(--cl-border);
    transition: var(--transition-fast);
}

.auth-trigger:hover {
    background: var(--white);
    border-color: var(--cl-primary);
}

.auth-dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 220px;
    background: var(--white);
    border: 1px solid var(--cl-border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-xl);
    display: flex;
    flex-direction: column;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.2s cubic-bezier(0.165, 0.84, 0.44, 1);
    z-index: 1200;
    overflow: hidden;
}

.auth-dropdown-menu.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.auth-dropdown-item {
    padding: 12px 18px;
    color: var(--cl-text);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.15s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.auth-dropdown-item:hover {
    background: var(--cl-bg);
    color: var(--cl-primary);
}

.auth-login-btn {
    font-weight: 700;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 8px 16px;
    background: var(--cl-primary);
    color: var(--white);
    border-radius: var(--radius-sm);
    text-decoration: none;
    transition: var(--transition-fast);
}
.auth-login-btn:hover { background: var(--cl-accent); }

