:root {
  --teal: #1f6b6b;
  --teal-soft: #2f8c8c;
  --yellow: #f7c948;
  --bg: #f5f7f7;
  --text: #1f2326;
  --muted: #6e7a7a;
  --border: #e3e7e7;
  --surface: #ffffff;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}


img {
  max-width: 100%;
  display: block;
}


.product-page {
  padding: 16px 16px 28px;
  max-width: 1260px;
  margin: 0 auto;
}

.product-page.product-page--with-related {
  padding-bottom: 28px;
}

.product-main {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.product-details {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.product-header {
  position: sticky;
  top: 0;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  margin: 0 -16px 12px;
  background: var(--surface);
  box-shadow: 0 8px 28px rgba(16, 50, 50, 0.08);
  border-bottom: 1px solid var(--border);
}

.header-back,
.header-favorite {
  border: none;
  background: #f3f7f7;
  color: var(--text);
  font-size: 18px;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  cursor: pointer;
}

.header-title {
  flex: 1;
  margin: 0 12px;
  font-weight: 600;
  color: var(--text);
  font-size: 16px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.header-favorite.is-active {
  background: #ffecec;
  color: #d72638;
}

.media-gallery {
  margin: 0 -16px;
  background: var(--surface);
}

.mobile-carousel {
  display: block;
}

.desktop-gallery {
  display: none;
}

.carousel {
  position: relative;
  overflow: hidden;
  height: clamp(300px, 62vh, 420px);
}

.carousel__track {
  display: flex;
  height: 100%;
  transform: translateX(0);
  transition: transform 0.35s ease;
}

.carousel__slide {
  min-width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #eff4f4;
}

.carousel__slide img {
  height: 100%;
  width: 100%;
  object-fit: cover;
}

.carousel__indicator {
  position: absolute;
  bottom: 14px;
  right: 14px;
  background: rgba(31, 35, 38, 0.78);
  color: #fff;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 13px;
  letter-spacing: 0.02em;
}

.desktop-gallery {
  position: relative;
  display: none;
  grid-template-columns: 96px 1fr;
  gap: 16px;
  align-items: stretch;
}

.desktop-thumbs {
  display: grid;
  gap: 12px;
  align-content: start;
  max-height: clamp(420px, 65vh, 560px);
  padding-right: 4px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(31, 107, 107, 0.35) transparent;
  padding-top: 4%;
}

.desktop-thumb {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 6px;
  width: 100%;
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f6faf9;
  cursor: pointer;
  transition: border 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.desktop-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 10px;
}

.desktop-thumb.is-active {
  border-color: var(--teal);
  box-shadow: 0 8px 24px rgba(31, 107, 107, 0.2);
  transform: translateY(-2px);
}

.desktop-stage {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  background: linear-gradient(135deg, #f0f4f4, #ffffff);
  border: 1px solid var(--border);
  box-shadow: 0 16px 36px rgba(16, 50, 50, 0.08);
}

.desktop-stage img {
  width: 100%;
  height: 100%;
  min-height: 520px;
  object-fit: cover;
  transition: transform 0.45s ease;
}

.desktop-stage:hover img {
  transform: scale(1.05);
}

.desktop-zoom-hint {
  position: absolute;
  right: 16px;
  bottom: 16px;
  background: rgba(31, 35, 38, 0.76);
  color: #fff;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 12px;
  letter-spacing: 0.01em;
}

.product-info {
  padding: 12px 0 6px;
}

.info-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
}

.product-category {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 13px;
  letter-spacing: 0.01em;
}

.product-rating {
  margin: 0;
  font-weight: 700;
  color: var(--text);
  font-size: 14px;
}

.product-name {
  margin: 0 0 10px;
  font-size: clamp(24px, 5vw, 32px);
  line-height: 1.2;
}

.price-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.availability {
  margin: 6px 0 0;
  color: var(--teal);
  font-weight: 600;
  font-size: 14px;
}

.price-values {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.current-price {
  font-size: 26px;
  font-weight: 700;
  color: var(--text);
}

.old-price {
  font-size: 15px;
  color: var(--muted);
  text-decoration: line-through;
}

.badges {
  display: flex;
  gap: 8px;
  align-items: center;
}

.badge {
  position: static;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 10px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 12px;
}

.badge--discount {
  background: var(--yellow);
  color: #1f2326;
}

.badge--new {
  background: #e1f4f4;
  color: var(--teal);
}

.picker {
  background: var(--surface);
  border-radius: 16px;
  padding: 14px 16px 16px;
  border: 1px solid var(--border);
  margin-bottom: 14px;
}

.picker--inline {
  margin-bottom: 0;
  flex: 1;
}

.picker__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.picker__title {
  margin: 0;
  font-weight: 600;
}

.picker__hint {
  margin: 0;
  font-size: 13px;
  color: var(--teal);
}

.picker__hint--muted {
  color: var(--muted);
}

.size-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.size-chip {
  border: 1px solid var(--border);
  background: #f5f8f8;
  border-radius: 12px;
  min-width: 64px;
  height: 44px;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  cursor: pointer;
  color: var(--text);
  letter-spacing: 0.01em;
  box-shadow: 0 2px 7px rgba(16, 50, 50, 0.06);
  transition: border 0.2s ease, background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.size-chip.is-selected {
  background: var(--teal);
  color: #fff;
  border-color: var(--teal);
  box-shadow: 0 8px 18px rgba(31, 107, 107, 0.28);
}

.size-chip:not(.is-disabled):hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(16, 50, 50, 0.14);
}

.size-chip.is-disabled {
  opacity: 0.45;
  cursor: not-allowed;
  text-decoration: line-through;
}

.size-warning {
  margin: 8px 0 0;
  color: #d32f2f;
  font-size: 13px;
  min-height: 16px;
}

.color-grid {
  display: flex;
  gap: 12px;
  align-items: center;
}

.color-dot {
  --dot-size: 38px;
  width: var(--dot-size);
  height: var(--dot-size);
  border-radius: 50%;
  border: 2px solid transparent;
  background: var(--dot-color);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.6);
}

.color-dot__check {
  color: #fff;
  font-size: 14px;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.color-dot.is-selected {
  border-color: var(--teal);
  box-shadow: 0 0 0 4px rgba(31, 107, 107, 0.16);
}

.color-dot.is-selected .color-dot__check {
  opacity: 1;
}

.description {
  margin-bottom: 16px;
}

.description--desktop {
  display: none;
}

.description-card {
  background: var(--surface);
  border-radius: 18px;
  border: 1px solid var(--border);
  padding: 16px;
  box-shadow: 0 10px 26px rgba(16, 50, 50, 0.05);
}

.description-card summary {
  list-style: none;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.description-card summary::-webkit-details-marker {
  display: none;
}

.description-card[open] summary::after {
  content: "–";
}

.description-card summary::after {
  content: "+";
  font-size: 20px;
  color: var(--muted);
}

.description ul {
  list-style: disc;
  padding-left: 20px;
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.panel-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 6px 0 10px;
}

.picker__header--inline {
  align-items: center;
  gap: 10px;
}

.quantity-control {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: #f7fbfb;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 12px;
  font-weight: 700;
}

.quantity-btn {
  border: none;
  background: transparent;
  font-size: 18px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  cursor: pointer;
  color: var(--text);
  transition: background 0.2s ease;
}

.quantity-btn:hover {
  background: #e8f2f2;
}

.ghost-icon {
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 14px;
  width: 56px;
  height: 56px;
  font-size: 22px;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(16, 50, 50, 0.08);
}

.ghost-icon.is-active {
  border-color: #ff5a5f;
  color: #ff5a5f;
  background: #fff6f6;
}

.primary-actions {
  display: none;
  gap: 12px;
  margin: 10px 0 6px;
}

.benefits {
  display: grid;
  gap: 10px;
  margin: 6px 0 8px;
}

.benefit {
  background: #f0f6f6;
  border-radius: 14px;
  padding: 12px 14px;
  font-weight: 600;
  color: var(--text);
  border: 1px solid var(--border);
}

.extended-info {
  display: grid;
  gap: 16px;
  margin-top: 10px;
  padding: 4px 0 12px;
}

.extended-info__block {
  background: var(--surface);
  border-radius: 18px;
  padding: 16px;
  border: 1px solid var(--border);
  box-shadow: 0 12px 30px rgba(16, 50, 50, 0.05);
}

.extended-info__block h2 {
  margin: 0 0 8px;
}

.extended-info__block p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.actions {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(180deg, rgba(245, 247, 247, 0.88) 0%, #f5f7f7 60%, #fff 100%);
  padding: 12px 16px 16px;
  border-top: 1px solid var(--border);
  box-shadow: 0 -12px 28px rgba(16, 50, 50, 0.08);
}

.actions__note {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 10px;
}

.actions__buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.action-btn {
  border: none;
  border-radius: 12px;
  padding: 14px 16px;
  font-weight: 700;
  font-size: 16px;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.2s ease;
  background: var(--teal);
  color: #fff;
  box-shadow: 0 12px 28px rgba(31, 107, 107, 0.22);
}

.action-btn--full {
  width: 100%;
}

.action-btn:active {
  transform: translateY(1px);
}

.action-btn--ghost {
  background: #fff;
  color: var(--teal);
  border: 1px solid var(--teal);
  box-shadow: none;
}

.toast {
  position: fixed;
  bottom: 88px;
  left: 50%;
  transform: translateX(-50%) translateY(30px);
  background: var(--text);
  color: #fff;
  padding: 12px 18px;
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.15);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
  font-weight: 600;
}

.toast.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.other-products {
  margin: 22px auto 32px;
  max-width: 1260px;
  padding: 0 16px;
}

.other-products__header h2 {
  margin: 0;
  font-size: clamp(20px, 3vw, 28px);
}

.other-products__header p {
  margin: 6px 0 0;
  color: var(--muted);
}

.other-products__grid {
  margin-top: 14px;
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.other-product-card {
  position: relative;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  overflow: hidden;
  box-shadow: 0 8px 20px rgba(16, 50, 50, 0.06);
}

.other-product-card__link {
  position: absolute;
  inset: 0;
  z-index: 2;
}

.other-product-card__image {
  position: relative;
  aspect-ratio: 1/1;
  background: #f2f7f7;
}

.other-product-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.other-product-card__badge {
  position: absolute;
  top: 8px;
  right: 8px;
  background: var(--yellow);
  color: #1f2326;
  font-size: 10px;
  font-weight: 700;
  border-radius: 999px;
  padding: 4px 7px;
}

.other-product-card__body {
  padding: 10px 10px 12px;
}

.other-product-card__name {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.other-product-card__price {
  margin: 6px 0 0;
  font-size: 15px;
  font-weight: 700;
  color: var(--teal);
}

@media (max-width: 1023px) {
  .main-header {
    display: none;
  }

  .orders-footer {
    display: none;
  }
}

@media (min-width: 768px) {
  body {
    background: linear-gradient(180deg, #eaf1f1 0%, #f5f7f7 30%);
  }

  .product-page {
    padding: 20px 24px 32px;
  }

  .product-page.product-page--with-related {
    padding-bottom: 32px;
  }

  .product-header {
    margin: 12px auto 16px;
    max-width: 640px;
    border-radius: 18px;
  }

  .media-gallery {
    margin: 0;
    border-radius: 18px;
    overflow: hidden;
  }

  .carousel {
    height: clamp(420px, 65vh, 560px);
  }


  .other-products {
    padding: 0 24px;
  }

  .other-products__grid {
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 16px;
  }

  .actions {
    left: 50%;
    transform: translateX(-50%);
    max-width: 640px;
  }
}

@media (min-width: 1024px) {

  .other-products {
    margin-top: 28px;
  }

  .other-products__grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .product-page {
    padding: 28px 24px 36px;
  }

  .product-main {
    display: grid;
    grid-template-columns: minmax(480px, 1.05fr) minmax(420px, 0.95fr);
    align-items: start;
    gap: 26px;
    grid-template-areas:
      "media details"
      "description details";
  }

  .media-gallery {
    box-shadow: none;
    grid-area: media;
  }

  .mobile-carousel {
    display: none;
  }

  .desktop-gallery {
    display: grid;
    padding: 3%;

  }

  .product-details {
    position: sticky;
    top: 82px;
    grid-area: details;
  }

  .product-header {
    max-width: 1180px;
  }

  .actions {
    display: none;
  }

  .primary-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .description-card {
    padding: 18px 20px 20px;
  }

  .description--desktop {
    display: block;
    grid-area: description;
  }

  .description--mobile {
    display: none;
  }

  .extended-info {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
  }
}
