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

:root {
    --blue: #1a73e8;
    --blue-dark: #1557b0;
    --gold: #f9a825;
    --gold-light: #fff8e1;
    --gray-50: #f8f9fa;
    --gray-100: #f1f3f4;
    --gray-200: #e8eaed;
    --gray-400: #9aa0a6;
    --gray-600: #5f6368;
    --gray-800: #3c4043;
    --gray-900: #202124;
    --white: #fff;
    --radius: 8px;
    --radius-lg: 24px;
    --shadow: 0 1px 6px rgba(32,33,36,.28);
    --shadow-hover: 0 2px 12px rgba(32,33,36,.2);
    --max-width: 1400px;
    --transition: 0.2s ease;
}

html { font-size: 16px; -webkit-text-size-adjust: 100%; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: var(--gray-900);
    background: var(--white);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a { color: var(--blue); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--blue-dark); }

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

/* Header */
.site-header {
    border-bottom: 1px solid var(--gray-200);
    background: var(--white);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0.75rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.nav-logo {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--blue);
    white-space: nowrap;
}
.nav-logo span { color: var(--gray-900); }
.nav-logo:hover { color: var(--blue); }

.nav-links {
    display: flex;
    gap: 1.25rem;
    margin-left: auto;
}
.nav-links a {
    color: var(--gray-600);
    font-size: 0.9rem;
    padding: 0.25rem 0;
    border-bottom: 2px solid transparent;
}
.nav-links a:hover,
.nav-links a.active {
    color: var(--blue);
    border-bottom-color: var(--blue);
}

/* Burger button – hidden on desktop */
.burger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    width: 32px;
    height: 32px;
    padding: 4px;
    background: none;
    border: none;
    cursor: pointer;
    flex-shrink: 0;
}
.burger span {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--gray-800);
    border-radius: 2px;
    transition: transform 0.25s, opacity 0.2s;
}
.burger--open span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.burger--open span:nth-child(2) { opacity: 0; }
.burger--open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* Mobile overlay */
.mobile-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.4);
    z-index: 199;
    opacity: 0;
    transition: opacity 0.25s;
}
.mobile-overlay--open { display: block; opacity: 1; }

/* Nav Search */
.nav-search {
    display: flex;
    align-items: center;
    flex: 1;
    max-width: 400px;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    padding: 0.25rem 0.5rem;
    background: var(--gray-50);
    transition: border-color var(--transition), box-shadow var(--transition);
}
.nav-search:focus-within {
    border-color: var(--blue);
    box-shadow: 0 0 0 2px rgba(26,115,232,.1);
    background: var(--white);
}
.nav-search input[type="search"] {
    flex: 1;
    border: none;
    outline: none;
    font-size: 0.85rem;
    padding: 0.3rem 0.4rem;
    background: transparent;
    font-family: inherit;
    min-width: 0;
}
.nav-search button {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--gray-600);
    padding: 0.2rem;
    display: flex;
    align-items: center;
}
.nav-search button:hover {
    color: var(--blue);
}
.nav-search-ai-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.2rem;
    display: flex;
    align-items: center;
}
.nav-search-ai-btn:hover .nav-search-ai {
    background: var(--blue-dark);
}
.nav-search-ai {
    font-size: 0.65rem;
    font-weight: 700;
    background: var(--blue);
    color: var(--white);
    padding: 0.1rem 0.3rem;
    border-radius: 3px;
    line-height: 1;
    transition: background var(--transition);
}

/* Main Content */
.main-content {
    flex: 1;
    max-width: var(--max-width);
    width: 100%;
    margin: 0 auto;
    padding: 0;
}

