/* === Layout wrappers === */

.product-page-wrapper {
  width: 100%;
  padding-bottom: 4rem;
}

.product-page-container {
  width: 80%;
  margin: 15rem auto; /* space under fixed header/banner */
  padding: 0 1.5rem;
}

/* Default: single column (mobile-first) */
.product-layout {
  display: flex;
  flex-direction: column;
  gap: 3rem;
  align-items: stretch;
}

/* Columns default to full width (mobile) */
.product-gallery-column,
.product-details {
  width: 100%;
  flex: 1 1 100%;
  min-width: 0;
}

/* >= 900px: two-column layout */
@media (min-width: 900px) {
  .product-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); /* left slightly wider */
    gap: 3rem;
    align-items: flex-start;
  }

  .product-gallery-column,
  .product-details {
    width: auto;
    flex: 0 0 auto;
  }
}

/* === Typography / headings === */

.product-title {
  font-family: "Sarala", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: clamp(1.8rem, 2.2vw, 2.2rem);
  line-height: 1.25;
  margin: 0 0 0.3rem;
}

.product-subtitle {
  font-family: "Nunito Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 0.95rem;
  color: #6b7280;
  margin: 0 0 1.25rem;
}

.product-section-title {
  font-family: "Sarala", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 1rem;
  font-weight: 700;
  margin: 0;
}

/* Meta: reference / category */

.product-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  margin-bottom: 1rem;
  font-size: 0.9rem;
  color: #4b5563;
}

.product-meta .label {
  font-weight: 600;
}

.product-meta .value {
  font-weight: 400;
}

/* === Price + availability === */

.product-price-block {
  margin-bottom: 1.25rem;
}

.product-price {
  font-size: 1.7rem;
  font-weight: 700;
  color: #111827;
  margin: 0;
}

.product-availability {
  font-size: 0.9rem;
  color: #059669;
  margin-top: 0.15rem;
}

/* === Buttons / actions === */

.product-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.75rem;
}

.product-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.6rem 1.1rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.16s ease, color 0.16s ease, border-color 0.16s ease, transform 0.1s ease;
  font-family: "Nunito Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.product-button i {
  font-size: 0.95rem;
}

.product-button-primary {
  background: #1aada3;
  color: #ffffff;
  border-color: #1aada3;
}

.product-button-primary:hover {
  background: #159289;
  border-color: #159289;
  transform: translateY(-1px);
}

.product-button-wishlist {
  background: #ffffff;
  color: #1aada3;
  border-color: #1aada3;
}

.product-button-wishlist:hover {
  background: #e0f7f5;
  transform: translateY(-1px);
}

.product-add-to-basket {
  margin: 0;
}

/* === Gallery === */

.product-gallery {
  width: 100%;
}

.product-main-image {
  width: 100%;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid #e5e7eb;
  background: #f9fafb;
}

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

/* Thumbnails */

.product-thumbnail-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0.9rem;
}

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

.product-thumbnail button {
  border: 1px solid #d1d5db;
  border-radius: 10px;
  padding: 0;
  background: #ffffff;
  cursor: pointer;
  overflow: hidden;
  transition: border-color 0.15s ease, transform 0.1s ease, box-shadow 0.15s ease;
}

.product-thumbnail img {
  display: block;
  width: 70px;
  height: 70px;
  object-fit: cover;
}

.product-thumbnail button:hover {
  border-color: #1aada3;
  box-shadow: 0 0 0 1px rgba(26, 173, 163, 0.3);
  transform: translateY(-1px);
}

/* === CONNECT PANEL (colour variants) === */

.product-connect {
  margin-top: 2rem;
  padding: 1.25rem 1.25rem 1rem;
  border-radius: 14px;
  border: 1px solid #e5e7eb;
  background: #f9fafb;
}

.product-connect-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-top: 0.8rem;
}

