/* habar.net — minimal white theme inspired by studio98store.com */

:root {
  --ink: #1a1a1a;
  --muted: #888888;
  --line: #eeeeee;
  --bg: #ffffff;
  --bg-soft: #ffffff;
  --danger: #b3261e;
  --font: "Inter", "Helvetica Neue", Arial, sans-serif;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

[x-cloak] {
  display: none !important;
}

body.app-shell {
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

h1, h2, h3, h4 {
  font-weight: 500;
  letter-spacing: 0.04em;
}

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

img {
  display: block;
  max-width: 100%;
}

/* ---------- Header ---------- */

.site-header {
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  background: #ffffff;
  z-index: 50;
  width: 100%;
}

.header-top {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 2rem;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 2rem 3.5rem;
}

.brand {
  font-size: 1.85rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  text-align: center;
  white-space: nowrap;
  color: var(--ink);
}

.desktop-nav {
  display: flex;
  gap: 2.4rem;
}

.desktop-nav a,
.header-link,
.cart-chip {
  font-size: 0.82rem;
  font-weight: 400;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  padding-bottom: 3px;
  border-bottom: 1px solid transparent;
  transition: border-color 0.15s ease, color 0.15s ease;
}

.desktop-nav a:hover,
.header-link:hover,
.cart-chip:hover {
  color: var(--ink);
  border-bottom-color: var(--ink);
}

.header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 2rem;
}

.menu-toggle {
  display: none;
}

.header-cart .cart-mobile {
  display: none;
}

.menu-toggle {
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  background: #ffffff;
  border-radius: 0;
  cursor: pointer;
  padding: 0;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.menu-toggle span {
  display: block;
  width: 18px;
  height: 1.5px;
  background: var(--ink);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.menu-toggle:active {
  background: #fafafa;
  border-color: var(--ink);
}

.header-cart .cart-mobile {
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 0.5rem 0;
  transition: color 0.2s ease;
  white-space: nowrap;
}

.header-cart .cart-mobile:active {
  color: var(--ink);
}

.btn-label-short {
  display: none;
}

.mobile-drawer {
  position: fixed;
  inset: 0;
  z-index: 200;
}

.mobile-drawer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(4px);
}

.mobile-drawer-panel {
  position: absolute;
  top: 0;
  left: 0;
  width: min(320px, 88vw);
  height: 100%;
  background: #ffffff;
  border-right: 1px solid var(--line);
  padding: 1.4rem 1.6rem 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  box-shadow: 8px 0 32px rgba(0, 0, 0, 0.06);
  transform: translateX(0);
  animation: slideIn 0.25s ease;
}

@keyframes slideIn {
  from { transform: translateX(-100%); }
  to { transform: translateX(0); }
}

.mobile-drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.4rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--line);
}

.mobile-drawer-title {
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

.menu-close {
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  background: #ffffff;
  color: var(--ink);
  font-size: 1rem;
  cursor: pointer;
  transition: border-color 0.2s ease;
}

.menu-close:active {
  border-color: var(--ink);
}

.mobile-drawer-panel a {
  font-size: 1rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink);
  padding: 1rem 0;
  border-bottom: 1px solid var(--line);
  transition: color 0.2s ease, padding-left 0.2s ease;
}

.mobile-drawer-panel a:active {
  color: var(--muted);
  padding-left: 0.4rem;
}

body.menu-open {
  overflow: hidden;
}

/* ---------- Layout ---------- */

.page-main {
  flex: 1;
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2rem 4rem;
}

.page-header {
  text-align: center;
  padding: 3rem 0 1rem;
}

