/* ====== WooCommerce Single Product ====== */

/* ── Layout ───────────────────────────────────────────────── */
.single-product .product {
  font-family: "Poppins", sans-serif;
}

/* 2-column grid: gallery left, summary right */
@media (min-width: 1024px) {
  .single-product .product {
    display: grid;
    grid-template-columns: 45% 1fr;
    gap: 2.5rem;
    align-items: start;
  }
  /* Gallery + summary in grid, everything else full-width */
  .single-product .woocommerce-product-gallery {
    grid-column: 1;
    grid-row: 1;
  }
  .single-product .summary {
    grid-column: 2;
    grid-row: 1;
  }
  .single-product .woocommerce-tabs,
  .single-product .related.products,
  .single-product .product-info {
    grid-column: 1 / -1;
  }
}

.single-product .woocommerce-product-gallery {
  margin-bottom: 2rem;
  position: relative;
  max-width: 500px;
}
.single-product .woocommerce-product-gallery__wrapper {
  overflow: hidden;
  border-radius: 0.75rem;
}
.single-product .woocommerce-product-gallery__image {
  overflow: hidden;
  border-radius: 0.75rem;
}
.single-product .woocommerce-product-gallery__image img {
  width: 100%;
  height: auto;
  display: block;
  cursor: zoom-in;
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}
.single-product .woocommerce-product-gallery__image:hover img {
  transform: scale(1.03);
}

/* Reset WC float defaults */
.single-product .woocommerce-product-gallery,
.single-product .summary {
  float: none !important;
  width: 100% !important;
}

/* ── Product Title ────────────────────────────────────────── */
.single-product .product_title {
  font-family: "Quicksand", sans-serif;
  font-size: 1.75rem;
  font-weight: 700;
  color: rgb(var(--heading));
  line-height: 1.25;
  margin: 0 0 1.25rem;
  animation: fadeUp 0.6s cubic-bezier(0.22, 1, 0.36, 1) both;
}
@media (min-width: 768px) {
  .single-product .product_title {
    font-size: 2rem;
  }
}

/* ── Price Section ────────────────────────────────────────── */
.product-price {
  background: rgb(var(--surface));
  border: 1px solid rgb(var(--divider));
  border-radius: 0.75rem;
  padding: 1.25rem;
  margin-bottom: 1.25rem;
}
.product-price__label {
  display: block;
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgb(var(--heading));
  margin-bottom: 0.25rem;
}
.product-price__amount {
  font-family: "Quicksand", sans-serif;
  font-size: 2rem;
  font-weight: 700;
  color: rgb(var(--brand));
  line-height: 1;
}
.product-price__amount .woocommerce-Price-amount {
  font-size: inherit;
  font-weight: inherit;
  color: inherit;
}
.product-price__amount del {
  font-size: 0.6em;
  color: rgb(var(--text-muted));
  font-weight: 400;
}
.product-price__amount ins {
  text-decoration: none;
}
.product-price__amount .woocommerce-price-suffix {
  color: rgb(var(--heading));
  font-size: 1.2rem;
}
.product-price__shipping {
  font-size: 0.75rem;
  color: rgb(var(--text-muted));
  margin: 0.5rem 0 0;
}
.product-price__shipping a {
  color: rgb(var(--link));
  text-decoration: none;
}
.product-price__shipping a:hover {
  color: rgb(var(--link-hover));
}
.product-price__details {
  display: flex;
  gap: 1.5rem;
  margin: 0.75rem 0 0;
  padding-top: 0.75rem;
  border-top: 1px solid rgb(var(--divider));
}
.product-price__detail {
  margin: 0;
}
.product-price__detail dt {
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: rgb(var(--text-subtle));
}
.product-price__detail dd {
  margin: 0;
  font-size: 0.875rem;
  font-weight: 600;
  color: rgb(var(--heading));
}

/* ── Discount Action ──────────────────────────────────────── */
.product-discount {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  background: rgb(var(--brand) / 0.08);
  border: 1px solid rgb(var(--brand) / 0.2);
  border-left: 3px solid rgb(var(--brand));
  border-radius: 0.5rem;
  margin-bottom: 1.25rem;
}
.product-discount__icon {
  flex-shrink: 0;
  color: rgb(var(--brand));
  margin-top: 0.125rem;
}
.product-discount__title {
  display: block;
  font-size: 0.875rem;
  font-weight: 700;
  color: rgb(var(--brand-text));
  margin-bottom: 0.25rem;
  animation: scaleIn 2s ease-in-out infinite alternate;
}
.product-discount__body p {
  font-size: 0.8125rem;
  font-weight: 300;
  color: rgb(var(--text));
  margin: 0;
  line-height: 1.6;
}

