﻿/*
  Woo product top section styled after przyklad.php (gpph card look)
  Scope: single product only, block theme template.
*/

body.single-product.woocommerce-block-theme {
  background: #f5f5f7;
  color: #111;
}

body.single-product.woocommerce-block-theme
main.wp-block-group.has-global-padding.is-layout-constrained.wp-block-group-is-layout-constrained {
  width: min(1240px, calc(100vw - 40px));
  max-width: min(1240px, calc(100vw - 40px));
  margin: 0 auto;
  padding: 0;
}

body.single-product.woocommerce-block-theme
main.wp-block-group.has-global-padding.is-layout-constrained.wp-block-group-is-layout-constrained
> .wp-block-columns.alignwide {
  width: 100%;
  max-width: 100%;
  margin: 0;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 0;
  align-items: stretch;
  border: 1px solid #eaeaea;
  border-radius: 18px;
  background: #fff;
  overflow: hidden;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.06);
}

body.single-product.woocommerce-block-theme
main.wp-block-group.has-global-padding.is-layout-constrained.wp-block-group-is-layout-constrained
> .wp-block-columns.alignwide
> .wp-block-column {
  min-width: 0;
}

body.single-product.woocommerce-block-theme
main.wp-block-group.has-global-padding.is-layout-constrained.wp-block-group-is-layout-constrained
> .wp-block-columns.alignwide
> .wp-block-column:first-child {
  position: static;
  top: auto;
  padding: 18px;
  border-right: 1px solid #f0f0f0;
}

body.single-product.woocommerce-block-theme
main.wp-block-group.has-global-padding.is-layout-constrained.wp-block-group-is-layout-constrained
> .wp-block-columns.alignwide
> .wp-block-column:last-child {
  position: static;
  top: auto;
  margin: 0;
  padding: 22px;
  background: transparent;
  border: 0;
  box-shadow: none;
}

/* Left media area */
body.single-product.woocommerce-block-theme .wp-block-woocommerce-product-image-gallery {
  margin: 0;
  padding: 14px;
  border: 1px solid #ededed;
  border-radius: 14px;
  background: #fff;
  box-shadow: none;
}

body.single-product.woocommerce-block-theme .woocommerce-product-gallery,
body.single-product.woocommerce-block-theme .woocommerce-product-gallery__wrapper {
  min-height: 0;
  background: transparent;
}

body.single-product.woocommerce-block-theme .woocommerce-product-gallery img {
  max-height: 520px;
  object-fit: contain;
}

body.single-product.woocommerce-block-theme .woocommerce-product-gallery__trigger,
body.single-product.woocommerce-block-theme .woo-variation-gallery-thumbnail-wrapper,
body.single-product.woocommerce-block-theme .flex-control-thumbs {
  display: none;
}

/* Right content heading */
body.single-product.woocommerce-block-theme .wp-block-post-title {
  margin: 0 0 10px;
  font-size: 26px;
  line-height: 1.18;
  font-weight: 700;
  letter-spacing: -0.01em;
}

body.single-product.woocommerce-block-theme .wp-block-woocommerce-product-price {
  margin: 0 0 12px;
}

body.single-product.woocommerce-block-theme .wc-block-components-product-price {
  font-size: 28px;
  line-height: 1.08;
  font-weight: 700;
}

body.single-product.woocommerce-block-theme .wp-block-post-excerpt {
  margin: 0 0 14px;
}

body.single-product.woocommerce-block-theme .wp-block-post-excerpt p {
  margin: 0;
  color: #444;
  line-height: 1.62;
  font-size: 15px;
}

/* Remove old custom card UI if present */
body.single-product.woocommerce-block-theme form.ap-variations-enhanced .ap-step-shell {
  display: none !important;
}

body.single-product.woocommerce-block-theme form.ap-variations-enhanced .ap-native-select {
  position: static !important;
  width: 100% !important;
  height: auto !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 1px solid #dcdcdc !important;
  clip: auto !important;
  overflow: visible !important;
  pointer-events: auto !important;
}

