@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800;900&display=swap');

/* ==========================================================================
   Kaptan Spor Modern Product Grid & Card Styling
   Based on product-grid-preview.html
   ========================================================================== */

:root {
  --ks-card-bg: #ffffff;
  --ks-card-border: #e5e5e5;
  --ks-card-border-hover: #111111;
  --ks-stage-bg: #ffffff;
  --ks-ink-primary: #09090b;
  --ks-ink-secondary: #525252;
  --ks-ink-muted: #71717a;
  --ks-accent-sale: #b91c1c;
  --ks-font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* Shop Grid Layout Overrides */
.wrapper-shop[data-grid="grid-4"],
.wrapper-shop.grid-layout {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 20px !important;
  padding: 0 !important;
}

@media (max-width: 1024px) {
  .wrapper-shop[data-grid="grid-4"],
  .wrapper-shop.grid-layout {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 16px !important;
  }
}

@media (max-width: 640px) {
  .wrapper-shop[data-grid="grid-4"],
  .wrapper-shop.grid-layout {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 12px !important;
  }
}

/* Product Card */
.product-card {
  display: flex !important;
  flex-direction: column !important;
  background-color: var(--ks-card-bg) !important;
  border: 1px solid var(--ks-card-border) !important;
  transition: border-color 0.2s ease, box-shadow 0.2s ease !important;
  position: relative !important;
  overflow: hidden !important;
  height: 100% !important;
  margin-bottom: 0 !important;
  font-family: var(--ks-font-sans) !important;
  box-sizing: border-box !important;
}

.product-card:hover {
  border-color: var(--ks-card-border-hover) !important;
}

/* Product Stage (Image Canvas) */
.product-stage {
  position: relative !important;
  width: 100% !important;
  aspect-ratio: 1 / 1 !important;
  background-color: var(--ks-stage-bg) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 16px !important;
  overflow: hidden !important;
  box-sizing: border-box !important;
}

@media (max-width: 640px) {
  .product-stage {
    padding: 10px !important;
  }
}

/* Badges (Top Left) */
.product-card-badge {
  position: absolute !important;
  top: 10px !important;
  left: 10px !important;
  z-index: 10 !important;
  font-size: 10px !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.05em !important;
  padding: 2.5px 8px !important;
  line-height: 1.35 !important;
  pointer-events: none !important;
  border-radius: 0 !important;
}

.product-badge-black {
  background-color: #000000 !important;
  color: #ffffff !important;
}

.product-badge-new {
  background-color: #000000 !important;
  color: #ffffff !important;
  letter-spacing: 0.08em !important;
}

.product-badge-sale {
  background-color: var(--ks-accent-sale) !important;
  color: #ffffff !important;
}

.product-badge-premium {
  background: #000000 !important;
  color: #facc15 !important;
  border: 1px solid #eab308 !important;
}

/* Product Stage Link & Images */
.product-stage-link {
  width: 100% !important;
  height: 100% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  text-decoration: none !important;
  position: relative !important;
}

.product-stage-img {
  max-width: 100% !important;
  max-height: 100% !important;
  width: auto !important;
  height: auto !important;
  object-fit: contain !important;
  mix-blend-multiply !important;
  transition: transform 0.3s ease-out, opacity 0.3s ease !important;
  display: block !important;
  margin: auto !important;
}

.product-card:hover .product-stage-img:not(.img-hover) {
  transform: scale(1.05) !important;
}

.product-card .img-hover {
  position: absolute !important;
  top: 50% !important;
  left: 50% !important;
  transform: translate(-50%, -50%) !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.product-card:hover .img-hover {
  opacity: 1 !important;
  transform: translate(-50%, -50%) scale(1.05) !important;
}

.product-grey-img {
  filter: grayscale(100%) !important;
  opacity: 0.55 !important;
}

/* Card Body */
.product-card-body {
  padding: 14px 16px !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: space-between !important;
  flex-grow: 1 !important;
  box-sizing: border-box !important;
}

@media (max-width: 640px) {
  .product-card-body {
    padding: 10px 12px !important;
  }
}

/* Price Row */
.product-price-row {
  display: flex !important;
  align-items: baseline !important;
  gap: 8px !important;
  flex-wrap: wrap !important;
  line-height: 1.2 !important;
  min-height: 24px !important;
}

.product-price-main {
  font-family: var(--ks-font-sans) !important;
  font-weight: 800 !important;
  font-size: 1.0625rem !important;
  letter-spacing: -0.025em !important;
  color: var(--ks-ink-primary) !important;
}

@media (max-width: 640px) {
  .product-price-main {
    font-size: 0.9375rem !important;
  }
}

.product-price-sale {
  color: var(--ks-accent-sale) !important;
}

.product-price-main span,
.product-price-main #item-price {
  font-family: inherit !important;
  font-weight: inherit !important;
  color: inherit !important;
  font-size: inherit !important;
}

.product-price-old {
  font-family: var(--ks-font-sans) !important;
  font-size: 0.8125rem !important;
  color: var(--ks-ink-muted) !important;
  text-decoration: line-through !important;
  font-weight: 500 !important;
}

.product-price-old span,
.product-price-old #item-price {
  font-family: inherit !important;
  font-weight: inherit !important;
  color: inherit !important;
  font-size: inherit !important;
  text-decoration: line-through !important;
}

