/* ==========================================================================
   Prime Automation — Main Stylesheet
   Luxury Smart Living. Intelligent Solutions.
   Apple-inspired premium UI · white + charcoal + soft gradients
   ========================================================================== */

/* --------------------------------------------------------------------------
   Design tokens
   -------------------------------------------------------------------------- */
:root {
    --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
            Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji";

    --bg: #ffffff;
    --bg-soft: #f5f5f7;
    --bg-softer: #fafafc;
    --bg-dark: #1d1d1f;
    --bg-dark-2: #161618;
    --bg-dark-3: #232326;

    --text: #1d1d1f;
    --text-muted: #6e6e73;
    --text-invert: #f5f5f7;
    --line: #e3e3e8;
    --line-dark: rgba(255, 255, 255, 0.14);

    --accent: #0071e3;
    --accent-dark: #0064c9;
    --accent-soft: #e8f1fd;
    --accent-grad: linear-gradient(135deg, #0071e3 0%, #5ac8fa 100%);
    --gold: #c9a24b;
    --success: #2e7d32;
    --danger: #d93025;

    --radius: 18px;
    --radius-sm: 12px;
    --radius-xs: 8px;

    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow: 0 6px 24px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 24px 60px rgba(0, 0, 0, 0.16);

    --container: 1200px;
    --header-h: 72px;
    --ease: cubic-bezier(0.33, 1, 0.68, 1);
}

/* --------------------------------------------------------------------------
   Reset & base
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

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

body {
    margin: 0;
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.6;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

a { color: var(--accent); text-decoration: none; transition: color 0.2s var(--ease); }
a:hover { color: var(--accent-dark); }

h1, h2, h3, h4, h5, h6 {
    font-weight: 650;
    line-height: 1.2;
    letter-spacing: -0.02em;
    margin: 0 0 0.5em;
    color: var(--text);
}

p { margin: 0 0 1em; }

ul, ol { margin: 0 0 1em; padding-left: 1.4em; }

button { font-family: inherit; cursor: pointer; }

::selection { background: var(--accent); color: #fff; }

/* --------------------------------------------------------------------------
   Layout utilities
   -------------------------------------------------------------------------- */
.container {
    width: 100%;
    max-width: var(--container);
    margin-inline: auto;
    padding-inline: 24px;
}

.section { padding: 88px 0; }
.section-soft { background: var(--bg-soft); }
.section-dark {
    background: var(--bg-dark);
    color: var(--text-invert);
}
.section-dark h1, .section-dark h2, .section-dark h3, .section-dark h4 {
    color: var(--text-invert);
}

.section-head { max-width: 720px; margin: 0 auto 48px; text-align: center; }
.section-head .eyebrow { color: var(--accent); font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; font-size: 0.8rem; }
.section-head h2 { font-size: clamp(1.75rem, 3vw, 2.4rem); margin-bottom: 12px; }
.section-head p { color: var(--text-muted); font-size: 1.05rem; margin-bottom: 0; }
.section-dark .section-head p { color: rgba(255,255,255,0.72); }

.eyebrow { color: var(--accent); font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; font-size: 0.8rem; }

.visually-hidden {
    position: absolute !important;
    width: 1px; height: 1px;
    margin: -1px; padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

.skip-link {
    position: absolute;
    left: -9999px;
    top: 8px;
    background: var(--accent);
    color: #fff;
    padding: 10px 16px;
    border-radius: 8px;
    z-index: 9999;
}
.skip-link:focus { left: 8px; }

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 13px 26px;
    border-radius: 980px;
    border: 1px solid transparent;
    font-size: 0.98rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    text-decoration: none;
    transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease),
                background-color 0.2s var(--ease), border-color 0.2s var(--ease),
                color 0.2s var(--ease);
    white-space: nowrap;
}
.btn:focus-visible { outline: 3px solid var(--accent-soft); outline-offset: 2px; }