.page-header h1 {
  font-size: 1.7rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.eyebrow {
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

.lede {
  color: var(--muted);
  max-width: 60ch;
  margin: 0.5rem auto 0;
}

/* ---------- Hero ---------- */

.hero {
  background: #ffffff;
  border-bottom: 1px solid var(--line);
  margin: 0 -2rem;
}

.hero-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 5rem 2rem;
  text-align: center;
}

.hero-inner h1 {
  font-size: 2.4rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-weight: 600;
}

.hero-inner p {
  color: var(--muted);
  margin: 0.6rem 0 1.8rem;
  letter-spacing: 0.06em;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
}

/* ---------- Category nav ---------- */

.category-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.8rem;
  justify-content: center;
  padding: 1.6rem 0 0.4rem;
  -webkit-overflow-scrolling: touch;
}

.category-link {
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 0.5rem 0;
  border-bottom: 1px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
  white-space: nowrap;
}

.category-link:hover {
  color: var(--ink);
}

.category-link:active {
  transform: scale(0.97);
}

.category-link.active {
  color: var(--ink);
  border-bottom-color: var(--ink);
}

/* ---------- Section heading ---------- */

.section-heading {
  text-align: center;
  padding: 2rem 0 1.6rem;
}

.section-heading h2 {
  font-size: 1.15rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
}

/* ---------- Product grid ---------- */

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 2.4rem 1.6rem;
}

.product-card {
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease;
}

.product-card-actions {
  display: flex;
  flex-direction: row;
  gap: 0.5rem;
  margin-top: 0.85rem;
}

.product-card-actions .buy-now-form,
.product-card-actions .add-cart-form.card {
  flex: 1;
  min-width: 0;
}

.product-card-actions .buy-now-form .button,
.product-card-actions .add-cart-form.card .button {
  width: 100%;
  padding: 0.65rem 0.5rem;
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.product-detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: end;
  margin-top: 1rem;
}

.product-detail-actions .buy-now-form {
  margin-top: 0;
}

.product-card:active {
  transform: scale(0.98);
}

.product-image {
  display: block;
  background: #ffffff;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  position: relative;
}

.product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease, opacity 0.3s ease;
}

.product-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.88);
  color: var(--ink);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.product-card:hover .product-image img,
.product-image:active img {
  transform: scale(1.04);
}

.product-card:hover .product-overlay,
.product-image:active .product-overlay {
  opacity: 1;
}

.product-body {
  padding: 0.9rem 0 0;
  text-align: center;
}

.product-body h3 {
  font-size: 0.92rem;
  font-weight: 400;
  letter-spacing: 0.02em;
}

.price-line {
  margin-top: 0.3rem;
  font-size: 0.85rem;
  color: var(--muted);
}

.price-value {
  color: var(--ink);
}

.sold-out-badge {
  display: inline-block;
  margin-left: 0.6rem;
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  border: 1px solid var(--line);
  padding: 0.1rem 0.5rem;
}

.sold-card .product-image img {
  filter: grayscale(0.4);
  opacity: 0.85;
}

/* ---------- Buttons & forms ---------- */

.button {
  display: inline-block;
  font-family: var(--font);
  font-size: 0.78rem;
  font-weight: 400;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  background: #ffffff;
  color: var(--ink);
  border: 1px solid var(--line);
  padding: 0.8rem 2.2rem;
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
}

