/* ============================================================
   CERA storefront — airy e-commerce theme (per-tenant --accent)
   ============================================================ */
:root { --accent: #4f46e5; --ink: #1f2430; --muted: #6b7280; --line: #e9ecf3; --bg: #fff; --soft: #f7f8fc; }
* { box-sizing: border-box; }
body { font-family: 'Inter', system-ui, sans-serif; color: var(--ink); margin: 0; background: var(--bg); }
a { color: var(--accent); text-decoration: none; }
img { max-width: 100%; }
.container-x { max-width: 1200px; margin: 0 auto; padding: 0 18px; }

/* Header */
.store-header { position: sticky; top: 0; z-index: 100; background: rgba(255,255,255,.92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.store-header .bar { display: flex; align-items: center; gap: 1.5rem; height: 70px; }
.store-logo { font-weight: 800; font-size: 1.3rem; color: var(--ink); display: flex; align-items: center; gap: .5rem; }
.store-logo img { height: 38px; }
.store-nav { display: flex; gap: 1.3rem; margin-left: auto; align-items: center; }
.store-nav a { color: var(--ink); font-weight: 500; font-size: .95rem; }
.store-nav a:hover { color: var(--accent); }
.btn-x { display: inline-flex; align-items: center; gap: .45rem; background: var(--accent); color: #fff; padding: .6rem 1.2rem; border-radius: 9px; font-weight: 600; border: 0; cursor: pointer; transition: .15s; }
.btn-x:hover { filter: brightness(.92); color: #fff; }
.btn-x.outline { background: transparent; color: var(--accent); border: 1.5px solid var(--accent); }
.menu-toggle { display: none; background: none; border: 0; font-size: 1.5rem; }

/* Hero slider */
.hero { position: relative; }
.hero .slide { position: relative; height: 460px; background-size: cover; background-position: center; display: none; }
.hero .slide.active { display: block; }
.hero .slide::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(0,0,0,.55), rgba(0,0,0,.05)); }
.hero .slide-body { position: absolute; inset: 0; display: flex; align-items: center; z-index: 2; }
.hero .slide-body .container-x { color: #fff; max-width: 1200px; }
.hero h1 { font-size: 2.8rem; font-weight: 800; margin: 0 0 .5rem; max-width: 620px; }
.hero p { font-size: 1.2rem; opacity: .95; max-width: 540px; }
.hero .dots { position: absolute; bottom: 18px; 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; }
.hero .dots button.active { background: #fff; width: 26px; border-radius: 6px; }

/* Sections */
.section { padding: 56px 0; }
.section-soft { background: var(--soft); }
.section-title { font-size: 1.7rem; font-weight: 800; margin: 0 0 6px; }
.section-sub { color: var(--muted); margin: 0 0 28px; }

/* Product grid */
.grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.p-card { background: #fff; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; transition: .18s; display: flex; flex-direction: column; }
.p-card:hover { transform: translateY(-4px); box-shadow: 0 14px 32px rgba(16,24,40,.12); border-color: transparent; }
.p-card .thumb { aspect-ratio: 1; background: var(--soft); overflow: hidden; display: grid; place-items: center; }
.p-card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.p-card .thumb .ph { color: #c7ccd9; font-size: 2.5rem; }
.p-card .body { padding: 14px; 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; }
.p-card .price { font-weight: 800; color: var(--accent); font-size: 1.15rem; margin-top: auto; }
.p-card .body .btn-x { margin-top: 10px; justify-content: center; font-size: .85rem; }

/* Categories */
.cat-chips { display: flex; flex-wrap: wrap; gap: 10px; }
.cat-chips a { padding: .5rem 1rem; border: 1px solid var(--line); border-radius: 30px; color: var(--ink); font-size: .9rem; }
.cat-chips a.active, .cat-chips a:hover { background: var(--accent); color: #fff; border-color: var(--accent); }

/* Product detail */
.pd { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.pd .main-img { aspect-ratio: 1; border-radius: 16px; overflow: hidden; background: var(--soft); }
.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: 72px; height: 72px; object-fit: cover; border-radius: 9px; border: 2px solid var(--line); cursor: pointer; }
.pd .thumbs img.active { border-color: var(--accent); }
.pd h1 { font-size: 2rem; margin: 0 0 8px; }
.pd .price { font-size: 1.8rem; font-weight: 800; color: var(--accent); margin: 12px 0; }

/* Footer */
.store-footer { background: var(--ink); color: #cbd2e0; padding: 48px 0 24px; margin-top: 40px; }
.store-footer h4 { color: #fff; font-size: 1rem; margin: 0 0 14px; }
.store-footer a { color: #cbd2e0; display: block; padding: 3px 0; }
.store-footer a:hover { color: #fff; }
.store-footer .cols { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 30px; }
.store-footer .social a { display: inline-block; margin-right: 12px; font-size: 1.2rem; }
.store-footer .copyright { border-top: 1px solid rgba(255,255,255,.1); margin-top: 30px; padding-top: 18px; 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: .65rem .8rem; border: 1px solid var(--line); border-radius: 9px; font-family: inherit; }
.field input:focus, .field textarea:focus { outline: 0; border-color: var(--accent); }
label.error { color: #e23b3b; font-weight: 400; font-size: .8rem; }

.pager { display: flex; gap: 6px; justify-content: center; margin-top: 30px; }
.pager a, .pager span { padding: .5rem .9rem; border: 1px solid var(--line); border-radius: 8px; color: var(--ink); }
.pager .active span { background: var(--accent); color: #fff; border-color: var(--accent); }

@media (max-width: 900px) {
    .grid { grid-template-columns: repeat(2, 1fr); }
    .pd { grid-template-columns: 1fr; }
    .store-footer .cols { grid-template-columns: 1fr; }
    .store-nav { position: fixed; inset: 70px 0 auto 0; background: #fff; flex-direction: column; padding: 1rem; border-bottom: 1px solid var(--line); display: none; }
    .store-nav.open { display: flex; }
    .menu-toggle { display: block; margin-left: auto; }
    .hero h1 { font-size: 1.8rem; }
}
@media (max-width: 560px) { .grid { grid-template-columns: 1fr 1fr; gap: 12px; } }