/* ── Product Meta (dl) ────────────────────────────────────── */
.product-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.25rem 0.5rem;
  padding: 0.75rem 1rem;
  background: rgb(var(--surface-alt));
  border-radius: 0.5rem;
  margin-bottom: 1rem;
}
.product-meta dt {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: rgb(var(--text-subtle));
}
.product-meta dt::after {
  content: ":";
}
.product-meta dd {
  margin: 0;
  font-size: 0.9375rem;
  font-weight: 600;
  color: rgb(var(--heading));
}

/* ── Gallery Notice ───────────────────────────────────────── */
.product-gallery-notice {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.8125rem;
  font-weight: 400;
  color: rgb(var(--brand-text));
  background: rgb(var(--brand) / 0.06);
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  margin-top: 1rem;
  margin-bottom: 1rem;
  line-height: 1.5;
}
.product-gallery-notice .inline-icon {
  flex-shrink: 0;
  margin-top: 0.125rem;
}

/* ── Manufacturer Info ────────────────────────────────────── */
.product-manufacturer {
  font-size: 0.8125rem;
  color: rgb(var(--text));
  padding: 0.75rem 1rem;
  background: rgb(var(--surface-alt));
  border-radius: 0.5rem;
  margin-bottom: 1rem;
}
.product-manufacturer__label {
  font-weight: 600;
  color: rgb(var(--text-subtle));
}
.product-manufacturer__name {
  font-weight: 600;
  color: rgb(var(--heading));
}
.product-manufacturer__desc {
  margin: 0.375rem 0 0;
  font-weight: 300;
  line-height: 1.6;
}

/* ── Checklist ────────────────────────────────────────────── */
.product-checklist {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  background: rgb(var(--surface));
  border: 1px solid rgb(var(--divider));
  border-radius: 0.75rem;
  margin-bottom: 1.25rem;
}
.product-checklist__icon {
  flex-shrink: 0;
  color: rgb(var(--brand));
  margin-top: 0.125rem;
}
.product-checklist__body strong {
  display: block;
  font-size: 0.875rem;
  color: rgb(var(--heading));
  margin-bottom: 0.25rem;
}
.product-checklist__body p {
  font-size: 0.8125rem;
  font-weight: 300;
  color: rgb(var(--text));
  margin: 0 0 0.5rem;
}
.product-checklist__link {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: rgb(var(--brand-text));
  text-decoration: none;
  transition: color 0.2s;
}
.product-checklist__link:hover {
  color: rgb(var(--brand-hover));
}

/* ── Shipping Notice (inside checklist) ───────────────────── */
p.shipping-notice {
  margin-top: 0.5rem;
  padding: 0.5rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 500;
  color: rgb(var(--brand-text));
  background: #fef9e7;
  border-left: 3px solid rgb(var(--brand));
  border-radius: 0.25rem;
}

/* ── Order Notice ─────────────────────────────────────────── */
.product-notice {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  background: rgb(var(--state-error) / 0.06);
  border: 1px solid rgb(var(--state-error) / 0.15);
  border-left: 3px solid rgb(var(--state-error));
  border-radius: 0.5rem;
  margin-bottom: 1.25rem;
}
.product-notice__icon {
  flex-shrink: 0;
  color: rgb(var(--state-error));
  margin-top: 0.125rem;
}
.product-notice__body strong {
  display: block;
  font-size: 0.875rem;
  color: rgb(var(--state-error));
  margin-bottom: 0.25rem;
}
.product-notice__body p {
  font-size: 0.8125rem;
  font-weight: 300;
  color: rgb(var(--text));
  margin: 0;
  line-height: 1.6;
}

