/* Web mağazası — ürün kartları ve görseller (merkezi StorageBox API) */

.shop-product-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(1, minmax(0, 1fr));
}

@media (min-width: 640px) {
  .shop-product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.1rem;
  }
}

@media (min-width: 1024px) {
  .shop-product-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1.25rem;
  }
}

@media (min-width: 1024px) {
  .shop-product-card__media {
    min-height: 17.5rem;
  }
}

@media (min-width: 1280px) {
  .shop-product-grid {
    gap: 1.35rem;
  }

  .shop-product-card__media {
    min-height: 19rem;
  }
}

.shop-product-card {
  overflow: hidden;
  border-radius: 1.1rem;
  border: 1px solid rgb(226 232 240 / 0.9);
  background: rgb(255 255 255);
  box-shadow:
    0 2px 8px rgb(15 23 42 / 0.05),
    0 10px 28px rgb(15 23 42 / 0.07);
  transition: box-shadow 0.28s ease, transform 0.28s ease, border-color 0.28s ease;
  display: flex;
  flex-direction: column;
}

.shop-product-card--has-image {
  border-color: rgb(226 232 240);
  box-shadow:
    0 4px 14px rgb(15 23 42 / 0.07),
    0 16px 36px rgb(15 23 42 / 0.1);
}

.shop-product-card--no-image {
  opacity: 0.88;
  box-shadow: 0 2px 6px rgb(15 23 42 / 0.04);
}

.shop-product-card--no-image .shop-product-card__media {
  background: linear-gradient(160deg, rgb(248 250 252), rgb(241 245 249));
}

:where([data-theme="dark"]) .shop-product-card {
  border-color: rgb(30 41 59);
  background: rgb(15 23 42 / 0.72);
  box-shadow: 0 1px 3px rgb(0 0 0 / 0.25);
}

