/* assets/css/punk.css */

:root {
    --bg-body: #f8f9fa;       
    --bg-white: #ffffff;
    --text-main: #2c3e50;     
    --text-muted: #7f8c8d;
    --accent-primary: #222222; 
    --accent-hover: #444444;
    
    /* Fallback Fonts (Overridden dynamically in header.php) */
    --font-heading: 'Urbanist', sans-serif;
    --font-subheading: 'Libre Franklin', sans-serif;
    --font-body: 'Libre Franklin', sans-serif;
    --font-nav: 'Urbanist', sans-serif; /* Fallback */
    
    --accent-pink: #d63384;
    --accent-green: #0ca678;
    
    /* DYNAMIC VARIABLES (Overridden by PHP) */
    --thumb-width: 300px; 
    --container-width: 95%;
    --side-pad: 20px;
    --nav-font-size: 14px; /* Default Fallback */
}

body {
    background-color: var(--bg-body);
    color: var(--text-main);
    font-family: var(--font-body);
    margin: 0;
    padding: 0;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* --- TYPOGRAPHY --- */
h1, h2, h3, h4, h5, h6 {
    margin-top: 0; 
    line-height: 1.2;
    font-family: var(--font-heading);
}

/* --- Navigation --- */
nav {
    background: var(--bg-white);
    border-bottom: 1px solid #eee;
    padding: 15px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.logo { display: flex; align-items: center; text-decoration: none; }
.logo img { height: 40px; width: auto; display: block; }

.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    margin-left: 30px;
    font-size: var(--nav-font-size); 
    font-weight: 500;
    transition: color 0.2s;
    font-family: var(--font-nav); 
}
.nav-links a:hover { color: var(--accent-primary); }

/* --- Hero Section --- */
.hero {
    min-height: 400px;
    height: auto;
    padding: 60px 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    background-color: var(--bg-white);
    position: relative;
    background-size: cover;
    background-position: center;
    z-index: 20; 
}

.hero-small {
    height: 180px; 
    min-height: 180px;
    padding: 0;
    display: flex;
    flex-direction: column; 
    justify-content: center; 
    align-items: center;
}

.hero h1 {
    font-family: var(--font-heading);
    font-size: 3.5rem;
    font-weight: 700;
    margin-top: -8px; 
    margin-bottom: 10px;
    line-height: 1.0; 
    color: var(--text-main);
    letter-spacing: 1px;
}

.hero-small h1 { display: none; } 

.hero p {
    font-size: 1.2rem;
    color: var(--text-muted);
    max-width: 900px; 
    width: 100%;
    margin: 0 auto 30px auto;

}

.hero h3 {
    font-family: var(--font-subheading);
}

/* --- Search Bar --- */
.search-container {
    position: relative;
    width: 80%;
    max-width: 1000px;
    margin: 0 auto;
}

.search-container input {
    width: 100%;
    padding: 15px 20px;
    border: 1px solid #e1e4e8;
    border-radius: 8px; 
    background: #f8f9fa;
    font-size: 16px;
    outline: none;
    transition: all 0.2s;
    box-sizing: border-box; 
    box-shadow: 0 4px 10px rgba(0,0,0,0.03);
    font-family: var(--font-body);
}
.search-container input:focus {
    background: #fff;
    border-color: #ccc;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}

.search-container button {
    position: absolute;
    right: 5px;
    top: 5px;
    bottom: 5px;
    padding: 0 25px;
    background-color: var(--accent-primary);
    color: white;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    font-family: var(--font-body);
}
.search-container button:hover { background-color: var(--accent-hover); }

/* --- GLOBAL LAYOUT & SECTIONS --- */
.container {
    max-width: 100%; 
    margin: 20px auto 40px auto;
    padding: 0 20px;
}

.home-section-strip {
    width: 100%;
    padding: 50px 0;
    background-size: cover;
    background-position: center;
}

.home-inner-container {
    width: var(--container-width);
    max-width: 1600px;
    margin: 0 auto;
    padding-left: var(--side-pad);
    padding-right: var(--side-pad);
    box-sizing: border-box;
}

.section-header {
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    gap: 20px;
}

.section-icon {
    height: 65px;
    width: auto;
    flex-shrink: 0;
}

.section-icon-div {
    width: 65px; 
    height: 65px;
    flex-shrink: 0;
}

.section-head-wrapper {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-left: 0; 
}

.section-head-title {
    font-family: var(--font-heading);
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--text-main);
    margin: 0 0 5px 0;
    letter-spacing: 1px;
    line-height: 1;
}

.section-head-text {
    font-weight: 700; 
    font-family: var(--font-subheading);
    color: var(--text-muted);
    font-size: 1rem;
    margin: 0;
    line-height: 1.4;
}

.section-head-desc {
    margin-top: 10px;
    font-size: 1rem;
    color: #555;
    line-height: 1.6;
    max-width: 100%;
}

/* --- SECTION DESC ROW (Used in System Sections) --- */
.section-desc-row {
    margin-bottom: 35px;
    max-width: 100%;
    line-height: 1.6;
}

/* --- MISSING PAGE GRIDS (RESTORED) --- */
.album-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 20px;
    margin-bottom: 40px;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.section-title {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 20px;
    margin-top: 30px;
    color: var(--text-main);
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

/* --- DYNAMIC JUSTIFIED GRID (Homepage) --- */
.justified-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 15px; 
}
.justified-grid::after {
    content: '';
    flex-grow: 999999999; 
    min-width: var(--thumb-width); 
    height: 0;
}

.card {
    height: var(--thumb-width); 
    flex-grow: 1; 
    position: relative;
    overflow: hidden;
    border-radius: 4px;
    cursor: pointer;
    background: #eee;
    transition: filter 0.2s ease;
}
.card:hover { filter: brightness(1.1); }

.card-img { height: 100%; display: block; }
.card-img img {
    height: 100%;
    width: auto; 
    min-width: 100%; 
    object-fit: cover; 
    display: block;
}

/* GRID HOVER ICON (QUICK SAVE) */
.quick-save-btn {
    position: absolute;
    bottom: 10px; 
    right: 10px;
    width: 35px;
    height: 35px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    opacity: 0;
    transform: translateY(5px);
    transition: all 0.2s ease;
    z-index: 20;
    border: 1px solid #ddd;
    cursor: pointer;
}
.quick-save-btn img { width: 100%; height: 100%; object-fit: contain; opacity: 0.9; }
.card:hover .quick-save-btn, .related-card:hover .quick-save-btn { opacity: 1; transform: translateY(0); }
.quick-save-btn:hover { background: var(--text-main); border-color: var(--text-main); }
.quick-save-btn:hover img { filter: invert(1); opacity: 1; }

@media (max-width: 800px)  { 
    .card { height: 200px !important; }
}

/* Badges */
.badge-free {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 10;
    background-color: var(--accent-green);
    color: white;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: 4px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

/* --- Category Cards --- */
.cat-hero-card {
    position: relative;
    height: var(--thumb-width); 
    min-width: var(--thumb-width);
    flex-grow: 1; 
    border-radius: 8px;
    overflow: hidden;
    text-decoration: none;
    color: white;
    margin-bottom: 0;
}
.cat-hero-card img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; filter: brightness(0.6); }
.cat-hero-card:hover img { transform: scale(1.05); filter: brightness(0.8); }
.cat-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; text-shadow: 0 2px 10px rgba(0,0,0,0.5); padding: 20px; box-sizing: border-box; }
.cat-name { font-family: var(--font-heading); font-size: 2.0rem; font-weight: 700; letter-spacing: 1px; }
.cat-count { font-size: 0.9rem; opacity: 0.8; margin-top: 5px; }

