:root {
  --bg: #f7f7fb;
  --text: #15152b;
  --muted: #5c5c74;
  --line: #e8e8f0;
  --white: #ffffff;
  --orange: #ff7a12;
  --deep-orange: #ff8b1e;
  --purple: #4425ff;
  --navy: #020e57;
  --navy-dark: #000a3e;
  --violet-soft: #f3efff;
  --card-shadow: 0 10px 30px rgba(25, 25, 45, 0.08);
  --radius-lg: 28px;
  --radius-md: 20px;
  --radius-sm: 16px;
  --hero-bg: #041163;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'Inter', system-ui, sans-serif;
  background: linear-gradient(180deg, #fefefe 0%, #f6f6fa 100%);
  color: var(--text);
}
body.theme-dark {
  --bg: #0d1020;
  --text: #f5f6ff;
  --muted: #b8bdd8;
  --line: #272b44;
  --white: #171b2f;
  --violet-soft: #222345;
  --card-shadow: 0 12px 32px rgba(0, 0, 0, 0.28);
  background: linear-gradient(180deg, #101322 0%, #080b16 100%);
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button, input { font: inherit; }
button { cursor: pointer; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 1px 0 rgba(0,0,0,0.05);
}
body.theme-dark .site-header {
  background: rgba(13, 16, 32, 0.96);
}
.topbar {
  max-width: 1240px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 16px;
}
.header-brand {
  flex: 0 0 286px;
  display: block;
  background: var(--navy-dark);
}
.header-brand img {
  width: 286px;
  height: 72px;
  object-fit: contain;
}
.main-nav {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 16px;
  padding: 0 12px;
}
.main-nav a {
  position: relative;
  padding: 24px 10px 21px;
  font-size: 0.96rem;
  font-weight: 600;
  color: #1e233e;
  white-space: nowrap;
}
.nav-auth-btn {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 10px 14px;
  background: var(--white);
  color: #1e233e;
  font-weight: 800;
  white-space: nowrap;
}
.nav-auth-btn.primary {
  border-color: transparent;
  background: var(--orange);
  color: #fff;
}
.nav-profile-wrap {
  position: relative;
}
.nav-profile-btn {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 38%, #fff 0 5px, transparent 6px),
    radial-gradient(circle at 50% 76%, #fff 0 10px, transparent 11px),
    linear-gradient(180deg, var(--purple), #1d56d8);
  box-shadow: 0 8px 20px rgba(68, 37, 255, .18);
  background-size: cover;
  background-position: center;
}
.nav-profile-btn.has-avatar {
  background-color: #fff;
  background-repeat: no-repeat;
}
.profile-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 70;
  width: 170px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--white);
  box-shadow: 0 18px 42px rgba(20, 25, 60, .18);
}
.profile-dropdown a,
.profile-dropdown button {
  width: 100%;
  display: flex;
  align-items: center;
  min-height: 40px;
  border: 0;
  border-radius: 10px;
  padding: 9px 10px;
  background: transparent;
  color: var(--text);
  font-weight: 800;
  text-align: left;
}
.profile-dropdown strong {
  display: block;
  padding: 8px 10px 9px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 5px;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.profile-dropdown a:hover,
.profile-dropdown button:hover {
  background: var(--violet-soft);
  color: var(--purple);
}
body.theme-dark .nav-auth-btn {
  color: var(--text);
}
body.theme-dark .nav-auth-btn.primary {
  color: #fff;
}
body.theme-dark .main-nav a,
body.theme-dark .mobile-nav-toggle,
body.theme-dark .category-pill {
  color: var(--text);
}
.main-nav a.active {
  color: var(--orange);
}
.main-nav a.active::after {
  content: "";
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 0;
  height: 3px;
  border-radius: 999px;
  background: var(--orange);
}
.caret { font-size: 0.82em; }
.mobile-nav-toggle {
  display: none;
  margin-left: auto;
  margin-right: 16px;
  background: transparent;
  border: none;
  font-size: 1.8rem;
  color: #1d2242;
}
.mobile-home-back {
  display: none;
  margin-left: auto;
  margin-right: 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 9px 13px;
  background: var(--white);
  color: #1d2242;
  font-weight: 900;
}

.hero {
  position: relative;
  overflow: hidden;
  background: var(--hero-bg);
  min-height: 575px;
}
.hero-slider,
.hero-overlay {
  position: absolute;
  inset: 0;
}
.hero-slider {
  z-index: 0;
}
.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(1.03);
  transition: opacity .7s ease, transform 4s ease;
}
.hero-slide.active {
  opacity: 1;
  transform: scale(1);
}
.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero-overlay {
  z-index: 1;
  background:
    linear-gradient(180deg, rgba(2, 10, 63, .62), rgba(2, 10, 63, .72)),
    radial-gradient(circle at 50% 18%, rgba(68, 37, 255, .48), transparent 38%);
}
.hero-content {
  position: relative;
  z-index: 2;
  max-width: 1240px;
  margin: 0 auto;
  padding: 42px 32px 56px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.hero-brand {
  width: 260px;
  margin-top: 10px;
  margin-bottom: 18px;
}
.hero h1 {
  margin: 0;
  color: white;
  font-size: clamp(3.2rem, 5.8vw, 5.4rem);
  line-height: 0.95;
  font-weight: 900;
  letter-spacing: -0.06em;
}
.hero h1 span { color: #ffb018; }
.hero p {
  margin: 18px 0 30px;
  color: rgba(255,255,255,0.9);
  font-size: 1.15rem;
}
.search-box {
  margin-top: 30px;
  width: min(490px, 100%);
  height: 58px;
  background: #fff;
  border-radius: 18px;
  display: grid;
  grid-template-columns: 42px 1fr 120px;
  align-items: center;
  gap: 8px;
  padding: 0 8px 0 12px;
  box-shadow: 0 15px 40px rgba(14, 18, 67, .25);
}
body.theme-dark .search-box {
  background: #171b2f;
}
.search-icon {
  font-size: 1.9rem;
  color: #54557d;
  line-height: 1;
  transform: translateY(-1px);
}
.search-box input {
  border: none;
  outline: none;
  font-size: 0.98rem;
  color: #23253d;
  background: transparent;
}
body.theme-dark .search-box input {
  color: var(--text);
}
.search-box button {
  border: none;
  height: 46px;
  border-radius: 14px;
  background: linear-gradient(180deg, #ff8c1e 0%, var(--orange) 100%);
  color: white;
  font-weight: 800;
}
.floating-search-box {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 40;
  width: min(250px, calc(100vw - 16px));
  min-height: 60px;
  background: #fff;
  border: 1px solid rgba(12, 16, 54, .08);
  border-radius: 16px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 48px;
  align-items: center;
  gap: 4px;
  padding: 7px 4px 7px 14px;
  box-shadow: 0 18px 38px rgba(14, 18, 67, .24);
}
.floating-search-box.hidden {
  display: none;
}
.floating-search-box input {
  min-width: 0;
  border: none;
  outline: none;
  background: transparent;
  color: #23253d;
  font-size: clamp(1.08rem, 5vw, 1.35rem);
  font-weight: 800;
  letter-spacing: 0;
}
.floating-search-box input::placeholder {
  color: #c9c9c9;
  opacity: 1;
}
.floating-search-box button {
  border: none;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: transparent;
  display: grid;
  place-items: center;
  padding: 0;
}
.floating-search-box button img {
  width: 52px;
  max-width: none;
  display: block;
  pointer-events: none;
}
body.theme-dark .floating-search-box {
  background: #fff;
}
body.theme-dark .floating-search-box input {
  color: #23253d;
}
.benefits-wrap {
  max-width: 1240px;
  margin: -40px auto 0;
  padding: 0 32px;
  position: relative;
  z-index: 3;
}
.card-shell {
  background: rgba(255,255,255,0.96);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--card-shadow);
}
.benefits {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  padding: 18px 22px;
}
.benefit-item {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 8px 10px;
}
.benefit-item h3 {
  margin: 6px 0 6px;
  font-size: 1rem;
}
.benefit-item p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.6;
}
.benefit-icon {
  width: 54px;
  height: 54px;
  flex: 0 0 54px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 1.6rem;
  background: #f4f0ff;
}
.benefit-icon.violet { color: #6446ff; }
.benefit-icon.purple { color: #5a3fff; }
.benefit-icon.indigo { color: #5333ff; }
.benefit-icon.rose { color: #ff4c5b; }

.section {
  max-width: 1240px;
  margin: 30px auto 0;
  padding: 0 32px;
}
.section-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 18px;
}
.section-title-row h2,
.how-it-works > h2 {
  margin: 0;
  font-size: 2rem;
  letter-spacing: -0.04em;
}
.section-title-row a {
  color: #4d34ff;
  font-weight: 700;
}
.product-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  max-width: 820px;
  margin-inline: auto;
}
body.theme-dark .card-shell {
  background: rgba(23, 27, 47, 0.96);
}
body.product-layout-grid .product-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-width: none;
}
body.product-layout-grid.product-columns-3 .product-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.product-card {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--white);
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(20, 25, 60, 0.06);
  display: grid;
  grid-template-columns: minmax(160px, 240px) 1fr;
  min-height: 210px;
}
.product-popout-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  border: 0;
  background: rgba(8, 10, 28, .55);
}
.product-card-expanded {
  position: fixed;
  z-index: 81;
  top: 50%;
  left: 50%;
  width: min(760px, calc(100vw - 28px));
  max-height: calc(100vh - 32px);
  overflow: auto;
  transform: translate(-50%, -50%);
  display: grid !important;
  grid-template-columns: minmax(240px, 42%) 1fr !important;
  box-shadow: 0 28px 90px rgba(0, 0, 0, .32);
  cursor: zoom-out;
}
.product-card-expanded .product-image-wrap {
  min-height: 360px !important;
  height: 100% !important;
}
.product-card-expanded .product-image-wrap img {
  height: 330px !important;
}
.product-card-expanded .product-body {
  padding: 28px 24px 22px !important;
}
.product-card-expanded .product-body h3 {
  min-height: 0 !important;
  font-size: 1.35rem !important;
}
.product-card-expanded .product-card-description {
  -webkit-line-clamp: 5;
  font-size: .98rem !important;
  min-height: 0 !important;
}
body.product-layout-grid .product-card {
  display: block;
  min-height: 0;
}
.product-top {
  position: relative;
  padding: 14px 14px 0;
}
.platform-chip {
  position: absolute;
  top: 10px;
  left: 10px;
  border-radius: 8px;
  padding: 4px 8px;
  color: white;
  font-size: 0.72rem;
  font-weight: 800;
  z-index: 2;
}
.product-card-actions {
  position: absolute;
  top: 10px;
  right: 10px;
  display: flex;
  gap: 7px;
  z-index: 2;
}

.product-card .favorite,
.product-card .share-product {
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--white);
  font-size: 1.2rem;
  color: #8487a8;
  display: grid;
  place-items: center;
  line-height: 1;
}

.product-card .share-product {
  font-size: 1rem;
  color: var(--purple);
}
.product-card .favorite.active {
  color: #ff4c5b;
}
.product-image-wrap {
  height: 100%;
  min-height: 190px;
  display: grid;
  place-items: center;
  overflow: hidden;
}
.product-image-wrap img {
  width: 100%;
  height: 170px;
  object-fit: contain;
  transition: transform .22s ease;
}
.product-card:hover .product-image-wrap img,
.product-card:focus-within .product-image-wrap img {
  transform: scale(1.12);
}
.product-body {
  padding: 22px 18px 18px;
  display: flex;
  flex-direction: column;
}
.product-body h3 {
  margin: 0 0 10px;
  min-height: 0;
  font-size: 0.99rem;
  line-height: 1.4;
}
.product-card-description {
  display: -webkit-box;
  min-height: 0;
  margin: -4px 0 10px;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.45;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.price-change-note {
  margin: -5px 0 9px;
  color: #7b7e96;
  font-size: 0.76rem;
  font-weight: 700;
}
body.product-layout-grid .product-image-wrap {
  height: 148px;
  min-height: 148px;
}
body.product-layout-grid .product-image-wrap img {
  height: 128px;
}
body.product-layout-grid .product-body {
  display: block;
  padding: 10px 14px 16px;
}
body.product-layout-grid .product-body h3 {
  min-height: 65px;
}
.product-load-sentinel {
  grid-column: 1 / -1;
  padding: 12px;
  border: 1px dashed var(--line);
  border-radius: 14px;
  color: #6f728d;
  font-size: 0.9rem;
  font-weight: 700;
  text-align: center;
}
body.theme-dark .product-load-sentinel {
  color: #b6bad8;
}
.price-line {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.price-now {
  font-size: 1.05rem;
  font-weight: 900;
}
.price-old {
  font-size: 0.92rem;
  color: #8a8da7;
  text-decoration: line-through;
}
.product-button {
  width: 100%;
  height: 40px;
  border: none;
  border-radius: 10px;
  color: white;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.btn-shopee { background: linear-gradient(180deg, #ff7f1d 0%, #ff6217 100%); }
.btn-tiktok { background: #111; }
.btn-lazada { background: linear-gradient(90deg, #6a35ff 0%, #4733ff 100%); }
.btn-zalora { background: #111; }

.category-grid {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 10px;
}
.category-pill {
  border: none;
  background: transparent;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  color: #1f2340;
}
.category-pill span {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #f3f4fb;
  font-size: 2rem;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.03);
}
body.theme-dark .category-pill span {
  background: #1b2036;
}
.category-pill small {
  font-size: 0.93rem;
  font-weight: 600;
  text-align: center;
}
.category-pill.active span,
.category-pill:hover span {
  box-shadow: 0 8px 22px rgba(66, 51, 255, 0.12);
}

.how-it-works {
  margin-top: 46px;
}
.how-it-works > h2 {
  text-align: center;
  margin-bottom: 18px;
}
.how-card {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  gap: 10px;
  padding: 26px 32px;
}
.how-step {
  display: flex;
  align-items: center;
  gap: 18px;
}
.how-icon {
  width: 72px;
  height: 72px;
  flex: 0 0 72px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #f2f0ff;
  font-size: 1.9rem;
  color: #5750a5;
}
.how-icon.gold {
  background: #fff4dc;
  color: #f2a300;
}
.how-step h3 {
  margin: 0 0 8px;
  font-size: 1rem;
}
.how-step p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}
.how-arrow {
  display: grid;
  place-items: center;
  color: #1d2241;
  font-size: 2rem;
}

.newsletter {
  margin-top: 28px;
}
.newsletter-box {
  background: linear-gradient(90deg, #0a1466 0%, #040c56 40%, #15108b 100%);
  color: white;
  border-radius: 22px;
  box-shadow: var(--card-shadow);
  padding: 20px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
}
.newsletter-copy {
  display: flex;
  align-items: center;
  gap: 18px;
}
.newsletter-icon {
  width: 56px;
  height: 56px;
  flex: 0 0 56px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(255,255,255,0.08);
  font-size: 1.6rem;
}
.newsletter-box h2 {
  margin: 0 0 8px;
  font-size: 1.75rem;
  letter-spacing: -0.03em;
}
.newsletter-box p {
  margin: 0;
  color: rgba(255,255,255,0.82);
}
.newsletter-form {
  display: flex;
  align-items: center;
  gap: 0;
  width: min(420px, 100%);
  background: white;
  border-radius: 14px;
  overflow: hidden;
}
body.theme-dark .newsletter-form {
  background: #171b2f;
}
.newsletter-form input {
  flex: 1;
  height: 54px;
  border: none;
  outline: none;
  padding: 0 18px;
}
.newsletter-form button {
  width: 130px;
  height: 54px;
  border: none;
  background: var(--orange);
  color: white;
  font-weight: 800;
}

.site-footer {
  margin-top: 24px;
  padding: 28px 32px 16px;
  background: linear-gradient(180deg, #031163 0%, #010a43 100%);
  color: white;
}
.site-footer {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 36px;
}
.footer-brand-block img {
  width: 228px;
  margin-bottom: 14px;
}
.footer-brand-block p {
  margin: 0 0 18px;
  color: rgba(255,255,255,0.85);
  line-height: 1.6;
}
.socials {
  display: flex;
  gap: 12px;
}
.socials span {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(255,255,255,0.10);
  font-weight: 700;
}
.footer-links {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}
.footer-links h3 {
  margin: 4px 0 12px;
  font-size: 1.2rem;
}
.footer-links a,
.footer-links p {
  display: block;
  margin: 0 0 8px;
  color: rgba(255,255,255,0.85);
  line-height: 1.65;
}
.footer-bottom {
  grid-column: 1 / -1;
  text-align: center;
  color: rgba(255,255,255,0.88);
  font-size: 0.95rem;
  padding-top: 8px;
}


.no-results {
  grid-column: 1 / -1;
  padding: 28px;
  border: 1px dashed var(--line);
  border-radius: 18px;
  background: var(--white);
  color: var(--muted);
  text-align: center;
  font-weight: 600;
}

.hidden { display: none !important; }

.auth-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(6, 9, 28, .72);
}

.utility-page {
  min-height: 60vh;
}

.utility-page-card {
  max-width: 900px;
  margin: 0 auto;
  padding: 34px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--white);
  box-shadow: var(--card-shadow);
}

.utility-page-card h1 {
  margin: 0 0 18px;
  font-size: clamp(2.2rem, 6vw, 4rem);
  letter-spacing: -0.04em;
}

.utility-page-content {
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.8;
}

.profile-page-body {
  min-height: 100vh;
  background: #f7f7fb;
}

.profile-nav {
  justify-content: flex-end;
}

.profile-page {
  max-width: 980px;
  margin: 0 auto;
  padding: 38px 24px 56px;
}

.profile-shell {
  display: grid;
  gap: 18px;
}

.profile-heading p {
  margin: 0 0 8px;
  color: var(--orange);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.profile-heading h1 {
  margin: 0;
  font-size: clamp(2.2rem, 5vw, 4rem);
  line-height: 1;
  letter-spacing: -0.04em;
}

.profile-card {
  display: grid;
  gap: 22px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--white);
  box-shadow: var(--card-shadow);
  padding: 24px;
}

.profile-photo-panel,
.profile-password-panel {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 18px;
  background: #fbfbfe;
}

.profile-photo-panel {
  display: grid;
  grid-template-columns: 136px 1fr;
  gap: 20px;
  align-items: center;
}

.profile-avatar-preview {
  width: 128px;
  height: 128px;
  border-radius: 50%;
  overflow: hidden;
  background: #eef0f8;
  border: 4px solid #fff;
  box-shadow: 0 12px 30px rgba(20, 25, 60, .12);
}

.profile-avatar-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  touch-action: none;
  transform-origin: center;
  cursor: grab;
}

.avatar-adjust-panel {
  display: grid;
  gap: 9px;
  margin-top: 14px;
}

.avatar-adjust-panel label {
  display: grid;
  gap: 6px;
  font-weight: 850;
}

.avatar-adjust-panel input[type="range"] {
  accent-color: var(--purple);
}

.avatar-adjust-panel p {
  margin: 0;
  font-size: .9rem;
}

.profile-photo-panel h2,
.profile-password-panel h2 {
  margin: 0 0 8px;
  font-size: 1.3rem;
}

.profile-photo-panel p,
.profile-password-panel p {
  margin: 0 0 14px;
  color: var(--muted);
  line-height: 1.6;
}

.profile-upload-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border-radius: 12px;
  padding: 10px 15px;
  background: var(--purple);
  color: #fff;
  font-weight: 900;
  overflow: hidden;
  cursor: pointer;
}

.profile-upload-btn input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.profile-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.profile-form-grid label {
  display: grid;
  gap: 7px;
  color: var(--text);
  font-weight: 850;
}

.profile-form-grid input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 13px;
  background: #fff;
  color: #15152b;
}

.profile-wide {
  grid-column: 1 / -1;
}

.profile-message {
  min-height: 22px;
  margin: 0;
  color: #d14424;
  font-weight: 850;
}

.profile-message.success {
  color: #177245;
}

.profile-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
}
.auth-card {
  position: relative;
  width: min(560px, 100%);
  max-height: calc(100vh - 40px);
  overflow: auto;
  border-radius: 22px;
  background: var(--white);
  border: 1px solid var(--line);
  box-shadow: 0 26px 80px rgba(0, 0, 0, .28);
  padding: 22px;
}
.auth-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--white);
  font-size: 1.4rem;
}
.auth-tabs {
  display: flex;
  gap: 8px;
  margin: 0 48px 18px 0;
}
.auth-tabs button,
.secondary-action {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--white);
  color: var(--text);
  font-weight: 800;
  padding: 10px 13px;
}
.auth-tabs button.active,
.auth-submit {
  border: 0;
  border-radius: 12px;
  background: var(--orange);
  color: #fff;
  font-weight: 900;
  padding: 12px 16px;
}
.auth-submit:disabled {
  cursor: not-allowed;
  opacity: .48;
}
.auth-form {
  display: grid;
  gap: 13px;
}
.auth-form h2 {
  margin: 0;
  letter-spacing: -0.04em;
}
.auth-form label {
  display: grid;
  gap: 7px;
  font-weight: 800;
}
.auth-form input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 13px;
  background: var(--white);
  color: var(--text);
}
.two-field-row,
.otp-row,
.auth-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.otp-row {
  grid-template-columns: auto 1fr auto;
  align-items: end;
}
.password-field {
  display: grid;
  grid-template-columns: 1fr 44px;
  gap: 8px;
}
.show-password-btn {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--white);
}
.remember-row {
  display: flex !important;
  align-items: center;
  gap: 9px !important;
}
.remember-row input {
  width: auto;
}
.auth-message {
  min-height: 20px;
  margin: 0;
  color: #d14424;
  font-weight: 800;
  line-height: 1.4;
}
.optional {
  color: var(--muted);
  font-weight: 600;
}