/* Footer */
.site-footer {
    border-top: 1px solid var(--gray-200);
    background: var(--gray-50);
    margin-top: auto;
}
.footer-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 1.5rem;
    text-align: center;
}
.footer-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 0.75rem;
}
.footer-links a { color: var(--gray-600); font-size: 0.875rem; }
.footer-links a:hover { color: var(--blue); }
.footer-copy { font-size: 0.8rem; color: var(--gray-400); }

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.5rem 1.25rem;
    border: 1px solid transparent;
    border-radius: var(--radius);
    font-size: 0.9rem;
    cursor: pointer;
    transition: all var(--transition);
    font-family: inherit;
    line-height: 1.5;
}
.btn-primary {
    background: var(--blue);
    color: var(--white);
}
.btn-primary:hover {
    background: var(--blue-dark);
    color: var(--white);
}
.btn-secondary {
    background: var(--gray-100);
    color: var(--gray-800);
    border-color: var(--gray-200);
}
.btn-secondary:hover {
    background: var(--gray-200);
    color: var(--gray-800);
}

/* Home Hero Intro */
.home-hero-intro {
    text-align: center;
    padding: 1.5rem 1rem 0;
}
.home-hero-intro h1 {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 0.4rem;
}
.home-hero-intro .h1-look { color: var(--blue); }
.home-hero-intro .h1-allweb { color: var(--gray-900); }
.home-hero-intro p {
    font-size: 0.85rem;
    color: var(--gray-600);
    line-height: 1.5;
    max-width: 600px;
    margin: 0 auto;
}

/* Home Hero */
.home-hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 4rem 1rem 2rem;
    text-align: center;
}
.home-logo h1 {
    font-size: 3rem;
    color: var(--blue);
    font-weight: 700;
}
.home-logo h1 span { color: var(--gray-900); }
.home-tagline {
    color: var(--gray-600);
    font-size: 1.1rem;
    margin: 0.5rem 0 2rem;
}

/* Search Form */
.search-form {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
}
.search-input-wrap {
    display: flex;
    align-items: center;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    padding: 0.5rem 0.75rem;
    background: var(--white);
    box-shadow: var(--shadow);
    transition: box-shadow var(--transition);
}
.search-input-wrap:focus-within {
    box-shadow: var(--shadow-hover);
    border-color: var(--blue);
}
.search-input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 1rem;
    padding: 0.5rem;
    background: transparent;
    font-family: inherit;
}
.search-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--blue);
    padding: 0.25rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}
.search-btn-ai {
    margin-right: 0.25rem;
}
.search-btn-ai:hover .search-ai-label {
    background: var(--blue-dark);
}
.search-ai-label {
    font-size: 0.75rem;
    font-weight: 700;
    background: var(--blue);
    color: var(--white);
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    line-height: 1;
    transition: background var(--transition);
}

/* Category Pills */
.home-categories {
    margin-top: 3rem;
    width: 100%;
    max-width: 700px;
}
.home-categories h2 {
    font-size: 1rem;
    color: var(--gray-600);
    font-weight: 400;
    margin-bottom: 1rem;
}
.category-pills {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
}
.pill {
    display: inline-block;
    padding: 0.4rem 0.9rem;
    border: 1px solid var(--gray-200);
    border-radius: 2rem;
    font-size: 0.85rem;
    color: var(--gray-800);
    background: var(--white);
    transition: all var(--transition);
}
.pill:hover {
    background: var(--blue);
    color: var(--white);
    border-color: var(--blue);
}

/* Error Page */
.error-page {
    text-align: center;
    padding: 4rem 1rem;
}
.error-page h1 { font-size: 4rem; color: var(--gray-400); }
.error-page p { color: var(--gray-600); margin: 1rem 0 2rem; }

/* Form Styles */
.form-group { margin-bottom: 1.25rem; }
.form-group label {
    display: block;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 0.4rem;
    color: var(--gray-800);
}
.form-control {
    width: 100%;
    padding: 0.6rem 0.75rem;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    font-size: 0.95rem;
    font-family: inherit;
    transition: border-color var(--transition);
}
.form-control:focus {
    outline: none;
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(26,115,232,.15);
}
textarea.form-control { resize: vertical; min-height: 100px; }
select.form-control { appearance: auto; }