.button:hover {
  border-color: var(--ink);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.button:active {
  transform: scale(0.97);
}

.button:disabled {
  color: #bbb;
  border-color: #ddd;
  cursor: not-allowed;
}

.button-outline,
.button-ghost {
  background: #ffffff;
  color: var(--ink);
  border: 1px solid var(--line);
}

.button-outline:hover,
.button-ghost:hover {
  border-color: var(--ink);
}

.button-small {
  padding: 0.45rem 1.2rem;
}

input,
textarea {
  font-family: var(--font);
  font-size: 0.95rem;
  color: var(--ink);
  background: var(--bg);
  border: 1px solid #cfcfcf;
  padding: 0.65rem 0.8rem;
  width: 100%;
  border-radius: 0;
}

input:focus,
textarea:focus {
  outline: 1px solid var(--ink);
  border-color: var(--ink);
}

textarea {
  min-height: 90px;
  resize: vertical;
}

label > span {
  display: block;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 0.35rem;
  color: var(--muted);
}

.form-error {
  color: var(--danger);
  border: 1px solid var(--danger);
  padding: 0.6rem 0.9rem;
  font-size: 0.88rem;
}

.payment-methods {
  border: 1px solid var(--line);
  padding: 1rem 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.payment-methods legend {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 0 0.4rem;
}

.payment-option {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  cursor: pointer;
}

.payment-option input[type="radio"] {
  width: auto;
  accent-color: var(--ink);
}

.payment-note {
  color: var(--muted);
  font-size: 0.88rem;
}

.add-cart-form {
  display: flex;
  gap: 0.9rem;
  align-items: end;
  margin-top: 1rem;
}

.add-cart-form label {
  max-width: 110px;
}

.add-cart-form.compact {
  align-items: center;
  margin-top: 0;
}

/* ---------- Empty state ---------- */

.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 4rem 2rem;
  border: 1px solid var(--line);
}

.empty-state h2,
.empty-state h3 {
  font-size: 1.05rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 0.4rem;
}

.empty-state p {
  color: var(--muted);
}

.empty-state .button {
  margin-top: 1.2rem;
}

/* ---------- Product detail ---------- */

.product-detail {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 3rem;
  align-items: start;
  padding-top: 3rem;
}

.detail-media {
  background: #ffffff;
}

.detail-media img {
  width: 100%;
}

.detail-copy h1 {
  font-size: 1.5rem;
  font-weight: 500;
  margin: 0.3rem 0 0.8rem;
}

.detail-price {
  display: flex;
  align-items: baseline;
  gap: 0.8rem;
  margin: 1rem 0;
}

.detail-price strong {
  font-size: 1.2rem;
  font-weight: 500;
}

.detail-price del {
  color: var(--muted);
}

.spec-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1rem 0 1.4rem;
}

.spec-list span {
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  border: 1px solid var(--line);
  padding: 0.25rem 0.7rem;
  color: var(--muted);
}

.stock-note {
  margin-top: 1rem;
  color: var(--muted);
  font-size: 0.88rem;
}

.product-description {
  margin: 1.25rem 0 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
}

.product-description h2 {
  font-size: 0.95rem;
  font-weight: 600;
  margin: 0 0 0.75rem;
}

.product-description-body p {
  margin: 0 0 0.75rem;
  color: var(--text);
  line-height: 1.6;
}

.product-description-body p:last-child {
  margin-bottom: 0;
}

.product-excerpt {
  margin: 0.35rem 0 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.45;
}

.listings-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.listing-table {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.listing-row {
  display: grid;
  grid-template-columns: 80px 1fr auto;
  gap: 1rem;
  align-items: center;
  padding: 0.85rem 0;
  border-top: 1px solid var(--line);
}

.listing-row-media img {
  width: 80px;
  height: 60px;
  object-fit: cover;
  border: 1px solid var(--line);
}

.listing-row-copy p {
  margin: 0.25rem 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.4;
}

.listing-row-meta {
  font-size: 0.82rem;
  color: var(--muted);
}

.listing-row-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.45rem;
}

.listing-form textarea {
  min-height: 10rem;
}

.listing-current-photos {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: -0.5rem;
}

.listing-current-photos img {
  width: 72px;
  height: 54px;
  object-fit: cover;
  border: 1px solid var(--line);
}

.checkbox-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.92rem;
}

.field-hint {
  font-style: normal;
  color: var(--muted);
  font-weight: 400;
}

.form-grid.two-col {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.form-error {
  color: #b42318;
  margin: 0 0 1rem;
}

.ios-install-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0, 0, 0, 0.55);
  display: grid;
  place-items: end center;
  padding: 1rem;
}

.ios-install-card {
  position: relative;
  background: #fff;
  max-width: 420px;
  width: 100%;
  padding: 1.5rem;
  border-radius: 12px 12px 0 0;
  margin-bottom: 0;
}

.ios-install-card h3 {
  margin: 0 0 0.75rem;
  font-size: 1.05rem;
}

