/* ============================================
   ON Brand Design System
   Matching on.com actual styles
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
  --on-black: #000000;
  --on-white: #ffffff;
  --on-bg: #f5f5f5;
  --on-gray-200: #e5e5e5;
  --on-gray-400: #a3a3a3;
  --on-gray-500: #737373;
  --on-gray-600: #525252;
  --on-orange: #c45500;
  --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

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

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body {
  font-family: var(--font-primary);
  background: var(--on-white);
  color: var(--on-black);
  line-height: 1.5;
  overflow-x: hidden;
}

/* ============================================
   Header
   ============================================ */

.on-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 72px;
  background: var(--on-white);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 40px;
  z-index: 100;
  box-sizing: border-box;
}

.on-logo {
  display: flex;
  align-items: center;
  color: var(--on-black);
}

.on-logo svg {
  display: block;
}

.on-nav {
  display: flex;
  gap: 40px;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.on-nav a {
  color: var(--on-black);
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.01em;
}

.on-nav a:hover {
  opacity: 0.7;
}

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

.on-icon-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  color: var(--on-black);
}

.on-icon-btn:hover {
  opacity: 0.7;
}

@media (max-width: 900px) {
  .on-header {
    padding: 0 16px;
    height: 60px;
  }
  .on-nav {
    display: none;
  }
  .on-header-actions {
    gap: 16px;
  }
}

@media (max-width: 900px) {
  .on-product-page {
    padding-top: 60px;
  }
}

/* ============================================
   Product Page Layout
   ============================================ */

.on-product-page {
  padding-top: 72px;
  min-height: 100vh;
  background: var(--on-white);
  overflow-x: hidden;
}

.on-product-container {
  display: grid;
  grid-template-columns: 1fr;
  width: 100%;
  max-width: 100vw;
}

@media (min-width: 1024px) {
  .on-product-container {
    grid-template-columns: 1fr 400px;
  }
}

@media (min-width: 1200px) {
  .on-product-container {
    grid-template-columns: 1fr 440px;
  }
}

/* ============================================
   Gallery
   ============================================ */

.on-gallery {
  position: relative;
  background: var(--on-bg);
  min-height: calc(100vh - 72px);
  overflow: hidden;
}

.on-gallery-scroll {
  display: flex;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  height: calc(100vh - 72px);
  width: 100%;
}

.on-gallery-scroll::-webkit-scrollbar {
  display: none;
}

.on-gallery-item {
  flex: 0 0 100%;
  min-width: 100%;
  scroll-snap-align: start;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  box-sizing: border-box;
}

@media (min-width: 768px) {
  .on-gallery-item {
    padding: 40px;
  }
}

.on-gallery-item img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.on-gallery-controls {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.on-gallery-arrow {
  width: 44px;
  height: 44px;
  border: 1px solid var(--on-gray-200);
  border-radius: 4px;
  background: var(--on-white);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--on-black);
  pointer-events: auto;
}

.on-gallery-arrow:hover {
  background: var(--on-bg);
}

.on-gallery-prev {
  margin-right: 8px;
}

.on-gallery-counter {
  font-size: 14px;
  color: var(--on-black);
  letter-spacing: 0.05em;
  margin-left: 16px;
}

@media (max-width: 1023px) {
  .on-gallery {
    min-height: auto;
  }
  .on-gallery-scroll {
    height: auto;
    aspect-ratio: 1;
  }
  .on-gallery-controls {
    bottom: 16px;
  }
}

/* ============================================
   Product Info
   ============================================ */

.on-product-info {
  padding: 24px 16px 40px;
  background: var(--on-white);
  overflow-x: hidden;
}

@media (min-width: 768px) {
  .on-product-info {
    padding: 32px 32px 60px;
  }
}

@media (min-width: 1024px) {
  .on-product-info {
    padding: 40px 48px 80px;
    overflow-y: auto;
    max-height: calc(100vh - 72px);
  }
}