/* Contact Info */
.contact-info {
    margin-bottom: 2rem;
    padding: 1rem 1.25rem;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    background: var(--gray-50);
    line-height: 1.7;
    font-size: 0.9rem;
    color: var(--gray-800);
}
.contact-info p { margin: 0; }

.alert {
    padding: 0.75rem 1rem;
    border-radius: var(--radius);
    margin-bottom: 1.25rem;
    font-size: 0.9rem;
}
.alert-success { background: #e6f4ea; color: #137333; }
.alert-error { background: #fce8e6; color: #c5221f; }

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 0.25rem;
    margin-top: 2rem;
    list-style: none;
}
.pagination a, .pagination span {
    display: inline-block;
    padding: 0.4rem 0.8rem;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    font-size: 0.875rem;
    color: var(--gray-800);
}
.pagination a:hover { background: var(--gray-100); }
.pagination .active { background: var(--blue); color: var(--white); border-color: var(--blue); }

/* Breadcrumb */
.breadcrumb {
    display: flex;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--gray-600);
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}
.breadcrumb a { color: var(--blue); }
.breadcrumb .sep { color: var(--gray-400); }

/* Page with Sidebar */
.page-with-sidebar { display: flex; gap: 1.5rem; max-width: 1400px; width: 100%; margin: 0 auto; padding: 0 1.5rem; }
.page-with-sidebar > .main-content { flex: 1; min-width: 0; max-width: none; }
.page-sidebar { width: 300px; flex-shrink: 0; padding: 1.5rem 1.5rem 1.5rem 0; }
.page-sidebar .ad-slot { position: sticky; top: 70px; }

/* Sidebar Featured Listings */
.sidebar-featured {
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    padding: 0.75rem 0.85rem;
    margin-bottom: 1rem;
    background: var(--white);
}
.sidebar-featured__title {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 0.5rem;
}
.sidebar-featured__item {
    display: block;
    padding: 0.45rem 0;
    border-bottom: 1px solid var(--gray-100);
    text-decoration: none;
    color: inherit;
    transition: background var(--transition);
}
.sidebar-featured__item:last-child { border-bottom: none; }
.sidebar-featured__item:hover { color: var(--blue); }
.sidebar-featured__name {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--gray-900);
    display: flex;
    align-items: center;
    gap: 0.35rem;
}
.sidebar-featured__item:hover .sidebar-featured__name { color: var(--blue); }
.sidebar-featured__badge {
    font-size: 0.65rem;
    font-weight: 500;
    padding: 0.05rem 0.35rem;
    border-radius: 3px;
    background: var(--gold);
    color: var(--white);
    flex-shrink: 0;
}
.sidebar-featured__rating { font-size: 0.75rem; color: var(--gray-600); margin-top: 0.1rem; }
.sidebar-featured__stars { letter-spacing: -1px; }
.sf-star-on { color: var(--gold); }
.sf-star-off { color: var(--gray-200); }
.sidebar-featured__score { margin-left: 0.2rem; }
.sidebar-featured__cat { font-size: 0.7rem; color: var(--gray-400); margin-top: 0.1rem; }

/* Sidebar Newsletter */
.sidebar-newsletter {
    background: linear-gradient(135deg, #eef3ff 0%, #f0f7ff 100%);
    border: 1px solid #d2dff8;
    border-radius: var(--radius);
    padding: 1rem;
    margin-bottom: 1rem;
}
.sidebar-newsletter__title { font-size: 0.95rem; font-weight: 700; color: var(--gray-900); margin-bottom: 0.25rem; }
.sidebar-newsletter__text { font-size: 0.78rem; color: var(--gray-600); margin-bottom: 0.65rem; line-height: 1.4; }
.sidebar-newsletter__input {
    width: 100%;
    padding: 0.55rem 0.7rem;
    border: 1px solid var(--gray-200);
    border-radius: 6px;
    font-size: 0.9rem;
    font-family: inherit;
    background: var(--white);
    margin-bottom: 0.4rem;
    transition: border-color var(--transition);
}
.sidebar-newsletter__input:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(26,115,232,.12); }
.sidebar-newsletter__btn {
    width: 100%;
    padding: 0.55rem;
    border: none;
    border-radius: 6px;
    background: var(--blue);
    color: var(--white);
    font-size: 0.85rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: background var(--transition);
}
.sidebar-newsletter__btn:hover { background: var(--blue-dark); }
.sidebar-newsletter__btn:disabled { opacity: 0.6; cursor: default; }
.sidebar-newsletter__msg { font-size: 0.82rem; padding: 0.5rem 0 0; font-weight: 500; }