.ios-install-card ol {
  margin: 0 0 0.75rem;
  padding-left: 1.25rem;
  line-height: 1.7;
}

.ios-install-card .menu-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
}

.ios-share-glyph {
  display: inline-block;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 0 0.35rem;
  font-weight: 600;
}

.ios-install-note {
  margin: 0;
  color: var(--muted);
  font-size: 0.85rem;
}

.sales-list {
  display: flex;
  flex-direction: column;
}

.sale-row {
  padding: 1rem 0;
  border-top: 1px solid var(--line);
}

.sale-row-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.5rem;
}

.sale-row-head .order-meta {
  display: block;
  color: var(--muted);
  font-size: 0.84rem;
  margin-top: 0.2rem;
}

.sale-row-status {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.sale-row-items {
  margin: 0.5rem 0 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.ship-form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.ship-form input {
  flex: 1 1 220px;
  border: 1px solid var(--line);
  padding: 0.5rem 0.7rem;
  font: inherit;
}

/* ---------- Cart ---------- */

.cart-panel {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 2.5rem;
  align-items: start;
}

.cart-lines {
  display: flex;
  flex-direction: column;
}

.cart-line {
  display: grid;
  grid-template-columns: 110px 1fr auto auto;
  gap: 1.4rem;
  align-items: center;
  padding: 1.4rem 0;
  border-bottom: 1px solid var(--line);
}

.cart-line img {
  width: 110px;
  height: 110px;
  object-fit: cover;
  background: #ffffff;
}

.cart-line h3 {
  font-size: 0.95rem;
  font-weight: 500;
}

.cart-line p {
  color: var(--muted);
  font-size: 0.85rem;
}

.cart-line-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: end;
}

.quantity-form {
  display: flex;
  gap: 0.6rem;
  align-items: end;
}

.quantity-form input {
  width: 70px;
}

.remove-form .button {
  color: var(--muted);
  border-color: var(--line);
}

.remove-form .button:hover,
.remove-form .button:active {
  color: #b42318;
  border-color: #b42318;
}

.cart-line-total {
  text-align: right;
  white-space: nowrap;
}

.cart-total {
  border: 1px solid var(--line);
  padding: 1.6rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.cart-total > div {
  display: flex;
  justify-content: space-between;
  font-weight: 500;
}

.cart-total p {
  color: var(--muted);
  font-size: 0.85rem;
}

/* ---------- Checkout ---------- */

.checkout-layout {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 3rem;
  align-items: start;
  padding-top: 3rem;
}

.checkout-layout h1 {
  font-size: 1.5rem;
  margin: 0.3rem 0 0.5rem;
}

.checkout-form {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  margin-top: 1.4rem;
}

.checkout-summary {
  border: 1px solid var(--line);
  padding: 1.6rem;
}

.checkout-summary h2 {
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  margin-bottom: 1rem;
}

.summary-line {
  display: flex;
  justify-content: space-between;
  padding: 0.45rem 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.92rem;
}

.summary-total {
  display: flex;
  justify-content: space-between;
  font-weight: 600;
  padding-top: 0.9rem;
}

/* ---------- Confirmation / dashboard ---------- */

.confirmation {
  max-width: 560px;
  margin: 3rem auto 0;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  align-items: center;
}

.confirmation h1 {
  font-size: 1.6rem;
}

.confirmation-card {
  border: 1px solid var(--line);
  padding: 1.6rem 2.6rem;
  display: grid;
  gap: 0.3rem;
  width: 100%;
}

.confirmation-card span {
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.confirmation-card strong {
  font-weight: 500;
}

/* ---------- Auth ---------- */

.auth-shell {
  display: grid;
  place-items: center;
  padding: 4rem 0;
}

.auth-card {
  border: 1px solid var(--line);
  padding: 2.6rem;
  max-width: 440px;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  text-align: center;
}

.auth-card h1 {
  font-size: 1.3rem;
}

.oauth-actions {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  margin-top: 0.5rem;
}

.oauth-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.7rem;
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border: 1px solid var(--ink);
  padding: 0.75rem 1.2rem;
  transition: background 0.15s ease, color 0.15s ease;
}

.oauth-button.google {
  background: var(--bg);
  color: var(--ink);
}

.oauth-button.google:hover {
  background: var(--ink);
  color: #fff;
}

.oauth-button.apple {
  background: #ffffff;
  color: var(--ink);
  border: 1px solid var(--line);
}

.oauth-button.apple:hover {
  border-color: var(--ink);
}

.oauth-icon {
  font-size: 0.95rem;
  width: 1.5rem;
  height: 1.5rem;
  display: grid;
  place-items: center;
  border: 1px solid currentColor;
  border-radius: 50%;
}

.auth-note {
  font-size: 0.75rem;
  color: var(--muted);
  word-break: break-all;
}

.auth-card-wide {
  max-width: 480px;
  text-align: left;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.auth-form label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.82rem;
  letter-spacing: 0.04em;
}

.auth-form input {
  border: 1px solid var(--line);
  padding: 0.65rem 0.75rem;
  font: inherit;
}

.auth-divider {
  text-align: center;
  color: var(--muted);
  font-size: 0.8rem;
  margin: 0.5rem 0;
}

.auth-footnote {
  font-size: 0.82rem;
  color: var(--muted);
  margin-top: 0.5rem;
}

.form-notice {
  color: var(--ink);
  font-size: 0.88rem;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--line);
  background: #f8f8f8;
}

.auth-switch-banner {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1rem;
  border: 1px solid var(--line);
  margin-bottom: 0.5rem;
}

.auth-switch-banner p {
  font-size: 0.88rem;
}

.mobile-logout-form {
  display: block;
}

.mobile-drawer-link {
  display: block;
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  font: inherit;
  color: inherit;
  padding: 0.85rem 0;
  cursor: pointer;
}

.label-hint {
  color: var(--muted);
  font-weight: 400;
}

.like-control {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.like-button {
  border: 1px solid var(--line);
  background: var(--bg);
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  display: grid;
  place-items: center;
  transition: border-color 0.15s ease, color 0.15s ease;
}

.like-button:hover,
.like-button.liked {
  border-color: var(--ink);
  color: #c62828;
}

.like-count {
  font-size: 0.78rem;
  color: var(--muted);
}

.archive-order-ref {
  font-size: 0.75rem;
  color: var(--muted);
  margin-top: 0.35rem;
}

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--line);
  padding: 2.4rem 2rem;
  text-align: center;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.8rem;
  justify-content: center;
  margin-bottom: 1.2rem;
}

