/* ============================================================
   CERA storefront — modern e-commerce theme (per-tenant --accent)
   ============================================================ */
:root {
    --accent: #4f46e5;
    --accent-2: color-mix(in srgb, var(--accent) 62%, #22d3ee);
    --ink: #14161f; --muted: #667085; --line: #eaecf3;
    --bg: #ffffff; --soft: #f6f7fb; --soft-2: #eef1f8;
    --radius: 18px; --radius-sm: 12px;
    --shadow-sm: 0 1px 2px rgba(16,24,40,.06);
    --shadow-md: 0 12px 30px rgba(16,24,40,.10);
    --shadow-lg: 0 26px 60px rgba(16,24,40,.18);
    --grad: linear-gradient(120deg, var(--accent), var(--accent-2));
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { font-family: 'Inter', system-ui, sans-serif; color: var(--ink); margin: 0; background: var(--bg); -webkit-font-smoothing: antialiased; line-height: 1.55; }
h1, h2, h3, h4, .display { font-family: 'Space Grotesk', 'Inter', sans-serif; letter-spacing: -.02em; }
a { color: var(--accent); text-decoration: none; }
img { max-width: 100%; }
.container-x { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* Buttons */
.btn-x { display: inline-flex; align-items: center; justify-content: center; gap: .55rem; background: var(--grad); color: #fff; padding: .72rem 1.4rem; border-radius: 999px; font-weight: 600; border: 0; cursor: pointer; white-space: nowrap; transition: transform .16s ease, box-shadow .16s ease, filter .16s ease; box-shadow: 0 8px 20px color-mix(in srgb, var(--accent) 30%, transparent); }
.btn-x:hover { color: #fff; transform: translateY(-2px); box-shadow: 0 14px 28px color-mix(in srgb, var(--accent) 38%, transparent); }
.btn-x:active { transform: translateY(0); }
.btn-x.outline { background: #fff; color: var(--accent); border: 1.5px solid color-mix(in srgb, var(--accent) 35%, var(--line)); box-shadow: none; }
.btn-x.outline:hover { background: color-mix(in srgb, var(--accent) 8%, transparent); }
.btn-x.ghost { background: rgba(255,255,255,.18); color: #fff; box-shadow: none; backdrop-filter: blur(6px); border: 1px solid rgba(255,255,255,.4); }
.btn-x.ghost:hover { background: rgba(255,255,255,.3); }
.btn-x.sm { padding: .52rem 1rem; font-size: .85rem; }

/* Top contact bar */
.topbar { background: var(--ink); color: #c7cede; font-size: .82rem; }
.topbar .bar { display: flex; align-items: center; gap: 1.2rem; min-height: 40px; flex-wrap: wrap; }
.topbar a { color: #c7cede; display: inline-flex; align-items: center; gap: .35rem; }
.topbar a:hover { color: #fff; }
.topbar .spacer { margin-left: auto; }
.topbar .sep { opacity: .3; }
@media (max-width: 640px){ .topbar { display: none; } }

/* Header */
.store-header { position: sticky; top: 0; z-index: 100; background: rgba(255,255,255,.82); backdrop-filter: blur(14px) saturate(160%); border-bottom: 1px solid transparent; transition: box-shadow .25s ease, background .25s ease, border-color .25s ease; }
.store-header.scrolled { box-shadow: var(--shadow-md); background: rgba(255,255,255,.96); border-bottom-color: var(--line); }
.store-header .bar { display: flex; align-items: center; gap: 1.5rem; height: 76px; }
.store-logo { font-weight: 700; font-size: 1.35rem; color: var(--ink); display: flex; align-items: center; gap: .6rem; font-family: 'Space Grotesk', sans-serif; }
.store-logo img { height: 42px; }
.store-logo .bi { font-size: 1.6rem; background: var(--grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.store-nav { display: flex; gap: 1.5rem; margin-left: auto; align-items: center; }
.store-nav a { color: var(--ink); font-weight: 500; font-size: .95rem; position: relative; padding: 4px 0; }
.store-nav a:not(.btn-x)::after { content: ''; position: absolute; left: 0; right: 100%; bottom: -3px; height: 2px; background: var(--grad); border-radius: 2px; transition: right .22s ease; }
.store-nav a:not(.btn-x):hover { color: var(--accent); }
.store-nav a:not(.btn-x):hover::after, .store-nav a.active::after { right: 0; }
.store-nav a.active { color: var(--accent); }
/* CTA button in the nav must keep white text (higher specificity than `.store-nav a`). */
.store-nav a.btn-x { color: #fff; }
.menu-toggle { display: none; background: none; border: 0; font-size: 1.7rem; color: var(--ink); }

/* Hero slider */
.hero { position: relative; overflow: hidden; }
.hero .slide { position: relative; height: clamp(420px, 60vh, 600px); background-size: cover; background-position: center; background-repeat: no-repeat; display: none; }
.hero .slide.active { display: block; animation: heroFade .7s ease both; }
@keyframes heroFade { from { opacity: .35; } to { opacity: 1; } }
.hero .slide::after { content: ''; position: absolute; inset: 0; background: linear-gradient(105deg, rgba(9,12,22,.78) 0%, rgba(9,12,22,.35) 45%, rgba(9,12,22,.05) 100%); }
.hero .slide-body { position: absolute; inset: 0; display: flex; align-items: center; z-index: 2; }
.hero .slide-body .container-x { color: #fff; }
.hero .eyebrow { display: inline-flex; align-items: center; gap: .5rem; background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.22); backdrop-filter: blur(6px); padding: .4rem .9rem; border-radius: 999px; font-size: .8rem; font-weight: 600; letter-spacing: .03em; margin-bottom: 1rem; animation: heroUp .6s ease both; }
.hero h1 { font-size: clamp(2.1rem, 4.6vw, 3.6rem); font-weight: 700; margin: 0 0 .7rem; max-width: 720px; line-height: 1.05; animation: heroUp .6s ease both .1s; }
.hero p { font-size: clamp(1rem, 1.7vw, 1.3rem); opacity: .92; max-width: 560px; margin: 0; animation: heroUp .6s ease both .2s; }
.hero .cta-row { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 1.6rem; animation: heroUp .6s ease both .3s; }
@keyframes heroUp { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
/* Gradient fallback hero with aurora blobs */
.hero .slide.grad { background: radial-gradient(1200px 500px at 80% -10%, color-mix(in srgb, var(--accent) 55%, #000), transparent), linear-gradient(120deg, #0b1020, #161b2e); }
.hero .slide.grad::after { background: none; }
.hero .blob { position: absolute; border-radius: 50%; filter: blur(60px); opacity: .55; z-index: 0; }
.hero .blob.b1 { width: 420px; height: 420px; right: -60px; top: -80px; background: var(--accent); }
.hero .blob.b2 { width: 360px; height: 360px; left: -80px; bottom: -120px; background: var(--accent-2); opacity: .4; }
.hero .arrow { position: absolute; top: 50%; transform: translateY(-50%); z-index: 3; width: 46px; height: 46px; border-radius: 50%; border: 1px solid rgba(255,255,255,.25); background: rgba(255,255,255,.15); color: #fff; font-size: 1.3rem; cursor: pointer; display: grid; place-items: center; backdrop-filter: blur(6px); transition: background .15s ease; }
.hero .arrow:hover { background: rgba(255,255,255,.35); }
.hero .arrow.prev { left: 20px; } .hero .arrow.next { right: 20px; }
.hero .dots { position: absolute; bottom: 22px; left: 0; right: 0; display: flex; gap: 8px; justify-content: center; z-index: 3; }
.hero .dots button { width: 10px; height: 10px; border-radius: 50%; border: 0; background: rgba(255,255,255,.5); cursor: pointer; transition: width .2s ease, background .2s ease; padding: 0; }
.hero .dots button.active { background: #fff; width: 28px; border-radius: 6px; }
@media (max-width: 640px){
    .hero .arrow { display: none; }
    .hero .slide { height: auto; min-height: 440px; }
    .hero .slide-body { padding: 30px 0 60px; }
    .hero h1 { font-size: 2rem; }
    /* Full-width, equal CTA buttons stack cleanly on phones */
    .hero .cta-row { flex-direction: column; align-items: stretch; width: 100%; margin-top: 1.4rem; }
    .hero .cta-row .btn-x { width: 100%; }
}

/* Features / trust strip */
.features { border-bottom: 1px solid var(--line); background: var(--bg); }
.features .row-f { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; padding: 30px 0; }
.feature { display: flex; align-items: center; gap: 13px; }
.feature .ic { width: 48px; height: 48px; flex: 0 0 auto; border-radius: 14px; display: grid; place-items: center; font-size: 1.35rem; background: color-mix(in srgb, var(--accent) 12%, transparent); color: var(--accent); }
.feature h5 { margin: 0; font-size: .96rem; font-weight: 700; }
.feature span { color: var(--muted); font-size: .82rem; }
@media (max-width: 900px){ .features .row-f { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px){ .features .row-f { grid-template-columns: 1fr; gap: 16px; } }

/* Sections */
.section { padding: 72px 0; }
.section-soft { background: var(--soft); }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 34px; flex-wrap: wrap; }
.eyebrow-2 { color: var(--accent); font-weight: 700; font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; }
.section-title { font-size: clamp(1.6rem, 2.8vw, 2.2rem); font-weight: 700; margin: 6px 0 6px; }
.section-sub { color: var(--muted); margin: 0; }

/* Category cards */
.cat-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.cat-card { position: relative; display: flex; flex-direction: column; border-radius: var(--radius); overflow: hidden; min-height: 172px; background: var(--soft-2); border: 1px solid var(--line); padding: 22px; color: var(--ink); transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease; }
.cat-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: transparent; color: #fff; }
/* gradient fill that appears on hover (makes white text readable on plain cards) */
.cat-card .fill { position: absolute; inset: 0; z-index: 0; background: var(--grad); opacity: 0; transition: opacity .22s ease; }
.cat-card:hover .fill { opacity: 1; }
.cat-card .bgimg { position: absolute; inset: 0; z-index: 1; background-size: cover; background-position: center; transition: transform .35s ease; }
.cat-card:hover .bgimg { transform: scale(1.06); }
.cat-card::before { content: ''; position: absolute; inset: 0; z-index: 2; background: linear-gradient(160deg, rgba(9,12,22,.15) 20%, rgba(9,12,22,.82)); opacity: 0; transition: opacity .2s ease; }
.cat-card.has-img::before { opacity: 1; }
.cat-card .ci { position: relative; z-index: 3; width: 48px; height: 48px; border-radius: 13px; display: grid; place-items: center; font-size: 1.35rem; background: var(--grad); color: #fff; font-family: 'Space Grotesk'; font-weight: 700; transition: background .2s ease; }
.cat-card:hover .ci { background: rgba(255,255,255,.22); }
.cat-card.has-img .ci { background: rgba(255,255,255,.18); backdrop-filter: blur(4px); }
.cat-card .cn { position: relative; z-index: 3; margin-top: auto; padding-top: 14px; font-weight: 700; font-size: 1.08rem; }
.cat-card .cc { position: relative; z-index: 3; font-size: .82rem; color: var(--muted); transition: color .2s ease; }
.cat-card:hover .cc { color: rgba(255,255,255,.9); }
.cat-card.has-img .cn, .cat-card.has-img .cc { color: #fff; }
.cat-card .go { position: absolute; z-index: 3; right: 16px; top: 16px; opacity: 0; transform: translateX(-6px); transition: .2s ease; color: #fff; }
.cat-card:hover .go { opacity: 1; transform: none; }
@media (max-width: 900px){ .cat-cards { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px){ .cat-cards { grid-template-columns: 1fr 1fr; gap: 12px; } .cat-card { min-height: 132px; padding: 16px; } }

/* Legacy category chips (products listing filter) */
.cat-chips { display: flex; flex-wrap: wrap; gap: 10px; }
.cat-chips a { padding: .55rem 1.1rem; border: 1px solid var(--line); border-radius: 999px; color: var(--ink); font-size: .9rem; font-weight: 500; background: #fff; transition: .15s; }
.cat-chips a.active, .cat-chips a:hover { background: var(--grad); color: #fff; border-color: transparent; transform: translateY(-2px); box-shadow: 0 8px 18px color-mix(in srgb, var(--accent) 28%, transparent); }

/* Product grid */
.grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.p-card { position: relative; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; display: flex; flex-direction: column; }
.p-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: transparent; }
.p-card .thumb { position: relative; aspect-ratio: 1; background: var(--soft); overflow: hidden; }
.p-card .thumb-link { display: block; width: 100%; height: 100%; }
.p-card .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.p-card:hover .thumb img { transform: scale(1.08); }
.p-card .thumb .ph { width: 100%; height: 100%; display: grid; place-items: center; color: #c7ccd9; font-size: 2.6rem; }
.p-card .badge-feat { position: absolute; top: 12px; left: 12px; z-index: 3; background: var(--grad); color: #fff; font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; padding: .3rem .6rem; border-radius: 999px; box-shadow: var(--shadow-sm); }
.p-card .wish { position: absolute; top: 10px; right: 10px; z-index: 3; width: 36px; height: 36px; border-radius: 50%; border: 0; background: rgba(255,255,255,.9); color: var(--muted); display: grid; place-items: center; cursor: pointer; box-shadow: var(--shadow-sm); transition: .15s; }
.p-card .wish:hover, .p-card .wish.on { color: #e0245e; transform: scale(1.08); }
.p-card .actions { position: absolute; left: 0; right: 0; bottom: 0; z-index: 3; display: flex; gap: 8px; padding: 12px; transform: translateY(120%); transition: transform .22s ease; background: linear-gradient(to top, rgba(255,255,255,.96), transparent); }
.p-card:hover .actions { transform: none; }
.p-card .actions .btn-x { flex: 1; }
.p-card .body { padding: 16px; flex: 1; display: flex; flex-direction: column; }
.p-card .cat { font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.p-card .name { font-weight: 600; margin: 3px 0 8px; color: var(--ink); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.6em; }
.p-card .name:hover { color: var(--accent); }
.p-card .price { font-weight: 800; color: var(--ink); font-size: 1.2rem; margin-top: auto; font-family: 'Space Grotesk'; }
.p-card .price small { color: var(--muted); font-weight: 500; font-size: .78rem; }
/* Touch devices have no hover — keep the action bar pinned over the image, always visible. */
@media (hover: none){ .p-card .actions { transform: none; flex-direction: column; } .p-card .actions .btn-x { width: 100%; } }

/* Promo CTA band */
.promo { position: relative; overflow: hidden; background: var(--grad); color: #fff; border-radius: 24px; padding: 48px; display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; box-shadow: var(--shadow-md); }
.promo::before { content: ''; position: absolute; width: 340px; height: 340px; right: -80px; top: -120px; background: rgba(255,255,255,.14); border-radius: 50%; }
.promo::after { content: ''; position: absolute; width: 240px; height: 240px; left: -60px; bottom: -120px; background: rgba(255,255,255,.10); border-radius: 50%; }
.promo .pt { position: relative; z-index: 1; }
.promo h3 { font-size: clamp(1.4rem, 3vw, 2rem); margin: 0 0 6px; font-weight: 700; }
.promo p { margin: 0; opacity: .92; max-width: 520px; }
.promo .btn-x { position: relative; z-index: 1; background: #fff; color: var(--accent); box-shadow: 0 10px 24px rgba(0,0,0,.18); }
.promo .btn-x:hover { background: #fff; filter: brightness(.97); }
@media (max-width: 560px){ .promo { padding: 32px 24px; } }

/* Product detail */
.pd { display: grid; grid-template-columns: 1fr 1fr; gap: 44px; }
.pd .main-img { aspect-ratio: 1; border-radius: 20px; overflow: hidden; background: var(--soft); box-shadow: var(--shadow-sm); }
.pd .main-img img { width: 100%; height: 100%; object-fit: cover; }
.pd .thumbs { display: flex; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.pd .thumbs img { width: 74px; height: 74px; object-fit: cover; border-radius: 11px; border: 2px solid var(--line); cursor: pointer; transition: border-color .15s ease; }
.pd .thumbs img.active, .pd .thumbs img:hover { border-color: var(--accent); }
.pd h1 { font-size: clamp(1.6rem, 3vw, 2.2rem); margin: 0 0 8px; }
.pd .price { font-size: 1.9rem; font-weight: 800; color: var(--accent); margin: 12px 0; font-family: 'Space Grotesk'; }

/* Footer */
.store-footer { background: var(--ink); color: #c7cede; padding: 60px 0 26px; margin-top: 0; }
.store-footer h4 { color: #fff; font-size: 1rem; margin: 0 0 16px; }
.store-footer a { color: #c7cede; display: block; padding: 4px 0; transition: color .15s ease; }
.store-footer a:hover { color: #fff; }
.store-footer .cols { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 34px; }
.store-footer .social { margin-top: 16px; }
.store-footer .social a { display: inline-grid; place-items: center; width: 40px; height: 40px; margin-right: 8px; font-size: 1.05rem; border-radius: 11px; background: rgba(255,255,255,.08); }
.store-footer .social a:hover { background: var(--grad); color: #fff; }
.store-footer .copyright { border-top: 1px solid rgba(255,255,255,.1); margin-top: 40px; padding-top: 20px; font-size: .85rem; }

/* Forms */
.field { margin-bottom: 14px; }
.field label { display: block; font-weight: 600; font-size: .85rem; margin-bottom: 5px; }
.field input, .field textarea, .field select { width: 100%; padding: .72rem .9rem; border: 1px solid var(--line); border-radius: 11px; font-family: inherit; transition: border-color .15s ease, box-shadow .15s ease; }
.field input:focus, .field textarea:focus, .field select:focus { outline: 0; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 15%, transparent); }
label.error { color: #e23b3b; font-weight: 400; font-size: .8rem; }

.pager { display: flex; gap: 6px; justify-content: center; margin-top: 32px; }
.pager a, .pager span { padding: .55rem .95rem; border: 1px solid var(--line); border-radius: 10px; color: var(--ink); }
.pager .active span { background: var(--grad); color: #fff; border-color: transparent; }

/* Scroll reveal */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce){ .reveal { opacity: 1; transform: none; } }

@media (max-width: 900px) {
    .grid { grid-template-columns: repeat(2, 1fr); }
    .pd { grid-template-columns: 1fr; }
    .store-footer .cols { grid-template-columns: 1fr; }
    /* Dropdown anchored to the bottom of the header (works whether or not the top bar is showing). */
    .store-nav { position: absolute; top: 100%; left: 0; right: 0; background: #fff; flex-direction: column; padding: 1rem; border-bottom: 1px solid var(--line); box-shadow: var(--shadow-md); display: none; align-items: stretch; max-height: calc(100vh - 76px); overflow-y: auto; }
    .store-nav.open { display: flex; }
    .store-nav a { padding: 11px 4px; }
    .store-nav a.btn-x { justify-content: center; }
    .menu-toggle { display: block; margin-left: auto; }
    .section { padding: 52px 0; }
}
@media (max-width: 560px) {
    .grid { grid-template-columns: 1fr 1fr; gap: 14px; }
    /* Narrow cards: stack View/Inquire full-width so nothing clips */
    .p-card .actions { flex-direction: column; padding: 10px; }
    .p-card .actions .btn-x { width: 100%; }
    .p-card .actions .btn-x.sm { padding: .48rem .6rem; font-size: .8rem; }
    .p-card .body { padding: 13px; }
    .p-card .name { font-size: .92rem; min-height: 2.4em; }
    .p-card .price { font-size: 1.05rem; }
}