/* Title */
.product-card-title {
  margin: 6px 0 0 0 !important;
  font-family: var(--ks-font-sans) !important;
  font-size: 0.875rem !important;
  font-weight: 700 !important;
  line-height: 1.35 !important;
  color: #18181b !important;
  display: -webkit-box !important;
  -webkit-line-clamp: 2 !important;
  -webkit-box-orient: vertical !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  min-height: 2.7em !important;
  max-height: 2.7em !important;
  word-break: break-word !important;
}

@media (max-width: 640px) {
  .product-card-title {
    font-size: 0.8125rem !important;
    margin-top: 4px !important;
    min-height: 2.7em !important;
    max-height: 2.7em !important;
  }
}

.product-card-title a {
  color: inherit !important;
  text-decoration: none !important;
}

.product-card:hover .product-card-title a {
  text-decoration: underline !important;
}

/* Bottom separator & footer info */
.product-card-footer {
  margin-top: 14px !important;
  padding-top: 10px !important;
  border-top: 1px solid #f4f4f5 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  font-family: var(--ks-font-sans) !important;
  font-size: 0.75rem !important;
  font-weight: 500 !important;
  gap: 6px !important;
}

.product-card-footer-left {
  display: inline-flex !important;
  align-items: center !important;
  color: var(--ks-ink-secondary) !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  line-height: 1 !important;
  min-height: 18px !important;
  max-width: 60% !important;
}

.product-card-brand-logo {
  height: 17px !important;
  max-width: 58px !important;
  width: auto !important;
  object-fit: contain !important;
  display: inline-block !important;
  vertical-align: middle !important;
  mix-blend-multiply !important;
  transition: transform 0.2s ease !important;
}

.product-card:hover .product-card-brand-logo {
  transform: scale(1.05) !important;
}

@media (max-width: 640px) {
  .product-card-footer {
    margin-top: 10px !important;
    padding-top: 8px !important;
    font-size: 0.6875rem !important;
    justify-content: space-between !important;
  }
  .product-card-footer-left {
    display: inline-flex !important;
    align-items: center !important;
    min-height: 16px !important;
    max-width: 55% !important;
  }
  .product-card-brand-logo {
    height: 14px !important;
    max-width: 44px !important;
  }
}

.product-card-footer-right {
  font-weight: 600 !important;
  white-space: nowrap !important;
  flex-shrink: 0 !important;
}

.product-card-footer-right.is-featured {
  color: var(--ks-ink-primary) !important;
}

.product-card-footer-right.is-sale {
  color: var(--ks-accent-sale) !important;
}

.product-card-footer-right.is-muted {
  color: var(--ks-ink-muted) !important;
}

/* Keyboard focus ring conforming to WCAG AA */
.focus-ring:focus-visible {
  outline: 2px solid #000000 !important;
  outline-offset: 2px !important;
}

/* ==========================================================================
   Out of Stock / Sold Out States (Crystal Clear Visual Indicators)
   ========================================================================== */

/* Top-Left Sold Out Badge */
.product-badge-soldout {
  background-color: #18181b !important;
  color: #ffffff !important;
  border: 1px solid #27272a !important;
  letter-spacing: 0.08em !important;
}

/* Sold Out Image Demarcation */
.product-card.is-sold-out .product-stage-img {
  filter: grayscale(100%) !important;
  opacity: 0.35 !important;
}

.product-card.is-sold-out:hover .product-stage-img {
  transform: none !important;
}

/* Center Sold Out Overlay & Pill */
.product-stage-soldout-overlay {
  position: absolute !important;
  inset: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  background-color: rgba(255, 255, 255, 0.45) !important;
  z-index: 4 !important;
  pointer-events: none !important;
}

.product-stage-soldout-pill {
  display: inline-flex !important;
  align-items: center !important;
  gap: 7px !important;
  background-color: rgba(24, 24, 27, 0.94) !important;
  color: #ffffff !important;
  font-family: var(--ks-font-sans) !important;
  font-size: 0.75rem !important;
  font-weight: 800 !important;
  letter-spacing: 0.08em !important;
  text-transform: uppercase !important;
  padding: 7px 14px !important;
  border-radius: 4px !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2) !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  backdrop-filter: blur(4px) !important;
}

.product-stage-soldout-pill .soldout-cross {
  font-size: 0.9375rem !important;
  font-weight: 900 !important;
  color: #ef4444 !important; /* Bold high-contrast red X */
  line-height: 1 !important;
}

@media (max-width: 640px) {
  .product-stage-soldout-pill {
    font-size: 0.6875rem !important;
    padding: 5px 10px !important;
    gap: 4px !important;
  }
  .product-stage-soldout-pill .soldout-cross {
    font-size: 0.8125rem !important;
  }
}

/* Sold Out Text & Price Dimming */
.product-card.is-sold-out .product-price-main {
  color: #a1a1aa !important;
  text-decoration: line-through !important;
}

.product-card.is-sold-out .product-card-title a {
  color: #71717a !important;
}

.product-card-footer-right.is-soldout {
  color: #dc2626 !important;
  font-weight: 700 !important;
}