.footer-links a {
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.footer-links a:hover {
  color: var(--ink);
}

.footer-copy {
  font-size: 0.75rem;
  color: var(--muted);
}

/* ---------- Responsive ---------- */

@media (max-width: 860px) {
  .desktop-nav,
  .header-link,
  .header-cart .cart-chip {
    display: none !important;
  }

  .header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.8rem;
    padding: 1.4rem 1.2rem;
    width: 100%;
  }

  .menu-toggle {
    display: inline-flex;
    flex-shrink: 0;
  }

  .header-search {
    display: none;
  }

  .brand {
    flex: 1;
    text-align: center;
    font-size: 1.15rem;
    letter-spacing: 0.2em;
    min-width: 0;
  }

  .header-actions {
    flex-shrink: 0;
    gap: 0;
    justify-content: flex-end;
  }

  .header-cart .cart-mobile {
    display: inline-block !important;
  }

  .product-card-actions .btn-label-long {
    display: none;
  }

  .product-card-actions .btn-label-short {
    display: inline;
  }

  .product-card-actions {
    gap: 0.35rem;
  }

  .product-card-actions .buy-now-form .button,
  .product-card-actions .add-cart-form.card .button {
    min-height: 44px;
    padding: 0.55rem 0.3rem;
    font-size: 0.68rem;
    letter-spacing: 0.04em;
    touch-action: manipulation;
  }

  .button,
  .category-link,
  .menu-toggle {
    touch-action: manipulation;
  }

  .page-main {
    padding: 0 1rem 3rem;
    max-width: 100%;
  }

  .hero {
    margin: 0 -1rem;
    border-bottom: 1px solid var(--line);
  }

  .hero-inner {
    padding: 2.8rem 1rem;
  }

  .hero-inner h1 {
    font-size: 1.45rem;
    letter-spacing: 0.18em;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
    gap: 0.7rem;
    max-width: 280px;
    margin: 0 auto;
  }

  .hero-actions .button {
    text-align: center;
    width: 100%;
  }

  .category-nav {
    flex-wrap: nowrap;
    overflow-x: auto;
    justify-content: flex-start;
    gap: 0;
    padding: 1rem 0 0.6rem;
    margin: 0 -1rem;
    padding-left: 1rem;
    padding-right: 1rem;
    scrollbar-width: none;
    -ms-overflow-style: none;
    border-bottom: 1px solid var(--line);
    position: sticky;
    top: 73px;
    background: #ffffff;
    z-index: 40;
  }

  .category-nav::-webkit-scrollbar {
    display: none;
  }

  .category-link {
    flex-shrink: 0;
    padding: 0.6rem 1.1rem;
    margin-right: 0.3rem;
    border: 1px solid var(--line);
    border-radius: 0;
    font-size: 0.72rem;
  }

  .category-link.active {
    background: #ffffff;
    border-color: var(--ink);
    border-bottom-color: var(--ink);
  }

  .section-heading {
    padding: 1.6rem 0 1.2rem;
  }

  .section-heading h2 {
    font-size: 1rem;
  }

  .product-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.2rem 0.8rem;
  }

  .product-body h3 {
    font-size: 0.82rem;
  }

  .price-line {
    font-size: 0.78rem;
  }

  .product-overlay {
    opacity: 1;
    background: rgba(255, 255, 255, 0);
    align-items: flex-end;
    padding-bottom: 0.6rem;
    font-size: 0.65rem;
  }

  .product-image:active .product-overlay {
    background: rgba(255, 255, 255, 0.9);
  }

  .product-detail-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .product-detail-actions .add-cart-form,
  .product-detail-actions .buy-now-form {
    width: 100%;
  }

  .product-detail-actions .button {
    width: 100%;
    min-height: 44px;
  }

  input,
  select,
  textarea {
    font-size: 16px;
  }

  .product-detail,
  .cart-panel,
  .checkout-layout {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    padding-top: 1.6rem;
  }

  .checkout-summary {
    order: -1;
  }

  .cart-line {
    grid-template-columns: 80px 1fr;
    grid-auto-rows: auto;
    gap: 0.8rem;
  }

  .cart-line-actions {
    grid-column: 1 / -1;
  }

  .cart-line-total {
    grid-column: 1 / -1;
    text-align: left;
    padding-top: 0.25rem;
  }

  .cart-line img {
    width: 80px;
    height: 80px;
  }

  .site-footer {
    padding: 2rem 1rem;
  }

  .footer-links {
    flex-direction: column;
    gap: 0.8rem;
  }

  .footer-links a {
    font-size: 0.82rem;
    padding: 0.3rem 0;
  }
}

