/* Two-column gallery+summary shell — matches docs/static-export/product.html's
   .product-page/.product-main container/row dimensions, applied directly to
   WooCommerce's native #primary/div.product/.woocommerce-product-gallery/.summary
   markup (no new wrapper divs needed). */
.single-product #primary {
  max-width: 1100px;
  margin: 0 auto;
  padding: 32px 40px;
}

.single-product div.product {
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
}

.single-product div.product .woocommerce-product-gallery,
.single-product div.product .summary {
  flex: 1;
  min-width: 0;
}

/* div.product has other native WooCommerce siblings after gallery/summary
   (.woocommerce-tabs, .related.products) — force them onto their own line
   instead of joining the gallery/summary flex row. */
.single-product div.product .woocommerce-tabs,
.single-product div.product .related.products {
  flex-basis: 100%;
}

@media (max-width: 899px) {
  .single-product #primary {
    padding: 20px 16px;
  }

  .single-product div.product {
    flex-direction: column;
    gap: 24px;
  }
}

/* Related products keeps four columns at desktop and two on mobile. */
.single-product .related ul.products {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}

.single-product .related ul.products::before,
.single-product .related ul.products::after {
  content: none;
  display: none;
}

@media (max-width: 899px) {
  .single-product .related ul.products {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Pix price block */
.rodasshop-pix-price {
  font-weight: 900;
  font-size: 24px;
  color: var(--color-primary);
}

.single-product div.product .summary .price {
  color: var(--color-dark);
}

.single-product div.product .woocommerce-product-gallery .flex-viewport {
  /* Flexslider writes an inline auto-height after image initialization. */
  height: 380px !important;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: #fff;
  box-sizing: border-box;
}

.single-product div.product .woocommerce-product-gallery .flex-viewport .woocommerce-product-gallery__image {
  height: 380px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.single-product div.product .woocommerce-product-gallery .flex-viewport .woocommerce-product-gallery__image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.single-product div.product .woocommerce-product-gallery .flex-control-thumbs {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.single-product div.product .woocommerce-product-gallery .flex-control-thumbs li {
  width: 64px !important;
  height: 64px;
  margin: 0;
}

.single-product div.product .woocommerce-product-gallery .flex-control-thumbs li img {
  width: 64px;
  height: 64px;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  object-fit: cover;
}

.rodasshop-pix-link {
  display: inline-block;
  color: var(--color-primary);
  text-decoration: underline;
  margin-bottom: 12px;
}

/* Installment text */
.rodasshop-installment {
  color: var(--color-text-secondary);
  font-size: 14px;
  margin-bottom: 12px;
}

/* Trust badges grid */
.rodasshop-trust-badges {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 16px 0;
  padding-top: 16px;
  border-top: 1px solid var(--color-border);
}

.rodasshop-trust-badge {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.rodasshop-trust-icon {
  color: var(--color-primary);
  font-size: 18px;
  line-height: 1;
}

.rodasshop-trust-badge-label {
  color: #6b7280;
  font-size: 11px;
}

/* Full-width description and compatibility card */
.rodasshop-desc-card {
  flex-basis: 100%;
  width: 100%;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 24px;
  box-sizing: border-box;
}

.rodasshop-desc-card h2 {
  margin: 0 0 12px;
  font-size: 20px;
  color: var(--color-dark);
}

.rodasshop-description {
  margin-top: 20px;
}

/* Compatibility list */
.rodasshop-compatibility {
  margin: 0;
}

.rodasshop-compatibility ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.rodasshop-compatibility li {
  padding: 4px 0;
  font-size: 14px;
  color: var(--color-text-secondary);
}

@media (max-width: 899px) {
  .rodasshop-desc-card {
    padding: 20px 16px;
  }
}

/* Shipping calculator */
.rodasshop-shipping-calculator {
  margin: 16px 0;
}

.rodasshop-shipping-calculator label {
  display: block;
  font-weight: 700;
  margin-bottom: 4px;
}

.rodasshop-shipping-fields {
  display: flex;
  align-items: center;
  gap: 8px;
}

.rodasshop-shipping-cep {
  width: 100%;
  max-width: 200px;
  padding: 8px 12px;
  border: 1px solid var(--color-border);
  border-radius: var(--button-radius);
  font-size: 14px;
}

.rodasshop-shipping-submit {
  flex: 0 0 auto;
  padding: 8px 14px;
  border: none;
  border-radius: var(--button-radius);
  background: var(--color-primary);
  color: var(--color-white);
  cursor: pointer;
}

.single-product div.product .product_title {
  font-size: 22px;
}

.rodasshop-shipping-validation {
  color: var(--color-error);
  font-size: 13px;
  margin-top: 4px;
}

.rodasshop-shipping-results {
  margin-top: 12px;
}

.rodasshop-shipping-rates {
  list-style: none;
  padding: 0;
}

.rodasshop-shipping-rates li {
  padding: 4px 0;
  font-size: 14px;
}

.rodasshop-shipping-error {
  color: var(--color-error);
  font-size: 13px;
}

/* Buy button — "COMPRAR" red, full-width.
   .woocommerce button.single_add_to_cart_button.button = (0,3,1) specificity
   matches WC core's button.button.alt element-tier, then wins via cascade order. */
.woocommerce button.single_add_to_cart_button.button {
  background-color: var(--color-primary);
  color: var(--color-white);
  font-weight: 700;
  font-size: 14px;
  border: none;
  border-radius: var(--button-radius);
  height: 46px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  cursor: pointer;
}

.woocommerce button.single_add_to_cart_button.button:hover {
  background-color: var(--color-primary-hover);
}

/* Tabs (Descrição / Avaliações) — the vendored Storefront CSS floats
   ul.tabs at ~30% width on the left and .panel at ~65% on the right
   (a vertical sidebar-style tab list), leaving a large empty gap on
   this single-column page. Switch to a plain horizontal tab bar with
   the panel full-width below, in line with the rest of the page. */
.woocommerce-tabs ul.tabs {
  width: 100%;
  float: none;
  display: flex;
  gap: 24px;
  margin: 0 0 20px;
  border-top: none;
  border-bottom: 1px solid var(--color-border);
}

.woocommerce-tabs ul.tabs li {
  border-bottom: none;
}

.woocommerce-tabs ul.tabs li.active::before,
.woocommerce-tabs ul.tabs li.active::after {
  content: none;
}

.woocommerce-tabs ul.tabs li a {
  padding: 12px 2px;
  font-weight: 700;
  color: var(--color-text-secondary);
}

.woocommerce-tabs ul.tabs li.active a {
  color: var(--color-primary);
  box-shadow: inset 0 -2px 0 var(--color-primary);
}

.woocommerce-tabs .panel {
  width: 100%;
  float: none;
  margin-top: 0;
}

/* Review list */
.commentlist li .comment_container {
  border: var(--card-border);
  border-radius: var(--card-radius);
  padding: 16px;
  margin-bottom: 16px;
}

/* Review form — vendored storefront/style.css has
   "#respond .comment-form-author, #respond .comment-form-email, #respond
   .comment-form-url { width: 29.4%; float: left; margin-right: 5.88% }".
   That ID-scoped selector outranks a plain class selector regardless of
   load order, so float:left wins for BOTH fields (no float:right for
   email) and they end up flush against each other. Match the #respond
   prefix so specificity ties and this (later-loaded) rule wins instead. */
#respond .comment-form-author {
  float: left;
  width: 47%;
  margin-right: 6%;
}

#respond .comment-form-email {
  float: right;
  width: 47%;
  margin-right: 0;
}

.comment-form-cookies-consent {
  clear: both;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  padding-top: 8px;
}

.comment-form-cookies-consent input[type="checkbox"] {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

#commentform input[type="text"],
#commentform input[type="email"],
#commentform textarea,
#commentform select#rating {
  border: 1px solid var(--color-border);
  border-radius: var(--button-radius);
  padding: 8px 12px;
  font-family: var(--font-family-base);
}

.woocommerce #review_form #respond p.form-submit input#submit {
  background-color: var(--color-primary);
  color: var(--color-white);
  border: none;
  border-radius: var(--button-radius);
  min-height: var(--button-height-min);
  padding: 0 24px;
  font-weight: 700;
  cursor: pointer;
}

.woocommerce #review_form #respond p.form-submit input#submit:hover {
  background-color: var(--color-primary-hover);
}
