/**
 * SWS Theme Modern - components.css
 * Product card, category card, section headers
 */

/* ─── PRODUCT CARD ────────────────────────────────────── */

.sws-product-card {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
  position: relative;
}

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

.sws-product-card__image-wrap {
  display: block;
  position: relative;
  aspect-ratio: 4/3;
  overflow: hidden;
  background: var(--color-surface);
}

.sws-product-card__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.sws-product-card:hover .sws-product-card__image {
  transform: scale(1.04);
}

.sws-product-card__badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: var(--color-primary);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  z-index: 1;
}

.sws-product-card__rank {
  position: absolute;
  top: 10px;
  left: 10px;
  background: var(--color-primary);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  z-index: 1;
}

.sws-product-card__wishlist {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 30px;
  height: 30px;
  background: rgba(255,255,255,0.9);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: var(--color-text-muted);
  cursor: pointer;
  z-index: 1;
  transition: color 0.15s, background 0.15s;
}

.sws-product-card__wishlist:hover {
  color: var(--color-primary);
  background: #fff;
}

.sws-product-card__actions {
  position: absolute;
  bottom: 10px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 6px;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.2s, transform 0.2s;
}

.sws-product-card:hover .sws-product-card__actions {
  opacity: 1;
  transform: translateY(0);
}

.sws-product-card__action {
  width: 32px;
  height: 32px;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  color: var(--color-text-muted);
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
  text-decoration: none;
}

.sws-product-card__action:hover {
  color: var(--color-primary);
  border-color: var(--color-primary);
}

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

.sws-product-card__brand {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-bottom: 4px;
}

.sws-product-card__title {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.35;
  margin-bottom: 6px;
  text-decoration: none;
}

.sws-product-card__title:hover {
  color: var(--color-primary);
}

.sws-product-card__rating {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 8px;
}

.sws-product-card__price-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.sws-product-card__price {
  font-size: 16px;
  font-weight: 700;
  color: var(--color-text);
}

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

.sws-product-card__cta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
}

.sws-product-card__add {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: var(--color-primary);
  color: #fff;
  border: none;
  border-radius: var(--btn-radius);
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s;
}

.sws-product-card__add:hover {
  background: var(--color-primary-dark);
  color: #fff;
}

.sws-product-card__detail {
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  color: var(--color-text-muted);
  transition: border-color 0.15s, color 0.15s;
  text-decoration: none;
}

.sws-product-card__detail:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

/* ─── SECTION HEADING ─────────────────────────────────── */

.mnx-section {
  padding: var(--section-spacing, 64px) 0;
}

.mnx-section--gray {
  background: var(--color-surface);
}

.mnx-section__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 28px;
  gap: 16px;
}

.mnx-section__title {
  font-size: clamp(22px, 3vw, 28px);
  font-weight: 800;
  color: var(--color-text);
  margin: 0;
  letter-spacing: -0.02em;
}

.mnx-section__subtitle {
  font-size: 13px;
  color: var(--color-text-muted);
  margin-top: 4px;
}

.mnx-section__link {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-primary);
  text-decoration: none;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: opacity 0.15s;
}

.mnx-section__link:hover {
  opacity: 0.75;
  color: var(--color-primary);
}

/* ─── FILTER TABS ─────────────────────────────────────── */

.mnx-filter-tabs {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

.mnx-filter-tab {
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 500;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  cursor: pointer;
  background: #fff;
  color: var(--color-text-muted);
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  text-decoration: none;
}

.mnx-filter-tab:hover {
  border-color: var(--color-text);
  color: var(--color-text);
}

.mnx-filter-tab--active {
  background: var(--color-text);
  color: #fff;
  border-color: var(--color-text);
}

/* ─── DEPARTMENT CIRCLE CARD ──────────────────────────── */

.mnx-dept-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--color-text);
  transition: transform 0.2s;
}

.mnx-dept-card:hover {
  transform: translateY(-3px);
  color: var(--color-text);
}

.mnx-dept-card__circle {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mnx-dept-card__circle img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.mnx-dept-card__circle-placeholder {
  width: 60%;
  height: 60%;
  border-radius: 50%;
  background: var(--color-border);
  opacity: 0.5;
}

.mnx-dept-card__label {
  font-size: 13px;
  font-weight: 600;
  text-align: center;
}