.on-breadcrumb {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.1em;
  color: var(--on-gray-500);
  margin-bottom: 16px;
}

.on-breadcrumb a {
  color: var(--on-gray-500);
  text-decoration: none;
}

.on-breadcrumb a:hover {
  color: var(--on-black);
}

.on-breadcrumb-sep {
  margin: 0 8px;
}

.on-product-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
}

.on-product-header .on-product-title {
  flex: 1;
  min-width: 0;
}

.on-product-title {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

@media (min-width: 768px) {
  .on-product-title {
    font-size: 32px;
  }
}

@media (min-width: 1200px) {
  .on-product-title {
    font-size: 40px;
  }
}

.on-wishlist-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  color: var(--on-black);
  flex-shrink: 0;
}

.on-wishlist-btn:hover {
  opacity: 0.6;
}

.on-product-badge {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.12em;
  margin-bottom: 8px;
}

.on-badge-highlight {
  color: var(--on-orange);
}

.on-badge-text {
  color: var(--on-black);
  margin-left: 8px;
}

.on-product-price {
  font-size: 16px;
  font-weight: 400;
  margin-bottom: 8px;
}

.on-product-price small {
  font-size: 13px;
  color: var(--on-gray-500);
  font-weight: 400;
  margin-left: 8px;
}

.on-product-description {
  font-size: 15px;
  color: var(--on-black);
  line-height: 1.6;
  margin-bottom: 24px;
  max-width: 340px;
}

/* Color Section */
.on-color-section {
  margin-bottom: 32px;
}

.on-color-label {
  font-size: 14px;
  margin-bottom: 12px;
}

.on-color-swatch-wrap {
  display: flex;
  gap: 8px;
}

.on-color-swatch {
  width: 48px;
  height: 48px;
  padding: 0;
  border: none;
  background: none;
  cursor: pointer;
  position: relative;
}

.on-color-swatch img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 2px;
}

.on-color-swatch.active::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--on-black);
}

/* Custom Fit Section */
.on-custom-fit {
  background: var(--on-white);
  border: 1px solid var(--on-gray-200);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 24px;
  width: 100%;
  box-sizing: border-box;
}

@media (min-width: 768px) {
  .on-custom-fit {
    padding: 24px;
  }
}

.on-custom-fit-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

@media (min-width: 768px) {
  .on-custom-fit-header {
    gap: 16px;
    margin-bottom: 16px;
  }
}

.on-custom-fit-icon {
  width: 40px;
  height: 40px;
  background: var(--on-bg);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.on-custom-fit-icon svg {
  width: 20px;
  height: 20px;
  stroke: var(--on-black);
}

.on-custom-fit-title {
  font-size: 16px;
  font-weight: 600;
}

.on-custom-fit-desc {
  font-size: 14px;
  color: var(--on-gray-600);
  line-height: 1.5;
  margin-bottom: 16px;
}

@media (min-width: 768px) {
  .on-custom-fit-desc {
    line-height: 1.6;
    margin-bottom: 20px;
  }
}

/* Buttons */
.on-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font-family: var(--font-primary);
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border: none;
  cursor: pointer;
  transition: background 0.2s, opacity 0.2s;
  text-decoration: none;
}

.on-btn-primary {
  background: var(--on-black);
  color: var(--on-white);
  width: 100%;
  height: 56px;
  padding: 0 24px;
  border-radius: 4px;
}

.on-btn-primary:hover {
  opacity: 0.85;
}

.on-btn-primary:active {
  opacity: 0.7;
}

.on-btn-primary svg {
  stroke: currentColor;
  fill: none;
}

/* Notify text */
.on-notify-text {
  font-size: 13px;
  color: var(--on-gray-600);
  line-height: 1.5;
}

.on-notify-link {
  color: var(--on-black);
  text-decoration: underline;
  font-weight: 500;
}

.on-notify-link:hover {
  opacity: 0.7;
}