@media (max-width: 400px) {
  .header-top {
    padding: 1.2rem 0.9rem;
  }

  .brand {
    font-size: 1rem;
    letter-spacing: 0.14em;
  }

  .product-grid {
    grid-template-columns: 1fr;
    gap: 1.6rem;
  }
}

/* ---------- Upgrade additions ---------- */

.header-search {
  display: flex;
  max-width: 220px;
}

.header-search input {
  width: 100%;
  border: 1px solid var(--line);
  padding: 0.45rem 0.75rem;
  font-size: 0.85rem;
  background: #fff;
}

.header-link-btn {
  background: none;
  border: none;
  cursor: pointer;
  font: inherit;
  color: inherit;
  padding: 0;
}

.logout-form {
  display: inline;
}

.product-badge {
  position: absolute;
  top: 0.6rem;
  left: 0.6rem;
  background: var(--ink);
  color: #fff;
  font-size: 0.7rem;
  padding: 0.2rem 0.5rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.product-brand {
  font-size: 0.78rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.product-subtitle {
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 0.2rem;
}

.condition-pill {
  display: inline-block;
  font-size: 0.72rem;
  border: 1px solid var(--line);
  padding: 0.15rem 0.45rem;
  margin-left: 0.4rem;
  text-transform: capitalize;
}

.product-gallery {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.gallery-frame {
  position: relative;
  overflow: hidden;
  touch-action: pan-y;
  cursor: grab;
  border: 1px solid var(--line);
  background: #f8f8f8;
}

.gallery-frame:active {
  cursor: grabbing;
}

.gallery-frame img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: contain;
  display: block;
}

.gallery-nav {
  position: absolute;
  top: 50%;
  z-index: 2;
  transform: translateY(-50%);
  width: 2.4rem;
  height: 2.4rem;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  color: var(--text);
  font-size: 1.5rem;
  line-height: 1;
  display: grid;
  place-items: center;
  cursor: pointer;
  padding: 0;
}

.gallery-nav:hover {
  border-color: var(--accent);
}

.gallery-nav-prev {
  left: 0.6rem;
}

.gallery-nav-next {
  right: 0.6rem;
}

.gallery-counter {
  position: absolute;
  right: 0.6rem;
  bottom: 0.6rem;
  z-index: 2;
  font-size: 0.72rem;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  padding: 0.2rem 0.45rem;
  border-radius: 4px;
}

.gallery-thumbs {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.6rem;
  overflow-x: auto;
  padding-bottom: 0.2rem;
}

.gallery-thumbs button {
  border: 1px solid var(--line);
  padding: 0;
  background: none;
  cursor: pointer;
  flex: 0 0 auto;
}

.gallery-thumbs button.is-active {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
}

.gallery-thumbs img {
  width: 56px;
  height: 42px;
  object-fit: cover;
  display: block;
}

.archive-photo-stack {
  position: relative;
  width: 100%;
  aspect-ratio: 4/3;
}

.archive-photo-stack img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 4px;
}

.archive-photo-stack img:nth-child(1) { z-index: 3; }
.archive-photo-stack img:nth-child(2) {
  z-index: 2;
  transform: translate(6px, 6px) scale(0.96);
  opacity: 0.85;
}
.archive-photo-stack img:nth-child(3) {
  z-index: 1;
  transform: translate(12px, 12px) scale(0.92);
  opacity: 0.7;
}

.archive-photo-more {
  position: absolute;
  bottom: 0.5rem;
  right: 0.5rem;
  z-index: 4;
  background: rgba(0, 0, 0, 0.65);
  color: #fff;
  font-size: 0.75rem;
  padding: 0.2rem 0.45rem;
  border-radius: 4px;
}

.related-products {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--line);
}