/* ── Information Section (Accordions) ─────────────────────── */
.product-info {
  margin-top: 2.5rem;
  max-width: 860px;
  border: 1px solid rgb(var(--divider));
  border-radius: 0.75rem;
  overflow: hidden;
  animation: fadeUp 0.6s cubic-bezier(0.22, 1, 0.36, 1) 0.2s both;
}
.product-info__section {
  border-bottom: 1px solid rgb(var(--divider));
}
.product-info__section:last-child {
  border-bottom: none;
}
.product-info__section > summary {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  font-family: "Poppins", sans-serif;
  font-size: 0.875rem;
  font-weight: 600;
  color: #fff;
  cursor: pointer;
  background: rgb(var(--brand));
  transition: background 0.2s ease;
  list-style: none;
  user-select: none;
  -webkit-user-select: none;
}
.product-info__section > summary::-webkit-details-marker {
  display: none;
}
.product-info__section > summary::after {
  content: "+";
  font-size: 1.25rem;
  font-weight: 300;
  line-height: 1;
  color: #fff;
  margin-left: auto;
}
.product-info__section[open] > summary::after {
  content: "−";
  color: #fff;
}
.product-info__section > summary:hover {
  background: rgb(var(--brand-hover));
}
.product-info__section > summary .inline-icon {
  flex-shrink: 0;
  color: #fff;
}
.product-info__section > div,
.product-info__section > .prose {
  padding: 1rem 1.25rem 1.25rem;
  border-top: 1px solid rgb(var(--divider));
  background: #fff;
}
/* Prose inside accordion: fix spacing for first/last child */
.product-info__section > .prose > *:first-child {
  margin-top: 0;
}
.product-info__section > .prose > *:last-child {
  margin-bottom: 0;
}

/* ── Info Table ────────────────────────────────────────────── */
.product-info__table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8125rem;
}
.product-info__table th {
  text-align: left;
  font-weight: 600;
  color: rgb(var(--heading));
  padding: 0.625rem 0.75rem;
  background: rgb(var(--surface-alt));
  border-bottom: 1px solid rgb(var(--divider));
}
.product-info__table td {
  padding: 0.625rem 0.75rem;
  color: rgb(var(--text));
  border-bottom: 1px solid rgb(var(--divider));
  font-weight: 300;
}
.product-info__table tr:last-child td {
  border-bottom: none;
}

@media (max-width: 424px) {
  .product-info__table thead {
    display: none;
  }
  .product-info__table tr {
    display: block;
    padding: 0.625rem 0;
    border-bottom: 1px solid rgb(var(--divider));
  }
  .product-info__table tr:last-child {
    border-bottom: none;
  }
  .product-info__table td {
    display: block;
    padding: 0.125rem 0.75rem;
    border-bottom: none;
  }
  .product-info__table td:first-child {
    font-weight: 600;
    color: rgb(var(--heading));
  }
}

/* ── Info Video ────────────────────────────────────────────── */
.product-info__video {
  width: 100%;
  max-width: 640px;
  border-radius: 0.5rem;
  margin-top: 1rem;
}

