/* Layout polish overrides */
.hero-grid {
  align-items: stretch;
}

.hero-slider {
  min-height: 420px;
  height: 420px;
  border-radius: 8px;
}

.slide {
  min-height: 420px;
  height: 420px;
  padding: 44px 48px;
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center right;
}

.slide h1,
.slide p,
.slide .badge,
.slide .slider-btn {
  max-width: 470px;
}

.slide h1 {
  font-size: 38px;
  line-height: 1.12;
}

.slide:before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(7, 28, 54, .86), rgba(7, 28, 54, .52), rgba(7, 28, 54, .08));
  z-index: 0;
}

.site-logo,
.admin-logo {
  object-fit: contain;
}

.slide.alt:before {
  background: linear-gradient(90deg, rgba(255, 255, 255, .94), rgba(255, 255, 255, .72), rgba(255, 255, 255, .12));
}

.slide > * {
  position: relative;
  z-index: 1;
}

.slider-dots {
  bottom: 22px;
}

.visual-cat img {
  height: 150px;
}

.grid-products {
  align-items: stretch;
}

.product-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.product-image {
  flex: 0 0 auto;
}

.product-image img {
  aspect-ratio: 1 / 1;
  background: #f8fafc;
}

.product-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-height: 245px;
}

.product-title {
  min-height: 48px;
  overflow: hidden;
}

.price-row {
  min-height: 40px;
  gap: 8px;
}

.price {
  white-space: nowrap;
  font-size: 16px;
}

.card-actions {
  margin-top: auto;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.card-actions button {
  min-width: 0;
  height: 38px;
  padding: 6px 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
}

.feature {
  min-height: 92px;
}

.admin-image-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.admin-image-card {
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
  padding: 10px;
}

.admin-image-card img {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 6px;
  background: #f8fafc;
}

.admin-image-card strong,
.admin-image-card span {
  display: block;
  margin-top: 8px;
  font-size: 13px;
}

.admin-image-card .actions {
  margin-top: 10px;
}

.detail-thumbs {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.detail-thumbs img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border: 1px solid #e2e8f0;
  border-radius: 7px;
  background: #f8fafc;
}

.product-detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 560px) minmax(0, 1fr);
  gap: 30px;
  align-items: start;
}

.product-gallery {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 14px;
}

.product-main-image {
  position: relative;
  grid-column: 2;
  grid-row: 1;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
  cursor: zoom-in;
}

.product-main-image img {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: contain;
}

.product-main-image span {
  position: absolute;
  right: 12px;
  bottom: 12px;
  border-radius: 999px;
  background: rgba(7, 28, 54, .86);
  color: #fff;
  padding: 7px 11px;
  font-size: 12px;
  font-weight: 700;
}

.product-thumbs {
  grid-column: 1;
  grid-row: 1;
  display: grid;
  align-content: start;
  gap: 10px;
}

.product-thumbs button {
  width: 92px;
  height: 92px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
  padding: 4px;
  cursor: pointer;
}

.product-thumbs button.active {
  border-color: #f58220;
  box-shadow: 0 0 0 2px rgba(245, 130, 32, .18);
}

.product-thumbs img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 6px;
}

.product-summary {
  min-width: 0;
}

.product-facts {
  display: grid;
  gap: 8px;
  margin: 14px 0;
  color: #64748b;
  font-size: 14px;
}

.price-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.product-actions .small-btn {
  padding: 11px 15px;
}

.product-tabs,
.admin-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 20px 0 14px;
  border-bottom: 1px solid #e2e8f0;
  padding-bottom: 10px;
}

.product-tabs button,
.admin-tabs button {
  border: 1px solid #e2e8f0;
  border-radius: 7px;
  background: #fff;
  color: #334155;
  padding: 10px 13px;
  font-weight: 800;
  cursor: pointer;
}

.product-tabs button.active,
.admin-tabs button.active {
  background: #071c36;
  border-color: #071c36;
  color: #fff;
}

.product-tab-panel,
.admin-tab-panel {
  display: none;
}

.product-tab-panel.active,
.admin-tab-panel.active {
  display: block;
}

.zoom-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  place-items: center;
  background: rgba(2, 6, 23, .86);
  padding: 24px;
}

.zoom-modal.open {
  display: grid;
}

.zoom-modal img {
  max-width: min(1100px, 96vw);
  max-height: 86vh;
  object-fit: contain;
  background: #fff;
  border-radius: 8px;
}

.zoom-modal button {
  position: fixed;
  top: 18px;
  right: 18px;
  border: 0;
  border-radius: 7px;
  background: #f58220;
  color: #fff;
  padding: 11px 14px;
  font-weight: 800;
  cursor: pointer;
}

.admin-product-editor form {
  margin: 0;
}

.admin-editor-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 22px;
  align-items: start;
}

.admin-editor-help {
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #f8fafc;
  padding: 16px;
  color: #64748b;
  line-height: 1.5;
}

.admin-editor-help strong {
  display: block;
  color: #071c36;
  margin-bottom: 6px;
}

.checkbox-field {
  display: flex;
  gap: 8px;
  align-items: center;
  border: 1px solid #e2e8f0;
  border-radius: 7px;
  padding: 12px;
  background: #fff;
}

.checkbox-field input {
  width: auto;
  margin: 0;
}

.admin-save-bar {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-top: 18px;
  border-top: 1px solid #e2e8f0;
  padding-top: 16px;
}

@media (max-width: 900px) {
  .hero-slider,
  .slide {
    height: 380px;
    min-height: 380px;
  }

  .slide {
    padding: 34px;
  }

  .slide h1 {
    font-size: 32px;
  }

  .product-body {
    min-height: 230px;
  }

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

  .product-detail-layout,
  .admin-editor-grid {
    grid-template-columns: 1fr;
  }

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

  .product-main-image {
    grid-column: 1;
    grid-row: 1;
  }

  .product-thumbs {
    grid-column: 1;
    grid-row: 2;
    grid-template-columns: repeat(5, 76px);
    overflow-x: auto;
  }

  .product-thumbs button {
    width: 76px;
    height: 76px;
  }
}

@media (max-width: 620px) {
  .hero-slider,
  .slide {
    height: 430px;
    min-height: 430px;
  }

  .slide {
    padding: 26px;
    background-position: 62% center;
  }

  .slide:before {
    background: linear-gradient(90deg, rgba(7, 28, 54, .92), rgba(7, 28, 54, .72), rgba(7, 28, 54, .32));
  }

  .slide h1 {
    font-size: 28px;
  }

  .visual-cat img {
    height: 180px;
  }

  .product-body {
    min-height: 220px;
  }

  .admin-image-grid {
    grid-template-columns: 1fr;
  }
}

.return-request-form {
  display: grid;
  gap: 6px;
  min-width: 180px;
}

.return-request-form select,
.return-request-form input {
  min-height: 34px;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 7px 9px;
  font-family: inherit;
}
