/* ========== RESET & BASE ========== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --navy: #0f172a;
    --blue: #3b82f6;
    --blue-dark: #2563eb;
    --sky: #eff6ff;
    --teal: #06b6d4;
    --teal-dark: #0891b2;
    --purple: #8b5cf6;
    --purple-dark: #7c3aed;
    --pink: #ec4899;
    --gold: #f59e0b;
    --green: #10b981;
    --white: #ffffff;
    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1e293b;
    --gray-900: #0f172a;
    --radius: 16px;
    --radius-sm: 8px;
    --shadow: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -2px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -4px rgba(0,0,0,0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0,0,0,0.1), 0 8px 10px -6px rgba(0,0,0,0.1);
}

html { scroll-behavior: smooth; }
body { font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; color: var(--gray-800); line-height: 1.6; background: var(--white); }
a { color: var(--blue); text-decoration: none; transition: color 0.3s ease; }
a:hover { color: var(--blue-dark); }
img { max-width: 100%; height: auto; display: block; }

/* ========== HEADER / NAV ========== */
.site-header { position: sticky; top: 0; z-index: 100; background: rgba(255,255,255,0.95); backdrop-filter: blur(12px); border-bottom: 1px solid var(--gray-200); }
.header-inner { max-width: 1200px; margin: 0 auto; padding: 0 24px; display: flex; align-items: center; justify-content: space-between; height: 68px; }
.logo { font-size: 1.4rem; font-weight: 800; color: var(--gray-800); letter-spacing: -0.5px; text-decoration: none; }
.logo span { background: linear-gradient(135deg, var(--blue), var(--purple)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.nav-toggle { display: none; background: none; border: none; color: var(--gray-800); font-size: 1.6rem; cursor: pointer; padding: 8px; }
.main-nav ul { display: flex; list-style: none; gap: 12px; }
.main-nav a { color: var(--gray-700); padding: 8px 16px; border-radius: 50px; font-size: 0.9rem; font-weight: 500; transition: all 0.3s ease; background: transparent; }
.main-nav a:hover { background: var(--sky); color: var(--blue-dark); }
.main-nav a.active { background: var(--blue); color: var(--white); }

/* ========== HERO ========== */
.hero { background: var(--navy); background-size: cover; background-position: center; color: var(--white); padding: 70px 24px; text-align: center; }
.hero h1 { font-size: clamp(2rem, 5vw, 3rem); font-weight: 800; line-height: 1.2; margin-bottom: 16px; letter-spacing: -0.5px; }
.hero p { font-size: 1.1rem; max-width: 680px; margin: 0 auto; opacity: 0.9; line-height: 1.7; }
.hero-cta { display: inline-block; background: linear-gradient(135deg, var(--blue), var(--purple)); color: var(--white); padding: 14px 32px; border-radius: 50px; font-weight: 600; font-size: 1rem; transition: all 0.3s ease; box-shadow: 0 4px 15px rgba(59,130,246,0.3); border: none; cursor: pointer; margin-top: 28px; }
.hero-cta:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(59,130,246,0.4); color: var(--white); }

/* ========== SECTIONS ========== */
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.section { padding: 70px 0; }
.section-alt { background: var(--gray-50); }
.section-title { font-size: 2rem; font-weight: 800; text-align: center; margin-bottom: 12px; color: var(--navy); }
.section-subtitle { text-align: center; color: var(--gray-600); max-width: 600px; margin: 0 auto 48px; font-size: 1rem; }

/* ========== CATEGORY PAGE LAYOUT ========== */
.page-content { max-width: 1200px; margin: 0 auto; padding: 50px 24px; }
.category-section { margin-bottom: 56px; }
.category-heading { font-size: 1.7rem; font-weight: 800; color: var(--navy); margin-bottom: 8px; display: flex; align-items: center; gap: 10px; }
.category-heading::after { content: ''; flex: 1; height: 3px; background: linear-gradient(90deg, var(--blue), transparent); border-radius: 2px; margin-left: 8px; }
.category-sub { color: var(--gray-600); margin-bottom: 28px; font-size: 0.95rem; }

/* ========== ITEM CARDS ========== */
.items-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 24px; }
.item-card { background: var(--white); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); border: 1px solid var(--gray-200); transition: all 0.3s ease; position: relative; overflow: hidden; }
.item-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 4px; background: linear-gradient(90deg, var(--blue), var(--purple)); }
.item-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--blue); }
.item-card h3 { font-size: 1.1rem; font-weight: 700; color: var(--navy); margin-bottom: 8px; }
.item-card p { color: var(--gray-600); font-size: 0.93rem; line-height: 1.6; margin-bottom: 14px; }
.price-tag { display: inline-block; background: linear-gradient(135deg, var(--green), var(--teal)); color: var(--white); padding: 4px 14px; border-radius: 20px; font-size: 0.85rem; font-weight: 600; margin-bottom: 12px; }
.retailers { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 4px; }
.retailers strong { color: var(--gray-700); font-size: 0.85rem; margin-right: 2px; }
.retailer-tag { display: inline-block; padding: 4px 12px; background: var(--sky); border-radius: 20px; font-size: 0.83rem; transition: all 0.2s ease; }
.retailer-tag a { color: var(--blue-dark); text-decoration: none; font-weight: 500; }
.retailer-tag:hover { background: var(--blue); }
.retailer-tag:hover a { color: var(--white); }

