/* ==========================================================================
   PRODUCT CATALOG INDEX — Lanyard Medan
   Palette: Crimson (#9E0C17) on White & Dark Slate (#0f172a)
   ========================================================================== */

:root {
  --prod-crimson: #9E0C17;
  --prod-crimson-hover: #800a12;
  --prod-crimson-soft: #fff5f5;
  --prod-crimson-border: #fee2e2;
  --prod-ink: #0f172a;
  --prod-slate: #334155;
  --prod-muted: #475569;
  --prod-subtle: #64748b;
  --prod-placeholder: #94a3b8;
  --prod-border: #e8e8e8;
  --prod-border-hover: #cbd5e1;
  --prod-line: #f1f5f9;
  --prod-bg: #ffffff;
  --prod-surface: #fafafa;
}

.product-page,
.product-page *,
.product-page *::before,
.product-page *::after {
  box-sizing: border-box;
}

.product-page {
  background: var(--prod-bg);
  color: var(--prod-ink);
  overflow-x: hidden;
  font-family: inherit;
}

/* --------------------------------------------------------------------------
   1. HERO SECTION
   -------------------------------------------------------------------------- */
.product-hero {
  background: #ffffff;
  border-bottom: 1px solid var(--prod-line);
  padding: clamp(56px, 7vw, 88px) 0 clamp(48px, 6vw, 72px);
}

.product-hero__container {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: clamp(36px, 5vw, 64px);
  align-items: center;
}

.product-hero__content {
  max-width: 640px;
}

/* Eyebrow Pill */
.product-hero__eyebrow-wrap {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  padding: 6px 14px 6px 10px;
  border-radius: 9999px;
  background: var(--prod-crimson-soft);
  border: 1px solid var(--prod-crimson-border);
}

.product-hero__sparkle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  color: var(--prod-crimson);
}

.product-hero__sparkle svg {
  width: 100%;
  height: 100%;
}

.product-hero__eyebrow {
  color: var(--prod-crimson);
  font-size: 11.5px;
  font-weight: 850;
  letter-spacing: 0.08em;
  line-height: 1.2;
  text-transform: uppercase;
}

/* Title & Lead */
.product-hero__title {
  margin: 0 0 16px;
  color: var(--prod-ink);
  font-size: clamp(2.2rem, 3.8vw, 3.4rem);
  font-weight: 850;
  letter-spacing: -0.04em;
  line-height: 1.15;
}

.product-hero__title-accent {
  color: var(--prod-crimson);
}

.product-hero__desc {
  margin: 0 0 28px;
  color: var(--prod-muted);
  font-size: 16px;
  line-height: 1.68;
}

/* Modern Search Box */
.product-hero__search {
  position: relative;
  margin-top: 24px;
}

.product-hero__search-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #ffffff;
  border: 1.5px solid var(--prod-border);
  border-radius: 9999px;
  padding: 6px 8px 6px 18px;
  box-shadow: 0 4px 18px rgb(15 23 42 / 0.04);
  transition: border-color 180ms ease, box-shadow 180ms ease;
}

.product-hero__search-bar:focus-within {
  border-color: var(--prod-crimson);
  box-shadow: 0 0 0 3.5px rgb(158 12 23 / 0.12);
}

.product-hero__search-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  color: var(--prod-placeholder);
  flex-shrink: 0;
}

.product-hero__search-icon svg {
  width: 100%;
  height: 100%;
}

.product-hero__search-input {
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  padding: 10px 8px;
  color: var(--prod-ink);
  font-family: inherit;
  font-size: 15px;
  font-weight: 500;
  outline: none;
}

.product-hero__search-input::placeholder {
  color: var(--prod-placeholder);
  font-weight: 400;
}

.product-hero__search-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 44px;
  padding: 0 22px;
  border-radius: 9999px;
  border: none;
  background: var(--prod-crimson);
  color: #ffffff;
  font-family: inherit;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 180ms ease, transform 180ms ease;
}

.product-hero__search-btn:hover {
  background: var(--prod-crimson-hover);
  transform: translateY(-1px);
}

.product-hero__search-clear {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  color: var(--prod-crimson);
  font-size: 13px;
  font-weight: 750;
  text-decoration: none;
  transition: color 160ms ease;
}

.product-hero__search-clear:hover {
  text-decoration: underline;
}

/* Hero Visual */
.product-hero__visual {
  position: relative;
}

.product-hero__image-card {
  position: relative;
  border-radius: 24px;
  border: 1px solid var(--prod-border);
  overflow: hidden;
  background: #ffffff;
  box-shadow: 0 12px 32px rgb(15 23 42 / 0.06);
  aspect-ratio: 4 / 3;
}

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

