/**
 * Flavor Peletomaty — Single peletomat frontend styles.
 *
 * Layout wzorowany na WooCommerce single-product.
 */

/* ── Top section: gallery + summary (2-column like WC product) ── */
.peletomat-single__top {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

/* ── Gallery ── */
.peletomat-single__gallery {
  position: relative;
}

.peletomat-single__main-image img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  object-fit: cover;
}

.peletomat-single__thumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.peletomat-single__thumb {
  width: 72px;
  height: 72px;
  border-radius: 4px;
  overflow: hidden;
  border: 2px solid transparent;
  cursor: pointer;
  transition: border-color 0.2s;
}

.peletomat-single__thumb:hover {
  border-color: var(--flavor-accent, #2271b1);
}

.peletomat-single__thumb.peletomat-single__thumb--active {
  border-color: var(--flavor-accent, #2271b1);
}

.peletomat-single__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ── Summary ── */
.peletomat-single__summary {
  display: flex;
  flex-direction: column;
  gap: 20px;
  position: sticky;
  top: 200px;
  align-self: start;
}

.peletomat-single__title {
  font-size: 2em;
  margin: 0;
  line-height: 1.2;
}

/* ── Status badges ── */
.peletomat-single__status {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.peletomat-badge {
  display: inline-block;
  padding: 4px 14px;
  border-radius: 20px;
  font-size: 0.85em;
  font-weight: 600;
  line-height: 1.4;
}

.peletomat-badge--active {
  background: #d4edda;
  color: #155724;
}

.peletomat-badge--inactive {
  background: #f8d7da;
  color: #721c24;
}

.peletomat-badge--mode {
  background: #e2e3e5;
  color: #383d41;
}

/* ── Location ── */
.peletomat-single__location h3 {
  margin: 0 0 6px;
  font-size: 1.1em;
  display: flex;
  align-items: center;
  gap: 6px;
}

.peletomat-single__location address {
  font-style: normal;
  font-size: 1em;
  color: #555;
}

.peletomat-single__loc-notes {
  margin: 6px 0 0;
  font-size: 0.9em;
  color: #777;
}

/* ── Excerpt ── */
.peletomat-single__excerpt p {
  margin: 0;
  font-size: 1em;
  color: #555;
  line-height: 1.6;
}

/* ── Products list ── */
.peletomat-single__products h3 {
  margin: 0 0 10px;
  font-size: 1.1em;
  display: flex;
  align-items: center;
  gap: 6px;
}

.peletomat-single__product-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.peletomat-single__product-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  border-bottom: 1px solid #eee;
}

.peletomat-single__product-list li:last-child {
  border-bottom: none;
}

.peletomat-single__product-list a {
  color: inherit;
  text-decoration: none;
  font-weight: 500;
}

.peletomat-single__product-list a:hover {
  color: var(--flavor-accent, #2271b1);
}

.peletomat-single__price {
  font-weight: 600;
  white-space: nowrap;
}

/* ── Map section ── */
.peletomat-single__map-section {
  margin-bottom: 40px;
}

.peletomat-single__map-section h3 {
  margin: 0 0 12px;
  font-size: 1.2em;
  display: flex;
  align-items: center;
  gap: 6px;
}

.peletomat-single__map iframe {
  display: block;
  width: 100%;
}

.peletomat-single__coords {
  margin: 8px 0 0;
  font-size: 0.85em;
  color: #888;
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .peletomat-single__top {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .peletomat-single__summary {
    position: static;
  }

  .peletomat-single__title {
    font-size: 1.5em;
  }
}
