.product-page-main {
  padding: 1.2rem 0 3rem;
}

.header-main .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.9rem;
}

.header-user-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: nowrap;
}

.header-user-actions .action-btn {
  position: relative;
  flex-shrink: 0;
}

.product-alerts {
  margin-bottom: 1rem;
  display: grid;
  gap: 0.5rem;
}

.product-alert {
  padding: 0.7rem 0.9rem;
  border-radius: 12px;
  font-size: 0.86rem;
  font-weight: 600;
}

.product-alert-success {
  background: hsla(138, 56%, 44%, 0.16);
  color: hsl(138, 50%, 28%);
}

.product-alert-error {
  background: hsla(0, 78%, 58%, 0.12);
  color: hsl(0, 63%, 36%);
}

.product-hero-card {
  display: grid;
  grid-template-columns: 1.04fr 1fr;
  gap: 1.2rem;
  background: linear-gradient(180deg, hsla(0, 0%, 100%, 0.95), hsla(48, 100%, 95%, 0.95));
  border: 1px solid hsla(28, 62%, 72%, 0.26);
  border-radius: 26px;
  box-shadow: 0 26px 60px hsla(214, 40%, 15%, 0.09);
  padding: 1.2rem;
}

.main-photo-wrap {
  border-radius: 20px;
  overflow: hidden;
  aspect-ratio: 1 / 1;
  background: hsla(204, 100%, 96%, 1);
}

.gallery-top-badges {
  position: absolute;
  top: 0.9rem;
  left: 0.9rem;
  right: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  z-index: 3;
  pointer-events: none;
}

.gallery-count-badge,
.gallery-stock-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  padding: 0.45rem 0.7rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.86);
  color: hsl(220, 13%, 13%);
  font-size: 0.78rem;
  font-weight: 700;
  box-shadow: 0 10px 22px rgba(29, 32, 38, 0.08);
}

.gallery-mobile-tip {
  margin: 0.7rem 0 0;
  font-size: 0.82rem;
  color: hsl(219, 9%, 45%);
}

.main-photo-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.thumb-row {
  margin-top: 0.75rem;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.55rem;
}

.thumb-photo-btn {
  border: 1px solid transparent;
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  background: var(--white);
  aspect-ratio: 1 / 1;
}

.thumb-photo-btn img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.thumb-photo-btn.is-active,
.thumb-photo-btn:hover {
  border-color: hsl(213, 86%, 38%);
}