.product-hero__trust-badge {
  position: absolute;
  bottom: -16px;
  left: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 18px;
  background: #ffffff;
  border: 1px solid var(--prod-border);
  border-radius: 16px;
  box-shadow: 0 8px 24px rgb(15 23 42 / 0.08);
  max-width: 320px;
}

.product-hero__trust-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--prod-crimson-soft);
  border: 1px solid var(--prod-crimson-border);
  color: var(--prod-crimson);
  flex-shrink: 0;
}

.product-hero__trust-icon svg {
  width: 20px;
  height: 20px;
}

.product-hero__trust-text strong {
  display: block;
  color: var(--prod-ink);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.25;
}

.product-hero__trust-text span {
  display: block;
  color: var(--prod-muted);
  font-size: 12px;
  line-height: 1.4;
}

/* --------------------------------------------------------------------------
   2. CATEGORY TABS BAR
   -------------------------------------------------------------------------- */
.product-tabs-section {
  background: #ffffff;
  padding: 24px 0 0;
  border-bottom: 1px solid var(--prod-line);
}

.product-tabs-nav {
  display: flex;
  align-items: center;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 20px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.product-tabs-nav::-webkit-scrollbar {
  display: none;
}

.product-tab-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 20px;
  border-radius: 9999px;
  background: #ffffff;
  border: 1.5px solid var(--prod-border);
  color: var(--prod-slate);
  font-size: 13.5px;
  font-weight: 750;
  text-decoration: none;
  white-space: nowrap;
  transition: all 180ms ease;
  cursor: pointer;
}

.product-tab-pill:hover {
  border-color: var(--prod-border-hover);
  color: var(--prod-ink);
  background: var(--prod-surface);
}

.product-tab-pill.is-active {
  background: var(--prod-crimson);
  border-color: var(--prod-crimson);
  color: #ffffff;
  box-shadow: 0 4px 14px rgb(158 12 23 / 0.2);
}

/* --------------------------------------------------------------------------
   3. CATALOG GRID SECTION
   -------------------------------------------------------------------------- */
.product-catalog {
  background: var(--prod-surface);
  padding: clamp(56px, 7vw, 88px) 0;
}

.product-catalog__header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: clamp(36px, 5vw, 48px);
}

.product-catalog__intro {
  max-width: 680px;
}

.product-catalog__eyebrow {
  margin: 0 0 10px;
  color: var(--prod-crimson);
  font-size: 13px;
  font-weight: 850;
  letter-spacing: 0.1em;
  line-height: 1.2;
  text-transform: uppercase;
}

.product-catalog__title {
  margin: 0 0 12px;
  color: var(--prod-ink);
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  font-weight: 850;
  letter-spacing: -0.035em;
  line-height: 1.2;
}

.product-catalog__lead {
  margin: 0;
  color: var(--prod-muted);
  font-size: 15px;
  line-height: 1.6;
}

.product-catalog__pricing-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 20px;
  border-radius: 9999px;
  background: #ffffff;
  border: 1.5px solid var(--prod-border);
  color: var(--prod-ink);
  font-size: 13.5px;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
  transition: all 180ms ease;
  flex-shrink: 0;
}

.product-catalog__pricing-link:hover {
  border-color: var(--prod-crimson);
  color: var(--prod-crimson);
  transform: translateY(-1px);
}

/* Product Cards Grid */
.product-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(24px, 3vw, 32px);
  list-style: none;
  padding: 0;
  margin: 0;
}

.product-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: #ffffff;
  border: 1px solid var(--prod-border);
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgb(15 23 42 / 0.04);
  transition: transform 220ms ease, box-shadow 220ms ease, border-color 220ms ease;
}

.product-card:hover {
  transform: translateY(-4px);
  border-color: var(--prod-border-hover);
  box-shadow: 0 16px 36px rgb(15 23 42 / 0.08);
}

.product-card__link {
  display: flex;
  flex-direction: column;
  height: 100%;
  text-decoration: none;
  color: inherit;
}

/* Image Thumbnail */
.product-card__thumb {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #f8fafc;
  margin: 0;
}

.product-card__thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 360ms cubic-bezier(0.16, 1, 0.3, 1);
}

.product-card:hover .product-card__thumb img {
  transform: scale(1.04);
}

.product-card__badge {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 2;
  border-radius: 8px;
  padding: 5px 12px;
  background: rgb(15 23 42 / 0.82);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #ffffff;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* Card Body */
.product-card__body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 22px 24px;
}