/* ========== COOKING-STYLE FILTER (kitchen page) ========== */
.cook-filter { background: linear-gradient(135deg, #eff6ff, #f5f3ff); border: 1px solid var(--gray-200); border-radius: var(--radius); padding: 28px; margin-bottom: 40px; box-shadow: var(--shadow); }
.cook-filter-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 6px; }
.cook-filter h2 { font-size: 1.25rem; font-weight: 700; color: var(--navy); display: flex; align-items: center; gap: 8px; }
.cook-filter .cook-badge { background: var(--gold); color: var(--navy); font-size: 0.7rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; letter-spacing: 0.5px; text-transform: uppercase; }
.cook-filter .cook-sub { color: var(--gray-600); font-size: 0.95rem; margin-bottom: 20px; }
.cook-chips { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 16px; }
.cook-chip { display: inline-flex; align-items: center; gap: 8px; padding: 10px 18px; border-radius: 999px; background: var(--white); border: 2px solid var(--gray-200); font-size: 0.9rem; font-weight: 500; color: var(--gray-700); cursor: pointer; transition: all 0.2s ease; font-family: 'Inter', sans-serif; }
.cook-chip:hover { border-color: var(--blue); color: var(--blue); transform: translateY(-1px); }
.cook-chip.active { background: linear-gradient(135deg, var(--blue), var(--purple)); color: var(--white); border-color: transparent; box-shadow: 0 4px 12px rgba(59,130,246,0.25); }
.cook-chip .cook-emoji { font-size: 1.1rem; }
.cook-actions { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.cook-reset { background: none; border: none; color: var(--blue-dark); font-weight: 600; cursor: pointer; font-size: 0.9rem; font-family: 'Inter', sans-serif; padding: 6px 0; text-decoration: underline; }
.cook-reset:hover { color: var(--purple-dark); }
.cook-status { color: var(--gray-600); font-size: 0.9rem; }
.cook-status strong { color: var(--navy); }
.item-card.hidden, .category-section.hidden { display: none; }
.cook-empty { text-align: center; padding: 60px 24px; color: var(--gray-600); background: var(--white); border: 2px dashed var(--gray-200); border-radius: var(--radius); display: none; }
.cook-empty.show { display: block; }
.cook-empty h3 { color: var(--navy); font-size: 1.1rem; margin-bottom: 8px; }

/* ========== CURATED PICKS ========== */
.picks { margin-top: 10px; padding-top: 14px; border-top: 1px dashed var(--gray-200); }
.picks-label { font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.6px; color: var(--gray-600); margin-bottom: 8px; }
.picks ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; }
.picks li { margin: 0; }
.pick { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 12px; background: var(--gray-50); border: 1px solid var(--gray-200); border-radius: 10px; text-decoration: none; color: var(--gray-800); font-size: 0.88rem; transition: all 0.2s ease; }
.pick:hover { background: var(--white); border-color: var(--blue); box-shadow: 0 2px 8px rgba(59,130,246,0.12); transform: translateX(2px); color: var(--gray-800); }
.pick-name { flex: 1; min-width: 0; font-weight: 500; }
.pick-name .pick-retailer { font-size: 0.76rem; color: var(--gray-600); font-weight: 500; display: block; margin-top: 1px; }
.pick-price { font-weight: 700; color: var(--green); font-size: 0.88rem; white-space: nowrap; }
.pick::after { content: '\2192'; color: var(--blue); font-weight: 700; margin-left: 4px; opacity: 0.6; transition: all 0.2s ease; }
.pick:hover::after { opacity: 1; transform: translateX(2px); }

/* ========== TIPS ========== */
.tips-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 24px; }
.tip-card { background: var(--white); border-radius: var(--radius); padding: 28px 24px; border-left: 4px solid; box-shadow: var(--shadow); transition: all 0.3s ease; }
.tip-card:nth-child(1) { border-left-color: var(--blue); }
.tip-card:nth-child(2) { border-left-color: var(--purple); }
.tip-card:nth-child(3) { border-left-color: var(--teal); }
.tip-card:nth-child(4) { border-left-color: var(--pink); }
.tip-card:nth-child(5) { border-left-color: var(--gold); }
.tip-card:nth-child(6) { border-left-color: var(--green); }
.tip-card:nth-child(7) { border-left-color: var(--blue); }
.tip-card:nth-child(8) { border-left-color: var(--purple); }
.tip-card:nth-child(9) { border-left-color: var(--teal); }
.tip-card:nth-child(10) { border-left-color: var(--pink); }
.tip-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.tip-card h3 { font-size: 1.05rem; margin-bottom: 8px; color: var(--navy); font-weight: 600; }
.tip-card p { color: var(--gray-600); font-size: 0.93rem; line-height: 1.6; }

