/* Version: v1.0.0 | Shared Common Styles */
@font-face {
  font-family: 'Roboto';
  src: url('../fonts/roboto/roboto-latin-var.woff2') format('woff2');
  font-style: normal;
  font-weight: 300 700;
  font-stretch: 75% 100%;
  font-display: swap;
}

:root {
  --cw-body-bg: #f6f7f9;
  --cw-surface: #ffffff;
  --cw-surface-muted: #f2f4f7;
  --cw-border: #e3e7ee;
  --cw-border-soft: rgba(227, 231, 238, 0.82);
  --cw-text: #16233a;
  --cw-text-soft: #6f7b8f;
  --cw-text-faint: #95a1b2;
  --cw-brand: #651e7c;
  --cw-brand-rgb: 101, 30, 124;
  --cw-brand-soft: rgba(101, 30, 124, 0.08);
  --cw-brand-soft-strong: rgba(101, 30, 124, 0.14);
  --cw-accent: #111827;
  --cw-accent-strong: #0f172a;
  --cw-radius-lg: 1rem;
  --cw-radius-md: 0.875rem;
  --cw-shadow-sm: 0 8px 20px rgba(15, 23, 42, 0.05);
  --cw-shadow-md: 0 18px 40px rgba(15, 23, 42, 0.10);
  --cw-shadow-btn: 0 10px 26px rgba(15, 23, 42, 0.16);
  --cw-card-media-ratio: 4 / 3;
}

body.cw-site {
  background-color: var(--cw-body-bg);
  color: var(--cw-text);
  font-family: 'Roboto', 'Helvetica Neue', Arial, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Noto Sans CJK SC', sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a {
  color: inherit;
}

.cw-page-switcher-wrap {
  padding: 1rem 0;
}

.cw-page-switcher {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.cw-page-switcher__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0.7rem 1.2rem;
  border: 1px solid rgba(var(--cw-brand-rgb), 0.14);
  border-radius: 999px;
  background: rgba(255,255,255,0.92);
  color: var(--cw-text);
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
}

.cw-page-switcher__btn:hover,
.cw-page-switcher__btn:focus-visible {
  border-color: rgba(var(--cw-brand-rgb), 0.28);
  background: rgba(var(--cw-brand-rgb), 0.07);
  color: var(--cw-brand);
}

.cw-page-switcher__btn.is-active {
  border-color: var(--cw-brand);
  background: var(--cw-brand);
  color: #fff;
}

.cw-archive-toolbar__result {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 42px;
  padding: 0.625rem 0.9rem;
  border: 1px solid rgba(var(--cw-brand-rgb), 0.12);
  border-radius: 999px;
  background: rgba(var(--cw-brand-rgb), 0.04);
  color: var(--cw-brand);
  font-size: 0.84rem;
  font-weight: 600;
}

.cw-archive-toolbar__result::before {
  content: '';
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: var(--cw-brand);
  box-shadow: 0 0 0 6px rgba(var(--cw-brand-rgb), 0.10);
}

.cw-product-card {
  overflow: hidden;
  border-radius: var(--cw-radius-lg);
  background: var(--cw-surface);
  transition: transform 0.28s ease, box-shadow 0.28s ease, border-color 0.28s ease;
}

.cw-product-card:hover,
.cw-product-card:focus-within {
  transform: translateY(-5px);
  box-shadow: var(--cw-shadow-md) !important;
}

.cw-product-card__media-wrap {
  padding: 0.75rem 0.75rem 0;
}

.cw-product-card__badge {
  position: absolute;
  top: 1.1rem;
  left: 1.1rem;
  z-index: 2;
  border: 1px solid rgba(255, 255, 255, 0.65);
  border-radius: 999px;
  padding: 0.35rem 0.7rem;
  background: rgba(255, 255, 255, 0.88) !important;
  color: var(--cw-accent-strong) !important;
  font-size: 0.715rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.06);
  backdrop-filter: blur(8px);
}

.cw-product-card__media {
  position: relative;
  display: block;
  aspect-ratio: var(--cw-card-media-ratio);
  overflow: hidden;
  border-radius: var(--cw-radius-md);
  background: var(--cw-surface-muted);
}