/* --- Carousel --- */
.carousel-wrapper { position: relative; display: flex; align-items: center; }

.carousel-track { 
    display: flex; 
    gap: 30px; 
    overflow-x: auto; 
    scroll-behavior: smooth; 
    padding: 20px 10px; 
    width: 100%; 
    scrollbar-width: none; 
    -ms-overflow-style: none; 
}
.carousel-track::-webkit-scrollbar { display: none; }

.carousel-btn { background: white; border: 1px solid #ddd; width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center; cursor: pointer; box-shadow: 0 2px 5px rgba(0,0,0,0.1); z-index: 10; flex-shrink: 0; margin: 0 15px; }
.carousel-btn:hover { background: var(--text-main); color: white; }
.carousel-item { min-width: 250px; flex-shrink: 0; }

/* --- Collections Stack --- */
.album-card { text-decoration: none; color: inherit; display: block; }
.album-stack { 
    position: relative; 
    width: 100%;
    aspect-ratio: 4 / 3; /* Proportional Scaling */
    margin-bottom: 15px; 
    transition: transform 0.2s ease; 
}
.album-card:hover .album-stack { transform: translateY(-5px); }
.stack-img { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; border-radius: 8px; box-shadow: 0 4px 10px rgba(0,0,0,0.1); border: 1px solid rgba(0,0,0,0.1); background: #fff; transition: transform 0.3s ease; }
.stack-img:nth-child(1) { z-index: 3; transform: rotate(0deg); }
.stack-img:nth-child(2) { z-index: 2; transform: rotate(3deg) translate(5px, -5px); opacity: 0.8; }
.stack-img:nth-child(3) { z-index: 1; transform: rotate(-3deg) translate(-5px, -5px); opacity: 0.6; }
.album-card:hover .stack-img:nth-child(2) { transform: rotate(6deg) translate(10px, -10px); }
.album-card:hover .stack-img:nth-child(3) { transform: rotate(-6deg) translate(-10px, -10px); }
.stack-empty { width: 100%; height: 100%; background: #f1f3f5; border-radius: 8px; display: flex; align-items: center; justify-content: center; color: #adb5bd; border: 2px dashed #dee2e6; }
.album-title { font-weight: 700; font-size: 1.1rem; margin-bottom: 5px; font-family: var(--font-heading); }
.album-meta { color: var(--text-muted); font-size: 0.9rem; }

/* --- Details Page & Collections --- */
.details-wrapper { display: flex; flex-wrap: wrap; gap: 40px; margin-top: 20px; padding: 0 20px; max-width: 1400px; margin: 0 auto; }
.image-stage { flex: 2; min-width: 300px; background: #f1f3f5; border-radius: 8px; padding: 20px; display: flex; align-items: center; justify-content: center; border: 1px solid #e9ecef; flex-direction: column; }
.image-stage img { max-width: 100%; height: auto; border-radius: 4px; box-shadow: 0 5px 15px rgba(0,0,0,0.1); }

.meta-sidebar { flex: 1; min-width: 250px; }
.meta-heading { margin-top: 0; margin-bottom: 20px; font-size: 1.2rem; font-weight: 800; color: var(--text-main); display: flex; align-items: center; border-bottom: 2px solid #eee; padding-bottom: 10px; font-family: var(--font-heading); }
.meta-avatar { width: 50px; height: 50px; border-radius: 50%; object-fit: cover; margin-right: 15px; border: 2px solid #ddd; background: #eee; }
.meta-id { color: var(--text-muted); font-family: 'Courier New', monospace; font-size: 0.9rem; margin-bottom: 30px; display: block; }

/* Buttons */
.btn-action { display: block; width: 100%; padding: 15px; text-align: center; border-radius: 6px; font-weight: 700; text-transform: uppercase; text-decoration: none; margin-bottom: 15px; transition: transform 0.1s; box-sizing: border-box; appearance: none; -webkit-appearance: none; font-family: var(--font-primary); font-size: 1rem; }
.btn-download { background-color: var(--accent-green); color: white; border: none; }
.btn-download:hover { background-color: #099268; }
.btn-upgrade { background-color: var(--accent-pink); color: white; border: none; }
.btn-upgrade:hover { transform: translateY(-2px); }

/* Unified Toolbar */
.actions-toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 25px; margin: 20px 0; padding: 15px 0; border-top: 1px solid #eee; border-bottom: 1px solid #eee; }
.action-group { display: flex; align-items: center; gap: 12px; }
.action-label { font-size: 12px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; }
.action-icon { width: 28px; height: 28px; cursor: pointer; transition: transform 0.2s ease, opacity 0.2s; opacity: 0.7; display: block; }
.action-icon:hover { transform: scale(1.1); opacity: 1; }

/* Specs & Tags */
.file-specs { margin: 30px 0; padding: 20px; background: #fff; border: 1px solid #eee; border-radius: 6px; }
.spec-row { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid #f1f1f1; font-size: 14px; }
.spec-row:last-child { border-bottom: none; }
.tags-list { margin-top: 20px; }
.tag-pill { display: inline-block; background: #fff; border: 1px solid #ddd; padding: 5px 12px; border-radius: 20px; font-size: 12px; color: var(--text-muted); text-decoration: none; margin-right: 5px; margin-bottom: 5px; transition: all 0.2s; }
.tag-pill:hover { border-color: var(--text-main); color: var(--text-main); }

.icon-spec { font-size: 18px !important; vertical-align: middle; margin-right: 8px; margin-bottom: 2px; color: #000; opacity: 0.8; }
.spec-row span { display: flex; align-items: center; }
.license-link { color: var(--text-main); text-decoration: underline; text-decoration-color: #ddd; text-underline-offset: 4px; transition: all 0.2s; }
.license-link:hover { color: var(--accent-pink); text-decoration-color: var(--accent-pink); }

/* --- UPDATED RELATED/SIMILAR GRID --- */
.related-wrapper { width: 100%; margin-top: 40px; padding-top: 20px; border-top: 1px solid #eee; }
.related-title { font-weight: 700; font-size: 1.1rem; margin-bottom: 15px; color: var(--text-muted); text-transform: uppercase; }

/* New Responsive Grid (Fixes squashed thumbnails) */
.related-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); 
    gap: 20px; 
}

.related-card { 
    height: auto; 
    aspect-ratio: 4 / 3; /* Enforces standard landscape shape */
    border-radius: 4px; 
    overflow: hidden; 
    position: relative; 
    background: #eee; 
    display: block; 
}

.related-card img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.2s; }
.related-card:hover img { transform: scale(1.05); }

.material-symbols-outlined.icon-middle { vertical-align: middle; margin-bottom: 2px; margin-right: 5px; font-size: 20px; }

/* Modals */
.modal-overlay { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.6); z-index: 2000; justify-content: center; align-items: center; }
.modal-box { background: white; width: 400px; border-radius: 8px; padding: 25px; box-shadow: 0 10px 30px rgba(0,0,0,0.3); position: relative; }
.modal-header { font-weight: bold; font-size: 1.2rem; margin-bottom: 15px; }
.close-modal { position: absolute; top: 15px; right: 20px; cursor: pointer; font-size: 20px; }
.create-new-box { margin-top: 15px; display: flex; gap: 10px; }

/* Modal Collection Specifics */
.col-list-row { display: flex; justify-content: space-between; align-items: center; padding: 12px; border-bottom: 1px solid #eee; transition: background 0.1s; }
.col-list-row:hover { background: #f8f9fa; }
.col-info { display: flex; flex-direction: column; }
.col-name { font-weight: 600; color: var(--text-main); font-size: 14px; }
.col-status { font-size: 11px; color: #999; }
.btn-add-col { background: white; border: 1px solid var(--accent-green); color: var(--accent-green); padding: 5px 12px; border-radius: 4px; font-size: 11px; font-weight: bold; cursor: pointer; text-transform: uppercase; transition: all 0.2s; }
.btn-add-col:hover { background: var(--accent-green); color: white; }
.btn-remove-col { background: #fff5f5; border-color: #ffc9c9; color: #e03131; }
.btn-remove-col:hover { background: #e03131; color: white; border-color: #e03131; }
.modal-options { background: #f1f3f5; padding: 10px; border-radius: 4px; margin-bottom: 15px; display: flex; gap: 15px; align-items: center; font-size: 13px; }

/* SEARCH PAGE UPDATES */
.search-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}
.search-title h2 { font-size: 24px; margin: 0; color: var(--text-main); }
.search-count { font-size: 14px; color: var(--text-muted); font-weight: normal; margin-left: 10px; }
.sort-form select {
    padding: 8px 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    color: var(--text-main);
    background: #fff;
    cursor: pointer;
    font-family: var(--font-body);
}

/* COLLECTION ITEM REMOVE BTN */
.remove-from-col-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 32px;
    height: 32px;
    background: rgba(0,0,0,0.6);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    transition: all 0.2s;
    z-index: 10;
}
.card:hover .remove-from-col-btn { opacity: 1; }
.remove-from-col-btn:hover { background: #e03131; }

/* Account */
.account-wrapper { display: flex; flex-wrap: wrap; gap: 40px; margin-top: 30px; }
.account-sidebar { flex: 1; min-width: 250px; }
.account-main { flex: 2; min-width: 300px; }
.profile-box { background: white; padding: 25px; border-radius: 8px; border: 1px solid #eee; margin-bottom: 20px; }
.profile-label { font-size: 12px; color: #999; text-transform: uppercase; font-weight: bold; margin-bottom: 5px; }
.profile-value { font-size: 16px; font-weight: 600; margin-bottom: 20px; color: var(--text-main); }
.sub-status { display: inline-block; padding: 5px 12px; border-radius: 20px; font-size: 12px; font-weight: bold; text-transform: uppercase; }
.sub-active { background: #e6fcf5; color: #0ca678; border: 1px solid #b2f2bb; }
.sub-free { background: #f1f3f5; color: #495057; border: 1px solid #dee2e6; }
.sub-expired { background: #fff5f5; color: #e03131; border: 1px solid #ffc9c9; }
.plan-card { border: 2px solid var(--accent-pink); border-radius: 8px; padding: 30px; background: #fff0f6; text-align: center; position: relative; }
.plan-title { font-size: 1.5rem; font-weight: 800; color: var(--accent-pink); margin-bottom: 10px; }
.plan-price { font-size: 2.5rem; font-weight: 900; color: var(--text-main); margin-bottom: 20px; }
.plan-price span { font-size: 1rem; color: #777; font-weight: normal; }
.plan-features { list-style: none; padding: 0; margin: 0 0 25px 0; text-align: left; display: inline-block; }
.plan-features li { margin-bottom: 8px; font-size: 14px; }
.plan-features li::before { content: "✓"; color: var(--accent-pink); font-weight: bold; margin-right: 8px; }
#paypal-button-container { margin-top: 20px; max-width: 300px; margin-left: auto; margin-right: auto; }

/* --- RESPONSIVE CUSTOM SECTIONS --- */
@media (max-width: 800px) {
    .mobile-stack {
        flex-direction: column !important;
        text-align: center !important;
        gap: 30px !important; 
    }
    .mobile-stack .custom-img-wrapper {
        width: 100%;
        text-align: center;
        margin-bottom: 20px;
    }
    .mobile-stack .custom-img-wrapper img {
        max-width: 100% !important;
        width: 100% !important; 
        height: auto !important;
        margin: 0 auto;
    }
    .mobile-hide .custom-img-wrapper { display: none !important; }
    .mobile-force { gap: 10px !important; }
}

/* --- RICH TEXT IMAGE ALIGNMENT --- */
img.img-left { float: left; margin: 5px 20px 10px 0; max-width: 50%; height: auto; }
img.img-right { float: right; margin: 5px 0 10px 20px; max-width: 50%; height: auto; }
img.img-center { display: block; margin: 20px auto; max-width: 100%; height: auto; }
.section-desc-row::after { content: ""; display: table; clear: both; }

/* --- NEW SMART SEARCH BAR --- */
.search-wrapper {
    margin: 0 auto;
    position: relative;
    z-index: 100;
}

.search-form {
    display: flex;
    align-items: center;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    padding: 5px;
    border: 1px solid #e1e4e8;
    position: relative;
}

/* Scope Dropdown Trigger */
.search-scope {
    position: relative;
    border-right: 1px solid #eee;
    margin-right: 5px;
}

.scope-trigger {
    background: transparent;
    border: none;
    padding: 10px 15px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-main);
    white-space: nowrap;
}

.scope-icon { font-size: 16px; color: var(--accent-pink); }
.scope-trigger .arrow { font-size: 10px; color: #999; }

/* The Dropdown Menu */
.scope-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 10px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    width: 220px;
    display: none;
    overflow: hidden;
    z-index: 200;
    border: 1px solid #eee;
    animation: fadeIn 0.2s ease;
}
.scope-dropdown.show { display: block; }

.scope-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 15px;
    cursor: pointer;
    transition: background 0.1s;
    font-size: 14px;
    color: var(--text-main);
}
.scope-item:hover { background: #f8f9fa; }

.scope-thumb {
    width: 24px;
    height: 24px;
    border-radius: 4px;
    object-fit: cover;
    background: #eee;
}
.scope-all-icon {
    display: flex; align-items: center; justify-content: center;
    font-weight: bold; color: #777; font-size: 16px;
}

/* Input Field */
.search-form input[type="text"] {
    flex: 1;
    border: none;
    background: transparent;
    padding: 12px 15px;
    font-size: 16px;
    outline: none;
    box-shadow: none !important; /* Override global input shadow */
}

/* Search Button */
.search-btn {
    background: var(--accent-primary);
    color: white;
    border: none;
    padding: 10px 25px;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}
.search-btn:hover { background: var(--accent-hover); }

/* Mobile Adaptations */
@media (max-width: 600px) {
    .search-wrapper { width: 95% !important; }
    .scope-label { display: none; } /* Hide label on tiny screens */
    .scope-trigger { padding: 10px; }
}

/* --- SURGICAL INJECTION: COOKIE CONSENT BANNER --- */
.cookie-banner {
    position: fixed;
    bottom: -100%;
    left: 0;
    width: 100%;
    background-color: var(--bg-card, #ffffff);
    color: var(--text-main, #333333);
    padding: 20px;
    box-shadow: 0 -5px 15px rgba(0, 0, 0, 0.1);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    transition: bottom 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    border-top: 2px solid var(--accent, #e03131);
}

.cookie-banner.show {
    bottom: 0;
}

.cookie-text {
    flex: 1 1 300px;
    max-width: 800px;
    font-size: 14px;
    line-height: 1.5;
    font-family: var(--font-body, 'Inter', sans-serif);
}

.cookie-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.btn-essential {
    background-color: transparent;
    border: 1px solid #ccc;
    color: var(--text-main, #555);
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.2s ease;
}

.btn-essential:hover {
    background-color: #f1f3f5;
}

.btn-accept-all {
    background-color: var(--accent, #e03131);
    border: 1px solid var(--accent, #e03131);
    color: white;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.2s ease;
}

.btn-accept-all:hover {
    background-color: #c92a2a;
}