/* ========== CATEGORY CARDS (homepage) ========== */
.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 28px; }
.category-card { background: var(--white); border-radius: var(--radius); padding: 0 0 28px; box-shadow: var(--shadow); border: 1px solid var(--gray-200); transition: all 0.3s ease; text-align: center; position: relative; overflow: hidden; }
.category-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 4px; background: linear-gradient(90deg, var(--blue), var(--purple)); transform: scaleX(0); transform-origin: left; transition: transform 0.3s ease; z-index: 2; }
.category-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.category-card:hover::before { transform: scaleX(1); }
.card-img { width: 100%; height: 160px; object-fit: cover; }
.card-icon { width: 64px; height: 64px; border-radius: 50%; background: linear-gradient(135deg, var(--sky), rgba(59,130,246,0.1)); display: flex; align-items: center; justify-content: center; margin: -32px auto 12px; font-size: 1.8rem; box-shadow: 0 4px 12px rgba(59,130,246,0.15); position: relative; z-index: 1; }
.category-card h3 { font-size: 1.2rem; font-weight: 700; margin-bottom: 8px; color: var(--navy); padding: 0 24px; }
.category-card p { color: var(--gray-600); font-size: 0.93rem; margin-bottom: 16px; line-height: 1.6; padding: 0 24px; }
.card-link { display: inline-block; color: var(--blue); font-weight: 600; font-size: 0.93rem; border-bottom: 2px solid transparent; transition: all 0.3s ease; }
.card-link:hover { color: var(--blue-dark); border-bottom-color: var(--blue-dark); }

/* ========== FAQ ========== */
.faq-list { max-width: 780px; margin: 0 auto; }
.faq-item { border-bottom: 1px solid var(--gray-200); }
.faq-question { width: 100%; background: none; border: none; padding: 20px 40px 20px 0; font-size: 1.05rem; font-weight: 600; color: var(--gray-800); text-align: left; cursor: pointer; position: relative; font-family: 'Inter', sans-serif; line-height: 1.5; transition: color 0.3s ease; }
.faq-question:hover { color: var(--blue); }
.faq-question::after { content: '+'; position: absolute; right: 0; top: 50%; transform: translateY(-50%); font-size: 1.5rem; font-weight: 300; color: var(--blue); transition: transform 0.3s ease; }
.faq-question.open::after { content: '−'; transform: translateY(-50%) rotate(180deg); }
.faq-answer { max-height: 0; overflow: hidden; transition: max-height 0.35s ease, padding 0.35s ease; color: var(--gray-600); font-size: 0.95rem; line-height: 1.7; }
.faq-answer.open { max-height: 300px; padding-bottom: 20px; }