.cw-product-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}

.cw-product-card:hover .cw-product-card__img,
.cw-product-card:focus-within .cw-product-card__img {
  transform: scale(1.035);
}

@media (hover: hover) and (pointer: fine) {
  .cw-product-card__media::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(15, 23, 42, 0.18), rgba(15, 23, 42, 0.02) 46%, rgba(15, 23, 42, 0));
    opacity: 0;
    transition: opacity 0.24s ease;
    z-index: 1;
  }

  .cw-product-card:hover .cw-product-card__media::before,
  .cw-product-card:focus-within .cw-product-card__media::before {
    opacity: 1;
  }
}

.cw-product-card__body {
  display: flex;
  flex-direction: column;
  gap: 0.42rem;
  padding: 1rem 1rem 1.125rem;
}

.cw-product-card__meta {
  color: var(--cw-text-soft);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.035em;
  text-transform: uppercase;
}

.cw-product-card__title {
  color: var(--cw-text);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.42;
  letter-spacing: 0;
}

.cw-product-card__title-link {
  display: -webkit-box;
  overflow: hidden;
  color: var(--cw-text);
  text-decoration: none;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  transition: color 0.2s ease;
}

.cw-product-card__title-link:hover,
.cw-product-card__title-link:focus-visible {
  color: var(--cw-accent);
}

.cw-product-card__footer {
  margin-top: 0.55rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--cw-border-soft);
}

.cw-product-card__price-group {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.625rem;
}

.cw-product-card__price-current {
  color: var(--cw-accent-strong);
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.01em;
}

.cw-product-card__price-old {
  color: var(--cw-text-faint);
  font-size: 0.9rem;
  font-weight: 400;
  line-height: 1;
  text-decoration-thickness: 1px;
  text-decoration-color: rgba(149, 161, 178, 0.85);
}

.cw-product-card__hover-btn {
  position: absolute;
  left: 50%;
  bottom: 1rem;
  z-index: 2;
  min-width: 126px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  padding: 0.62rem 1rem;
  background: rgba(15, 23, 42, 0.84);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  box-shadow: var(--cw-shadow-btn);
  backdrop-filter: blur(10px);
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, 12px);
  transition: opacity 0.24s ease, transform 0.24s ease, visibility 0.24s ease, background-color 0.22s ease, border-color 0.22s ease;
}

.cw-product-card__hover-btn:hover,
.cw-product-card__hover-btn:focus-visible {
  background: #651e7c;
  border-color: #651e7c;
  color: #fff;
}

@media (hover: hover) and (pointer: fine) {
  .cw-product-card:hover .cw-product-card__hover-btn,
  .cw-product-card:focus-within .cw-product-card__hover-btn {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, 0);
  }
}

@media (max-width: 575.98px) {
  .cw-page-switcher-wrap {
    padding-top: 0.85rem;
  }

  .cw-page-switcher {
    gap: 0.55rem;
  }

  .cw-page-switcher__btn {
    min-height: 40px;
    padding: 0.68rem 1rem;
    font-size: 0.84rem;
  }

  .cw-archive-toolbar__result {
    min-height: 38px;
    font-size: 0.78rem;
  }

  .cw-product-card {
    border-radius: 0.875rem;
  }

  .cw-product-card__body {
    gap: 0.34rem;
    padding: 0.9rem;
  }

  .cw-product-card__badge {
    top: 0.95rem;
    left: 0.95rem;
    padding: 0.3rem 0.6rem;
    font-size: 0.68rem;
  }

  .cw-product-card__meta {
    font-size: 0.71rem;
  }

  .cw-product-card__title {
    font-size: 0.94rem;
  }

  .cw-product-card__footer {
    margin-top: 0.45rem;
    padding-top: 0.65rem;
  }

  .cw-product-card__price-group {
    gap: 0.5rem;
  }

  .cw-product-card__price-current {
    font-size: 1.02rem;
  }

  .cw-product-card__price-old {
    font-size: 0.82rem;
  }
}
