/* =========================================================
   Kenakata — base styles, layout, header, footer, components
   ========================================================= */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
  --primary: #ff5a1f;
  --primary-dark: #e04811;
  --primary-soft: #fff1ea;
  --ink: #161a2e;
  --ink-2: #3b4160;
  --muted: #747a96;
  --line: #e6e8f0;
  --bg: #f4f5f9;
  --card: #ffffff;
  --navy: #1b1f3b;
  --green: #12a150;
  --red: #e5383b;
  --amber: #f5a524;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 1px 2px rgba(22, 26, 46, .05), 0 6px 20px rgba(22, 26, 46, .06);
  --shadow-lg: 0 20px 50px rgba(22, 26, 46, .14);
  --font: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --container: 1240px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); font-size: 15px; line-height: 1.55; color: var(--ink); background: var(--bg); }
body.no-scroll { overflow: hidden; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; }
h1, h2, h3, h4 { margin: 0 0 .5em; line-height: 1.25; letter-spacing: -.01em; }
p { margin: 0 0 1em; }
[hidden] { display: none !important; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 16px; }
.ic { width: 20px; height: 20px; flex-shrink: 0; }
.ic-verified { width: 15px; height: 15px; color: #fff; fill: #2f80ed; stroke: #fff; }
.mt { margin-top: 22px; }
.text-muted { color: var(--muted); }
.text-green { color: var(--green); }
main { min-height: 50vh; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 46px; padding: 0 22px; border-radius: var(--radius-sm); font-weight: 700; font-size: 15px; transition: .2s; white-space: nowrap; border: 1.5px solid transparent; }
.btn--primary { background: var(--primary); color: #fff; }
.btn--primary:hover { background: var(--primary-dark); }
.btn--dark { background: var(--navy); color: #fff; }
.btn--dark:hover { background: #2a2f57; }
.btn--outline { border-color: var(--line); background: #fff; color: var(--ink); }
.btn--outline:hover { border-color: var(--primary); color: var(--primary); }
.btn--soft { background: var(--primary-soft); color: var(--primary); }
.btn--soft:hover { background: #ffe2d4; }
.btn--sm { height: 36px; padding: 0 14px; font-size: 13.5px; }
.btn--block { width: 100%; }
.btn:disabled { opacity: .5; pointer-events: none; }
.icon-btn { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 10px; }
.icon-btn:hover { background: var(--bg); }
.link { color: var(--primary); font-weight: 600; }
.link:hover { text-decoration: underline; }

/* ---------- Topbar ---------- */
.topbar { background: var(--navy); color: #c8cbe0; font-size: 12.5px; }
.topbar__inner { display: flex; justify-content: space-between; align-items: center; height: 36px; gap: 16px; }
.topbar__msg { display: flex; align-items: center; gap: 6px; margin: 0; }
.topbar__msg .ic { width: 15px; color: var(--primary); }
.topbar__links { display: flex; gap: 20px; }
.topbar__links a:hover { color: #fff; }

/* ---------- Main bar ---------- */
.mainbar { background: #fff; position: sticky; top: 0; z-index: 50; border-bottom: 1px solid var(--line); }
body.scrolled .mainbar { box-shadow: 0 4px 18px rgba(22,26,46,.08); }
.mainbar__inner { display: flex; align-items: center; gap: 28px; height: 76px; }
.mainbar__burger { display: none; }
.logo { display: flex; align-items: center; gap: 9px; font-size: 23px; font-weight: 800; letter-spacing: -.03em; flex-shrink: 0; }
.logo b { color: var(--primary); }
.logo--light { color: #fff; }
.search { flex: 1; display: flex; height: 48px; border: 2px solid var(--primary); border-radius: 12px; overflow: hidden; background: #fff; }
.search select { border: 0; background: var(--bg); padding: 0 12px; font-size: 13.5px; font-weight: 600; color: var(--ink-2); max-width: 150px; outline: 0; border-right: 1px solid var(--line); }
.search input { flex: 1; border: 0; padding: 0 16px; outline: 0; min-width: 0; }
.search button { background: var(--primary); color: #fff; width: 58px; display: grid; place-items: center; }
.search button:hover { background: var(--primary-dark); }
.mainbar__actions { display: flex; align-items: center; gap: 6px; }
.action { position: relative; display: flex; align-items: center; gap: 9px; padding: 8px 10px; border-radius: 10px; font-weight: 700; font-size: 14px; }
.action:hover { background: var(--bg); }
.action .ic { width: 24px; height: 24px; }
.action small { display: block; font-size: 11.5px; color: var(--muted); font-weight: 500; line-height: 1.1; }
.badge { position: absolute; top: 1px; left: 26px; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 10px; background: var(--primary); color: #fff; font-size: 11px; font-style: normal; font-weight: 700; display: grid; place-items: center; border: 2px solid #fff; }

/* ---------- Category bar ---------- */
.catbar { background: #fff; border-bottom: 1px solid var(--line); }
.catbar__inner { display: flex; align-items: center; gap: 4px; height: 48px; overflow-x: auto; scrollbar-width: none; }
.catbar__inner::-webkit-scrollbar { display: none; }
.catbar a { padding: 7px 12px; border-radius: 8px; font-size: 14px; font-weight: 600; color: var(--ink-2); white-space: nowrap; display: flex; align-items: center; gap: 6px; }
.catbar a:hover { background: var(--primary-soft); color: var(--primary); }
.catbar .ic { width: 17px; height: 17px; }
.catbar__all { background: var(--navy); color: #fff !important; margin-right: 6px; }
.catbar__all:hover { background: #2a2f57 !important; }
.catbar__hl { color: var(--primary) !important; margin-left: auto; }

/* ---------- Drawer ---------- */
.drawer { position: fixed; inset: 0; z-index: 100; background: rgba(15,18,35,.5); opacity: 0; visibility: hidden; transition: .25s; }
.drawer.open { opacity: 1; visibility: visible; }
.drawer__panel { width: min(320px, 86vw); height: 100%; background: #fff; overflow-y: auto; transform: translateX(-100%); transition: .3s; padding-bottom: 30px; }
.drawer.open .drawer__panel { transform: none; }
.drawer__head { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.drawer__user { display: flex; gap: 10px; padding: 16px; border-bottom: 1px solid var(--line); }
.drawer__user > a:not(.btn) { display: flex; align-items: center; gap: 8px; font-weight: 700; }
.drawer__user .btn { flex: 1; }
.drawer__label { margin: 16px 16px 6px; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 700; }
.drawer__link { display: flex; align-items: center; gap: 12px; padding: 10px 16px; font-weight: 600; font-size: 14.5px; }
.drawer__link:hover { background: var(--bg); }
.drawer__link img { width: 32px; height: 32px; border-radius: 8px; }
.drawer__link .ic:last-child { margin-left: auto; width: 16px; color: var(--muted); }

/* ---------- Section heads ---------- */
.section { padding: 26px 0; }
.section__head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 16px; }
.section__head h2 { font-size: 22px; margin: 0; }
.section__head a { color: var(--primary); font-weight: 700; font-size: 14px; display: flex; align-items: center; gap: 4px; }
.section__head a .ic { width: 16px; }
.panel { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; }

/* ---------- Product grid & card ---------- */
.p-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; }
.p-grid--4 { grid-template-columns: repeat(4, 1fr); }
.p-card { position: relative; background: var(--card); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; box-shadow: var(--shadow); transition: transform .2s, box-shadow .2s; }
.p-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.p-card__img { position: relative; aspect-ratio: 1; background: var(--bg); overflow: hidden; }
.p-card__img img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.p-card:hover .p-card__img img { transform: scale(1.06); }
.p-card__badge { position: absolute; top: 10px; left: 10px; background: var(--primary); color: #fff; font-size: 12px; font-weight: 800; padding: 3px 8px; border-radius: 6px; }
.p-card__wish { position: absolute; top: 8px; right: 8px; width: 36px; height: 36px; border-radius: 50%; background: #fff; display: grid; place-items: center; color: var(--muted); box-shadow: 0 2px 8px rgba(0,0,0,.08); transition: .2s; }
.p-card__wish:hover, .p-card__wish.active { color: var(--red); }
.p-card__wish.active .ic { fill: var(--red); }
.p-card__body { padding: 11px 13px 6px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.p-card__vendor { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 700; color: var(--ink-2); align-self: flex-start; max-width: 100%; padding: 3px 8px 3px 3px; border-radius: 20px; background: var(--bg); transition: .2s; }
.p-card__vendor span:not(.v-logo) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.p-card__vendor:hover { background: var(--primary-soft); color: var(--primary); }
.p-card__title { font-size: 14px; font-weight: 500; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.8em; }
.p-card__title:hover { color: var(--primary); }
.p-card__price { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.p-card__price strong { color: var(--primary); font-size: 18px; font-weight: 800; }
.p-card__price del { color: var(--muted); font-size: 13px; }
.p-card__meta { display: flex; align-items: center; gap: 5px; font-size: 12px; color: var(--muted); flex-wrap: wrap; }
.dot { width: 3px; height: 3px; border-radius: 50%; background: currentColor; }
.p-card__add { margin: 6px 13px 13px; height: 38px; border-radius: 9px; background: var(--primary-soft); color: var(--primary); font-weight: 700; font-size: 13.5px; display: flex; align-items: center; justify-content: center; gap: 7px; transition: .2s; }
.p-card__add .ic { width: 17px; }
.p-card__add:hover { background: var(--primary); color: #fff; }

.stars { display: inline-flex; gap: 1px; }
.stars svg { width: 13px; height: 13px; fill: #dfe1ea; }
.stars svg.on { fill: var(--amber); }
.stars svg.half { fill: #f9cf86; }

/* Vendor logo (initial avatar) */
.v-logo { --vc: var(--primary); display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--vc); color: #fff; font-weight: 800; font-size: 15px; flex-shrink: 0; letter-spacing: .02em; }
.v-logo.xs { width: 20px; height: 20px; font-size: 8.5px; }
.v-logo.sm { width: 36px; height: 36px; font-size: 13px; }
.v-logo.lg { width: 64px; height: 64px; font-size: 22px; }
.v-logo.xl { width: 104px; height: 104px; font-size: 34px; border: 5px solid #fff; box-shadow: var(--shadow); }

/* ---------- Breadcrumb ---------- */
.breadcrumb { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); padding: 16px 0; }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb .ic { width: 14px; }
.breadcrumb span:last-child { color: var(--ink); font-weight: 600; }

/* ---------- Forms ---------- */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.field label { font-size: 13.5px; font-weight: 700; color: var(--ink-2); }
.field label em { color: var(--red); font-style: normal; }
.input, .field input:not([type=checkbox]):not([type=radio]), .field select, .field textarea {
  width: 100%; height: 48px; border: 1.5px solid var(--line); border-radius: var(--radius-sm); padding: 0 14px; background: #fff; outline: 0; transition: .2s; }
.field textarea { height: auto; min-height: 120px; padding: 12px 14px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 4px rgba(255,90,31,.12); }
.field.invalid input, .field.invalid select, .field.invalid textarea { border-color: var(--red); }
.field__error { color: var(--red); font-size: 12.5px; font-weight: 600; min-height: 0; }
.field__error:empty { display: none; }
.field__pass { position: relative; }
.field__pass input { padding-right: 48px !important; }
.field__pass button { position: absolute; right: 6px; top: 4px; width: 40px; height: 40px; display: grid; place-items: center; color: var(--muted); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.field-row--3 { grid-template-columns: repeat(3, 1fr); }
.check { display: flex; align-items: flex-start; gap: 10px; font-size: 14px; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--primary); margin-top: 2px; flex-shrink: 0; }
.field .check { font-weight: 500; color: var(--ink-2); }

/* ---------- Tabs / accordion ---------- */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.tabs button { padding: 14px 18px; font-weight: 700; color: var(--muted); border-bottom: 3px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs button.active { color: var(--primary); border-color: var(--primary); }
.accordion { border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fff; margin-bottom: 10px; overflow: hidden; }
.accordion__head { width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 16px 18px; font-weight: 700; text-align: left; }
.accordion__head .ic { transition: .25s; color: var(--muted); }
.accordion.open .accordion__head .ic { transform: rotate(180deg); color: var(--primary); }
.accordion__body { display: none; padding: 0 18px 16px; color: var(--ink-2); }
.accordion.open .accordion__body { display: block; }

/* ---------- Perks & Footer ---------- */
.perks { background: #fff; border-top: 1px solid var(--line); margin-top: 40px; }
.perks__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; padding: 26px 16px; }
.perk { display: flex; align-items: center; gap: 14px; }
.perk > .ic { width: 46px; height: 46px; padding: 11px; border-radius: 12px; background: var(--primary-soft); color: var(--primary); }
.perk b { display: block; font-size: 14.5px; }
.perk span { font-size: 13px; color: var(--muted); }
.footer { background: var(--navy); color: #b9bdd6; font-size: 14px; }
.footer__grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr 1.6fr; gap: 30px; padding: 48px 16px 34px; }
.footer h4 { color: #fff; font-size: 15px; margin-bottom: 14px; }
.footer__grid > div > a { display: block; padding: 4px 0; }
.footer a:hover { color: #fff; }
.footer__brand p { margin: 14px 0 18px; max-width: 300px; }
.footer__social { display: flex; gap: 8px; }
.footer__social a { width: 38px; height: 38px; border-radius: 10px; background: rgba(255,255,255,.08); display: grid; place-items: center; }
.footer__social a:hover { background: var(--primary); }
.footer__social .ic { width: 18px; }
.newsletter { display: flex; gap: 8px; }
.newsletter input { flex: 1; min-width: 0; height: 44px; border-radius: 9px; border: 1px solid rgba(255,255,255,.15); background: rgba(255,255,255,.06); color: #fff; padding: 0 14px; outline: 0; }
.newsletter .btn { height: 44px; padding: 0 16px; }
.pay-logos { display: flex; flex-wrap: wrap; gap: 6px; }
.pay-logos span { background: #fff; color: var(--navy); font-weight: 800; font-size: 12px; padding: 5px 10px; border-radius: 6px; }
.footer__bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; padding: 18px 16px; border-top: 1px solid rgba(255,255,255,.08); font-size: 13px; }

/* ---------- Bottom nav (mobile) ---------- */
.bottom-nav { display: none; }
.to-top { position: fixed; right: 18px; bottom: 22px; width: 44px; height: 44px; border-radius: 50%; background: var(--navy); color: #fff; display: grid; place-items: center; z-index: 40; opacity: 0; visibility: hidden; transform: translateY(10px); transition: .25s; }
.to-top.show { opacity: 1; visibility: visible; transform: none; }
.to-top .ic { transform: rotate(180deg); }

/* ---------- Toast ---------- */
.toast-wrap { position: fixed; top: 90px; right: 18px; z-index: 200; display: flex; flex-direction: column; gap: 8px; }
.toast { display: flex; align-items: center; gap: 10px; background: var(--navy); color: #fff; padding: 12px 16px; border-radius: 10px; font-weight: 600; font-size: 14px; box-shadow: var(--shadow-lg); animation: toastIn .3s; }
.toast .ic { width: 20px; height: 20px; padding: 3px; border-radius: 50%; background: var(--green); }
.toast--info .ic { background: var(--muted); }
.toast.out { opacity: 0; transform: translateX(20px); transition: .3s; }
@keyframes toastIn { from { opacity: 0; transform: translateX(20px); } }

/* ---------- Empty state ---------- */
.empty { text-align: center; padding: 56px 20px; }
.empty .ic { width: 72px; height: 72px; padding: 18px; border-radius: 50%; background: var(--primary-soft); color: var(--primary); margin: 0 auto 16px; }
.empty p { color: var(--muted); }

/* ---------- Page header ---------- */
.page-hero { background: linear-gradient(120deg, var(--navy), #2c3266); color: #fff; padding: 42px 0; }
.page-hero h1 { font-size: 34px; margin-bottom: 6px; }
.page-hero p { color: #c8cbe0; margin: 0; max-width: 620px; }

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 1200px) {
  .p-grid { grid-template-columns: repeat(4, 1fr); }
  .footer__grid { grid-template-columns: 1fr 1fr 1fr; }
  .footer__brand, .footer__news { grid-column: span 3; }
  .footer__brand p { max-width: 520px; }
}
@media (max-width: 992px) {
  .topbar__links a:nth-child(-n+3) { display: none; }
  .mainbar__inner { gap: 16px; }
  .action--account span { display: none; }
  .p-grid, .p-grid--4 { grid-template-columns: repeat(3, 1fr); }
  .perks__grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
  body { padding-bottom: 66px; font-size: 14.5px; }
  .topbar { display: none; }
  .mainbar__inner { flex-wrap: wrap; height: auto; padding-top: 10px; padding-bottom: 10px; gap: 6px 10px; }
  .mainbar__burger { display: grid; margin-left: -8px; }
  .logo { font-size: 20px; }
  .logo img { width: 32px; height: 32px; }
  .mainbar__actions { margin-left: auto; }
  .action--account { display: none; }
  .search { order: 5; flex-basis: 100%; height: 44px; }
  .search select { display: none; }
  .catbar { display: none; }
  .p-grid, .p-grid--4 { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .p-card__body { padding: 9px 10px 4px; }
  .p-card__price strong { font-size: 16px; }
  .p-card__add { margin: 4px 10px 10px; height: 36px; }
  .p-card__add span { font-size: 13px; }
  .section { padding: 18px 0; }
  .section__head h2 { font-size: 18px; }
  .field-row, .field-row--3 { grid-template-columns: 1fr; }
  .footer__grid { grid-template-columns: 1fr 1fr; gap: 24px; padding-top: 34px; }
  .footer__brand, .footer__news { grid-column: span 2; }
  .page-hero { padding: 30px 0; }
  .page-hero h1 { font-size: 26px; }
  .panel { padding: 16px; }
  .bottom-nav { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; background: #fff; border-top: 1px solid var(--line); height: 62px; box-shadow: 0 -4px 18px rgba(22,26,46,.06); }
  .bottom-nav a { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 11px; font-weight: 600; color: var(--muted); }
  .bottom-nav a.active { color: var(--primary); }
  .bottom-nav .badge { top: 6px; left: calc(50% + 4px); }
  .to-top { bottom: 80px; right: 14px; }
  .toast-wrap { top: auto; bottom: 80px; left: 16px; right: 16px; }
}
@media (max-width: 420px) {
  .perks__grid { grid-template-columns: 1fr; }
  .p-card__add .ic { display: none; }
}