/* Native Woo variations in gpph card style */
body.single-product.woocommerce-block-theme .wp-block-add-to-cart-form {
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

body.single-product.woocommerce-block-theme form.variations_form table.variations {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 10px;
  margin: 0 0 12px;
}

body.single-product.woocommerce-block-theme form.variations_form table.variations tr {
  border: 1px solid #ededed;
  border-radius: 14px;
  background: #fff;
}

body.single-product.woocommerce-block-theme form.variations_form table.variations th,
body.single-product.woocommerce-block-theme form.variations_form table.variations td {
  border: 0 !important;
  padding: 10px 12px !important;
  vertical-align: middle;
}

body.single-product.woocommerce-block-theme form.variations_form table.variations th.label {
  width: 38%;
}

body.single-product.woocommerce-block-theme form.variations_form table.variations th.label label {
  display: block;
  font-size: 12px;
  color: #666;
  font-weight: 700;
}

body.single-product.woocommerce-block-theme form.variations_form table.variations td.value {
  width: 62%;
}

body.single-product.woocommerce-block-theme form.variations_form select {
  width: 100%;
  min-height: 46px;
  border: 1px solid #dcdcdc;
  border-radius: 12px;
  background: #fff;
  color: #111;
  font-size: 14px;
  line-height: 1.2;
  padding: 10px 12px;
}

body.single-product.woocommerce-block-theme form.variations_form a.reset_variations {
  display: none !important;
}

body.single-product.woocommerce-block-theme .single_variation_wrap {
  border-top: 1px solid #ededed;
  margin-top: 10px;
  padding-top: 10px;
}

body.single-product.woocommerce-block-theme .woocommerce-variation-add-to-cart {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: center;
}

body.single-product.woocommerce-block-theme .quantity {
  margin: 0;
}

body.single-product.woocommerce-block-theme .quantity .qty {
  min-height: 46px;
  min-width: 86px;
  border: 1px solid #dcdcdc;
  border-radius: 12px;
  padding-inline: 12px;
  text-align: center;
}

body.single-product.woocommerce-block-theme .single_add_to_cart_button.button.alt,
body.single-product.woocommerce-block-theme .single_add_to_cart_button.wp-element-button {
  min-height: 46px;
  border: 0;
  border-radius: 12px;
  background: #111;
  color: #fff;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -0.01em;
  padding: 0 18px;
}

body.single-product.woocommerce-block-theme .single_add_to_cart_button.button.alt:hover,
body.single-product.woocommerce-block-theme .single_add_to_cart_button.wp-element-button:hover {
  background: #000;
}

/* Product details section below */
body.single-product.woocommerce-block-theme .wp-block-woocommerce-product-details {
  margin-top: 18px;
  border: 1px solid #eaeaea;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.06);
  padding: 22px;
}

/* Mobile */
@media (max-width: 1120px) {
  body.single-product.woocommerce-block-theme
  main.wp-block-group.has-global-padding.is-layout-constrained.wp-block-group-is-layout-constrained {
    width: calc(100vw - 24px);
    max-width: calc(100vw - 24px);
  }

  body.single-product.woocommerce-block-theme
  main.wp-block-group.has-global-padding.is-layout-constrained.wp-block-group-is-layout-constrained
  > .wp-block-columns.alignwide {
    grid-template-columns: 1fr;
  }

  body.single-product.woocommerce-block-theme
  main.wp-block-group.has-global-padding.is-layout-constrained.wp-block-group-is-layout-constrained
  > .wp-block-columns.alignwide
  > .wp-block-column:first-child {
    border-right: 0;
    border-bottom: 1px solid #f0f0f0;
  }

  body.single-product.woocommerce-block-theme
  main.wp-block-group.has-global-padding.is-layout-constrained.wp-block-group-is-layout-constrained
  > .wp-block-columns.alignwide
  > .wp-block-column:last-child {
    padding: 18px;
  }

  body.single-product.woocommerce-block-theme form.variations_form table.variations th,
  body.single-product.woocommerce-block-theme form.variations_form table.variations td {
    display: block;
    width: 100%;
    padding: 8px 10px !important;
  }

  body.single-product.woocommerce-block-theme .woocommerce-variation-add-to-cart {
    grid-template-columns: 1fr;
  }

  body.single-product.woocommerce-block-theme .quantity .qty,
  body.single-product.woocommerce-block-theme .single_add_to_cart_button.button.alt,
  body.single-product.woocommerce-block-theme .single_add_to_cart_button.wp-element-button {
    width: 100%;
  }
}