.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 8px 20px rgba(0, 113, 227, 0.28); }
.btn-primary:hover { background: var(--accent-dark); color: #fff; transform: translateY(-2px); box-shadow: 0 12px 28px rgba(0, 113, 227, 0.34); }

.btn-dark { background: var(--bg-dark); color: #fff; }
.btn-dark:hover { background: #000; color: #fff; transform: translateY(-2px); }

.btn-light { background: #fff; color: var(--bg-dark); }
.btn-light:hover { background: var(--bg-soft); color: var(--bg-dark); transform: translateY(-2px); }

.btn-outline { background: transparent; color: var(--accent); border-color: var(--accent); }
.btn-outline:hover { background: var(--accent-soft); color: var(--accent-dark); }

.btn-outline-light { background: transparent; color: #fff; border-color: rgba(255,255,255,0.6); }
.btn-outline-light:hover { background: rgba(255,255,255,0.12); color: #fff; }

.btn-link { background: transparent; color: var(--accent); padding: 13px 8px; }
.btn-link:hover { color: var(--accent-dark); text-decoration: underline; }

.btn-lg { padding: 16px 34px; font-size: 1.05rem; }
.btn-sm { padding: 9px 18px; font-size: 0.9rem; }
.btn-block { width: 100%; }

/* --------------------------------------------------------------------------
   Header / Navbar
   -------------------------------------------------------------------------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.82);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    transition: box-shadow 0.3s var(--ease);
}
.site-header.scrolled { box-shadow: 0 6px 24px rgba(0, 0, 0, 0.08); }

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    min-height: var(--header-h);
}

.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--text); }
.brand:hover { color: var(--text); }
.brand-mark { border-radius: 9px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name { font-weight: 700; font-size: 1.08rem; letter-spacing: -0.02em; }
.brand-tagline { font-size: 0.72rem; color: var(--text-muted); letter-spacing: 0.02em; }

.main-nav .nav-list { display: flex; align-items: center; gap: 4px; list-style: none; margin: 0; padding: 0; }
.nav-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 10px 14px;
    border-radius: 980px;
    color: var(--text);
    font-size: 0.95rem;
    font-weight: 500;
}
.nav-link:hover { background: var(--bg-soft); color: var(--text); }
.nav-link.active { color: var(--accent); }
.nav-link .caret { width: 14px; height: 14px; fill: currentColor; transition: transform 0.2s var(--ease); }

.has-dropdown { position: relative; }
.has-dropdown:hover .dropdown { opacity: 1; visibility: visible; transform: translateY(0); }
.has-dropdown:hover .caret { transform: rotate(180deg); }

.dropdown {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    min-width: 240px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 14px;
    box-shadow: var(--shadow-lg);
    padding: 8px;
    list-style: none;
    margin: 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(6px);
    transition: opacity 0.2s var(--ease), transform 0.2s var(--ease), visibility 0.2s;
}
.dropdown a {
    display: block;
    padding: 10px 14px;
    border-radius: 9px;
    color: var(--text);
    font-size: 0.94rem;
}
.dropdown a:hover { background: var(--bg-soft); color: var(--accent); }

.header-actions { display: flex; align-items: center; gap: 12px; }

.header-search {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-soft);
    border: 1px solid transparent;
    border-radius: 980px;
    padding: 6px 6px 6px 14px;
    transition: border-color 0.2s var(--ease), background-color 0.2s var(--ease);
}
.header-search:focus-within { border-color: var(--accent); background: #fff; }
.header-search .search-icon { width: 16px; height: 16px; fill: var(--text-muted); flex: none; }
.header-search input {
    border: 0;
    background: transparent;
    outline: none;
    font-family: inherit;
    font-size: 0.92rem;
    width: 190px;
    color: var(--text);
}
.header-search input::placeholder { color: var(--text-muted); }
.search-submit {
    background: var(--accent);
    color: #fff;
    border: 0;
    border-radius: 980px;
    padding: 7px 14px;
    font-weight: 600;
    font-size: 0.85rem;
    transition: background-color 0.2s var(--ease);
}
.search-submit:hover { background: var(--accent-dark); }

.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    padding: 10px;
    background: var(--bg-soft);
    border: 0;
    border-radius: 12px;
}
.nav-toggle span { display: block; height: 2px; width: 100%; background: var(--text); border-radius: 2px; transition: transform 0.25s var(--ease), opacity 0.25s; }
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-cta { display: none; }

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */
.hero {
    position: relative;
    overflow: hidden;
    background: var(--bg-dark);
    color: #fff;
    padding: 120px 0 140px;
}
.hero-bg {
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(60% 80% at 78% 20%, rgba(0, 113, 227, 0.42), transparent 60%),
        radial-gradient(50% 70% at 15% 85%, rgba(90, 200, 250, 0.24), transparent 60%),
        linear-gradient(180deg, #101013 0%, #1d1d1f 100%);
}
.hero-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(255,255,255,0.07) 1px, transparent 1px);
    background-size: 26px 26px;
    -webkit-mask-image: radial-gradient(70% 70% at 50% 30%, #000 20%, transparent 75%);
    mask-image: radial-gradient(70% 70% at 50% 30%, #000 20%, transparent 75%);
}

.hero-inner { position: relative; z-index: 1; text-align: center; max-width: 840px; margin: 0 auto; }
.hero h1 {
    color: #fff;
    font-size: clamp(2.4rem, 5.5vw, 4.2rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    margin-bottom: 20px;
}
.hero h1 .gradient-text {
    background: linear-gradient(120deg, #5ac8fa, #0071e3 55%, #c9a24b 115%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.hero p.hero-sub {
    color: rgba(255,255,255,0.78);
    font-size: clamp(1.05rem, 2vw, 1.25rem);
    max-width: 640px;
    margin: 0 auto 36px;
}
.hero-cta { display: flex; justify-content: center; gap: 16px; flex-wrap: wrap; }
.hero-stats {
    display: flex;
    justify-content: center;
    gap: 48px;
    flex-wrap: wrap;
    margin-top: 56px;
}
.hero-stat { text-align: center; }
.hero-stat strong { display: block; font-size: 1.9rem; color: #fff; font-weight: 700; }
.hero-stat span { color: rgba(255,255,255,0.65); font-size: 0.9rem; }

/* --------------------------------------------------------------------------
   Category cards
   -------------------------------------------------------------------------- */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}
.category-card {
    position: relative;
    display: block;
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--bg-soft);
    aspect-ratio: 4 / 5;
    box-shadow: var(--shadow-sm);
    transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.category-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.category-card img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s var(--ease);
}
.category-card:hover img { transform: scale(1.06); }
.category-card .category-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 22px;
    background: linear-gradient(to top, rgba(10,10,12,0.85) 0%, rgba(10,10,12,0.1) 55%, transparent 100%);
    color: #fff;
}
.category-card h3 { color: #fff; font-size: 1.25rem; margin-bottom: 4px; }
.category-card .category-count { color: rgba(255,255,255,0.8); font-size: 0.85rem; }
.category-card .category-link { color: #fff; font-weight: 600; font-size: 0.9rem; margin-top: 10px; display: inline-flex; align-items: center; gap: 6px; }
.category-card .category-link svg { width: 14px; height: 14px; fill: currentColor; }

/* --------------------------------------------------------------------------
   Feature strips
   -------------------------------------------------------------------------- */
.features-strip {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}
.feature-item {
    background: var(--bg-softer);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 28px 24px;
    text-align: center;
    transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.feature-item:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.feature-icon {
    width: 52px;
    height: 52px;
    margin: 0 auto 16px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: var(--accent-soft);
    color: var(--accent);
}
.feature-icon svg { width: 26px; height: 26px; fill: currentColor; }
.feature-item h3 { font-size: 1.02rem; margin-bottom: 6px; }
.feature-item p { font-size: 0.92rem; color: var(--text-muted); margin: 0; }

/* --------------------------------------------------------------------------
   Product cards
   -------------------------------------------------------------------------- */
.products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}
.product-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.product-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }

.product-media { position: relative; display: block; background: var(--bg-soft); }
.product-image-wrap { position: relative; aspect-ratio: 3 / 2; overflow: hidden; }
.product-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s var(--ease);
}
.product-card:hover .product-image { transform: scale(1.05); }

.product-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 5px 12px;
    border-radius: 980px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: #fff;
    z-index: 2;
}
.badge-best { background: var(--accent); }
.badge-new { background: var(--success); }
.badge-save { background: rgba(29, 29, 31, 0.85); left: auto; right: 12px; }

.product-body { padding: 20px; display: flex; flex-direction: column; flex: 1; }
.product-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.product-category { font-size: 0.78rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted); }
.product-category:hover { color: var(--accent); }
.product-title { font-size: 1.06rem; margin-bottom: 6px; }
.product-title a { color: var(--text); }
.product-title a:hover { color: var(--accent); }
.product-short { font-size: 0.9rem; color: var(--text-muted); margin-bottom: 14px; }
.product-price-row { display: flex; align-items: baseline; gap: 10px; margin-top: auto; margin-bottom: 16px; }
.product-price { font-size: 1.25rem; font-weight: 700; color: var(--text); }
.product-price-old { font-size: 0.92rem; color: var(--text-muted); text-decoration: line-through; }

/* Star rating */
.star-rating { display: inline-flex; gap: 1px; }
.star-rating .star { width: 14px; height: 14px; fill: #d8d8dc; }
.star-rating .star.filled { fill: var(--gold); }
.review-count { font-size: 0.78rem; color: var(--text-muted); }

/* --------------------------------------------------------------------------
   Reviews
   -------------------------------------------------------------------------- */
.reviews-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.review-card {
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--line-dark);
    border-radius: var(--radius);
    padding: 28px;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}
.review-card .stars { margin-bottom: 14px; }
.review-card .stars .star { width: 16px; height: 16px; fill: var(--gold); }
.review-card p { color: rgba(255,255,255,0.85); font-size: 0.98rem; margin-bottom: 18px; }
.review-author { display: flex; align-items: center; gap: 12px; }
.review-author img { width: 42px; height: 42px; border-radius: 50%; object-fit: cover; }
.review-author strong { color: #fff; font-size: 0.95rem; display: block; }
.review-author span { color: rgba(255,255,255,0.6); font-size: 0.82rem; }

/* --------------------------------------------------------------------------
   Newsletter
   -------------------------------------------------------------------------- */
.newsletter-section {
    background: var(--accent-grad);
    padding: 72px 0;
    color: #fff;
}
.newsletter-inner { text-align: center; max-width: 620px; }
.newsletter-heading { color: #fff; font-size: clamp(1.6rem, 3vw, 2.1rem); margin-bottom: 10px; }
.newsletter-sub { color: rgba(255,255,255,0.9); margin-bottom: 26px; }
.newsletter-form { display: flex; gap: 10px; justify-content: center; }
.newsletter-form input {
    flex: 1;
    max-width: 380px;
    padding: 14px 20px;
    border-radius: 980px;
    border: 1px solid rgba(255,255,255,0.5);
    background: rgba(255,255,255,0.16);
    color: #fff;
    font-family: inherit;
    font-size: 0.98rem;
    outline: none;
}
.newsletter-form input::placeholder { color: rgba(255,255,255,0.75); }
.newsletter-form input:focus { border-color: #fff; background: rgba(255,255,255,0.24); }
.newsletter-note { font-size: 0.82rem; color: rgba(255,255,255,0.8); margin: 14px 0 0; }
.newsletter-status { border-radius: var(--radius-xs); padding: 12px 16px; margin-bottom: 18px; font-size: 0.95rem; }
.newsletter-status.success { background: rgba(255,255,255,0.2); color: #fff; }
.newsletter-status.error { background: rgba(255,255,255,0.2); color: #ffe9e6; }

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.site-footer { background: var(--bg-dark-2); color: rgba(255,255,255,0.78); padding: 80px 0 32px; }
.footer-top {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1fr;
    gap: 40px;
    padding-bottom: 48px;
    border-bottom: 1px solid var(--line-dark);
}
.footer-brand .brand-name { color: #fff; }
.footer-brand .brand-tagline { color: rgba(255,255,255,0.55); }
.footer-about { margin: 18px 0 14px; font-size: 0.92rem; color: rgba(255,255,255,0.65); max-width: 320px; }
.footer-contact { font-size: 0.92rem; }
.footer-contact a { color: #fff; }
.footer-heading { color: #fff; font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 18px; }
.footer-links { list-style: none; margin: 0; padding: 0; }
.footer-links li { margin-bottom: 10px; }
.footer-links a { color: rgba(255,255,255,0.68); font-size: 0.93rem; }
.footer-links a:hover { color: #fff; }
.footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    padding-top: 28px;
    font-size: 0.85rem;
    color: rgba(255,255,255,0.55);
}
.footer-legal { list-style: none; display: flex; gap: 20px; margin: 0; padding: 0; }
.footer-legal a { color: rgba(255,255,255,0.55); font-size: 0.85rem; }
.footer-legal a:hover { color: #fff; }

/* --------------------------------------------------------------------------
   Page header (inner pages)
   -------------------------------------------------------------------------- */
.page-header {
    background: var(--bg-dark);
    color: #fff;
    padding: 88px 0 72px;
    position: relative;
    overflow: hidden;
}
.page-header::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: radial-gradient(50% 90% at 80% 10%, rgba(0, 113, 227, 0.35), transparent 60%),
                      radial-gradient(45% 80% at 10% 90%, rgba(90, 200, 250, 0.18), transparent 55%);
}
.page-header .container { position: relative; z-index: 1; }
.page-header .eyebrow { color: #5ac8fa; }
.page-header h1 { color: #fff; font-size: clamp(2rem, 4vw, 3rem); margin-bottom: 12px; }
.page-header p { color: rgba(255,255,255,0.75); max-width: 640px; font-size: 1.05rem; margin: 0; }
.page-header .breadcrumbs { margin-top: 22px; }
.page-header .breadcrumbs a { color: rgba(255,255,255,0.7); }
.page-header .breadcrumbs span[aria-current] { color: #fff; }
.page-header .breadcrumbs li::after { color: rgba(255,255,255,0.4); }

/* --------------------------------------------------------------------------
   Breadcrumbs
   -------------------------------------------------------------------------- */
.breadcrumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; font-size: 0.88rem; }
.breadcrumbs li { display: inline-flex; align-items: center; }
.breadcrumbs li::after { content: "›"; margin: 0 6px; color: var(--text-muted); }
.breadcrumbs li:last-child::after { content: ""; }
.breadcrumbs a { color: var(--text-muted); }
.breadcrumbs a:hover { color: var(--accent); }
.breadcrumbs span[aria-current] { color: var(--text); font-weight: 500; }

/* --------------------------------------------------------------------------
   Forms
   -------------------------------------------------------------------------- */
.form-group { margin-bottom: 20px; }
.form-group label { display: block; font-weight: 600; font-size: 0.92rem; margin-bottom: 8px; }
.form-control {
    width: 100%;
    padding: 13px 16px;
    border: 1px solid var(--line);
    border-radius: var(--radius-xs);
    font-family: inherit;
    font-size: 0.98rem;
    color: var(--text);
    background: #fff;
    transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.form-control:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
textarea.form-control { resize: vertical; min-height: 150px; }
.form-error { color: var(--danger); font-size: 0.9rem; margin: 4px 0 0; }
.form-success {
    background: #e6f4ea;
    color: var(--success);
    border: 1px solid #b7dfc0;
    border-radius: var(--radius-xs);
    padding: 14px 18px;
    margin-bottom: 22px;
}

/* --------------------------------------------------------------------------
   Content layout
   -------------------------------------------------------------------------- */
.content-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 56px; align-items: start; }
.content-grid.wide { grid-template-columns: 1fr; }

.card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 28px;
}
.card-soft { background: var(--bg-softer); border-color: transparent; }

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }

/* --------------------------------------------------------------------------
   FAQ accordion
   -------------------------------------------------------------------------- */
.faq-list { max-width: 820px; margin: 0 auto; }
.faq-item {
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: #fff;
    margin-bottom: 14px;
    overflow: hidden;
    transition: box-shadow 0.25s var(--ease);
}
.faq-item.open { box-shadow: var(--shadow); }
.faq-question {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    text-align: left;
    padding: 20px 22px;
    background: transparent;
    border: 0;
    font-size: 1.02rem;
    font-weight: 600;
    color: var(--text);
}
.faq-question .faq-icon {
    flex: none;
    width: 26px; height: 26px;
    border-radius: 50%;
    background: var(--accent-soft);
    color: var(--accent);
    display: grid;
    place-items: center;
    transition: transform 0.25s var(--ease);
}
.faq-question .faq-icon svg { width: 14px; height: 14px; fill: currentColor; }
.faq-item.open .faq-icon { transform: rotate(45deg); }
.faq-answer { display: none; padding: 0 22px 20px; color: var(--text-muted); font-size: 0.97rem; }
.faq-item.open .faq-answer { display: block; animation: fadeIn 0.3s var(--ease); }

/* --------------------------------------------------------------------------
   Product detail page
   -------------------------------------------------------------------------- */
.product-detail { display: grid; grid-template-columns: 1fr 1.1fr; gap: 56px; align-items: start; }

.product-gallery .gallery-main {
    position: relative;
    aspect-ratio: 4 / 3;
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--bg-soft);
    margin-bottom: 14px;
}
.product-gallery .gallery-main img { width: 100%; height: 100%; object-fit: cover; }
.gallery-thumbs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.gallery-thumb {
    aspect-ratio: 1 / 1;
    border-radius: var(--radius-sm);
    overflow: hidden;
    border: 2px solid transparent;
    background: var(--bg-soft);
    padding: 0;
    transition: border-color 0.2s var(--ease);
}
.gallery-thumb img { width: 100%; height: 100%; object-fit: cover; }
.gallery-thumb.active { border-color: var(--accent); }

.product-info h1 { font-size: clamp(1.7rem, 3vw, 2.3rem); margin-bottom: 10px; }
.product-info .product-meta-line { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 18px; }
.product-info .product-meta-line .price { font-size: 1.6rem; font-weight: 700; }
.product-info .product-meta-line .price-old { font-size: 1.05rem; color: var(--text-muted); text-decoration: line-through; }
.product-info .lead { font-size: 1.06rem; color: var(--text-muted); margin-bottom: 20px; }
.product-cta { display: flex; gap: 14px; flex-wrap: wrap; margin: 24px 0; }
.product-perks { display: flex; gap: 22px; flex-wrap: wrap; list-style: none; margin: 0 0 24px; padding: 18px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.product-perks li { display: flex; align-items: center; gap: 8px; font-size: 0.9rem; color: var(--text-muted); }
.product-perks svg { width: 18px; height: 18px; fill: var(--success); flex: none; }

.spec-table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.spec-table th, .spec-table td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.spec-table tr:last-child th, .spec-table tr:last-child td { border-bottom: 0; }
.spec-table th { color: var(--text-muted); font-weight: 600; width: 40%; }
.spec-table td { color: var(--text); }

.check-list { list-style: none; padding: 0; margin: 0; }
.check-list li { position: relative; padding-left: 28px; margin-bottom: 12px; }
.check-list li::before {
    content: "";
    position: absolute;
    left: 0; top: 4px;
    width: 18px; height: 18px;
    background: var(--accent-soft);
    border-radius: 50%;
    -webkit-mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"/></svg>') center / contain no-repeat;
    mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"/></svg>') center / contain no-repeat;
}

/* Tabs */
.tabs { margin-top: 32px; }
.tab-nav { display: flex; gap: 6px; flex-wrap: wrap; border-bottom: 1px solid var(--line); margin-bottom: 26px; }
.tab-btn {
    border: 0;
    background: transparent;
    padding: 12px 18px;
    font-size: 0.98rem;
    font-weight: 600;
    color: var(--text-muted);
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
}
.tab-btn.active { color: var(--accent); border-bottom-color: var(--accent); }
.tab-panel { display: none; }
.tab-panel.active { display: block; animation: fadeIn 0.35s var(--ease); }

/* --------------------------------------------------------------------------
   Filter bar (shop)
   -------------------------------------------------------------------------- */
.filter-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 28px;
    padding: 16px 20px;
    background: var(--bg-softer);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
}
.filter-bar .result-count { font-size: 0.92rem; color: var(--text-muted); }
.filter-select {
    padding: 9px 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius-xs);
    font-family: inherit;
    background: #fff;
    color: var(--text);
}
.shop-layout { display: grid; grid-template-columns: 260px 1fr; gap: 32px; align-items: start; }
.filter-sidebar .filter-group { margin-bottom: 26px; }
.filter-sidebar h3 { font-size: 1rem; margin-bottom: 12px; }
.filter-sidebar ul { list-style: none; margin: 0; padding: 0; }
.filter-sidebar ul li { margin-bottom: 8px; }
.filter-sidebar label { display: flex; align-items: center; gap: 8px; font-size: 0.93rem; color: var(--text); cursor: pointer; }
.filter-sidebar input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--accent); }

.pagination { display: flex; justify-content: center; gap: 8px; margin-top: 40px; }
.pagination a, .pagination span {
    min-width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 8px;
    border-radius: 12px;
    border: 1px solid var(--line);
    color: var(--text);
    font-weight: 500;
    font-size: 0.92rem;
}
.pagination a:hover { border-color: var(--accent); color: var(--accent); }
.pagination .current { background: var(--accent); color: #fff; border-color: var(--accent); }

/* --------------------------------------------------------------------------
   Article / blog
   -------------------------------------------------------------------------- */
.blog-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.article-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.article-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.article-media { position: relative; aspect-ratio: 16 / 9; overflow: hidden; }
.article-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s var(--ease); }
.article-card:hover .article-media img { transform: scale(1.05); }
.article-body { padding: 24px; display: flex; flex-direction: column; flex: 1; }
.article-meta { font-size: 0.8rem; color: var(--text-muted); margin-bottom: 10px; }
.article-meta .tag { color: var(--accent); font-weight: 600; }
.article-title { font-size: 1.15rem; margin-bottom: 10px; }
.article-title a { color: var(--text); }
.article-title a:hover { color: var(--accent); }
.article-excerpt { font-size: 0.93rem; color: var(--text-muted); margin-bottom: 16px; }

.article-hero .container { max-width: 820px; }
.article-hero p { margin-bottom: 0; }
.article-hero .article-meta { margin-top: 20px; margin-bottom: 0; }

.article-body-content { max-width: 780px; margin: 0 auto; font-size: 1.06rem; }
.article-body-content h2 { font-size: 1.55rem; margin-top: 1.6em; }
.article-body-content p { color: #3a3a3c; }
.article-author-box {
    max-width: 780px;
    margin: 40px auto 0;
    display: flex;
    gap: 18px;
    align-items: center;
    background: var(--bg-softer);
    border-radius: var(--radius);
    padding: 22px;
}

/* --------------------------------------------------------------------------
   Cookie modal
   -------------------------------------------------------------------------- */
.cookie-overlay {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: grid;
    place-items: center;
    padding: 20px;
    background: rgba(20, 20, 24, 0.55);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s var(--ease), visibility 0.3s;
}
.cookie-overlay.show { opacity: 1; visibility: visible; }
.cookie-modal {
    width: 100%;
    max-width: 460px;
    background: #fff;
    border-radius: 22px;
    padding: 36px 32px;
    text-align: center;
    box-shadow: var(--shadow-lg);
    transform: translateY(14px) scale(0.97);
    transition: transform 0.3s var(--ease);
}
.cookie-overlay.show .cookie-modal { transform: translateY(0) scale(1); }
.cookie-icon {
    width: 64px; height: 64px;
    margin: 0 auto 16px;
    display: grid;
    place-items: center;
    border-radius: 18px;
    background: var(--accent-soft);
    color: var(--accent);
}
.cookie-title { font-size: 1.4rem; margin-bottom: 8px; }
.cookie-message { color: var(--text-muted); font-size: 0.97rem; margin-bottom: 22px; }
.cookie-actions { display: flex; flex-direction: column; gap: 10px; }
.cookie-actions .btn-link { justify-content: center; }

/* --------------------------------------------------------------------------
   Back to top
   -------------------------------------------------------------------------- */
.back-to-top {
    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: 900;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    border: 0;
    background: var(--bg-dark);
    color: #fff;
    display: grid;
    place-items: center;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity 0.25s var(--ease), transform 0.25s var(--ease), visibility 0.25s;
}
.back-to-top.show { opacity: 1; visibility: visible; transform: translateY(0); }
.back-to-top svg { width: 20px; height: 20px; fill: currentColor; }

/* --------------------------------------------------------------------------
   Misc
   -------------------------------------------------------------------------- */
.callout {
    background: var(--accent-soft);
    border-radius: var(--radius-sm);
    padding: 18px 20px;
    font-size: 0.96rem;
    color: #0059a6;
}
.callout a { text-decoration: underline; }

/* --------------------------------------------------------------------------
   Brand strip
   -------------------------------------------------------------------------- */
.brands-strip {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 14px;
}
.brand-chip {
    padding: 12px 24px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 980px;
    font-weight: 650;
    font-size: 1.05rem;
    color: var(--text);
    letter-spacing: 0.02em;
    transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease), border-color 0.2s;
}
.brand-chip:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--accent); }

/* --------------------------------------------------------------------------
   Recently viewed (product page)
   -------------------------------------------------------------------------- */
.recently-viewed { max-width: 780px; margin: 48px auto 0; }
.recently-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-top: 18px;
}
.recently-item {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    padding: 10px;
    color: var(--text);
    transition: box-shadow 0.2s var(--ease), transform 0.2s var(--ease);
}
.recently-item:hover { box-shadow: var(--shadow); transform: translateY(-2px); color: var(--text); }
.recently-thumb { flex: none; width: 72px; height: 54px; border-radius: var(--radius-xs); overflow: hidden; background: var(--bg-soft); }
.recently-thumb img { width: 100%; height: 100%; object-fit: cover; }
.recently-name { font-size: 0.86rem; font-weight: 550; line-height: 1.35; }
.recently-empty { color: var(--text-muted); font-size: 0.95rem; margin-top: 14px; }

/* --------------------------------------------------------------------------
   Toast notification
   -------------------------------------------------------------------------- */
.toast {
    position: fixed;
    left: 50%;
    bottom: 28px;
    transform: translate(-50%, 120%);
    z-index: 2100;
    max-width: min(92vw, 460px);
    background: var(--bg-dark);
    color: #fff;
    border-radius: 980px;
    padding: 14px 26px;
    font-size: 0.95rem;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    transition: transform 0.35s var(--ease), opacity 0.35s var(--ease);
    text-align: center;
}
.toast.show { transform: translate(-50%, 0); opacity: 1; }

.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