.search-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 1.5rem;
  padding: 0 3.5rem;
}

.search-filters input,
.search-filters select {
  border: 1px solid var(--line);
  padding: 0.5rem 0.75rem;
  font-size: 0.9rem;
}

.search-count {
  padding: 0 3.5rem;
  color: var(--muted);
  margin-bottom: 1rem;
}

.pagination {
  display: flex;
  gap: 0.4rem;
  justify-content: center;
  padding: 2rem;
}

.page-link {
  border: 1px solid var(--line);
  padding: 0.4rem 0.7rem;
  font-size: 0.85rem;
}

.page-link.active {
  background: var(--ink);
  color: #fff;
}

.account-nav {
  display: flex;
  gap: 1.2rem;
  margin-bottom: 1.5rem;
  padding: 0 3.5rem;
}

.account-nav a.active {
  font-weight: 600;
  border-bottom: 1px solid var(--ink);
}

.order-list {
  padding: 0 3.5rem 3rem;
}

.order-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--line);
  padding: 1rem 0;
}

.order-meta {
  display: block;
  font-size: 0.82rem;
  color: var(--muted);
}

.status-pill {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border: 1px solid var(--line);
  padding: 0.15rem 0.45rem;
  margin-right: 0.6rem;
}

.status-pill.paid {
  background: #e8f5e9;
  border-color: #c8e6c9;
}

