/* ROWAY — minimal menswear storefront styles */

@font-face {
  font-family: "Shopee Display";
  src: url("/assets/fonts/ShopeeDisplay-Light.ttf") format("truetype");
  font-style: normal;
  font-weight: 300;
  font-display: swap;
}

@font-face {
  font-family: "Shopee Display";
  src: url("/assets/fonts/ShopeeDisplay-Regular.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Shopee Display";
  src: url("/assets/fonts/ShopeeDisplay-Medium.ttf") format("truetype");
  font-style: normal;
  font-weight: 500;
  font-display: swap;
}

@font-face {
  font-family: "Shopee Display";
  src: url("/assets/fonts/ShopeeDisplay-Bold.ttf") format("truetype");
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}

@font-face {
  font-family: "Shopee Display";
  src: url("/assets/fonts/ShopeeDisplay-ExtraBold.ttf") format("truetype");
  font-style: normal;
  font-weight: 800;
  font-display: swap;
}

@font-face {
  font-family: "Shopee Display";
  src: url("/assets/fonts/ShopeeDisplay-Black.ttf") format("truetype");
  font-style: normal;
  font-weight: 900;
  font-display: swap;
}

:root {
  --bg: #ffffff;
  --fg: #111111;
  --muted: #6f6b64;
  --line: #e7e3db;
  --surface: #f6f3ec;
  --danger: #b3392c;
  --success: #2f6d4c;
  --radius: 2px;
  --maxw: 1180px;
  --font: "Shopee Display", "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

button, input, select, textarea { font: inherit; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
}

body { min-height: 100vh; display: flex; flex-direction: column; }

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

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

.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Announcement bar ---------- */
.announcement-bar {
  width: 100%;
  height: 38px;
  overflow: hidden;
  background: #000;
  color: #fff;
  font-family: var(--font);
}

.announcement-bar__viewport {
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.announcement-bar__track {
  display: flex;
  width: max-content;
  height: 100%;
  position: relative;
  left: 0;
  will-change: transform;
  animation: announcement-marquee 96s linear infinite;
}

.announcement-bar__group {
  flex: 0 0 auto;
  display: flex;
  height: 100%;
}

.announcement-bar__message {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  height: 100%;
  padding-right: 0;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 400;
  line-height: 1;
  letter-spacing: .015em;
}

.announcement-bar__item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.announcement-bar__separator {
  margin: 0 30px;
  opacity: .72;
}

.announcement-bar__icon {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

@keyframes announcement-marquee {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(-50%, 0, 0); }
}

@media (max-width: 700px) {
  .announcement-bar { height: 34px; }
  .announcement-bar__message {
    padding-right: 0;
    font-size: 12px;
  }
  .announcement-bar__separator { margin: 0 22px; }
  .announcement-bar__item { gap: 7px; }
  .announcement-bar__icon { width: 14px; height: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  .announcement-bar__viewport {
    overflow-x: auto;
    scrollbar-width: none;
  }
  .announcement-bar__viewport::-webkit-scrollbar { display: none; }
  .announcement-bar__track {
    min-width: 100%;
    left: 0;
    animation: none;
    will-change: auto;
  }
  .announcement-bar__group:not(:first-child),
  .announcement-bar__message:not(:first-child) { display: none; }
}

/* ---------- Header ---------- */
.site-header {
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  background: var(--bg);
  z-index: 20;
}

.site-header .container {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.logo {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: block;
  line-height: 0;
}

.logo img {
  display: block;
  width: 96px;
  height: auto;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-right: auto;
}

.main-nav > a,
.main-nav > .nav-products > .nav-products-trigger {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  font-family: var(--font);
  font-size: 13px;
  font-weight: 500;
  line-height: 20px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  transition: color 0.15s;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.main-nav a:hover, .main-nav a.active { color: var(--fg); }

.nav-products {
  position: relative;
}

.nav-products-trigger,
.header-search-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--fg);
  cursor: pointer;
}

.nav-products-trigger svg,
.header-search-trigger svg,
.header-search-submit svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
}

.header-search { position: relative; }

.header-search-form {
  position: absolute;
  top: calc(100% + 13px);
  left: 0;
  display: flex;
  width: min(390px, calc(100vw - 32px));
  padding: 8px;
  background: var(--bg);
  border: 1px solid var(--line);
  box-shadow: 0 16px 38px rgba(17, 17, 17, .12);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-6px);
  transition: opacity .15s ease, transform .15s ease, visibility .15s;
  z-index: 45;
}

.header-search.open .header-search-form {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

.header-search-input {
  min-width: 0;
  flex: 1;
  height: 38px;
  padding: 0 12px;
  border: 0;
  outline: 0;
  background: #fff;
  color: var(--fg);
  font: inherit;
  font-size: 13px;
}

.header-search-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 0;
  background: var(--fg);
  color: var(--bg);
  cursor: pointer;
}

.nav-products::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  height: 16px;
}

.category-dropdown {
  position: absolute;
  top: calc(100% + 15px);
  left: 50%;
  transform: translateX(-50%) translateY(-6px);
  width: 260px;
  max-height: min(65vh, 520px);
  overflow-y: auto;
  padding: 8px 0;
  background: var(--bg);
  border: 1px solid var(--line);
  box-shadow: 0 16px 38px rgba(17, 17, 17, 0.12);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s;
  z-index: 40;
}

.nav-products.open .category-dropdown {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

.main-nav .category-dropdown a {
  display: block;
  padding: 11px 18px;
  color: var(--fg);
  font-size: 12px;
  line-height: 1.35;
  letter-spacing: 0.06em;
}

.main-nav .category-dropdown a:hover {
  background: var(--surface);
}

.main-nav .category-dropdown a.category-big-sale {
  color: #991b1b;
  font-weight: 800;
}

.main-nav .category-dropdown a.category-big-sale:hover,
.main-nav .category-dropdown a.category-big-sale:focus-visible {
  color: #7f1d1d;
  background: #fff5f5;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 20px;
}

@media (max-width: 700px) {
  .site-header .container {
    height: 54px;
    padding-top: 0;
    padding-left: 12px;
    padding-right: 12px;
    gap: 10px;
  }

  .logo {
    position: static;
    flex: 0 0 auto;
    transform: none;
  }

  .logo img {
    width: 68px;
  }

  .main-nav {
    flex: 0 1 auto;
    gap: 2px;
    margin-right: auto;
  }

  .main-nav > a,
  .main-nav > .nav-products > .nav-products-trigger {
    font-size: 10px;
    font-weight: 500;
    line-height: 18px;
    letter-spacing: 0.035em;
  }

  .site-header .header-actions { flex: 0 0 auto; gap: 0; }
  .site-header .account-link, .site-header .cart-link { width: 28px; height: 28px; }
  .nav-products-trigger, .header-search-trigger { width: 30px; height: 30px; }
  .nav-products-trigger svg, .header-search-trigger svg { width: 19px; height: 19px; }
  .header-search-form {
    top: calc(100% + 12px);
    left: -32px;
    width: min(330px, calc(100vw - 24px));
  }
  .site-header .container {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    column-gap: 6px;
  }

  .site-header .main-nav {
    grid-column: 1;
    grid-row: 1;
    min-width: 0;
    margin-right: 0;
    justify-self: start;
  }

  .site-header .logo {
    position: static;
    grid-column: 2;
    grid-row: 1;
    transform: none;
    justify-self: center;
  }

  .site-header .header-actions {
    grid-column: 3;
    grid-row: 1;
    min-width: 0;
    justify-self: end;
  }
  .category-dropdown {
    left: 0;
    transform: translateY(-6px);
    width: min(260px, calc(100vw - 48px));
  }
  .nav-products.open .category-dropdown {
    transform: translateY(0);
  }
}

.cart-link {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
}

.cart-icon {
  width: 25px;
  height: 25px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.cart-count {
  position: absolute;
  top: 1px;
  right: 0;
  background: var(--fg);
  color: var(--bg);
  border-radius: 50%;
  min-width: 18px;
  height: 18px;
  font-size: 11px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
}


/* ---------- Demo banner ---------- */
.demo-banner {
  background: #2b2620;
  color: #f2e9d8;
  font-size: 13px;
  text-align: center;
  padding: 8px 16px;
  display: none;
}
.demo-banner.visible { display: block; }

/* ---------- Hero ---------- */
.hero {
  background: var(--surface);
  padding: 96px 0;
  text-align: center;
}

.hero h1 {
  font-size: clamp(32px, 5vw, 56px);
  font-weight: 500;
  letter-spacing: 0.02em;
  margin: 0 0 16px;
}

.hero p {
  color: var(--muted);
  max-width: 560px;
  margin: 0 auto 32px;
  font-size: 16px;
  line-height: 1.6;
}

.sale-hero {
  position: relative;
  padding: 0;
  overflow: hidden;
  background: #a90000;
}

.sale-hero-track { display:flex; width:100%; transition:transform .55s ease; }
.sale-hero-slide { display:block; flex:0 0 100%; width:100%; }
.sale-hero-arrow {
  position:absolute; top:50%; z-index:2; width:44px; height:44px; border:0; border-radius:50%;
  transform:translateY(-50%); background:rgba(0,0,0,.45); color:#fff; font-size:30px; line-height:1;
}
.sale-hero-arrow.prev { left:18px; }
.sale-hero-arrow.next { right:18px; }
.sale-hero-dots { position:absolute; left:50%; bottom:18px; z-index:2; display:flex; gap:8px; transform:translateX(-50%); }
.sale-hero-dots button { width:9px; height:9px; padding:0; border:1px solid #fff; border-radius:50%; background:rgba(0,0,0,.25); }
.sale-hero-dots button.active { background:#fff; }

.sale-hero picture,
.sale-hero img {
  display: block;
  width: 100%;
}

.sale-hero img {
  aspect-ratio: 1640 / 959;
  object-fit: cover;
}

.sale-hero-cta {
  position: absolute;
  left: 50%;
  bottom: 4.5%;
  z-index: 3;
  min-width: 220px;
  transform: translateX(-50%);
  border-color: #111;
  background: #111;
  color: #fff;
  opacity: .48;
  transition: opacity .18s ease, transform .18s ease;
}

.sale-hero-cta:hover,
.sale-hero-cta:focus-visible,
.sale-hero-cta:active,
.sale-hero-cta.is-pressed {
  opacity: 1;
  transform: translateX(-50%) scale(1.02);
}

@media (max-width: 700px) {
  .sale-hero img {
    aspect-ratio: 1122 / 1402;
    object-position: top center;
  }
  .sale-hero-cta {
    bottom: 5.5%;
    min-width: 190px;
    padding: 12px 22px;
    font-size: 12px;
  }
  .sale-hero-arrow { width:34px; height:34px; font-size:24px; }
  .sale-hero-arrow.prev { left:8px; }
  .sale-hero-arrow.next { right:8px; }
  .sale-hero-dots { bottom:10px; }
}

/* ---------- Homepage discovery ---------- */
.home-discovery {
  padding: 44px 0 12px;
  background: #f5f5f3;
}

.featured-categories-panel { border: 1px solid #dededb; }
.featured-categories-panel > h2 {
  margin: 0;
  padding: 28px 20px;
  background: #171717;
  color: #fff;
  text-align: center;
  font-size: clamp(23px, 3vw, 36px);
  font-weight: 700;
  letter-spacing: 0.045em;
}

.featured-category-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
  padding: 14px;
  background: #efefed;
}

.featured-category-slider { position: relative; }

.featured-category-grid > .loading-state,
.featured-category-grid > .featured-category-loading-placeholder,
.featured-category-grid > .empty-state,
.featured-category-grid > .error-state { grid-column: 1 / -1; }

.featured-category-loading-placeholder { min-height: 1px; }

.featured-category-card {
  min-width: 0;
  padding: 18px 12px 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  background: #fff;
  border: 1px solid #dededb;
  color: #111;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.featured-category-card h3 { margin: 0 0 14px; font-size: 18px; font-weight: 650; line-height: 1.25; }
.featured-category-image { display: block; width: 100%; aspect-ratio: 1 / 1.15; overflow: hidden; background: #f5f5f3; }
.featured-category-image img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; }
.featured-category-card:hover .featured-category-image img { transform: scale(1.035); }
.featured-category-cta { margin-top: 14px; padding: 8px 13px; border: 1px solid #aaa; font-size: 12px; font-weight: 600; letter-spacing: .04em; }

@media (max-width: 980px) {
  .featured-category-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 700px) {
  .home-discovery { padding: 16px 0 0; }
  .home-discovery .container { width: 100%; padding: 0 8px; }
  .featured-categories-panel > h2 { padding: 12px 8px; font-size: 18px; }
  .featured-category-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 5px;
    padding: 6px;
    overflow: visible;
  }
  .featured-category-card {
    min-width: 0;
    padding: 6px 4px;
    box-shadow: none;
  }
  .featured-category-card h3 {
    min-height: 24px;
    margin: 0 0 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    line-height: 1.15;
  }
  .featured-category-image { aspect-ratio: 1 / 1; }
  .featured-category-cta { display: none; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 14px 32px;
  border: 1px solid var(--fg);
  background: var(--fg);
  color: var(--bg);
  font-size: 13px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  border-radius: var(--radius);
  transition: opacity 0.15s;
  text-align: center;
}
.btn:hover { opacity: 0.82; }
.btn:disabled { opacity: 0.4; cursor: not-allowed; }

.btn-outline {
  background: transparent;
  color: var(--fg);
}

.btn-block { display: block; width: 100%; }

/* ---------- Section titles ---------- */
.section {
  padding: 72px 0;
}

.section-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 36px;
}

.section-title h2 {
  font-size: 26px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin: 0;
}

.section-title a {
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---------- Product grid ---------- */
.product-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 28px 22px;
}

.product-load-more {
  grid-column: 1 / -1;
  display: flex;
  justify-content: center;
  padding-top: 24px;
}

@media (max-width: 980px) {
  .product-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 700px) {
  .product-grid { grid-template-columns: repeat(2, 1fr); gap: 20px 14px; }
  .category-section .product-grid > .product-card:nth-child(n + 5) { display: none; }
}

.product-card { display: block; }

.product-thumb {
  aspect-ratio: 1 / 1;
  width: 100%;
  background: transparent;
  border: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0;
  overflow: hidden;
  position: relative;
}

.product-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-thumb .placeholder-label {
  width: 100%;
  height: 100%;
  padding: 20px;
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  line-height: 1.5;
}

.category-section {
  border-top: 1px solid var(--line);
}

.category-section:nth-child(even) {
  background: #fafafa;
}

.product-thumb .badge-sale {
  position: absolute;
  top: 10px;
  left: 10px;
  background: var(--fg);
  color: var(--bg);
  font-size: 11px;
  letter-spacing: 0.05em;
  padding: 4px 8px;
}

.product-thumb .badge-sale.badge-sale-deep {
  background: #991b1b;
  color: #fff;
}

.product-info { padding-top: 14px; }

.product-name {
  font-size: 14px;
  margin: 0 0 6px;
  font-weight: 500;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.detail-product-title {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.product-price {
  font-size: 14px;
  display: flex;
  gap: 8px;
  align-items: baseline;
}

.product-price .old {
  color: var(--muted);
  text-decoration: line-through;
  font-size: 13px;
}

.sale-price-deep,
.detail-price .sale-price-deep {
  color: #991b1b;
  font-weight: 700;
}

/* ---------- Filters ---------- */
.filters-bar {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 32px;
  flex-wrap: wrap;
}

.filters-bar input[type="text"], .filters-bar select {
  padding: 12px 14px;
  border: 1px solid var(--line);
  font-family: var(--font);
  font-size: 14px;
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--fg);
}

.filters-bar input[type="text"] { flex: 1; min-width: 200px; }

/* ---------- Product detail ---------- */
.product-detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  padding: 56px 0 96px;
}

@media (max-width: 800px) {
  .product-detail { grid-template-columns: 1fr; gap: 32px; }
}

.detail-thumb {
  aspect-ratio: 1 / 1;
  background: transparent;
  border: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  text-align: center;
}

.detail-thumb img { width: 100%; height: 100%; object-fit: cover; }
.product-gallery { min-width: 0; }
.gallery-main { position: relative; width: 100%; cursor: zoom-in; touch-action: pan-y; user-select: none; -webkit-user-select: none; }
.gallery-thumbnails { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 9px; margin-top: 10px; }
.gallery-thumbnail { aspect-ratio: 1; padding: 0; border: 1px solid transparent; background: transparent; cursor: pointer; overflow: hidden; }
.gallery-thumbnail[hidden] { display: none; }
.gallery-thumbnail img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gallery-thumbnail.selected { border-color: var(--fg); }
.image-lightbox { position: fixed; inset: 0; z-index: 200; display: none; align-items: center; justify-content: center; padding: 32px; background: rgba(0,0,0,.88); }
.image-lightbox.visible { display: flex; }
.image-lightbox img { max-width: min(92vw, 1100px); max-height: 90vh; object-fit: contain; }
.lightbox-close { position: fixed; top: 18px; right: 24px; width: 44px; height: 44px; border: 0; background: none; color: #fff; font-size: 34px; cursor: pointer; }
.lightbox-open { overflow: hidden; }

@media (max-width: 800px) {
  .gallery-thumbnails {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
  }
  .gallery-thumbnails::-webkit-scrollbar { display: none; }
  .gallery-thumbnail { flex: 0 0 72px; scroll-snap-align: start; }
}

.detail-thumb .placeholder-label {
  width: 100%;
  height: 100%;
  padding: 40px;
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.detail-info h1 {
  font-size: 28px;
  font-weight: 500;
  margin: 0 0 12px;
}

.detail-code { color: var(--muted); font-size: 13px; margin-bottom: 20px; }

.detail-price {
  font-size: 22px;
  margin-bottom: 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: baseline;
}
.detail-price .old { color: var(--muted); text-decoration: line-through; font-size: 16px; }
.detail-price .website-discount-note {
  color: #991b1b;
  font-size: 10px;
  font-weight: 600;
  line-height: 1.35;
}

.detail-desc { color: #3a3630; line-height: 1.7; margin-bottom: 28px; }

.option-group { margin-bottom: 24px; }
.option-group label {
  display: block;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 10px;
}

.size-options { display: flex; gap: 8px; flex-wrap: wrap; }
.size-options button {
  min-width: 44px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--fg);
  cursor: pointer;
  font-family: var(--font);
}
.size-options button.selected { border-color: var(--fg); background: var(--fg); color: var(--bg); }
.size-options button:disabled { color: #aaa; background: #f5f5f5; cursor: not-allowed; text-decoration: line-through; }
.required-mark { color: var(--danger); }
.option-label-row { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin-bottom: 10px; }
.option-label-row label { margin-bottom: 0; }
.size-guide-trigger { padding: 0; border: 0; background: none; color: var(--muted); font-family: var(--font); font-size: 12px; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.size-guide-trigger:hover,
.size-guide-trigger:focus-visible { color: var(--fg); }
.size-guide-modal { position: fixed; inset: 0; z-index: 220; display: none; align-items: center; justify-content: center; padding: 32px; background: rgba(0,0,0,.84); }
.size-guide-modal.visible { display: flex; }
.size-guide-dialog { position: relative; width: min(1120px, 94vw); max-height: 92vh; overflow: auto; background: #fff; box-shadow: 0 18px 60px rgba(0,0,0,.3); }
.size-guide-dialog img { display: block; width: 100%; height: auto; }
.size-guide-close { position: fixed; top: 18px; right: 24px; z-index: 1; width: 44px; height: 44px; border: 1px solid rgba(255,255,255,.7); border-radius: 50%; background: rgba(0,0,0,.72); color: #fff; font-family: Arial, sans-serif; font-size: 30px; line-height: 1; cursor: pointer; }
.size-guide-close:hover,
.size-guide-close:focus-visible { background: #000; }
.size-guide-open { overflow: hidden; }
.option-helper { color: var(--muted); font-size: 13px; padding: 8px 0; }
.selection-error { display: none; margin: -8px 0 20px; padding: 11px 13px; border: 1px solid var(--danger); color: var(--danger); font-size: 13px; }
.selection-error.visible { display: block; }

.qty-row { display: flex; align-items: center; gap: 14px; margin-bottom: 28px; }
.qty-control { display: flex; border: 1px solid var(--line); }
.qty-control button {
  width: 40px; height: 44px;
  background: none; border: none; color: var(--fg); cursor: pointer; font-size: 16px;
}
.qty-control input {
  width: 48px; text-align: center; border: none; border-left: 1px solid var(--line); border-right: 1px solid var(--line);
  font-family: var(--font); font-size: 14px;
}

.stock-note { font-size: 13px; color: var(--muted); margin-top: 12px; }
.buy-now-btn { margin-bottom: 10px; }
.btn-secondary { background: var(--bg); color: var(--fg); border: 1px solid var(--fg); }
.btn-secondary:hover { background: var(--surface); }

.related-products { padding: 0 0 96px; border-top: 1px solid var(--line); }
.related-products__heading { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; padding: 34px 0 24px; }
.related-products__heading h2 { margin: 0; font-size: 20px; font-weight: 500; letter-spacing: .02em; }
.related-products__heading a { color: var(--fg); font-size: 12px; text-decoration: underline; text-underline-offset: 3px; }
.related-products__grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 30px 18px; }
.related-products__grid .loading-state { grid-column: 1 / -1; padding: 36px 0; }
@media (max-width: 800px) {
  .related-products { padding-bottom: 64px; overflow: hidden; }
  .related-products__heading { padding-top: 28px; }
  .related-products__heading h2 { font-size: 18px; }
  .related-products__grid { display: flex; gap: 14px; overflow-x: auto; padding-bottom: 12px; scroll-snap-type: x mandatory; scrollbar-width: none; }
  .related-products__grid::-webkit-scrollbar { display: none; }
  .related-product-card { flex: 0 0 68%; max-width: 260px; scroll-snap-align: start; }
}
.product-accordions { margin-top: 34px; border-top: 1px solid var(--line); }
.product-accordions details { border-bottom: 1px solid var(--line); }
.product-accordions summary { position: relative; padding: 17px 24px 17px 0; cursor: pointer; list-style: none; font-size: 13px; font-weight: 500; letter-spacing: .04em; text-transform: uppercase; }
.product-accordions summary::-webkit-details-marker { display: none; }
.product-accordions summary::after { content: '+'; position: absolute; right: 2px; top: 15px; font-size: 20px; font-weight: 400; }
.product-accordions details[open] summary::after { content: '−'; }
.product-accordions details > div { padding: 0 0 18px; color: var(--muted); font-size: 13px; line-height: 1.75; }
.product-accordions .product-description-text { white-space: pre-line; }
.product-accordions details a { text-decoration: underline; color: var(--fg); }
@media (max-width: 800px) {
  .product-page #product-detail-root {
    width: 100%;
    padding-left: 14px;
    padding-right: 14px;
  }
  .product-page .breadcrumb {
    padding-top: 16px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .product-detail {
    gap: 24px;
    padding: 20px 0 58px;
  }
  .detail-info { min-width: 0; }
  .detail-info h1 {
    font-size: 22px;
    line-height: 1.25;
    overflow-wrap: anywhere;
  }
  .detail-code { margin-bottom: 14px; }
  .detail-price { margin-bottom: 18px; gap: 8px 10px; }
  .detail-price .website-discount-note { flex-basis: 100%; font-size: 12px; }
  .detail-desc { margin-bottom: 22px; }
  .option-group { margin-bottom: 20px; }
  .size-options { gap: 7px; }
  .size-options button {
    min-width: 44px;
    min-height: 44px;
    padding: 9px 11px;
    touch-action: manipulation;
  }
  .qty-row { margin-bottom: 22px; }
  .qty-control button { min-width: 44px; min-height: 44px; color: #111; }
  .qty-control input { min-height: 44px; color: #111; background: #fff; }
  .buy-now-btn,
  #add-to-cart-btn { min-height: 48px; }
  .gallery-thumbnails { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .image-lightbox { padding: 14px; }
  .lightbox-close { top: 8px; right: 8px; }
  .size-guide-modal { padding: 12px; }
  .size-guide-dialog { width: 100%; max-height: 94vh; }
  .size-guide-close { top: 8px; right: 8px; width: 40px; height: 40px; font-size: 28px; }
  .related-products__heading { gap: 12px; }
  .related-products__heading h2 { min-width: 0; }
}

@media (max-width: 360px) {
  .product-page .site-header .container { padding-left: 8px; padding-right: 8px; }
  .product-page .site-header .logo img { width: 68px; }
  .product-page .main-nav > .nav-products > .nav-products-trigger { font-size: 9px; }
  .product-page .site-header .account-link,
  .product-page .site-header .cart-link { width: 28px; height: 28px; }
  .gallery-thumbnails { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
  .related-products__heading h2 { font-size: 16px; }
}

/* ---------- Cart page ---------- */
.cart-layout { display: grid; grid-template-columns: 1fr 340px; gap: 48px; padding: 56px 0 96px; }
@media (max-width: 860px) { .cart-layout { grid-template-columns: 1fr; } }

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

.cart-item-thumb {
  width: 100px;
  aspect-ratio: 1/1;
  background: var(--surface);
  border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; color: var(--muted); text-align: center; padding: 0; overflow: hidden;
}
.cart-item-thumb img { width: 100%; height: 100%; object-fit: cover; }

.cart-item-name { font-weight: 500; margin: 0 0 4px; font-size: 14px; }
.cart-item-meta { color: var(--muted); font-size: 13px; margin-bottom: 10px; }
.cart-item-remove { font-size: 12px; color: var(--danger); background: none; border: none; cursor: pointer; padding: 0; text-decoration: underline; }

.cart-item-right { text-align: right; }
.cart-item-price { font-size: 14px; margin-bottom: 10px; }

@media (max-width: 560px) {
  .cart-layout { gap: 28px; padding-top: 28px; }
  .cart-item { grid-template-columns: 82px minmax(0, 1fr); gap: 14px; align-items: start; }
  .cart-item-thumb { width: 82px; }
  .cart-item-right { grid-column: 2; display: flex; align-items: center; justify-content: space-between; text-align: left; }
  .cart-item-price { margin-bottom: 0; }
}

.summary-box {
  border: 1px solid var(--line);
  padding: 28px;
  align-self: start;
}
.summary-box h3 { margin: 0 0 20px; font-size: 16px; letter-spacing: 0.04em; }
.summary-row { display: flex; justify-content: space-between; font-size: 14px; margin-bottom: 12px; color: var(--muted); }
.summary-row.total { color: var(--fg); font-size: 18px; font-weight: 600; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); }

.empty-state { text-align: center; padding: 96px 0; color: var(--muted); }
.empty-state h2 { color: var(--fg); font-weight: 500; margin-bottom: 12px; }

/* ---------- Checkout ---------- */
.checkout-layout { width: min(820px, 100%); margin: 0 auto; padding: 36px 0 96px; }
.checkout-main { min-width: 0; }
.checkout-order-summary { margin-bottom: 38px; }
.checkout-customer-section > h3 { margin: 0 0 24px; font-size: 18px; font-weight: 500; letter-spacing: .03em; }
.checkout-summary-item { display: grid; grid-template-columns: 82px minmax(0, 1fr) auto; gap: 16px; align-items: start; padding: 16px 0; border-bottom: 1px solid var(--line); }
.checkout-summary-thumb { width: 82px; aspect-ratio: 1; overflow: hidden; background: var(--surface); }
.checkout-summary-thumb img { width: 100%; height: 100%; object-fit: cover; }
.checkout-summary-info { min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; font-size: 13px; color: var(--muted); }
.checkout-summary-info strong { color: var(--fg); font-size: 14px; font-weight: 500; }
.checkout-summary-price { padding-top: 2px; font-size: 14px; white-space: nowrap; }
.checkout-remove { margin-top: 4px; padding: 0; border: 0; background: none; color: var(--danger); font: inherit; text-decoration: underline; cursor: pointer; }
@media (max-width: 560px) {
  .checkout-layout { padding-top: 20px; padding-bottom: 64px; }
  .checkout-order-summary { margin-bottom: 30px; padding: 18px 14px; }
  .checkout-summary-item { grid-template-columns: 68px minmax(0, 1fr); gap: 12px; }
  .checkout-summary-thumb { width: 68px; }
  .checkout-summary-price { grid-column: 2; padding-top: 0; }
}

.form-group { margin-bottom: 20px; }
.form-group label { display: block; font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.form-group input, .form-group textarea {
  width: 100%; padding: 13px 14px; border: 1px solid var(--line); font-family: var(--font); font-size: 14px; border-radius: var(--radius); background: var(--bg); color: var(--fg);
}
.form-group textarea { resize: vertical; min-height: 80px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 520px) { .form-row { grid-template-columns: 1fr; } }

.payment-options { display: flex; flex-direction: column; gap: 12px; margin-bottom: 8px; }
.payment-option {
  border: 1px solid var(--line);
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  cursor: pointer;
}
.payment-option.selected { border-color: var(--fg); background: var(--surface); }
.payment-option input { accent-color: var(--fg); }
.payment-option .po-title { font-weight: 500; font-size: 14px; }
.payment-option .po-desc { font-size: 12px; color: var(--muted); margin-top: 2px; }

.field-error { color: var(--danger); font-size: 13px; margin-top: 6px; }
.form-error-box { border: 1px solid var(--danger); color: var(--danger); padding: 14px 16px; font-size: 14px; margin-bottom: 20px; display: none; }
.form-error-box.visible { display: block; }
.form-success-box { display: none; border: 1px solid #55805f; color: #315a3b; background: #f1f7f2; padding: 14px 16px; font-size: 14px; margin-bottom: 20px; }
.form-success-box.visible { display: block; }

/* ---------- Customer account ---------- */
.auth-card { width: min(520px, 100%); margin: 72px auto 96px; border: 1px solid var(--line); padding: 36px; }
.auth-card h1, .account-heading h1 { margin: 0 0 8px; font-size: 26px; font-weight: 500; }
.muted { color: var(--muted); }
.auth-links { display: flex; justify-content: space-between; gap: 18px; margin-top: 20px; font-size: 13px; }
.account-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding: 52px 0 28px; border-bottom: 1px solid var(--line); }
.account-heading p { margin: 0; color: var(--muted); }
.account-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; padding: 28px 0 96px; }
.account-card { border: 1px solid var(--line); padding: 28px; }
.account-card h2 { font-size: 17px; font-weight: 500; margin: 0 0 22px; }
.account-address-card #address-list { margin-bottom: 24px; }
.account-address-card #address-form { padding-top: 24px; border-top: 1px solid var(--line); }
.account-orders { grid-column: 1 / -1; }
.text-button { border: 0; background: none; padding: 0; color: var(--muted); text-decoration: underline; cursor: pointer; font: inherit; }
.saved-address, .order-line { display: flex; justify-content: space-between; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 13px; line-height: 1.6; }
.order-line { display: grid; grid-template-columns: 1fr auto 140px; }
.tag { font-size: 10px; text-transform: uppercase; letter-spacing: .05em; padding: 2px 6px; background: var(--surface); }
.check-row { display: block; margin: 0 0 20px; font-size: 13px; color: var(--muted); }
@media (max-width: 760px) {
  .account-page main.container { padding-left: 14px; padding-right: 14px; }
  .account-heading { padding: 30px 0 22px; }
  .account-heading h1 { font-size: 22px; }
  .account-grid { grid-template-columns: 1fr; gap: 16px; padding: 20px 0 64px; }
  .account-card { padding: 20px 16px; }
  .account-orders { grid-column: auto; }
  .auth-card { padding: 24px; margin-top: 36px; }
  .saved-address { align-items: flex-start; }
  .order-line { grid-template-columns: 1fr auto; }
  .order-line span:last-child { grid-column: 1 / -1; color: var(--muted); }
  .account-address-card .btn { width: 100%; }
}

/* ---------- Order result ---------- */
.result-box { max-width: 520px; margin: 96px auto; text-align: center; padding: 0 24px; }
.result-icon { font-size: 48px; margin-bottom: 20px; }
.result-box h1 { font-size: 24px; margin-bottom: 12px; }
.result-box p { color: var(--muted); line-height: 1.6; margin-bottom: 28px; }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  margin-top: auto;
  padding: 56px 0 28px;
  background: var(--surface);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.35fr 1fr 1.35fr .75fr;
  gap: 36px;
  font-size: 13px;
  color: var(--muted);
}
.footer-column { min-width: 0; }
.footer-column h2 {
  margin: 0 0 18px;
  color: var(--fg);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .08em;
}
.footer-column a,
.footer-column p,
.footer-pending {
  display: block;
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
  text-decoration: none;
}
.footer-column a:hover { color: var(--fg); }
.footer-column .footer-commerce-verification {
  width: min(170px, 100%);
  margin: 18px 0 0;
}
.footer-commerce-verification img {
  display: block;
  width: 100%;
  height: auto;
}
.footer-business-registration { max-width: 34em; }
.footer-column .footer-business-code { margin-top: 12px; color: var(--fg); }
.footer-business-code strong { font-weight: 600; }
.footer-pending { cursor: default; }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-top: 38px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}
@media (max-width: 960px) {
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .site-footer { padding-top: 40px; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .footer-bottom { flex-direction: column; margin-top: 30px; }
}

/* ---------- Information pages ---------- */
.info-page { width: min(860px, calc(100% - 40px)); margin: 0 auto; padding: 36px 0 88px; }
.info-page .breadcrumb { padding-left: 0; }
.info-hero { padding: 46px 0 30px; border-bottom: 1px solid var(--line); }
.info-hero h1 { margin: 0 0 14px; font-size: clamp(28px, 4vw, 42px); font-weight: 500; letter-spacing: -.02em; }
.info-hero p { max-width: 680px; margin: 0; color: var(--muted); font-size: 15px; line-height: 1.75; }
.info-content { padding-top: 18px; }
.info-section { padding: 26px 0; border-bottom: 1px solid var(--line); }
.info-section:last-child { border-bottom: 0; }
.info-section h2 { margin: 0 0 14px; font-size: 19px; font-weight: 500; }
.info-section h3 { margin: 22px 0 10px; font-size: 15px; font-weight: 500; }
.info-section p, .info-section li { color: #555; font-size: 14px; line-height: 1.8; }
.info-section p { margin: 0 0 12px; }
.info-section ul, .info-section ol { margin: 0; padding-left: 22px; }
.info-note { margin-top: 18px; padding: 16px 18px; background: var(--surface); color: #555; font-size: 13px; line-height: 1.7; }
.size-table-wrap { overflow-x: auto; margin-top: 14px; }
.size-table { width: 100%; min-width: 560px; border-collapse: collapse; font-size: 13px; }
.size-table th, .size-table td { padding: 12px 14px; border: 1px solid var(--line); text-align: center; }
.size-table th { background: var(--surface); font-weight: 500; }
.job-card { margin-top: 16px; padding: 20px; border: 1px solid var(--line); }
.job-card h3 { margin-top: 0; }
.info-contact { display: inline-flex; margin-top: 8px; padding: 11px 18px; background: var(--fg); color: var(--bg); text-decoration: none; font-size: 13px; }
@media (max-width: 560px) { .info-page { width: min(100% - 28px, 860px); padding-top: 20px; } .info-hero { padding-top: 28px; } }

/* ---------- Misc ---------- */
.loading-state, .error-state { text-align: center; padding: 64px 0; color: var(--muted); }
.product-loading-placeholder { min-height: 128px; grid-column: 1 / -1; }
.product-loading-placeholder--detail { min-height: min(62vh, 620px); }
.product-loading-placeholder--related { min-height: 96px; }
.breadcrumb { font-size: 12px; color: var(--muted); padding: 24px 0 0; letter-spacing: 0.03em; text-transform: uppercase; }
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--fg);
  color: var(--bg);
  padding: 14px 22px;
  font-size: 13px;
  letter-spacing: 0.04em;
  border-radius: var(--radius);
  opacity: 0;
  pointer-events: none;
  transition: all 0.25s ease;
  z-index: 50;
}
.toast.visible { opacity: 1; transform: translateX(-50%) translateY(0); }
.header-actions { display: flex; align-items: center; gap: 16px; }
.account-link { position: relative; display: inline-flex; width: 25px; height: 25px; color: inherit; }
.account-link svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; }
.account-link.signed-in::after { content: ''; position: absolute; right: -1px; bottom: 0; width: 6px; height: 6px; border-radius: 50%; background: #55805f; border: 1px solid var(--bg); }

.address-selects { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.form-group select { width: 100%; min-height: 46px; padding: 0 13px; border: 1px solid var(--line); border-radius: 0; background: #fff; color: var(--fg); font: inherit; }
.form-group select:disabled { background: var(--surface); color: var(--muted); cursor: wait; }
.shipping-method-box { margin: 2px 0 20px; padding: 14px 16px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); font-size: 13px; line-height: 1.5; }
.shipping-method-box strong, .shipping-method-box span { display: block; }
.shipping-method-box strong { margin-bottom: 3px; color: var(--fg); font-size: 14px; }

.contact-dock { position: fixed; right: 18px; bottom: 22px; z-index: 80; display: flex; flex-direction: column; gap: 10px; }
.contact-dock__item { display: flex; align-items: center; justify-content: flex-end; gap: 10px; color: #fff; text-decoration: none; }
.contact-dock__item svg { order: 2; width: 48px; height: 48px; padding: 12px; border: 1px solid #111; border-radius: 50%; background: #111; fill: #fff; filter: drop-shadow(0 3px 9px rgba(0,0,0,.18)); transition: transform .18s ease, filter .18s ease, background .18s ease, fill .18s ease; }
.contact-dock__item .contact-dock__messenger-mark { padding: 8px; }
.contact-dock__item span { padding: 8px 11px; border-radius: 3px; background: rgba(20,20,20,.88); color: #fff; font-size: 12px; opacity: 0; transform: translateX(8px); pointer-events: none; transition: .18s ease; }
.contact-dock__item:hover svg, .contact-dock__item:focus-visible svg { transform: translateY(-2px) scale(1.04); filter: drop-shadow(0 5px 12px rgba(0,0,0,.25)); }
.contact-dock__item:hover span, .contact-dock__item:focus-visible span { opacity: 1; transform: translateX(0); }
.contact-dock__item:hover svg, .contact-dock__item:focus-visible svg { background: #fff; fill: #111; }
@media (max-width: 720px) {
  .address-selects { grid-template-columns: 1fr; gap: 0; }
  .contact-dock { right: 12px; bottom: 14px; gap: 8px; }
  .contact-dock__item svg { width: 44px; height: 44px; padding: 11px; }
  .contact-dock__item .contact-dock__messenger-mark { padding: 7px; }
  .contact-dock__item span { display: none; }
}