/* ========== FOOTER ========== */
.site-footer { background: var(--navy); color: rgba(255,255,255,0.7); padding: 60px 24px 30px; position: relative; overflow: hidden; }
.site-footer::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 1px; background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent); }
.footer-inner { max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 36px; position: relative; z-index: 1; }
.footer-col h4 { color: var(--white); font-size: 1rem; margin-bottom: 14px; font-weight: 600; }
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 8px; }
.footer-col a { color: rgba(255,255,255,0.65); font-size: 0.92rem; transition: color 0.3s ease; }
.footer-col a:hover { color: var(--gold); }
.footer-col p { font-size: 0.9rem; line-height: 1.6; }
.footer-bottom { max-width: 1200px; margin: 36px auto 0; padding-top: 24px; border-top: 1px solid rgba(255,255,255,0.1); text-align: center; font-size: 0.85rem; }

/* ========== CHECKLIST-SPECIFIC ========== */
.progress-section { background: var(--white); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); border: 1px solid var(--gray-200); margin-bottom: 24px; }
.progress-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.progress-header h2 { font-size: 1.1rem; font-weight: 700; color: var(--navy); }
.progress-text { font-weight: 700; color: var(--blue); font-size: 1.1rem; }
.progress-bar { background: var(--gray-200); border-radius: 999px; height: 12px; overflow: hidden; }
.progress-fill { background: linear-gradient(90deg, var(--blue), var(--purple)); height: 100%; border-radius: 999px; transition: width 0.5s ease; display: flex; align-items: center; justify-content: flex-end; padding-right: 8px; min-width: 40px; }
.progress-fill span { font-size: 0.7rem; font-weight: 700; color: var(--white); }
.controls { display: flex; gap: 12px; margin-bottom: 24px; flex-wrap: wrap; }
.btn { padding: 10px 24px; border-radius: 50px; font-weight: 600; font-size: 0.9rem; cursor: pointer; border: 2px solid transparent; font-family: 'Inter', sans-serif; transition: all 0.3s ease; }
.btn-outline { background: var(--white); color: var(--blue); border-color: var(--blue); }
.btn-outline:hover { background: var(--blue); color: var(--white); }
.btn-primary { background: linear-gradient(135deg, var(--blue), var(--purple)); color: var(--white); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 4px 15px rgba(59,130,246,0.3); }
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.filter-btn { padding: 8px 20px; border: 2px solid var(--gray-200); border-radius: 999px; background: var(--white); font-weight: 500; cursor: pointer; transition: all 0.2s ease; font-size: 0.88rem; font-family: 'Inter', sans-serif; color: var(--gray-700); }
.filter-btn:hover { border-color: var(--blue); color: var(--blue); }
.filter-btn.active { background: linear-gradient(135deg, var(--blue), var(--purple)); color: var(--white); border-color: transparent; }
.cl-category { background: var(--white); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); border: 1px solid var(--gray-200); margin-bottom: 16px; }
.cl-category.hidden { display: none; }
.cl-category-header { background: var(--navy); color: var(--white); padding: 16px 24px; display: flex; justify-content: space-between; align-items: center; cursor: pointer; }
.cl-category-header h3 { font-size: 1.1rem; font-weight: 700; display: flex; align-items: center; gap: 10px; }
.cl-count { background: var(--gold); color: var(--navy); padding: 2px 10px; border-radius: 20px; font-size: 0.8rem; font-weight: 700; }
.cl-toggle { font-size: 1.2rem; transition: transform 0.3s; color: rgba(255,255,255,0.7); }
.cl-category.collapsed .cl-toggle { transform: rotate(-90deg); }
.cl-items { padding: 16px 24px; display: grid; grid-template-columns: 1fr 1fr; gap: 4px 24px; }
.cl-category.collapsed .cl-items { max-height: 0; padding: 0 24px; overflow: hidden; }
.cl-item { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px dotted var(--gray-200); }
.cl-item:last-child { border-bottom: none; }
.cl-item input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--blue); cursor: pointer; flex-shrink: 0; }
.cl-item label { font-size: 0.93rem; color: var(--gray-800); cursor: pointer; }
.cl-item input[type="checkbox"]:checked + label { text-decoration: line-through; color: var(--gray-300); }