@media (max-width: 1180px) {
  .main-nav { gap: 10px; }
  .main-nav a { font-size: 0.89rem; padding-inline: 6px; }
  body.product-layout-grid .product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .category-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .benefits { grid-template-columns: repeat(2, 1fr); }
  .how-card { grid-template-columns: 1fr; }
  .how-arrow { display: none; }
  .newsletter-box { flex-direction: column; align-items: stretch; }
  .newsletter-form { width: 100%; }
  .site-footer { grid-template-columns: 1fr; }
}

@media (max-width: 860px) {
  .site-header {
    position: sticky;
    top: 0;
  }
  .topbar {
    flex-wrap: wrap;
    padding: 0 0 12px;
  }
  .header-brand { flex: 1 1 auto; }
  .mobile-nav-toggle,
  .mobile-home-back { display: inline-flex; }
  .main-nav {
    display: none;
    flex: 1 1 100%;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 6px 16px 0;
  }
  .main-nav.show { display: flex; }
  .main-nav a {
    width: 100%;
    padding: 12px 0;
    border-bottom: 1px solid #ececf4;
  }
  .nav-auth-btn {
    width: 100%;
    margin-top: 8px;
  }
  .nav-profile-wrap {
    margin-top: 8px;
  }
  .nav-profile-btn {
    margin-top: 0;
  }
  .profile-dropdown {
    position: static;
    width: 100%;
    margin-top: 8px;
  }
  .main-nav a.active::after { display: none; }

  .hero { min-height: auto; }
  .hero-content { padding: 20px 16px 28px; }
  .hero-brand { width: 170px; }
  .hero h1 { font-size: clamp(2.7rem, 11vw, 4rem); }
  .hero p { font-size: 1rem; margin-bottom: 18px; }
  .search-box {
    margin-top: 26px;
    width: 100%;
    grid-template-columns: 38px 1fr;
    grid-template-areas:
      "icon input"
      "button button";
    height: auto;
    padding: 10px;
    row-gap: 10px;
    border-radius: 16px;
  }
  .search-icon { grid-area: icon; }
  .search-box input {
    grid-area: input;
    min-width: 0;
  }
  .search-box button {
    grid-area: button;
    width: 100%;
  }
  .floating-search-box {
    right: 8px;
    bottom: 10px;
    width: min(225px, calc(100vw - 12px));
    min-height: 56px;
    grid-template-columns: minmax(0, 1fr) 44px;
    padding: 7px 3px 7px 13px;
  }
  .benefits-wrap,
  .section { padding-inline: 16px; }
  .benefits-wrap { margin-top: -8px; }
  .benefits { grid-template-columns: repeat(2, 1fr); padding: 14px; }
  .product-grid {
    display: grid;
    grid-template-columns: 1fr;
    overflow: visible;
    gap: 12px;
    max-width: none;
  }
  .product-card {
    grid-template-columns: minmax(120px, 38%) 1fr;
    min-width: 0;
    max-width: none;
  }
  body.product-layout-grid .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  body.product-layout-grid.product-columns-3 .product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .section-title-row h2, .how-it-works > h2 { font-size: 1.7rem; }
  .category-grid {
    display: flex;
    overflow-x: auto;
    gap: 12px;
    padding-bottom: 6px;
  }
  .category-pill { min-width: 96px; }
  .category-pill span { width: 78px; height: 78px; }
  .newsletter-box { padding: 18px 16px; }
  .newsletter-copy { align-items: flex-start; }
  .newsletter-box h2 { font-size: 1.35rem; }
  .footer-links { grid-template-columns: 1fr; }
  .two-field-row,
  .otp-row,
  .auth-actions,
  .profile-form-grid {
    grid-template-columns: 1fr;
  }
  .profile-page {
    padding: 26px 16px 42px;
  }
  .profile-card {
    padding: 16px;
    border-radius: 18px;
  }
  .profile-photo-panel {
    grid-template-columns: 1fr;
    justify-items: start;
  }
  .profile-actions {
    flex-direction: column-reverse;
    align-items: stretch;
  }
  .profile-actions .secondary-action,
  .profile-actions .auth-submit {
    text-align: center;
    width: 100%;
  }
}