.product-card__meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  font-size: 12px;
  font-weight: 700;
  color: var(--prod-subtle);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.product-card__sku {
  display: inline-flex;
  padding: 2px 8px;
  background: var(--prod-line);
  border-radius: 6px;
  color: var(--prod-slate);
}

.product-card__title {
  margin: 0 0 10px;
  color: var(--prod-ink);
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.35;
  transition: color 160ms ease;
}

.product-card:hover .product-card__title {
  color: var(--prod-crimson);
}

.product-card__desc {
  margin: 0 0 20px;
  color: var(--prod-muted);
  font-size: 14px;
  line-height: 1.6;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Card Footer */
.product-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 16px;
  border-top: 1px solid var(--prod-line);
}

.product-card__price {
  font-size: 15px;
  font-weight: 850;
  color: var(--prod-crimson);
}

.product-card__action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--prod-ink);
  font-size: 13.5px;
  font-weight: 800;
  transition: color 160ms ease;
}

.product-card__action-arrow {
  display: inline-block;
  transition: transform 180ms ease;
}

.product-card:hover .product-card__action {
  color: var(--prod-crimson);
}

.product-card:hover .product-card__action-arrow {
  transform: translateX(4px);
}

/* --------------------------------------------------------------------------
   4. EMPTY & PAGINATION STATES
   -------------------------------------------------------------------------- */
.product-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: #ffffff;
  border: 1px solid var(--prod-border);
  border-radius: 24px;
  padding: clamp(48px, 8vw, 72px) 24px;
  max-width: 640px;
  margin: 0 auto;
}

.product-empty__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border-radius: 18px;
  background: var(--prod-crimson-soft);
  border: 1px solid var(--prod-crimson-border);
  color: var(--prod-crimson);
  margin-bottom: 20px;
}

.product-empty__icon svg {
  width: 32px;
  height: 32px;
}

.product-empty__title {
  margin: 0 0 10px;
  color: var(--prod-ink);
  font-size: 22px;
  font-weight: 850;
  letter-spacing: -0.02em;
}

.product-empty__desc {
  margin: 0 0 24px;
  color: var(--prod-muted);
  font-size: 15px;
  line-height: 1.6;
  max-width: 440px;
}

.product-empty__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 26px;
  border-radius: 9999px;
  background: var(--prod-crimson);
  border: 1.5px solid var(--prod-crimson);
  color: #ffffff;
  font-size: 14.5px;
  font-weight: 800;
  text-decoration: none;
  transition: all 180ms ease;
}

.product-empty__btn:hover {
  background: var(--prod-crimson-hover);
  transform: translateY(-2px);
}

.product-pagination {
  display: flex;
  justify-content: center;
  margin-top: clamp(40px, 6vw, 56px);
}

.product-pagination__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 28px;
  border-radius: 9999px;
  background: #ffffff;
  border: 1.5px solid var(--prod-crimson);
  color: var(--prod-crimson);
  font-size: 14.5px;
  font-weight: 800;
  text-decoration: none;
  transition: all 180ms ease;
}

.product-pagination__btn:hover {
  background: var(--prod-crimson-soft);
  transform: translateY(-2px);
}

/* --------------------------------------------------------------------------
   5. RESPONSIVE BREAKPOINTS
   -------------------------------------------------------------------------- */
@media (max-width: 1024px) {
  .product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .product-hero__container {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .product-hero__content {
    max-width: 100%;
  }

  .product-hero__visual {
    max-width: 580px;
  }
}

@media (max-width: 640px) {
  .product-hero {
    padding: 40px 0 44px;
  }

  .product-hero__title {
    font-size: clamp(2rem, 8vw, 2.6rem);
  }

  .product-hero__desc {
    font-size: 14.5px;
  }

  .product-hero__search-bar {
    flex-direction: column;
    align-items: stretch;
    border-radius: 18px;
    padding: 10px;
    gap: 10px;
  }

  .product-hero__search-input {
    padding: 8px 6px;
  }

  .product-hero__search-btn {
    width: 100%;
    min-height: 44px;
    border-radius: 12px;
  }

  .product-hero__trust-badge {
    position: static;
    margin-top: 14px;
    max-width: 100%;
  }

  .product-catalog__header {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  .product-catalog__pricing-link {
    width: 100%;
    justify-content: center;
  }

  .product-grid {
    grid-template-columns: 1fr;
  }

  .product-card__thumb {
    aspect-ratio: 16 / 10;
  }
}

@media (prefers-reduced-motion: reduce) {
  .product-page *,
  .product-page *::before,
  .product-page *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
