* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  background: #f9fafb;
  color: #111827;
}

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

.site-header {
  padding: 20px 24px;
  background: #111827;
  color: #fff;
}

.site-header h1 {
  margin: 0 0 12px;
  font-size: 20px;
}

.category-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.category-nav a {
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  font-size: 13px;
  text-transform: capitalize;
}

.category-nav a.active {
  background: #fff;
  color: #111827;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
  padding: 24px;
}

.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  color: #6b7280;
  padding: 60px 0;
}

.product-card {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  transition: transform 0.15s ease;
}

.product-card:hover {
  transform: translateY(-2px);
}

.product-card__image {
  aspect-ratio: 1 / 1;
  background: #f3f4f6;
}

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

.product-card__no-image {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #9ca3af;
  font-size: 13px;
}

.product-card__body {
  padding: 12px 14px;
}

.product-card__name {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-card__category {
  font-size: 12px;
  color: #6b7280;
  text-transform: capitalize;
  margin-bottom: 4px;
}

.product-card__price {
  font-size: 15px;
  font-weight: 700;
  color: #111827;
}

.product-detail {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 32px;
  padding: 32px 24px;
  max-width: 900px;
  margin: 0 auto;
}

.carousel__main {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: 16px;
  overflow: hidden;
  background: #f3f4f6;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 8px 24px rgba(0, 0, 0, 0.06);
}

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

.carousel__arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: none;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  font-size: 14px;
  color: #111827;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.carousel__arrow:hover {
  background: #fff;
}

.carousel__arrow--prev {
  left: 12px;
}

.carousel__arrow--next {
  right: 12px;
}

.carousel__thumbs {
  display: flex;
  gap: 10px;
  margin-top: 14px;
  overflow-x: auto;
  scroll-behavior: smooth;
  padding-bottom: 4px;
}

.carousel__thumb {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 10px;
  cursor: pointer;
  flex-shrink: 0;
  opacity: 0.55;
  border: 2px solid transparent;
  transition: opacity 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.carousel__thumb:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.carousel__thumb.active {
  opacity: 1;
  border-color: #111827;
}

.product-detail__info {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
  padding-top: 8px;
}

.product-detail__price {
  font-size: 28px;
  font-weight: 700;
  color: #111827;
}

.option-group__label {
  font-size: 13px;
  font-weight: 600;
  color: #374151;
  margin-bottom: 8px;
  text-transform: capitalize;
}

.option-group__values {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.option-chip {
  padding: 8px 14px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  background: #fff;
  font-size: 13px;
  cursor: pointer;
}

.option-chip:hover {
  border-color: #111827;
}

.option-chip.active {
  border-color: #111827;
  background: #111827;
  color: #fff;
}

.color-swatch {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  cursor: pointer;
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px #d1d5db;
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.color-swatch:hover {
  transform: scale(1.08);
}

.color-swatch.active {
  box-shadow: 0 0 0 2px #111827;
}

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

.swipe-body {
  overflow: hidden;
}

.swipe-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  height: calc(100vh - 90px);
  max-width: 480px;
  margin: 0 auto;
}

.swipe-empty {
  color: #6b7280;
  font-size: 15px;
  text-align: center;
}

.swipe-card {
  position: relative;
  width: 100%;
  max-width: 380px;
  aspect-ratio: 3 / 4;
  border-radius: 20px;
  overflow: hidden;
  background: #f3f4f6;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12), 0 16px 40px rgba(0, 0, 0, 0.1);
  touch-action: none;
  user-select: none;
  cursor: grab;
}

.swipe-card:active {
  cursor: grabbing;
}

.swipe-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
}

.swipe-dots {
  position: absolute;
  top: 12px;
  left: 12px;
  right: 12px;
  display: flex;
  gap: 4px;
}

.swipe-dot {
  flex: 1;
  height: 3px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.4);
}

.swipe-dot.active {
  background: #fff;
}

.swipe-price,
.swipe-size {
  position: absolute;
  bottom: 16px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(17, 24, 39, 0.75);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  backdrop-filter: blur(4px);
}

.swipe-price {
  left: 16px;
}

.swipe-size {
  right: 16px;
}

.swipe-stamp {
  position: absolute;
  top: 24px;
  padding: 6px 14px;
  border: 3px solid;
  border-radius: 8px;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: 1px;
  opacity: 0;
  pointer-events: none;
}

.swipe-stamp--like {
  left: 20px;
  color: #16a34a;
  border-color: #16a34a;
  transform: rotate(-15deg);
}

.swipe-stamp--nope {
  right: 20px;
  color: #dc2626;
  border-color: #dc2626;
  transform: rotate(15deg);
}

.swipe-actions {
  display: flex;
  gap: 24px;
  margin-top: 28px;
}

.swipe-btn {
  width: 56px;
  height: 56px;
  border-radius: 999px;
  border: none;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  font-size: 22px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.swipe-btn--dislike {
  color: #dc2626;
}

.swipe-btn--like {
  color: #16a34a;
}