.product-category-pill {
  display: inline-block;
  margin: 0;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  background: hsla(208, 72%, 56%, 0.13);
  color: var(--eerie-black);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.product-info-area h1 {
  margin: 0.6rem 0 0.45rem;
  font-size: 1.7rem;
  color: var(--eerie-black);
}

.product-desc {
  margin: 0;
  color: var(--davys-gray);
  line-height: 1.65;
  font-size: 0.92rem;
}

.product-price-row {
  margin-top: 1rem;
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
}

.product-highlight-strip {
  margin-top: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.product-highlight-strip span {
  display: inline-flex;
  align-items: center;
  padding: 0.55rem 0.8rem;
  border-radius: 999px;
  background: hsl(40, 40%, 97%);
  color: hsl(219, 9%, 45%);
  font-size: 0.8rem;
  font-weight: 700;
}

.product-price-row strong {
  font-size: 1.5rem;
  color: var(--eerie-black);
}

.product-price-row del {
  color: var(--sonic-silver);
  font-size: 0.92rem;
}

.product-meta-grid {
  margin-top: 0.9rem;
  display: grid;
  gap: 0.35rem;
}

.product-meta-grid span {
  font-size: 0.82rem;
  color: var(--davys-gray);
}

.product-specs-block {
  margin-top: 1rem;
  padding: 0.85rem;
  border-radius: 16px;
  border: 1px solid hsla(28, 62%, 72%, 0.28);
  background: hsla(0, 0%, 100%, 0.78);
}

.product-specs-block h2 {
  margin: 0;
  font-size: 0.95rem;
}

.product-specs-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.product-specs-head span {
  color: hsl(219, 9%, 45%);
  font-size: 0.8rem;
  font-weight: 700;
}

.product-specs-groups {
  margin-top: 0.7rem;
  display: grid;
  gap: 0.65rem;
}

.product-specs-group {
  border: 1px solid hsla(214, 20%, 31%, 0.12);
  border-radius: 12px;
  padding: 0.65rem;
  background: hsla(0, 0%, 100%, 0.9);
}

.product-specs-group h3 {
  margin: 0;
  font-size: 0.82rem;
  color: var(--davys-gray);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.product-specs-group ul {
  margin: 0.45rem 0 0;
  padding-left: 1rem;
  display: grid;
  gap: 0.32rem;
}

.product-specs-group li {
  font-size: 0.82rem;
  color: var(--davys-gray);
  line-height: 1.5;
}

.product-cta-row {
  margin-top: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.review-section,
.similar-section {
  margin-top: 1.15rem;
  border: 1px solid hsla(28, 62%, 72%, 0.24);
  border-radius: 24px;
  background: hsla(0, 0%, 100%, 0.9);
  padding: 1.1rem;
}

.review-head {
  display: flex;
  justify-content: space-between;
  gap: 0.8rem;
  align-items: center;
}

.review-head h2,
.similar-section h2 {
  margin: 0;
  font-size: 1rem;
  color: var(--eerie-black);
}

.review-head p {
  margin: 0;
  color: var(--sonic-silver);
  font-size: 0.8rem;
}

.review-form-card {
  margin-top: 0.85rem;
  padding: 0.9rem;
  border-radius: 16px;
  background: hsla(208, 72%, 56%, 0.06);
}

.review-form-grid {
  display: grid;
  grid-template-columns: 1fr 180px;
  gap: 0.75rem;
}

.review-field {
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
}

.review-field.full,
.review-actions.full {
  grid-column: 1 / -1;
}

.review-field label {
  font-size: 0.8rem;
  color: var(--davys-gray);
  font-weight: 600;
}

.review-field input,
.review-field textarea,
.review-field select {
  border: 1px solid hsla(28, 62%, 72%, 0.4);
  border-radius: 10px;
  padding: 0.6rem 0.75rem;
  font-family: "Poppins", sans-serif;
  font-size: 0.88rem;
}

.rating-stars-picker {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.2rem;
  width: fit-content;
}

.rating-stars-picker input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.rating-stars-picker label {
  display: inline-block;
  cursor: pointer;
  font-size: 1.55rem;
  line-height: 1;
  color: hsl(0, 0%, 78%);
  transition: transform 0.15s ease, color 0.15s ease;
}

.rating-stars-picker label.is-active,
.rating-stars-picker label:hover {
  color: hsl(38, 96%, 43%);
}

.rating-stars-picker label:hover {
  transform: translateY(-1px);
}

.review-list {
  margin-top: 0.9rem;
  display: grid;
  gap: 0.6rem;
}

.review-item {
  border: 1px solid hsla(28, 62%, 72%, 0.26);
  border-radius: 14px;
  padding: 0.75rem;
  background: var(--white);
}

.review-item-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.65rem;
}

.review-client-head {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
}

.review-avatar {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, hsl(213, 86%, 38%), hsl(208, 72%, 56%));
  color: var(--white);
  font-weight: 700;
  font-size: 1rem;
}

.review-stars {
  color: hsl(38, 96%, 43%);
  letter-spacing: 0.08em;
}

.review-item p {
  margin: 0.4rem 0 0.35rem;
  color: var(--davys-gray);
  font-size: 0.85rem;
}

.review-item small,
.review-empty,
.review-closed {
  color: var(--sonic-silver);
  font-size: 0.78rem;
}

.review-closed {
  margin-top: 0.9rem;
  padding: 0.8rem;
  border-radius: 12px;
  background: hsla(28, 62%, 72%, 0.18);
}

.similar-grid {
  margin-top: 0.8rem;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
}

.similar-card {
  text-decoration: none;
  border: 1px solid hsla(28, 62%, 72%, 0.24);
  border-radius: 16px;
  overflow: hidden;
  background: var(--white);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.similar-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 30px hsla(214, 40%, 15%, 0.1);
}

.similar-card img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

.similar-card h3,
.similar-card p {
  margin: 0;
  padding: 0.45rem 0.6rem;
}

.similar-card h3 {
  color: var(--eerie-black);
  font-size: 0.82rem;
  line-height: 1.4;
}

.similar-card p {
  color: hsl(213, 86%, 38%);
  font-size: 0.8rem;
  font-weight: 700;
  padding-top: 0;
}

@media (max-width: 1024px) {
  .product-hero-card {
    grid-template-columns: 1fr;
  }

  .similar-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .header-main {
    padding: 0.35rem 0;
  }

  .header-logo strong {
    font-size: 1.06rem !important;
  }

  .header-user-actions {
    gap: 0.3rem;
  }

  .header-user-actions .action-btn {
    min-width: 42px;
    min-height: 42px;
  }

  .header-user-actions .auth-action-optional {
    display: none;
  }

  .review-form-grid {
    grid-template-columns: 1fr;
  }

  .review-item-head {
    flex-direction: column;
    align-items: flex-start;
  }

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

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

body {
  font-family: "Kumbh Sans", "Poppins", sans-serif;
  background: #fffdf9;
  color: hsl(220, 13%, 13%);
}

.header-main {
  border-bottom: 1px solid hsl(220, 14%, 90%);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
}

.header-main .container {
  min-height: 88px;
  gap: 1rem;
}

.header-logo {
  text-decoration: none;
}

.detail-top-nav {
  display: inline-flex;
  align-items: center;
  gap: 1.4rem;
  margin-right: auto;
  margin-left: 1.5rem;
}

.detail-top-nav a {
  text-decoration: none;
  color: hsl(219, 9%, 45%);
  font-weight: 500;
  transition: color 0.2s ease;
}

.detail-top-nav a:hover {
  color: hsl(220, 13%, 13%);
}

.header-user-actions .action-btn {
  width: 48px;
  height: 48px;
  border-radius: 999px;
  border: 1px solid hsl(220, 14%, 90%);
  background: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.header-user-actions .action-btn ion-icon {
  font-size: 1.2rem;
}

.product-page-main {
  padding: 2.2rem 0 3.5rem;
}

.product-hero-card {
  grid-template-columns: minmax(0, 1.05fr) minmax(360px, 0.95fr);
  gap: 3.5rem;
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0;
  border-radius: 0;
}

.main-photo-wrap {
  position: relative;
  border-radius: 28px;
  background: hsl(210, 100%, 97%);
  box-shadow: 0 28px 60px rgba(29, 32, 38, 0.08);
}

.main-photo-wrap img {
  object-fit: contain;
  padding: 1.25rem;
}

.detail-slide-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 46px;
  height: 46px;
  border: none;
  border-radius: 999px;
  background: #fff;
  color: hsl(220, 13%, 13%);
  box-shadow: 0 12px 24px rgba(29, 32, 38, 0.14);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 2;
}

.detail-slide-btn.prev { left: 1rem; }
.detail-slide-btn.next { right: 1rem; }

.thumb-row {
  margin-top: 1.25rem;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

.thumb-photo-btn {
  border-radius: 18px;
  background: hsl(210, 100%, 97%);
  border: 2px solid transparent;
  transition: opacity 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}

.thumb-photo-btn:hover {
  opacity: 0.9;
  transform: translateY(-2px);
}

.thumb-photo-btn.is-active,
.thumb-photo-btn:hover {
  border-color: hsl(213, 86%, 38%);
}

.product-category-pill {
  padding: 0;
  background: transparent;
  color: hsl(213, 86%, 38%);
  font-size: 0.86rem;
  letter-spacing: 0.16em;
}

.product-info-area h1 {
  margin-top: 1rem;
  font-size: clamp(2.1rem, 4vw, 2.9rem);
  line-height: 1.08;
}

.product-desc {
  margin-top: 1.2rem;
  font-size: 1rem;
  line-height: 1.8;
  color: hsl(219, 9%, 45%);
  white-space: pre-line;
}

.product-price-row {
  margin-top: 1.6rem;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}

.product-price-row strong {
  font-size: 1.95rem;
}

.product-price-row del {
  font-size: 1rem;
  font-weight: 700;
}

.product-meta-grid {
  margin-top: 1.2rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem;
}

.product-meta-grid span {
  padding: 1rem 1.1rem;
  border-radius: 18px;
  background: hsl(40, 40%, 97%);
  color: hsl(219, 9%, 45%);
  font-size: 0.92rem;
}

.product-meta-grid b {
  color: hsl(220, 13%, 13%);
}

.detail-qty-panel {
  margin-top: 1.2rem;
  display: inline-flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1rem 1.15rem;
  border-radius: 20px;
  background: hsl(40, 40%, 97%);
}

.detail-qty-panel > span {
  font-size: 0.86rem;
  color: hsl(219, 9%, 45%);
  font-weight: 700;
}

.detail-qty-controls {
  display: inline-flex;
  align-items: center;
  gap: 1rem;
}

.detail-qty-btn {
  width: 42px;
  height: 42px;
  border: none;
  border-radius: 14px;
  background: #fff;
  color: hsl(213, 86%, 38%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

#detail-qty-value {
  min-width: 20px;
  text-align: center;
  font-size: 1.05rem;
}

.product-specs-block {
  margin-top: 1.5rem;
  padding: 1.2rem;
  border-radius: 24px;
  border: 1px solid hsl(220, 14%, 90%);
  background: #fff;
}

.product-specs-block h2 {
  font-size: 1rem;
}

.product-specs-groups {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem;
}

.product-specs-group {
  border-radius: 18px;
  padding: 0.9rem 1rem;
}

.product-cta-row {
  margin-top: 1.6rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 0.9rem;
}

.product-cta-row .btn-add-cart,
.product-cta-row .btn-cart-add,
.product-cta-row .btn-affiliate,
.product-cta-row .btn-favorite {
  min-height: 56px;
  border-radius: 18px;
  font-weight: 700;
  font-family: "Kumbh Sans", sans-serif;
  justify-content: center;
}

.product-cta-row .btn-add-cart,
.product-cta-row .btn-cart-add {
  background: hsl(213, 86%, 38%);
  color: #fff;
  box-shadow: 0 18px 35px rgba(16, 84, 177, 0.25);
}

.product-cta-row .btn-affiliate {
  background: hsl(220, 13%, 13%);
  color: #fff;
}

.product-cta-row .btn-favorite {
  grid-column: 1 / -1;
  border: 1px solid hsl(220, 14%, 90%);
  background: #fff;
  color: hsl(220, 13%, 13%);
}

.review-section,
.similar-section {
  margin-top: 2.1rem;
  border: 1px solid hsl(220, 14%, 90%);
  border-radius: 28px;
  background: #fff;
  padding: 1.4rem;
  box-shadow: 0 18px 34px rgba(29, 32, 38, 0.05);
}

.review-head h2,
.similar-section h2 {
  font-size: 1.15rem;
}

.review-form-card {
  background: hsl(40, 40%, 97%);
  border-radius: 22px;
  padding: 1rem;
}

.review-field input,
.review-field textarea,
.review-field select {
  border-radius: 14px;
  border-color: hsl(220, 14%, 90%);
  background: #fff;
}

.review-actions .btn,
.review-actions .btn-primary {
  min-height: 52px;
  border: none;
  border-radius: 16px;
  background: hsl(213, 86%, 38%);
  color: #fff;
  font-weight: 700;
}

.review-item,
.similar-card {
  border-color: hsl(220, 14%, 90%);
  border-radius: 20px;
}

.similar-card {
  box-shadow: none;
}

.similar-card img {
  background: hsl(210, 100%, 97%);
}

.similar-card h3 {
  font-size: 0.92rem;
}

@media (max-width: 1024px) {
  .detail-top-nav {
    display: none;
  }

  .product-hero-card {
    gap: 1.8rem;
  }
}

@media (max-width: 760px) {
  .product-meta-grid,
  .product-specs-groups,
  .product-cta-row {
    grid-template-columns: 1fr;
  }

  .product-cta-row .btn-favorite {
    grid-column: auto;
  }

  .detail-slide-btn {
    width: 40px;
    height: 40px;
  }
}

@media (max-width: 680px) {
  .product-page-main {
    padding: 1rem 0 5.5rem;
  }

  .product-hero-card {
    gap: 1.1rem;
  }

  .product-gallery-area {
    margin-inline: calc(-1 * min(0.45rem, 2vw));
  }

  .main-photo-wrap {
    border-radius: 26px;
    aspect-ratio: 1 / 1.08;
    min-height: 360px;
  }

  .main-photo-wrap img {
    padding: 0.7rem;
  }

  .thumb-row {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 86px;
    grid-template-columns: unset;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    padding-bottom: 0.2rem;
    gap: 0.7rem;
  }

  .thumb-row::-webkit-scrollbar {
    height: 6px;
  }

  .thumb-row::-webkit-scrollbar-thumb {
    background: rgba(16, 84, 177, 0.28);
    border-radius: 999px;
  }

  .thumb-photo-btn {
    scroll-snap-align: start;
    min-width: 86px;
  }

  .gallery-mobile-tip {
    display: block;
    padding-inline: 0.2rem;
  }

  .product-info-area h1 {
    font-size: clamp(1.8rem, 8vw, 2.2rem);
  }

  .product-desc {
    font-size: 0.95rem;
    line-height: 1.68;
  }

  .product-highlight-strip {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .product-highlight-strip span {
    justify-content: center;
    text-align: center;
    min-height: 48px;
  }

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

  .product-meta-grid span {
    min-height: 72px;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }

  .detail-qty-panel {
    width: 100%;
    border-radius: 18px;
  }

  .detail-qty-controls {
    justify-content: space-between;
  }

  .product-specs-block {
    padding: 1rem;
    border-radius: 20px;
  }

  .product-specs-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.25rem;
  }

  .product-specs-group {
    padding: 0.85rem;
  }

  .product-specs-group li {
    display: grid;
    gap: 0.18rem;
  }

  .product-cta-row {
    position: sticky;
    bottom: 0.7rem;
    z-index: 15;
    padding: 0.8rem;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 20px 36px rgba(29, 32, 38, 0.14);
    backdrop-filter: blur(14px);
  }

  .product-cta-row .btn-add-cart,
  .product-cta-row .btn-affiliate,
  .product-cta-row .btn-favorite {
    min-height: 54px;
    width: 100%;
  }

  .review-section,
  .similar-section {
    margin-top: 1rem;
    border-radius: 22px;
    padding: 1rem;
  }

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

@media (max-width: 480px) {
  .main-photo-wrap {
    min-height: 320px;
  }

  .product-highlight-strip,
  .product-meta-grid {
    grid-template-columns: 1fr;
  }

  .gallery-top-badges {
    top: 0.7rem;
    left: 0.7rem;
    right: 0.7rem;
  }

  .gallery-count-badge,
  .gallery-stock-badge {
    font-size: 0.72rem;
    padding: 0.38rem 0.6rem;
  }
}

@media screen and (max-width: 860px) {
  .product-page-main > .container {
    width: min(100%, calc(100vw - 1rem));
    overflow-x: clip;
  }

  .product-hero-card {
    display: flex !important;
    flex-direction: column !important;
    gap: 1rem !important;
    grid-template-columns: 1fr !important;
    align-items: stretch !important;
  }

  .product-gallery-area,
  .product-info-area,
  .review-section,
  .similar-section {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  .product-gallery-area {
    order: 1;
    margin: 0 !important;
  }

  .product-info-area {
    order: 2;
    padding-top: 0.15rem;
  }

  .main-photo-wrap {
    width: 100%;
    max-width: 100%;
    min-height: 340px;
    aspect-ratio: auto;
  }

  .main-photo-wrap img {
    width: 100%;
    height: 100%;
    max-width: 100%;
    object-fit: contain;
  }

  .thumb-row {
    width: 100%;
    max-width: 100%;
  }
}

@media screen and (max-width: 680px) {
  .header-main .container {
    min-height: 72px;
    gap: 0.55rem;
  }

  .detail-top-nav {
    display: none !important;
  }

  .header-user-actions {
    margin-left: auto;
  }

  .product-page-main > .container {
    width: min(100%, calc(100vw - 0.75rem));
  }

  .product-page-main {
    padding: 0.8rem 0 5.8rem;
  }

  .product-hero-card {
    gap: 0.85rem !important;
  }

  .product-gallery-area {
    position: relative;
    isolation: isolate;
  }

  .main-photo-wrap {
    min-height: 300px;
    border-radius: 22px;
  }

  .detail-slide-btn {
    width: 38px;
    height: 38px;
  }

  .detail-slide-btn.prev {
    left: 0.7rem;
  }

  .detail-slide-btn.next {
    right: 0.7rem;
  }

  .thumb-row {
    display: flex;
    overflow-x: auto;
    padding-inline: 0;
    gap: 0.55rem;
  }

  .thumb-photo-btn {
    flex: 0 0 72px;
    min-width: 72px;
    max-width: 72px;
    border-radius: 14px;
  }

  .gallery-mobile-tip {
    margin-top: 0.45rem;
    padding-left: 0.1rem;
    font-size: 0.75rem;
    line-height: 1.45;
  }

  .product-info-area h1 {
    margin-top: 0.7rem;
    font-size: clamp(1.55rem, 7.4vw, 2rem);
    line-height: 1.05;
    word-break: break-word;
  }

  .product-desc {
    margin-top: 0.8rem;
    font-size: 0.92rem;
    line-height: 1.55;
  }

  .product-highlight-strip,
  .product-meta-grid,
  .product-specs-groups,
  .product-cta-row,
  .similar-grid,
  .review-form-grid {
    grid-template-columns: 1fr !important;
  }

  .product-highlight-strip {
    display: grid;
    gap: 0.5rem;
  }

  .product-highlight-strip span,
  .product-meta-grid span {
    min-height: auto;
    padding: 0.8rem 0.9rem;
    border-radius: 16px;
  }

  .product-price-row {
    margin-top: 1rem;
    align-items: flex-end;
    gap: 0.4rem;
  }

  .product-price-row strong {
    font-size: 1.85rem;
  }

  .product-price-row del {
    font-size: 0.95rem;
  }

  .detail-qty-panel,
  .product-specs-block {
    width: 100%;
    padding: 0.9rem;
    border-radius: 18px;
  }

  .detail-qty-controls {
    justify-content: space-between;
    width: 100%;
  }

  .product-specs-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.2rem;
  }

  .product-specs-group {
    padding: 0.8rem;
    border-radius: 16px;
  }

  .product-specs-group li {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
  }

  .product-cta-row {
    position: static;
    padding: 0;
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
    gap: 0.65rem;
  }

  .product-cta-row .btn-add-cart,
  .product-cta-row .btn-affiliate,
  .product-cta-row .btn-favorite {
    width: 100%;
    min-height: 52px;
    font-size: 0.95rem;
  }

  .review-section,
  .similar-section {
    margin-top: 0.9rem;
    padding: 0.95rem;
    border-radius: 20px;
  }

  .review-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.35rem;
  }

  .similar-card {
    display: grid;
    grid-template-columns: 86px minmax(0, 1fr);
    align-items: stretch;
  }

  .similar-card img {
    height: 100%;
  }

  .similar-card h3,
  .similar-card p {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }
}

@media screen and (max-width: 420px) {
  .header-user-actions .action-btn {
    width: 42px;
    height: 42px;
  }

  .main-photo-wrap {
    min-height: 270px;
  }

  .gallery-top-badges {
    top: 0.6rem;
    left: 0.6rem;
    right: 0.6rem;
  }

  .gallery-count-badge,
  .gallery-stock-badge {
    font-size: 0.7rem;
    padding: 0.35rem 0.52rem;
  }

  .product-price-row strong {
    font-size: 1.7rem;
  }

  .product-desc {
    font-size: 0.89rem;
  }
}

.related-products-section {
  margin-top: 2.1rem;
  border: 1px solid hsl(220, 14%, 90%);
  border-radius: 28px;
  background: linear-gradient(180deg, #ffffff, #fffaf2);
  padding: 1.4rem;
  box-shadow: 0 18px 34px rgba(29, 32, 38, 0.05);
}

.related-products-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.8rem;
  margin-bottom: 1rem;
}

.related-products-head h2 {
  margin: 0;
  font-size: 1.15rem;
  color: var(--eerie-black);
}

.related-products-head p {
  margin: 0;
  max-width: 34rem;
  color: var(--sonic-silver);
  font-size: 0.82rem;
}

.related-products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.9rem;
}

.related-product-card {
  width: 100%;
  max-width: 280px;
  justify-self: center;
  text-decoration: none;
  border: 1px solid hsl(220, 14%, 90%);
  border-radius: 20px;
  overflow: hidden;
  background: #fff;
  display: flex;
  flex-direction: column;
  min-width: 0;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.related-product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 36px rgba(29, 32, 38, 0.1);
  border-color: hsla(213, 86%, 38%, 0.24);
}

.related-product-card img {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  background: hsl(210, 100%, 97%);
}

.related-product-info {
  display: grid;
  gap: 0.35rem;
  padding: 0.85rem 0.9rem 1rem;
  min-width: 0;
}

.related-product-info p {
  margin: 0;
  color: hsl(213, 86%, 38%);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.related-product-info h3 {
  margin: 0;
  color: var(--eerie-black);
  font-size: 0.96rem;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.related-product-info strong {
  color: hsl(220, 13%, 13%);
  font-size: 0.98rem;
}

@media (max-width: 860px) {
  .related-products-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .related-products-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .related-product-card {
    max-width: none;
  }
}

@media (max-width: 680px) {
  .related-products-section {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 22px;
  }

  .related-products-grid {
    grid-template-columns: 1fr;
  }

  .related-product-card {
    max-width: none;
    display: grid;
    grid-template-columns: 96px minmax(0, 1fr);
    align-items: stretch;
  }

  .related-product-card img {
    height: 100%;
    aspect-ratio: auto;
  }

  .related-product-info {
    padding: 0.8rem 0.85rem;
  }
}

@media (max-width: 420px) {
  .related-product-card {
    grid-template-columns: 88px minmax(0, 1fr);
  }
}

/* ── Variant selector ── */
.product-variants-block {
  display: grid;
  gap: 1rem;
  margin: 0.9rem 0 0.4rem;
}

.variant-option-group {}

.variant-option-name {
  font-size: 0.83rem;
  font-weight: 700;
  color: var(--davys-gray, #5c6374);
  margin: 0 0 0.45rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.variant-option-values {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.variant-value-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  padding: 0.38rem 0.8rem;
  border-radius: 999px;
  border: 1.5px solid hsla(214, 20%, 31%, 0.22);
  background: transparent;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
  color: inherit;
}

.variant-value-btn:hover {
  border-color: hsla(213, 74%, 52%, 0.55);
  background: hsla(208, 72%, 56%, 0.06);
}

.variant-value-btn.is-selected {
  border-color: #2c7be5;
  background: hsla(213, 74%, 52%, 0.1);
  color: #1a5ecc;
}
