:root {
  --ink: #17202a;
  --muted: #637082;
  --line: #dbe2ea;
  --paper: #ffffff;
  --soft: #f5f7f8;
  --accent: #0f766e;
  --accent-dark: #115e59;
  --sun: #f59e0b;
  --rose: #e11d48;
  --shadow: 0 22px 60px rgba(23, 32, 42, 0.14);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, Arial, sans-serif;
  color: var(--ink);
  background: var(--soft);
}

body.overlay-open {
  overflow: hidden;
  position: fixed;
  left: 0;
  right: 0;
  width: 100%;
  overscroll-behavior: none;
}

html.overlay-open {
  overflow: hidden;
  overscroll-behavior: none;
}

button,
input {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: inherit;
  text-decoration: none;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

.mobile-menu-drawer {
  display: block;
}

.mobile-sticky-search {
  position: sticky;
  top: 74px;
  z-index: 19;
  display: grid;
  grid-template-columns: minmax(280px, 760px);
  justify-content: center;
  align-items: center;
  gap: 10px;
  padding: 10px 22px;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

.mobile-sticky-search > .mobile-menu-button,
.mobile-sticky-search > .mobile-cart-button {
  display: none;
}

.mobile-search-field {
  display: block;
  width: 100%;
}

.mobile-search-field input {
  min-height: 44px;
  border-radius: 8px;
  background: white;
}

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

.nav {
  max-width: 1180px;
  min-height: 74px;
  margin: 0 auto;
  padding: 0 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.brand,
.nav-links,
.nav-actions,
.hero-actions,
.filters,
.shop-tools {
  display: flex;
  align-items: center;
}

.brand {
  gap: 10px;
  font-weight: 800;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 8px;
  color: white;
  background: var(--ink);
  letter-spacing: 0;
}

.nav-links {
  gap: 28px;
  color: var(--muted);
  font-weight: 600;
}

.nav-actions {
  gap: 10px;
}

.icon-button,
.cart-button,
.filter-button,
.primary-button,
.secondary-link,
.primary-link {
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 700;
}

.icon-button,
.cart-button,
.filter-button {
  background: white;
  border: 1px solid var(--line);
  color: var(--ink);
}

.icon-button,
.cart-button {
  min-height: 42px;
  padding: 0 14px;
}

.account-label {
  display: block;
}

.account-label.profile-label {
  display: grid;
  gap: 2px;
  line-height: 1.1;
  text-align: left;
}

.account-label.profile-label strong {
  font-size: 14px;
}

.account-label.profile-label small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.cart-button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.cart-button strong {
  display: grid;
  place-items: center;
  min-width: 24px;
  height: 24px;
  border-radius: 999px;
  color: white;
  background: var(--rose);
  font-size: 13px;
}

.mobile-menu-button {
  display: grid;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  place-items: center;
  padding: 9px;
  cursor: pointer;
}

.mobile-menu-button span {
  display: block;
  width: 20px;
  height: 2px;
  border-radius: 999px;
  background: var(--ink);
}

.hero {
  min-height: 560px;
  display: grid;
  align-items: center;
  background:
    linear-gradient(90deg, rgba(12, 20, 28, 0.85), rgba(12, 20, 28, 0.34)),
    url("https://images.unsplash.com/photo-1541643600914-78b084683601?auto=format&fit=crop&w=1800&q=80") center/cover;
}

.hero-content {
  width: min(720px, calc(100% - 44px));
  margin: 0 auto;
  color: white;
  transform: translateX(-22%);
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero .eyebrow {
  color: #7dd3fc;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  max-width: 780px;
  margin-bottom: 18px;
  font-size: clamp(42px, 7vw, 74px);
  line-height: 0.95;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 10px;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.05;
  letter-spacing: 0;
}

.hero p {
  max-width: 590px;
  color: rgba(255, 255, 255, 0.84);
  font-size: 18px;
  line-height: 1.7;
}

.hero-actions {
  flex-wrap: wrap;
  gap: 12px;
}

.primary-link,
.primary-button {
  color: white;
  background: var(--accent);
  box-shadow: 0 10px 28px rgba(15, 118, 110, 0.24);
}

.primary-link,
.secondary-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 18px;
}

.primary-button {
  min-height: 48px;
  padding: 0 18px;
}

.primary-button:disabled {
  cursor: not-allowed;
  opacity: 0.68;
  box-shadow: none;
}

.primary-button:hover,
.primary-link:hover {
  background: var(--accent-dark);
}

.secondary-link {
  color: white;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.32);
}

.secondary-link.dark {
  color: var(--ink);
  background: white;
  border-color: var(--line);
}

.stats,
.section-heading,
.product-grid,
.deals,
.support {
  width: min(1180px, calc(100% - 44px));
  margin: 0 auto;
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  margin-top: -44px;
  overflow: hidden;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.stats div {
  display: grid;
  gap: 6px;
  padding: 26px;
  background: white;
}

.stats strong {
  font-size: 26px;
}

.stats span,
.section-heading p,
.support p,
.deals p,
.product-card p {
  color: var(--muted);
  line-height: 1.6;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  padding: 78px 0 24px;
}

.filters {
  flex-wrap: wrap;
  gap: 8px;
}

.shop-tools {
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
}

.shop-tools > .search-field {
  display: none;
}

.search-field {
  width: min(300px, 100%);
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.search-field input {
  min-height: 40px;
  border-radius: 8px;
}

.filter-button {
  min-height: 40px;
  padding: 0 14px;
}

.filter-button.active {
  color: white;
  background: var(--ink);
  border-color: var(--ink);
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.product-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.product-image {
  aspect-ratio: 1 / 0.82;
  background: #e7ecef;
}

.product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.product-info {
  padding: 18px;
}

.product-info h3 {
  margin: 0 0 8px;
  font-size: 18px;
}

.product-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 16px;
}

.price {
  font-size: 20px;
  font-weight: 800;
}

.add-button {
  min-height: 40px;
  padding: 0 12px;
  border: 0;
  border-radius: 8px;
  color: white;
  background: var(--ink);
  cursor: pointer;
  font-weight: 700;
}

.deals,
.support {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  margin-top: 70px;
  padding: 36px;
  border-radius: 8px;
}

.deals {
  background: #fff7ed;
  border: 1px solid #fed7aa;
}

.deals .eyebrow {
  color: var(--sun);
}

.support {
  margin-bottom: 70px;
  color: white;
  background: var(--ink);
}

.support p {
  color: rgba(255, 255, 255, 0.76);
}

.drawer,
.modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  visibility: hidden;
  opacity: 0;
  transition: opacity 180ms ease, visibility 180ms ease;
}

.drawer.open,
.modal.open {
  visibility: visible;
  opacity: 1;
}

.drawer {
  background: rgba(23, 32, 42, 0.34);
  overscroll-behavior: contain;
  touch-action: pan-y;
}

.drawer-panel {
  width: min(420px, 100%);
  height: 100%;
  margin-left: auto;
  padding: 24px;
  display: flex;
  flex-direction: column;
  background: white;
  transform: translateX(100%);
  transition: transform 220ms ease;
  overscroll-behavior: contain;
  overflow: hidden;
  touch-action: pan-y;
}

.drawer.open .drawer-panel {
  transform: translateX(0);
}

.mobile-menu-drawer .drawer-panel {
  margin-left: 0;
  margin-right: auto;
  transform: translateX(-100%);
}

.mobile-menu-drawer.open .drawer-panel {
  transform: translateX(0);
}

.drawer-header,
.cart-line,
.cart-summary div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.close-button {
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  cursor: pointer;
  font-weight: 800;
}

.cart-items {
  flex: 1;
  overflow: auto;
  padding: 12px 0;
}

.cart-line {
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.cart-line strong {
  display: block;
}

.cart-line span {
  color: var(--muted);
  font-size: 14px;
}

.remove-button {
  border: 0;
  background: transparent;
  color: var(--rose);
  cursor: pointer;
  font-weight: 700;
}

.text-button {
  border: 0;
  background: transparent;
  color: var(--accent);
  cursor: pointer;
  font-weight: 800;
}

.profile-panel {
  gap: 16px;
  overflow: auto;
  overscroll-behavior: contain;
}

.profile-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
}

.profile-avatar {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 8px;
  color: white;
  background: var(--ink);
  font-weight: 800;
}

.profile-card strong,
.profile-card span {
  display: block;
}

.profile-card span:not(.profile-avatar) {
  margin-top: 4px;
  color: var(--muted);
  font-size: 14px;
}

.profile-section {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

.profile-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.profile-mini-list,
.profile-orders {
  display: grid;
  gap: 8px;
  max-height: 210px;
  overflow: auto;
}

.profile-line,
.order-line {
  display: grid;
  gap: 4px;
  padding: 10px;
  border-radius: 8px;
  background: var(--soft);
}

.profile-line span,
.order-line span,
.empty-state {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.profile-actions {
  display: grid;
  gap: 10px;
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.secondary-action {
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: var(--rose);
  cursor: pointer;
  font-weight: 800;
}

.cart-summary {
  display: grid;
  gap: 16px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.full {
  width: 100%;
}

.hidden {
  display: none !important;
}

.order-success-banner {
  position: fixed;
  top: 86px;
  left: 50%;
  z-index: 80;
  width: min(520px, calc(100% - 28px));
  transform: translateX(-50%);
  padding: 14px 16px;
  border: 1px solid rgba(15, 118, 110, 0.22);
  border-radius: 8px;
  background: #ecfdf5;
  color: #115e59;
  box-shadow: var(--shadow);
  font-weight: 800;
  line-height: 1.45;
}

.order-success-banner[hidden] {
  display: none;
}

.search-mode .hero,
.search-mode .home-section,
.search-mode .filters,
.search-mode .section-heading .eyebrow {
  display: none;
}

.search-mode .section-heading {
  align-items: stretch;
  padding-top: 18px;
}

.search-mode .section-heading h2 {
  margin-bottom: 0;
  font-size: 24px;
}

.search-mode .shop-tools {
  width: 100%;
  justify-content: stretch;
}

.search-mode .search-field {
  width: 100%;
}

.search-mode .product-grid {
  margin-top: 14px;
}

.modal {
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(23, 32, 42, 0.5);
  overscroll-behavior: contain;
  overflow: hidden;
  touch-action: pan-y;
}

.auth-card {
  position: relative;
  width: min(440px, 100%);
  max-height: calc(100vh - 40px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 28px;
  border-radius: 8px;
  background: white;
  box-shadow: var(--shadow);
  touch-action: pan-y;
}

.auth-body {
  min-height: 0;
  overflow: auto;
  margin-right: -12px;
  padding-right: 12px;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.auth-message {
  flex: 0 0 auto;
}

.auth-close {
  position: absolute;
  top: 18px;
  right: 18px;
}

.auth-tabs {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
  padding: 6px;
  margin: 18px 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
}

.auth-tab {
  min-height: 40px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  cursor: pointer;
  font-weight: 700;
}

.auth-tab.active {
  background: white;
  box-shadow: 0 8px 18px rgba(23, 32, 42, 0.08);
}

.auth-form {
  display: none;
  gap: 14px;
}

.auth-form.active {
  display: grid;
}

.google-auth-box {
  width: min(280px, 100%);
  max-width: 280px;
  min-height: 48px;
  display: flex;
  justify-content: center;
  justify-self: center;
  overflow: visible;
  padding: 2px;
}

.google-auth-box > div {
  max-width: 100% !important;
}

.auth-divider {
  position: relative;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.auth-divider::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--line);
}

.auth-divider span {
  position: relative;
  padding: 0 10px;
  background: white;
}

label {
  display: grid;
  gap: 8px;
  color: var(--ink);
  font-weight: 700;
}

input {
  width: 100%;
  min-height: 46px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: var(--ink);
}

select {
  min-height: 46px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: var(--ink);
  font: inherit;
}

.phone-row {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 8px;
}

textarea {
  width: 100%;
  min-height: 92px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  resize: vertical;
  font: inherit;
  color: var(--ink);
}

input:focus {
  outline: 3px solid rgba(15, 118, 110, 0.16);
  border-color: var(--accent);
}

textarea:focus {
  outline: 3px solid rgba(15, 118, 110, 0.16);
  border-color: var(--accent);
}

.form-message {
  min-height: 24px;
  margin: 14px 0 0;
  color: var(--accent-dark);
  font-weight: 700;
}

.form-message.error {
  color: var(--rose);
}

.otp-box,
.payment-gateway,
.order-total {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
}

.otp-box small {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  line-height: 1.5;
}

.checkout-card {
  width: min(520px, 100%);
  height: auto;
  max-height: calc(100vh - 40px);
  max-height: calc(100svh - 40px);
  max-height: calc(100dvh - 40px);
}

.checkout-form {
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  gap: 14px;
  overflow-x: hidden;
  overflow-y: auto;
  margin-right: -12px;
  padding-right: 12px;
  overscroll-behavior: contain;
  touch-action: pan-y;
  -webkit-overflow-scrolling: touch;
}

.checkout-body {
  display: grid;
  gap: 14px;
}

.checkout-actions {
  display: grid;
  gap: 12px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  background: white;
}

.checkout-actions .primary-button {
  min-height: 52px;
}

.checkout-card .form-message {
  flex: 0 0 auto;
  min-height: 20px;
  margin: 10px 0 0;
}

.address-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.payment-gateway {
  display: grid;
  gap: 12px;
}

.payment-options {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.payment-option {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  font-size: 14px;
  cursor: pointer;
  user-select: none;
  transition: border-color 160ms ease, background 160ms ease, color 160ms ease;
}

.payment-option.active {
  color: white;
  background: var(--ink);
  border-color: var(--ink);
}

.payment-gateway small {
  color: var(--muted);
  line-height: 1.5;
}

.payment-option input {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 1px;
  height: 1px;
  margin: 0;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -50%);
}

.mobile-menu-panel {
  gap: 8px;
  overflow: auto;
  overscroll-behavior: contain;
}

.mobile-menu-panel a,
.menu-command {
  display: flex;
  align-items: center;
  min-height: 46px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: var(--ink);
  font-weight: 800;
}

.order-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

@media (max-width: 920px) {
  .nav {
    min-height: 70px;
    flex-wrap: nowrap;
    padding-top: 10px;
    padding-bottom: 10px;
  }

  .nav-links {
    display: none;
  }

  .brand {
    flex: 1;
    min-width: 0;
  }

  .hero-content {
    transform: none;
  }

  .product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .section-heading,
  .deals,
  .support {
    align-items: stretch;
    flex-direction: column;
  }

  .shop-tools {
    justify-content: flex-start;
  }
}

@media (max-width: 640px) {
  .site-header {
    position: static;
    z-index: 20;
  }

  .nav {
    min-height: 62px;
    justify-content: space-between;
    flex-wrap: nowrap;
    gap: 10px;
    padding: 8px 12px;
  }

  .mobile-menu-button {
    display: grid;
  }

  .nav-links {
    display: none;
  }

  .nav-actions {
    width: auto;
    justify-content: flex-end;
    gap: 7px;
  }

  .brand {
    flex: 1;
    min-width: 0;
  }

  .brand-mark {
    width: 38px;
    height: 38px;
    font-size: 14px;
  }

  .brand > span:last-child {
    font-size: 17px;
    white-space: nowrap;
  }

  .icon-button,
  .cart-button {
    min-height: 38px;
    padding: 0 10px;
    font-size: 13px;
  }

  .cart-button {
    gap: 6px;
  }

  .mobile-sticky-search {
    top: 0;
    z-index: 30;
    grid-template-columns: 0 minmax(0, 1fr) 0;
    gap: 8px;
    padding: 8px 12px;
  }

  .mobile-sticky-search.is-compact {
    grid-template-columns: 42px minmax(0, 1fr) auto;
  }

  .mobile-sticky-search .mobile-menu-button,
  .mobile-sticky-search .mobile-cart-button {
    display: grid;
    opacity: 0;
    pointer-events: none;
    overflow: hidden;
    padding: 0;
    border: 0;
  }

  .mobile-sticky-search .mobile-cart-button {
    display: inline-flex;
  }

  .mobile-sticky-search.is-compact .mobile-menu-button,
  .mobile-sticky-search.is-compact .mobile-cart-button {
    opacity: 1;
    pointer-events: auto;
    overflow: visible;
    padding: 9px;
    border: 1px solid var(--line);
  }

  .mobile-sticky-search.is-compact .mobile-cart-button {
    padding: 0 10px;
  }

  .mobile-search-field input {
    min-height: 42px;
    font-size: 14px;
  }

  .mobile-cart-button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 42px;
    padding: 0 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: white;
    color: var(--ink);
    cursor: pointer;
    font-weight: 800;
    font-size: 13px;
  }

  .mobile-cart-button strong {
    display: grid;
    place-items: center;
    min-width: 22px;
    height: 22px;
    border-radius: 999px;
    color: white;
    background: var(--rose);
    font-size: 12px;
  }

  .shop-tools {
    justify-content: flex-start;
  }

  .hero {
    min-height: 620px;
  }

  h1 {
    font-size: 42px;
  }

  .stats,
  .product-grid {
    grid-template-columns: 1fr;
  }

  .payment-options {
    grid-template-columns: repeat(2, 1fr);
  }

  .modal {
    padding: 10px;
    align-items: start;
  }

  .auth-card {
    width: min(100%, 430px);
    max-height: calc(100svh - 20px);
    padding: 20px;
  }

  .checkout-card {
    height: auto;
    max-height: calc(100svh - 20px);
    max-height: calc(100dvh - 20px);
  }

  .auth-header h2 {
    font-size: 28px;
  }

  .auth-body {
    max-height: calc(100svh - 180px);
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }

  .checkout-body {
    max-height: none;
  }

  .address-grid {
    grid-template-columns: 1fr;
  }

  .auth-form {
    gap: 12px;
  }

  .form-message {
    margin-top: 10px;
    font-size: 14px;
  }

  .order-success-banner {
    top: 12px;
  }

  .stats {
    margin-top: 0;
    width: 100%;
    border-radius: 0;
  }

  .section-heading,
  .product-grid,
  .deals,
  .support {
    width: min(100% - 28px, 1180px);
  }

  .deals,
  .support {
    padding: 24px;
  }
}
