.product-page {
  max-width: 1000px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

.product-breadcrumb {
  margin-bottom: 1rem;
  font-size: 0.9rem;
  color: #64748b;
}

.product-breadcrumb a {
  color: var(--accent);
  text-decoration: none;
}

.product-breadcrumb a:hover {
  text-decoration: underline;
}

.product-breadcrumb .sep {
  margin: 0 0.35rem;
}

.product-top {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}

.product-gallery-col {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

@media (max-width: 768px) {
  .product-top {
    grid-template-columns: 1fr;
  }
}

.product-specs-main {
  padding: 0.5rem 0;
}

.product-name {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: var(--header-bg);
}

.spec-row {
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
}

.spec-name {
  color: #64748b;
  font-weight: 600;
}

.spec-value {
  margin-left: 0.25rem;
}

.details-link {
  display: inline-flex;
  margin-top: 1rem;
  font-size: 0.9rem;
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px dashed var(--accent);
  cursor: pointer;
}

.details-link:hover {
  color: #4f7f10;
  border-bottom-color: #4f7f10;
}

.product-tags {
  margin-top: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.product-price-buy {
  width: 100%;
  padding: 0.6rem 1rem;
  background: linear-gradient(135deg, #f2f9ee 0%, #e8f3df 100%);
  border: 2px solid var(--accent);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.tag {
  background: #edf7e7;
  color: #3d6f14;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  font-size: 0.85rem;
}

.product-gallery {
  position: relative;
  background: #f1f5f9;
  border-radius: 12px;
  overflow: hidden;
  min-height: 300px;
}

.product-slider {
  position: relative;
  aspect-ratio: 4/3;
}

.product-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.product-slide.active {
  opacity: 1;
  z-index: 1;
}

.product-slide img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.no-photo {
  color: #94a3b8;
}

.product-slider-dots {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  gap: 8px;
}

.product-slider-dots button {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2px solid #64748b;
  background: transparent;
  cursor: pointer;
}

.product-slider-dots button.active {
  background: var(--accent);
  border-color: var(--accent);
}

.product-details {
  margin-top: 2rem;
  padding: 1.5rem;
  background: #f8fafc;
  border-radius: 12px;
}

.product-details h2 {
  margin-bottom: 1rem;
  font-size: 1.2rem;
  color: var(--header-bg);
}

.details-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.detail-row {
  display: flex;
  gap: 0.5rem;
}

.detail-row dt {
  color: #64748b;
  font-weight: 600;
}

.detail-row dd {
  margin: 0;
}

.product-price-buy .product-price {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--header-bg);
  margin: 0;
}

.product-price-buy .btn-buy {
  padding: 0.5rem 1.25rem;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s;
}

.product-price-buy .btn-buy:hover {
  background: #4f7f10;
}

.btn-buy:hover {
  background: #4f7f10;
}

.popup-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.popup-overlay.open {
  display: flex;
}

.popup {
  background: #fff;
  border-radius: 12px;
  padding: 2rem;
  max-width: 400px;
  width: 100%;
  position: relative;
}

.popup-close {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  width: 36px;
  height: 36px;
  font-size: 1.5rem;
  line-height: 1;
  background: none;
  border: none;
  cursor: pointer;
  color: #64748b;
}

.popup h3 {
  margin-bottom: 0.5rem;
  color: var(--header-bg);
}

.popup-text {
  color: #64748b;
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
}

.popup label {
  display: block;
  margin-bottom: 1rem;
}

.popup label span {
  display: block;
  margin-bottom: 0.25rem;
  font-size: 0.9rem;
  color: #475569;
}

.popup input {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
}

.btn-submit {
  width: 100%;
  padding: 0.75rem;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-weight: 500;
  cursor: pointer;
  margin-top: 0.5rem;
}

.form-message {
  margin-top: 0.75rem;
  font-size: 0.9rem;
}

/* Похожие товары */
.similar-section {
  margin-top: 2.5rem;
  padding: 1.75rem 1.5rem;
  background: #f8fafc;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
}

.similar-section h2 {
  margin-bottom: 1rem;
  color: var(--header-bg);
}

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

.product-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: box-shadow 0.2s, transform 0.2s;
}

.product-card:hover {
  box-shadow: 0 8px 24px rgba(0,0,0,0.1);
  transform: translateY(-2px);
}

.product-card img,
.product-card-noimg {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
}

.product-card-noimg {
  background: #e2e8f0;
}

.product-card-body {
  padding: 1rem;
}

.product-card-body h3 {
  font-size: 0.9rem;
  margin-bottom: 0.35rem;
  color: var(--header-bg);
}

.product-card-body .product-price {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 600;
  color: #335f2a;
}

@media (max-width: 900px) {
  .similar-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  .similar-grid {
    grid-template-columns: 1fr;
  }
}