/* 3 across on desktop (wrapping across lines) */
.product-connect-item {
  flex: 0 0 calc(33.333% - 0.7rem);
  max-width: calc(33.333% - 0.7rem);
  text-decoration: none;
  color: inherit;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #e5e7eb;
  background: #ffffff;
  display: flex;
  flex-direction: column;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.product-connect-item:hover {
  transform: translateY(-2px);
  border-color: #1aada3;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
}

.product-connect-item.is-active {
  border-color: #1aada3;
  box-shadow: 0 0 0 1px rgba(26, 173, 163, 0.35);
}

.product-connect-thumb {
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #f3f4f6;
}

.product-connect-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.product-connect-label {
  padding: 0.45rem 0.55rem 0.5rem;
  text-align: center;
  font-size: 0.85rem;
  font-weight: 600;
  color: #111827;
}

/* Responsive breakpoints for connect grid */
@media (max-width: 768px) {
  .product-connect-item {
    flex: 0 0 calc(50% - 0.7rem);
    max-width: calc(50% - 0.7rem);
  }
}

@media (max-width: 480px) {
  .product-connect-item {
    flex: 0 0 100%;
    max-width: 100%;
  }
}

/* === VIDEO BLOCK === */

.product-video-block {
  margin-top: 2rem;
  padding: 1.25rem 1.25rem 1rem;
  border-radius: 14px;
  border: 1px solid #e5e7eb;
  background: #ffffff;
}

.product-video-embed {
  margin-top: 0.75rem;
  position: relative;
  width: 100%;
  padding-bottom: 56.25%; /* 16:9 */
  border-radius: 12px;
  overflow: hidden;
  background: #000000;
}

.product-video-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* === DIMENSIONS PANEL (right column) === */

.product-dimensions {
  margin-top: 1.5rem;
  padding: 1rem 1.25rem;
  border-radius: 14px;
  border: 1px solid #e5e7eb;
  background: #f9fafb;
}

.product-dimensions-list {
  list-style: none;
  margin: 0.6rem 0 0;
  padding: 0;
  font-size: 0.92rem;
  color: #111827;
}

.product-dimensions-list li + li {
  margin-top: 0.25rem;
}

.product-dimensions-list strong {
  font-weight: 600;
}

.product-dimensions-note {
  margin: 0.6rem 0 0;
  font-size: 0.9rem;
  color: #6b7280;
}

.product-dimensions--empty {
  opacity: 0.9;
}

/* For the HTML dimensions block from the DB */
.product-dimensions-body {
  margin-top: 0.6rem;
  font-size: 0.92rem;
  color: #111827;
}

.product-dimensions-body p {
  margin: 0 0 0.4rem;
}

/* === Currency converter === */

.product-currency {
  margin-bottom: 1.5rem;
  padding: 0.9rem 1.1rem;
  border-radius: 14px;
  border: 1px solid #e5e7eb;
  background: #ffffff;
}

.product-currency-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.product-currency-controls {
  margin-top: 0.55rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.75rem;
  align-items: center;
  font-size: 0.9rem;
}

#currency-select {
  padding: 0.35rem 0.6rem;
  border-radius: 999px;
  border: 1px solid #d1d5db;
  background: #f9fafb;
  font-size: 0.9rem;
}

.product-currency-result {
  margin-top: 0.45rem;
  font-weight: 600;
  font-size: 1rem;
  color: #111827;
}

.product-currency-note {
  margin: 0.4rem 0 0;
  font-size: 0.8rem;
  color: #6b7280;
}

/* === Description === */

.product-description {
  margin-top: 1.75rem;
  font-size: 0.96rem;
  line-height: 1.7;
  color: #111827;
}

.product-description p {
  margin: 0 0 0.85rem;
}

.product-description ul {
  padding-left: 1.1rem;
  margin: 0.25rem 0 0.9rem;
}

/* === Not found === */

.product-not-found {
  text-align: center;
  padding: 4rem 1rem 5rem;
}

.product-not-found h1 {
  font-size: 1.7rem;
  margin-bottom: 0.7rem;
}

.product-not-found p {
  max-width: 540px;
  margin: 0 auto;
  color: #4b5563;
}

/* === Lightbox === */

.product-lightbox {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.75);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.product-lightbox.is-active {
  display: flex;
}

.product-lightbox__inner {
  position: relative;
  max-width: min(900px, 95vw);
  max-height: 90vh;
  background: #000000;
  border-radius: 12px;
  overflow: hidden;
}

.product-lightbox__inner img {
  display: block;
  max-width: 100%;
  max-height: 90vh;
  width: auto;
  height: auto;
  object-fit: contain;
}

/* Controls attached to image panel */
.product-lightbox__close {
  position: absolute;
  top: 0.6rem;
  right: 0.6rem;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  border: none;
  background: rgba(15, 23, 42, 0.75);
  color: #f9fafb;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.product-lightbox__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: none;
  background: rgba(15, 23, 42, 0.7);
  color: #f9fafb;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.product-lightbox__nav--prev {
  left: 0.6rem;
}

.product-lightbox__nav--next {
  right: 0.6rem;
}

.product-lightbox__close i,
.product-lightbox__nav i {
  font-size: 1rem;
}

/* Prevent scroll behind lightbox */
.no-scroll {
  overflow: hidden;
}