/* ── Gallery Thumbnails ───────────────────────────────────── */
.product-gallery-thumbs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  gap: 0.5rem;
  margin-top: 0.75rem;
}
.product-gallery-thumb {
  position: relative;
  margin: 0;
  cursor: zoom-in;
  overflow: hidden;
  border-radius: 0.375rem;
  border: 1px solid rgb(var(--divider));
  aspect-ratio: 1;
  transition: border-color 0.2s ease;
}
.product-gallery-thumb:hover {
  border-color: rgb(var(--brand));
}
.product-gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}
.product-gallery-thumb:hover img {
  transform: scale(1.06);
}
.product-gallery-thumb__zoom {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgb(var(--raw-950) / 0.3);
  color: white;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.product-gallery-thumb:hover .product-gallery-thumb__zoom {
  opacity: 1;
}

/* ── WC Cart Form ─────────────────────────────────────────── */
.single-product .cart {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: stretch;
  margin-bottom: 1.5rem;
}
.single-product .cart .quantity {
  flex-shrink: 0;
}
.single-product .cart .single_add_to_cart_button,
.single-product .cart .vpc-configure-button {
  flex: 1;
  min-width: 0;
}
.single-product .cart > p,
.single-product .cart > label,
.single-product .cart > div:not(.quantity) {
  flex-basis: 100%;
}
.single-product .cart .quantity {
  flex-shrink: 0;
}

/* ── WC Product Meta (SKU, Categories, Tags) ──────────────── */
.single-product .product_meta {
  font-size: 0.75rem;
  font-weight: 400;
  color: rgb(var(--heading));
  line-height: 1.8;
  padding-top: 1rem;
  border-top: 1px solid rgb(var(--divider));
}
.single-product .product_meta > span {
  display: block;
}
.single-product .product_meta a {
  color: rgb(var(--brand-text));
  text-decoration: none;
  transition: color 0.2s;
}
.single-product .product_meta a:hover {
  color: rgb(var(--brand-text));
}
.single-product .product_meta .sku {
  font-weight: 600;
  color: rgb(var(--heading));
}

/* ── WC Gallery Trigger (zoom icon) ───────────────────────── */
.single-product .woocommerce-product-gallery__trigger {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 5;
  width: 2.5rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgb(var(--surface) / 0.9);
  border-radius: 50%;
  box-shadow: 0 2px 8px rgb(var(--raw-950) / 0.1);
  text-decoration: none;
  font-size: 1rem;
  transition: all 0.2s ease;
}
.single-product .woocommerce-product-gallery__trigger:hover {
  background: rgb(var(--surface));
  transform: scale(1.1);
}

/* ── WC Notices on Product Page (base styles in wc-global.css) ── */
.single-product .woocommerce-message,
.single-product .woocommerce-error,
.single-product .woocommerce-info {
  grid-column: 1 / -1;
}

/* ── WC Add to Cart / Configure Button ────────────────────── */
.single-product .single_add_to_cart_button,
.single-product .vpc-configure-button {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  flex: 1;
  padding: 1rem 2rem;
  font-family: "Poppins", sans-serif;
  font-size: 1rem;
  font-weight: 600;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: rgb(var(--btn-bg));
  color: rgb(var(--btn-text)) !important;
  border: 1px solid rgb(var(--btn-bg));
  border-radius: 0.5rem;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}
.single-product .single_add_to_cart_button:hover,
.single-product .vpc-configure-button:hover {
  background: rgb(var(--btn-bg-hover));
  border-color: rgb(var(--btn-bg-hover));
  transform: translateY(-2px);
  box-shadow: 0 8px 25px -5px rgb(var(--btn-shadow) / 0.3);
}

/* ── Voucher Fields (Gutscheine) ──────────────────────────── */
.voucher-fields-wrapper {
  padding: 1.25rem;
  background: rgb(var(--surface));
  border: 1px solid rgb(var(--divider));
  border-radius: 0.75rem;
}
.voucher-fields .form-row label {
  display: block;
  font-family: "Poppins", sans-serif;
  font-size: 0.8125rem;
  font-weight: 600;
  color: rgb(var(--heading));
  margin-bottom: 0.5rem;
}
.voucher-fields .form-row .input-text {
  width: 100%;
  padding: 0.75rem;
  font-family: "Poppins", sans-serif;
  font-size: 0.875rem;
  border: 1px solid rgb(var(--input-border));
  border-radius: 0.5rem;
  background: rgb(var(--input-bg));
  color: rgb(var(--input-text));
}
.voucher-fields .form-row .input-text:focus {
  outline: none;
  border-color: rgb(var(--brand));
  box-shadow: 0 0 0 2px rgb(var(--brand) / 0.15);
}
.voucher-image-options {
  margin-top: 0.75rem;
}
.voucher-image-option img {
  border-radius: 0.5rem;
  border: 1px solid rgb(var(--divider));
}

/* ── WC Quantity Input ────────────────────────────────────── */
.single-product .quantity .qty {
  width: 4rem;
  height: 100%;
  padding: 0.75rem;
  font-family: "Poppins", sans-serif;
  font-size: 0.875rem;
  text-align: center;
  border: 1px solid rgb(var(--input-border));
  border-radius: 0.5rem;
  background: rgb(var(--input-bg));
  color: rgb(var(--input-text));
}

/* ── WC Tabs ──────────────────────────────────────────────── */
.single-product .woocommerce-tabs {
  margin-top: 2.5rem;
}
.single-product .woocommerce-tabs ul.tabs {
  list-style: none;
  display: flex;
  gap: 0;
  margin: 0;
  padding: 0;
  border-bottom: 2px solid rgb(var(--divider));
}
.single-product .woocommerce-tabs ul.tabs li {
  margin: 0;
  list-style: none;
}
.single-product .woocommerce-tabs ul.tabs li a {
  display: block;
  padding: 0.875rem 1.5rem;
  font-family: "Poppins", sans-serif;
  font-size: 1.4rem;
  font-weight: 600;
  color: rgb(var(--text-muted));
  text-decoration: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition:
    color 0.2s ease,
    border-color 0.2s ease;
}
.single-product .woocommerce-tabs ul.tabs li a:hover {
  color: rgb(var(--heading));
}
.single-product .woocommerce-tabs ul.tabs li.active a {
  color: rgb(var(--heading));
  border-bottom-color: rgb(var(--brand));
}
.single-product .woocommerce-tabs .panel {
  padding: 2rem 0;
}
/* Tab panel prose content max-width for readability */
.single-product .woocommerce-tabs .panel .prose {
  max-width: 860px;
}
/* Reset WC tab before/after pseudo elements */
.single-product .woocommerce-tabs ul.tabs::before,
.single-product .woocommerce-tabs ul.tabs::after {
  display: none;
}
.single-product .woocommerce-tabs ul.tabs li::before,
.single-product .woocommerce-tabs ul.tabs li::after {
  display: none;
}

/* ── Description Content Images ────────────────────────────── */
.single-product .woocommerce-tabs .prose img {
  border-radius: 0.5rem;
  margin: 1rem 0;
  height: auto;
}
.single-product .woocommerce-tabs .prose img.alignleft {
  float: left;
  margin: 0.5rem 1.5rem 1rem 0;
  max-width: 40%;
}
.single-product .woocommerce-tabs .prose img.alignright {
  float: right;
  margin: 0.5rem 0 1rem 1.5rem;
  max-width: 40%;
}
@media (max-width: 639px) {
  .single-product .woocommerce-tabs .prose img.alignleft,
  .single-product .woocommerce-tabs .prose img.alignright {
    float: none;
    max-width: 100%;
    margin: 1rem 0;
  }
}

/* ── Description Red Warning Text ─────────────────────────── */
.single-product .woocommerce-tabs .prose .red,
.single-product .woocommerce-tabs .prose p[style*="color: #e02b20"],
.single-product .woocommerce-tabs .prose p[style*="color: #c71010"],
.single-product .woocommerce-tabs .prose span[style*="color: #e02b20"],
.single-product .woocommerce-tabs .prose span[style*="color: #c71010"] {
  color: rgb(var(--state-error)) !important;
}

/* Related Products: see wc-related-products.css */

/* ── Summary Reveal Animation ─────────────────────────────── */
.single-product .summary > * {
  animation: fadeUp 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.single-product .summary > *:nth-child(1) { animation-delay: 0.05s; }
.single-product .summary > *:nth-child(2) { animation-delay: 0.12s; }
.single-product .summary > *:nth-child(3) { animation-delay: 0.19s; }
.single-product .summary > *:nth-child(4) { animation-delay: 0.26s; }
.single-product .summary > *:nth-child(5) { animation-delay: 0.33s; }
.single-product .summary > *:nth-child(6) { animation-delay: 0.4s; }
.single-product .summary > *:nth-child(n+7) { animation-delay: 0.45s; }

/* ── Responsive: Tablet ──────────────────────────────────── */
@media (max-width: 767px) {
  .single-product .product_title {
    font-size: 1.5rem;
  }
  .product-price__amount {
    font-size: 1.5rem;
  }
  .product-price__details {
    flex-direction: column;
    gap: 0.5rem;
  }
  .product-info {
    margin-top: 1.5rem;
  }
  .product-info__section > summary {
    font-size: 0.8125rem;
    padding: 0.875rem 1rem;
    gap: 0.5rem;
  }
  .product-info__section > div,
  .product-info__section > .prose {
    padding: 0.875rem 1rem 1rem;
  }
  .single-product .woocommerce-tabs {
    margin-top: 1.5rem;
  }
  .single-product .woocommerce-tabs ul.tabs {
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .single-product .woocommerce-tabs ul.tabs::-webkit-scrollbar {
    display: none;
  }
  .single-product .woocommerce-tabs ul.tabs li a {
    padding: 0.75rem 1rem;
    font-size: 1rem;
    white-space: nowrap;
  }
  .single-product .woocommerce-tabs .panel {
    padding: 1.25rem 0;
  }
  .product-gallery-thumbs {
    grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
    gap: 0.375rem;
  }
  /* Summary elements tighter spacing */
  .product-meta,
  .product-gallery-notice,
  .product-manufacturer {
    padding: 0.625rem 0.875rem;
  }
  .product-checklist,
  .product-notice,
  .product-discount {
    padding: 0.875rem 1rem;
  }
}

/* ── Responsive: Small Mobile ────────────────────────────── */
@media (max-width: 424px) {
  .single-product .product_title {
    font-size: 1.25rem;
  }
  .product-price {
    padding: 1rem;
  }
  .product-price__amount {
    font-size: 1.25rem;
  }
  .product-info__section > summary {
    font-size: 0.75rem;
  }
}
