/* ==========================================================================
   1. DESIGN TOKENS & RESET
   ========================================================================== */
:root {
    --bg: #ffffff;
    --surface: #f8fafc;
    --text: #1e293b;
    --muted: #64748b;
    --primary: #0f172a;
    --accent: #2563eb;
    --accent-hover: #1d4ed8;
    --border: #e2e8f0;
    --radius: 8px;
    --container: 1180px;
}

*, *::before, *::after { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: var(--text);
    background: var(--bg);
    line-height: 1.65;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.container {
    width: 100%;
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 20px;
}

.site-main { flex: 1; }

/* ==========================================================================
   2. TOP UTILITY BAR & HEADER (OVERFLOW-PROOF N-MENU SLOTS)
   ========================================================================== */
.site-topbar {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    font-size: 0.85rem;
    padding: 6px 0;
}
.topbar-inner { display: flex; justify-content: flex-end; }
.topbar-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}
.topbar-list a { color: var(--muted); }
.topbar-list a:hover { color: var(--primary); }

.site-header {
    background: #fff;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    min-height: 72px;
    padding-top: 8px;
    padding-bottom: 8px;
}
.site-brand { flex-shrink: 0; }
.brand-link { display: inline-flex; align-items: center; text-decoration: none !important; }
.brand-logo { max-height: 80px; width: auto; }
.brand-title { font-size: 1.35rem; font-weight: 700; color: var(--primary); letter-spacing: -0.02em; }

.primary-nav {
    flex: 1;
    min-width: 0;
    display: flex;
    justify-content: flex-end;
}
.primary-menu {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 4px 18px;
}
.primary-menu > li { position: relative; }
.primary-menu > li > a {
    display: inline-block;
    padding: 8px 4px;
    color: var(--text);
    font-weight: 500;
    font-size: 0.95rem;
    white-space: nowrap;
    text-decoration: none;
}
.primary-menu > li > a:hover { color: var(--accent); }
.caret { font-size: 0.7rem; margin-left: 3px; }

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 210px;
    max-width: 280px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.1);
    list-style: none;
    margin: 0;
    padding: 8px 0;
    z-index: 120;
}
.has-dropdown:hover .dropdown-menu,
.has-dropdown:focus-within .dropdown-menu { display: block; }
.dropdown-menu a {
    display: block;
    padding: 8px 16px;
    color: var(--text);
    font-size: 0.9rem;
    white-space: normal;
    text-decoration: none;
}
.dropdown-menu a:hover { background: var(--surface); color: var(--accent); }

.nav-toggle {
    display: none;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 6px 12px;
    font-size: 1.25rem;
    cursor: pointer;
    color: var(--primary);
}

/* ==========================================================================
   3. BUTTONS, BADGES & TYPOGRAPHY
   ========================================================================== */
.btn {
    display: inline-block;
    background: var(--accent);
    color: #fff !important;
    padding: 11px 22px;
    border-radius: 6px;
    font-weight: 500;
    font-size: 0.95rem;
    border: none;
    cursor: pointer;
    text-decoration: none !important;
    transition: background 0.15s ease;
}
.btn:hover { background: var(--accent-hover); }
.btn-sm { padding: 8px 15px; font-size: 0.875rem; }

.eyebrow {
    display: inline-block;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 6px;
}
.badge {
    display: inline-block;
    background: #eff6ff;
    color: var(--accent);
    font-size: 0.78rem;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 999px;
    margin-bottom: 8px;
}
.lead { font-size: 1.12rem; color: var(--muted); }
.muted { color: var(--muted); }

/* ==========================================================================
   4. HOMEPAGE BLOCKS & SLIDER
   ========================================================================== */