.shop-product-card:hover {
  transform: translateY(-5px);
  box-shadow:
    0 8px 20px rgb(15 23 42 / 0.08),
    0 22px 48px rgb(15 23 42 / 0.14);
  border-color: color-mix(in srgb, var(--shop-primary, var(--tenant-primary, #f27a1a)) 35%, rgb(226 232 240));
}

.shop-product-card--has-image:hover {
  box-shadow:
    0 10px 24px rgb(15 23 42 / 0.1),
    0 28px 56px rgb(15 23 42 / 0.16),
    0 0 0 1px color-mix(in srgb, var(--shop-primary, #f27a1a) 18%, transparent);
}

:where([data-theme="dark"]) .shop-product-card:hover {
  border-color: color-mix(in srgb, var(--tenant-primary, #0284c7) 40%, rgb(30 41 59));
  box-shadow: 0 12px 28px rgb(0 0 0 / 0.35);
}

.shop-product-card__media {
  position: relative;
  aspect-ratio: 1 / 1;
  min-height: 15rem;
  background: linear-gradient(165deg, rgb(255 255 255), rgb(250 252 255) 40%, rgb(241 245 249));
  border-bottom: 1px solid rgb(241 245 249);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.35rem;
  overflow: hidden;
}

.shop-product-card--has-image .shop-product-card__media {
  background:
    radial-gradient(ellipse 85% 75% at 50% 42%, rgb(255 255 255) 0%, rgb(248 250 252) 55%, rgb(241 245 249) 100%);
}

.shop-product-card--has-image .shop-product-card__media::before {
  content: "";
  position: absolute;
  inset: 8%;
  border-radius: 1rem;
  background: rgb(255 255 255 / 0.65);
  box-shadow:
    inset 0 1px 0 rgb(255 255 255 / 0.9),
    0 12px 32px rgb(15 23 42 / 0.1),
    0 4px 12px rgb(15 23 42 / 0.06);
  z-index: 0;
  pointer-events: none;
}

.shop-product-card--has-image .shop-product-card__media-stage {
  position: relative;
  z-index: 1;
  isolation: isolate;
}

.shop-product-card__media-stage {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.38s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
}

.shop-product-card:hover .shop-product-card__media-stage {
  transform: scale(1.06) translateY(-3px);
}

.shop-product-card--has-image:hover .shop-product-card__media::before {
  box-shadow:
    inset 0 1px 0 rgb(255 255 255 / 0.95),
    0 18px 42px rgb(15 23 42 / 0.14),
    0 6px 16px rgb(15 23 42 / 0.08);
}

:where([data-theme="dark"]) .shop-product-card__media {
  background: linear-gradient(145deg, rgb(30 41 59), rgb(15 23 42));
  border-bottom-color: rgb(30 41 59);
}

.shop-product-photo.znf-product-photo {
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  border-radius: 0.85rem;
  border: 0;
  background: transparent;
  font-size: 2.5rem;
  box-shadow: 0 10px 28px rgb(15 23 42 / 0.08);
  transition: box-shadow 0.32s ease;
}

.shop-product-card:hover .shop-product-photo.znf-product-photo {
  box-shadow: 0 16px 40px rgb(15 23 42 / 0.14);
}

:where([data-theme="dark"]) .shop-product-photo.znf-product-photo {
  border-color: rgb(51 65 85);
  background: rgb(15 23 42);
}

.shop-product-photo.znf-product-photo--has-img img {
  object-fit: contain;
  padding: 0.5rem;
  transform-origin: center center;
  transition: transform 0.38s cubic-bezier(0.22, 1, 0.36, 1);
}

.shop-product-card:hover .shop-product-photo.znf-product-photo--has-img img.shop-card-gallery__img.is-active {
  transform: scale(1.06);
}

/* Kart galerisi — hover ile sağa/sola geçiş */
.shop-card-gallery {
  position: relative;
  width: 100%;
  height: 100%;
  border: 0;
  background: transparent;
  padding: 0;
  cursor: zoom-in;
  overflow: hidden;
  border-radius: inherit;
}

.shop-card-gallery__stack {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 10rem;
}

.shop-card-gallery__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 0.35rem;
  opacity: 0;
  transform: scale(0.96);
  filter: drop-shadow(0 8px 16px rgb(15 23 42 / 0.12));
  transition:
    opacity 0.22s ease,
    transform 0.32s cubic-bezier(0.22, 1, 0.36, 1),
    filter 0.32s ease;
  pointer-events: none;
}

.shop-card-gallery__img.is-active {
  opacity: 1;
  transform: scale(1);
  z-index: 1;
  filter: drop-shadow(0 12px 24px rgb(15 23 42 / 0.16));
}

.shop-card-gallery--hover .shop-card-gallery__img.is-active {
  transform: scale(1.08);
  filter: drop-shadow(0 16px 32px rgb(15 23 42 / 0.2));
}

.shop-card-gallery__segments {
  position: absolute;
  top: 0.45rem;
  left: 0.45rem;
  right: 0.45rem;
  z-index: 3;
  display: flex;
  gap: 0.2rem;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.shop-card-gallery--hover .shop-card-gallery__segments,
.shop-card-gallery--many:focus-within .shop-card-gallery__segments {
  opacity: 1;
}

.shop-card-gallery__segments span {
  flex: 1;
  height: 0.18rem;
  border-radius: 999px;
  background: rgb(255 255 255 / 0.55);
  box-shadow: 0 0 0 1px rgb(15 23 42 / 0.08);
}

.shop-card-gallery__segments span.is-active {
  background: var(--shop-primary, var(--tenant-primary, #f27a1a));
  box-shadow: none;
}

.shop-card-gallery__hint {
  position: absolute;
  bottom: 0.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: rgb(71 85 105);
  background: rgb(255 255 255 / 0.92);
  border: 1px solid rgb(226 232 240);
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
}

.shop-card-gallery--hover .shop-card-gallery__hint {
  opacity: 1;
}

:where([data-theme="dark"]) .shop-card-gallery__hint {
  background: rgb(15 23 42 / 0.9);
  border-color: rgb(51 65 85);
  color: rgb(203 213 225);
}

.shop-card-gallery:focus-visible {
  outline: 2px solid var(--shop-primary, var(--tenant-primary, #f27a1a));
  outline-offset: 2px;
}

.shop-product-card__brand {
  position: absolute;
  top: 0.55rem;
  left: 0.55rem;
  z-index: 5;
  max-width: 5.5rem;
  padding: 0.2rem 0.35rem;
  border-radius: 0.5rem;
  background: rgb(255 255 255 / 0.95);
  border: 1px solid rgb(226 232 240);
  box-shadow: 0 4px 14px rgb(15 23 42 / 0.12);
  pointer-events: none;
}

:where([data-theme="dark"]) .shop-product-card__brand {
  background: rgb(15 23 42 / 0.88);
  border-color: rgb(51 65 85);
}

.shop-product-brand-logo.manufacturer-logo-cell {
  min-height: 2rem;
  padding: 0;
}

.shop-product-brand-logo .manufacturer-logo-img {
  max-height: 1.75rem;
  max-width: 4.75rem;
  object-fit: contain;
}

.shop-product-card__badge {
  position: absolute;
  top: 0.55rem;
  right: 0.55rem;
  z-index: 5;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.25rem 0.45rem;
  border-radius: 999px;
  box-shadow: 0 4px 14px rgb(15 23 42 / 0.14);
  pointer-events: none;
}

.shop-product-card__badge--out {
  background: rgb(254 226 226);
  color: rgb(185 28 28);
}

:where([data-theme="dark"]) .shop-product-card__badge--out {
  background: rgb(127 29 29 / 0.45);
  color: rgb(252 165 165);
}

.shop-product-card__body {
  padding: 0.75rem 0.9rem 0.95rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.shop-product-card__brand-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.45rem;
  min-height: 1.25rem;
}

.shop-product-card__brand-text {
  flex: 1;
  min-width: 0;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--tenant-primary, #0284c7);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.shop-product-card__title {
  margin-top: 0.2rem;
  font-size: 0.86rem;
  font-weight: 600;
  line-height: 1.35;
  color: rgb(15 23 42);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.35rem;
}

:where([data-theme="dark"]) .shop-product-card__title {
  color: rgb(248 250 252);
}

.shop-product-card__code-row {
  display: flex;
  align-items: center;
  margin-top: 0.45rem;
  padding: 0.35rem 0.45rem;
  border-radius: 0.5rem;
  background: rgb(248 250 252);
  border: 1px solid rgb(241 245 249);
}

:where([data-theme="dark"]) .shop-product-card__code-row {
  background: rgb(30 41 59 / 0.55);
  border-color: rgb(51 65 85);
}

.shop-product-card__sku {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.68rem;
  font-weight: 700;
  color: rgb(51 65 85);
  letter-spacing: 0.01em;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

:where([data-theme="dark"]) .shop-product-card__sku {
  color: rgb(226 232 240);
}

.shop-product-card__stars {
  flex-shrink: 0;
  margin-left: auto;
  justify-content: flex-end;
}

.shop-product-card__oem {
  margin-top: 0.2rem;
  font-size: 0.84rem;
  color: rgb(100 116 139);
}

.shop-product-card__oem .shop-code-copy {
  font-size: 0.88rem;
  font-weight: 700;
}

.shop-product-card__footer {
  margin-top: 0.85rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgb(241 245 249);
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.5rem;
}

:where([data-theme="dark"]) .shop-product-card__footer {
  border-top-color: rgb(30 41 59);
}

.shop-product-card__price {
  font-size: 1rem;
}

.shop-product-card__stock {
  margin-top: 0.2rem;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.72rem;
  color: rgb(100 116 139);
}

.shop-product-card__status {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.72rem;
  font-weight: 600;
  white-space: nowrap;
}

.shop-product-card__status--in {
  color: rgb(5 150 105);
}

.shop-product-card__status--out {
  color: rgb(239 68 68);
}

a.shop-product-card {
  display: block;
  text-decoration: none;
  color: inherit;
}

.shop-product-card__badge--sale {
  background: rgb(239 68 68);
  color: #fff;
}

.shop-product-card__list-price {
  display: block;
  font-size: 0.78rem;
  color: rgb(148 163 184);
  text-decoration: line-through;
}

.shop-product-card__rating {
  display: none;
}

/* Yıldız bileşeni */
.shop-stars {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.shop-stars__icons {
  display: inline-flex;
  align-items: center;
  gap: 0.05rem;
}

.shop-stars__icon {
  color: rgb(203 213 225);
  fill: transparent;
  stroke-width: 2;
}

.shop-stars__icon.is-on {
  color: rgb(245 158 11);
  fill: rgb(245 158 11);
}

.shop-stars--xs .shop-stars__icon {
  width: 0.72rem;
  height: 0.72rem;
}

.shop-stars--sm .shop-stars__icon {
  width: 0.82rem;
  height: 0.82rem;
}

.shop-stars--md .shop-stars__icon {
  width: 1rem;
  height: 1rem;
}

.shop-stars__value {
  font-size: 0.68rem;
  font-weight: 700;
  color: rgb(100 116 139);
  white-space: nowrap;
}

.shop-stars__value em {
  font-style: normal;
  font-weight: 500;
  color: rgb(148 163 184);
  margin-left: 0.15rem;
}

.shop-product-card__add {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  width: 100%;
  margin-top: 0.75rem;
  padding: 0.55rem;
  border: 0;
  border-radius: 0.55rem;
  background: var(--shop-primary, var(--tenant-primary, #f27a1a));
  color: #fff;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.15s ease, transform 0.15s ease, background 0.15s ease;
}

.shop-product-card:hover .shop-product-card__add,
.shop-product-card__add:focus-visible {
  opacity: 1;
  transform: translateY(0);
}

.shop-product-card__add.is-added {
  opacity: 1;
  transform: translateY(0);
  background: rgb(5 150 105);
}

.shop-product-card__add:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  background: rgb(148 163 184);
}

@media (max-width: 768px) {
  .shop-product-card__add {
    opacity: 1;
    transform: none;
  }
}