@media (max-width: 520px) {
  .header-brand img { width: 220px; height: 56px; }
  .header-brand { flex-basis: 220px; }
  .mobile-nav-toggle { margin-right: 10px; }
  .hero-content { padding-top: 12px; }
  .search-box {
    margin-top: 26px;
    height: auto;
    grid-template-columns: 34px 1fr;
    padding: 8px;
  }
  .product-card,
  body.product-layout-grid .product-card {
    display: grid;
    grid-template-columns: 1fr;
  }
  .product-card-expanded {
    grid-template-columns: 1fr !important;
    width: min(360px, calc(100vw - 20px));
  }
  .product-card-expanded .product-image-wrap {
    min-height: 260px !important;
    height: 260px !important;
  }
  .product-card-expanded .product-image-wrap img {
    height: 230px !important;
  }
  body.product-layout-grid .product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  body.product-layout-grid.product-columns-3 .product-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }
  body.product-layout-grid .product-card {
    display: block;
    min-height: 0;
  }
  .product-image-wrap,
  body.product-layout-grid .product-image-wrap {
    min-height: 150px;
    height: 150px;
  }
  body.product-layout-grid .product-image-wrap {
    min-height: 112px;
    height: 112px;
  }
  body.product-layout-grid.product-columns-3 .product-image-wrap {
    min-height: 84px;
    height: 84px;
  }
  body.product-layout-grid .product-image-wrap img {
    height: 96px;
  }
  body.product-layout-grid.product-columns-3 .product-image-wrap img {
    height: 74px;
  }
  body.product-layout-grid .product-top {
    padding: 10px 8px 0;
  }
  body.product-layout-grid .product-body {
    padding: 8px;
  }
  body.product-layout-grid .product-body h3 {
    font-size: 0.82rem;
    line-height: 1.3;
    min-height: 38px;
  }
  body.product-layout-grid .product-card-description {
    font-size: 0.72rem;
    line-height: 1.3;
    min-height: 36px;
  }
  body.product-layout-grid.product-columns-3 .product-body h3 {
    font-size: 0.72rem;
  }
  body.product-layout-grid .price-line {
    gap: 4px;
    margin-bottom: 8px;
  }
  body.product-layout-grid .price-change-note {
    font-size: 0.66rem;
    margin-bottom: 7px;
  }
  body.product-layout-grid .price-now {
    font-size: 0.86rem;
  }
  body.product-layout-grid .price-old {
    font-size: 0.72rem;
  }
  body.product-layout-grid .product-button {
    min-height: 34px;
    padding: 8px;
    font-size: 0.76rem;
  }
  body.product-layout-grid.product-columns-3 .product-button {
    font-size: 0.68rem;
  }
  .benefits { grid-template-columns: 1fr 1fr; gap: 8px; }
  .benefit-item { flex-direction: column; gap: 10px; }
  .benefit-item h3 { margin-top: 0; }
  .newsletter-form { flex-direction: column; background: transparent; gap: 12px; overflow: visible; }
  .newsletter-form input { width: 100%; border-radius: 12px; }
  .newsletter-form button { width: 100%; border-radius: 12px; }
}
.product-detail-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 28px;
  box-shadow: var(--card-shadow);
  padding: 28px;
}

.product-detail-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 34px;
  align-items: center;
}

.product-detail-image {
  background: var(--bg);
  border-radius: 24px;
  padding: 28px;
  display: grid;
  place-items: center;
}

.product-detail-image img {
  width: 100%;
  max-height: 430px;
  object-fit: contain;
}

.product-detail-info h1 {
  margin: 18px 0;
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1.05;
  letter-spacing: -0.05em;
}

.detail-price {
  justify-content: flex-start;
  margin: 18px 0;
}

.detail-price .price-now {
  font-size: 1.7rem;
}

.product-detail-note {
  color: var(--muted);
  font-size: 8px;
  line-height: 1.45;
  margin: 18px 0 22px;
}

.back-link {
  display: inline-block;
  margin-top: 18px;
  color: #4d34ff;
  font-weight: 800;
}

.product-error {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 32px;
  text-align: center;
  box-shadow: var(--card-shadow);
}

@media (max-width: 760px) {
  .product-detail-layout {
    grid-template-columns: 1fr;
  }

  .product-detail-card {
    padding: 18px;
  }

  .product-detail-image {
    padding: 18px;
  }
}