.hero-slider { position: relative; overflow: hidden; background: var(--primary); }
.hero-slide { display: none; position: relative; }
.hero-slide.is-active { display: block; }
.hero-slide img {
  width: 100%;
  height: auto;
  /*max-height: 600px; /* Change this to your desired max height */
  object-fit: contain;
  display: block;
  margin: 0 auto;
  opacity: 1;
}
.hero-caption {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(15,23,42,0.75), rgba(15,23,42,0.2));
    display: flex;
    align-items: center;
    color: #fff;
}
.hero-caption h1 { font-size: 2.5rem; margin: 0 0 12px; max-width: 720px; line-height: 1.2; }
.hero-caption p { font-size: 1.15rem; margin: 0 0 22px; max-width: 620px; color: #e2e8f0; }
.hero-dots {
    position: absolute;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
}
.hero-dot {
    width: 11px;
    height: 11px;
    border-radius: 50%;
    border: none;
    background: rgba(255,255,255,0.45);
    cursor: pointer;
    padding: 0;
}
.hero-dot.is-active { background: #fff; }

.section-block { padding: 60px 0; border-bottom: 1px solid var(--border); }
.section-block h1, .section-block h2 { color: var(--primary); margin-top: 0; line-height: 1.25; }
.align-center { text-align: center; }
.narrow-wrap { max-width: 820px; margin: 0 auto; }

.split-layout { display: flex; align-items: center; gap: 44px; }
.split-media, .split-content { flex: 1; }
.split-media img { border-radius: var(--radius); width: 100%; }

.block-cta { background: var(--primary); color: #fff; background-size: cover; background-position: center; }
.block-cta .cta-overlay { padding: 72px 0; text-align: center; }
.block-cta.has-bg .cta-overlay { background: rgba(15, 23, 42, 0.72); }
.block-cta h2 { color: #fff; font-size: 2rem; margin: 0 0 12px; }
.block-cta p { color: #e2e8f0; max-width: 680px; margin: 0 auto 24px; }

/* ==========================================================================
   5. CARDS, CATALOG, CATEGORY & DETAIL PAGES
   ========================================================================== */
.card-grid { display: grid; gap: 24px; margin-top: 24px; }
.grid-3 { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }

.item-card {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: #fff;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.item-card:hover { box-shadow: 0 10px 24px rgba(15,23,42,0.08); transform: translateY(-2px); }
.card-media img { width: 100%; height: 210px; object-fit: cover; }
.card-body { padding: 20px; flex: 1; display: flex; flex-direction: column; }
.card-body h3 { margin: 0 0 8px; font-size: 1.15rem; }
.card-body h3 a { color: var(--primary); text-decoration: none; }
.card-body h3 a:hover { color: var(--accent); }
.card-body p { color: var(--muted); font-size: 0.94rem; margin: 0 0 16px; flex: 1; }
.price-tag { font-weight: 700; color: var(--accent); margin-bottom: 10px; font-size: 1.05rem; }

.breadcrumb { font-size: 0.875rem; color: var(--muted); margin-bottom: 20px; }
.filter-pills { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.pill {
    padding: 6px 14px;
    border-radius: 999px;
    border: 1px solid var(--border);
    color: var(--text);
    font-size: 0.875rem;
    text-decoration: none !important;
}
.pill.is-active, .pill:hover { background: var(--accent); color: #fff; border-color: var(--accent); }

.category-header { display: flex; align-items: center; gap: 20px; margin-bottom: 24px; }
.category-banner-thumb { width: 96px; height: 96px; object-fit: cover; border-radius: var(--radius); flex-shrink: 0; }

.detail-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; }
.detail-main-img { width: 100%; border-radius: var(--radius); border: 1px solid var(--border); }
.detail-thumbs { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
.detail-thumbs img { width: 72px; height: 72px; object-fit: cover; border-radius: 6px; border: 1px solid var(--border); cursor: pointer; }
.detail-price { font-size: 1.4rem; font-weight: 700; color: var(--accent); margin: 8px 0 16px; }
.highlights-list { padding-left: 20px; margin: 16px 0; }
.highlights-list li { margin-bottom: 6px; }

/* ==========================================================================
   6. ARTICLES, SIDEBAR & CONTACT FORM
   ========================================================================== */
.layout-with-sidebar { display: grid; grid-template-columns: 1fr 280px; gap: 40px; align-items: start; }
.sidebar-box { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; }
.sidebar-box h4 { margin-top: 0; color: var(--primary); }
.sidebar-menu { list-style: none; padding: 0; margin: 0; }
.sidebar-menu li { border-bottom: 1px solid var(--border); }
.sidebar-menu li:last-child { border-bottom: none; }
.sidebar-menu a { display: block; padding: 8px 0; color: var(--text); }

.article-featured img { border-radius: var(--radius); margin-bottom: 24px; max-height: 440px; width: 100%; object-fit: cover; }
.article-contact-wrap { margin-top: 40px; padding-top: 32px; border-top: 1px solid var(--border); }

.contact-box { max-width: 560px; background: var(--surface); padding: 28px; border-radius: var(--radius); border: 1px solid var(--border); }
.form-stack .form-group { margin-bottom: 16px; }
.form-stack label { display: block; font-weight: 500; margin-bottom: 6px; font-size: 0.92rem; }
.form-stack input, .form-stack textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font: inherit;
    background: #fff;
}

.alert { padding: 12px 16px; border-radius: 6px; margin-bottom: 16px; font-size: 0.94rem; }
.alert.success { background: #dcfce7; color: #166534; border: 1px solid #bbf7d0; }
.alert.error { background: #fee2e2; color: #991b1b; border: 1px solid #fecaca; }

.pagination { display: flex; justify-content: center; gap: 8px; margin-top: 36px; }
.pagination a { padding: 8px 14px; border: 1px solid var(--border); border-radius: 6px; color: var(--text); }
.pagination a.is-active { background: var(--accent); color: #fff; border-color: var(--accent); }

/* ==========================================================================
   7. FOOTER & PERMANENT BOTTOM LEGAL BAR
   ========================================================================== */
.site-footer {
    background: var(--primary);
    color: #cbd5e1;
    margin-top: auto;
}
.footer-upper { padding: 28px 0; border-bottom: 1px solid rgba(255,255,255,0.1); }
.footer-upper-inner {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}
.footer-brand-info strong { color: #fff; }
.footer-brand-info a { color: #93c5fd; }
.footer-menu {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 10px 20px;
}
.footer-menu a { color: #cbd5e1; font-size: 0.92rem; }
.footer-menu a:hover { color: #fff; }

.footer-legal-bar {
    background: #020617;
    padding: 16px 0;
    font-size: 0.875rem;
    color: #94a3b8;
}
.footer-legal-inner {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}
.footer-legal-links a { color: #e2e8f0; font-weight: 500; }
.footer-legal-links a:hover { color: #fff; text-decoration: underline; }
.footer-legal-links .sep { margin: 0 10px; color: #475569; }

/* ==========================================================================
   8. RESPONSIVE BREAKPOINTS
   ========================================================================== */
@media (max-width: 820px) {
    .nav-toggle { display: inline-block; }
    .header-inner { flex-wrap: wrap; }
    .primary-nav {
        display: none;
        flex-basis: 100%;
        width: 100%;
        justify-content: flex-start;
        border-top: 1px solid var(--border);
        padding-top: 10px;
    }
    .primary-nav.is-open { display: block; }
    .primary-menu { flex-direction: column; align-items: stretch; gap: 0; }
    .primary-menu > li > a { display: block; padding: 10px 4px; border-bottom: 1px solid var(--surface); }
    .dropdown-menu { position: static; box-shadow: none; border: none; padding-left: 16px; max-width: 100%; }
    .split-layout, .detail-layout, .layout-with-sidebar, .category-header {
        grid-template-columns: 1fr;
        flex-direction: column;
        align-items: flex-start;
    }
    .hero-slide img { height: 320px; }
    .hero-caption h1 { font-size: 1.75rem; }
}