/* Ads */
.ad-slot { text-align: center; margin: 0.75rem auto; }
.ad-slot img { max-width: 100%; height: auto; }
.ad-slot picture { display: block; }

/* HTML ad variants: show only the correct breakpoint */
.ad-v--tablet, .ad-v--mobile { display: none; }
@media (max-width: 1023px) {
    .ad-v--desktop { display: none; }
    .ad-v--tablet { display: block; }
}
@media (max-width: 767px) {
    .ad-v--tablet { display: none; }
    .ad-v--mobile { display: block; }
}

/* Mobile sticky bottom branding */
.sticky-bottom-ad {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    background: var(--white);
    box-shadow: 0 -2px 12px rgba(0,0,0,.15);
    transform: translateY(100%);
    transition: transform 0.35s ease;
}
.sticky-bottom-ad--visible { transform: translateY(0); }
.sticky-bottom-ad--hiding { transform: translateY(100%); }
.sticky-bottom-ad__close {
    position: absolute;
    top: -28px;
    right: 6px;
    width: 28px;
    height: 28px;
    border: none;
    border-radius: 50% 50% 0 0;
    background: var(--white);
    box-shadow: 0 -2px 6px rgba(0,0,0,.1);
    font-size: 1.1rem;
    line-height: 1;
    color: var(--gray-600);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}
.sticky-bottom-ad__close:hover { color: var(--gray-900); }
.sticky-bottom-ad__content { text-align: center; padding: 0.35rem; }
.sticky-bottom-ad__content img { max-width: 100%; max-height: 90px; height: auto; display: block; margin: 0 auto; }

@media (max-width: 1024px) {
    .sticky-bottom-ad { display: block; }
    .page-with-sidebar { flex-direction: column; }
    .page-sidebar { width: 100%; padding: 0 1.5rem 1.5rem; }
}

/* Responsive */
@media (max-width: 768px) {
    .home-logo h1 { font-size: 2rem; }
    .nav-links { gap: 0.75rem; }
    .nav-container { padding: 0.5rem 1rem; }
    .main-content { padding: 1rem 0; }
    .page-with-sidebar { padding: 0 1rem; }
    .nav-search { max-width: 250px; }
}

/* Mobile slide-in menu (outside header, proper z-index) */
.mobile-menu {
    display: none;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 260px;
    background: var(--white);
    padding: 4.5rem 1.25rem 1.5rem;
    z-index: 200;
    box-shadow: 2px 0 16px rgba(0,0,0,.15);
    transform: translateX(-100%);
    transition: transform 0.25s ease;
}
.mobile-menu--open { transform: translateX(0); }
.mobile-menu a {
    font-size: 1rem;
    padding: 0.65rem 0;
    border-bottom: 1px solid var(--gray-100);
    color: var(--gray-800);
    text-decoration: none;
}
.mobile-menu a:last-child { border-bottom: none; }
.mobile-menu a.active { color: var(--blue); }

@media (max-width: 960px) {
    .burger { display: flex; }
    .mobile-menu { display: flex; }
    .nav-links--desktop { display: none; }
    .nav-search { max-width: none; }
}

@media (max-width: 480px) {
    .burger { width: 20px; height: 32px; padding: 4px 0; }
    .nav-container { padding: 0.5rem 0.5rem; gap: 0.5rem; }
    .home-hero { padding: 2rem 0.5rem; }
}