/* ========== MOBILE ========== */
@media (max-width: 768px) {
    .nav-toggle { display: block; }
    .main-nav { display: none; position: absolute; top: 68px; left: 0; right: 0; background: var(--white); padding: 16px 24px; box-shadow: 0 8px 20px rgba(0,0,0,0.1); border-bottom: 1px solid var(--gray-200); }
    .main-nav.open { display: block; }
    .main-nav ul { flex-direction: column; gap: 4px; }
    .main-nav a { display: block; padding: 12px 16px; }
    .hero { padding: 50px 24px; }
    .hero h1 { font-size: clamp(1.6rem, 4vw, 2.4rem); }
    .section { padding: 50px 0; }
    .card-grid, .items-grid, .tips-grid { grid-template-columns: 1fr; }
    .cl-items { grid-template-columns: 1fr; }
    .page-content { padding: 30px 16px; }
    .controls { flex-direction: column; }
    .filters { gap: 6px; }
    .filter-btn { font-size: 0.82rem; padding: 6px 14px; }
}
@media (max-width: 480px) {
    .header-inner { height: 60px; }
    .logo { font-size: 1.1rem; }
    .hero { padding: 40px 16px; }
    .hero h1 { font-size: clamp(1.4rem, 3vw, 2rem); }
    .hero p { font-size: 0.95rem; }
    .section { padding: 40px 0; }
    .section-title { font-size: 1.6rem; }
    .category-heading { font-size: 1.3rem; }
    .items-grid { grid-template-columns: 1fr; }
    .footer-inner { gap: 24px; }
    .cook-filter { padding: 20px; }
    .cook-chip { padding: 8px 14px; font-size: 0.85rem; }
    .cook-filter-header { gap: 8px; }
}

/* ========== PRINT ========== */
@media print {
    .site-header, .main-nav, .nav-toggle, .hero, .controls, .progress-section, .filters, .site-footer, .cl-toggle, .cook-filter { display: none !important; }
    .item-card.hidden, .category-section.hidden { display: block !important; }
    body { background: white !important; color: #0f172a !important; font-size: 11pt; line-height: 1.5; }
    .page-content::before { content: "UK University Dorm Checklist"; display: block; font-size: 22pt; font-weight: 800; color: #0f172a; text-align: center; padding: 16pt 0 6pt; border-bottom: 3px solid #f59e0b; margin-bottom: 16pt; }
    .page-content::after { content: "unidormchecklist.co.uk"; display: block; text-align: center; font-size: 9pt; color: #888; padding-top: 12pt; margin-top: 12pt; border-top: 1px solid #ccc; }
    .cl-category, .cl-category.hidden, .cl-category.collapsed { display: block !important; border: 2px solid #2563eb; border-radius: 6pt; margin-bottom: 12pt; page-break-inside: avoid; overflow: visible !important; }
    .cl-category-header { background-color: #0f172a !important; color: white !important; padding: 8pt 12pt !important; print-color-adjust: exact; -webkit-print-color-adjust: exact; }
    .cl-count { background: #f59e0b !important; color: #0f172a !important; print-color-adjust: exact; -webkit-print-color-adjust: exact; }
    .cl-items, .cl-category.collapsed .cl-items, .cl-category.hidden .cl-items { display: grid !important; grid-template-columns: 1fr 1fr !important; max-height: none !important; overflow: visible !important; padding: 8pt 10pt !important; gap: 2pt 16pt; }
    .cl-item { padding: 4pt 0; border-bottom: 1px dotted #ddd; }
    .cl-item input[type="checkbox"] { width: 14pt; height: 14pt; accent-color: #3b82f6; print-color-adjust: exact; -webkit-print-color-adjust: exact; }
    .cl-item input[type="checkbox"]:checked + label { text-decoration: line-through; color: #999; }
    .cl-item label { font-size: 10pt; }
    .item-card { box-shadow: none; border: 1px solid #ddd; page-break-inside: avoid; }
    .item-card::before { background: #3b82f6 !important; print-color-adjust: exact; -webkit-print-color-adjust: exact; }
}