.order-detail-card,
.legal-page,
.contact-page {
  max-width: 720px;
  padding: 0 3.5rem 3rem;
}

.legal-page h1,
.contact-page h1 {
  margin-bottom: 0.6rem;
}

.legal-page p,
.contact-page p {
  margin-bottom: 1rem;
}

.tracking-note {
  margin-top: 1rem;
  font-size: 0.9rem;
}

/* ---------- Account shell ---------- */

.account-shell {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 2rem;
  padding: 2rem 3.5rem 4rem;
  align-items: start;
}

.account-sidebar {
  border: 1px solid var(--line);
  padding: 1.4rem;
  position: sticky;
  top: 7rem;
}

.account-user {
  display: flex;
  gap: 0.9rem;
  align-items: center;
  margin-bottom: 1.4rem;
  padding-bottom: 1.2rem;
  border-bottom: 1px solid var(--line);
}

.account-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--line);
}

.account-avatar.placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  text-transform: uppercase;
}

.account-email {
  display: block;
  font-size: 0.82rem;
  color: var(--muted);
}

.account-nav-vertical {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.account-nav-link {
  padding: 0.55rem 0.7rem;
  font-size: 0.9rem;
  border-radius: 2px;
}

.account-nav-link.active,
.account-nav-link:hover {
  background: #f5f5f5;
}

.account-panel {
  border: 1px solid var(--line);
  padding: 1.6rem;
  margin-bottom: 1.2rem;
}

.account-panel h1,
.account-panel h2 {
  margin-bottom: 0.5rem;
}

.form-hint {
  font-size: 0.88rem;
  color: var(--muted);
  margin-bottom: 1rem;
}

.form-success {
  color: #1b5e20;
  background: #e8f5e9;
  padding: 0.6rem 0.8rem;
  margin-bottom: 1rem;
  font-size: 0.9rem;
}

.input-readonly {
  background: #f8f8f8;
  color: var(--muted);
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-direction: row !important;
}

.checkbox-row input {
  width: auto;
}

.text-link {
  font-size: 0.9rem;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.empty-state.inline {
  padding: 1rem 0;
}

.guest-signin-card {
  border: 1px solid var(--line);
  padding: 1.2rem;
  margin-top: 0.8rem;
  text-align: center;
}

.guest-signin-card p {
  margin-bottom: 0.9rem;
  font-size: 0.92rem;
  color: var(--muted);
}

.auth-shell-page {
  display: flex;
  justify-content: center;
  padding: 3rem 1.5rem 4rem;
}

.auth-card-wide {
  max-width: 440px;
  width: 100%;
}

.auth-footnote {
  margin-top: 1.2rem;
  font-size: 0.85rem;
  color: var(--muted);
  text-align: center;
}

.checkout-steps {
  display: flex;
  gap: 0.5rem;
  margin: 1rem 0 1.4rem;
}

.checkout-step {
  flex: 1;
  border: 1px solid var(--line);
  background: #fff;
  padding: 0.65rem 0.8rem;
  font-size: 0.85rem;
  cursor: pointer;
}

.checkout-step.active {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}

.checkout-step-actions {
  display: flex;
  gap: 0.8rem;
  margin-top: 1rem;
}

.order-list.compact .order-row {
  padding: 0.75rem 0;
}

@media (max-width: 768px) {
  .account-shell {
    grid-template-columns: 1fr;
    padding: 1.2rem 1rem 3rem;
  }

  .account-sidebar {
    position: static;
  }

  .search-filters,
  .search-count,
  .account-nav,
  .order-list,
  .legal-page,
  .contact-page {
    padding-left: 1rem;
    padding-right: 1rem;
  }
}
