/* Rincón Tostitos — single product (full-bleed desktop) */
body.single-product {
  --rt-cream: #f5f0e8;
  --rt-ink: #1a1612;
  --rt-green: #1c7944;
  --rt-pad: clamp(1rem, 3vw, 2.5rem);
  --rt-max: 1280px;
  background: var(--rt-cream) !important;
  color: var(--rt-ink);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}

body.single-product .wp-site-blocks {
  background: var(--rt-cream);
  padding: 0 !important;
  max-width: none !important;
  width: 100% !important;
}

/* Header full width */
body.single-product header.wp-block-template-part {
  display: block !important;
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(245, 240, 232, 0.96) !important;
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(26, 22, 18, 0.08);
  width: 100% !important;
  max-width: none !important;
}

body.single-product header.wp-block-template-part .wp-block-group.alignfull,
body.single-product header.wp-block-template-part .wp-block-group.has-global-padding,
body.single-product header.wp-block-template-part .wp-block-group.alignwide {
  max-width: var(--rt-max) !important;
  width: 100% !important;
  margin-left: auto !important;
  margin-right: auto !important;
  padding-left: var(--rt-pad) !important;
  padding-right: var(--rt-pad) !important;
  box-sizing: border-box;
}

body.single-product header.wp-block-template-part .wp-block-group.alignwide {
  padding-top: 0.85rem !important;
  padding-bottom: 0.85rem !important;
}

body.single-product .wp-block-site-title {
  margin: 0 !important;
  font-size: 0 !important;
  line-height: 0 !important;
}

body.single-product .wp-block-site-title a {
  display: block !important;
  width: min(200px, 52vw);
  height: 54px;
  background: url("https://rincontostitos.com.mx/wp-content/uploads/rt/rt-logo-horizontal.png") no-repeat left center / contain;
  color: transparent !important;
  overflow: hidden;
  text-indent: -9999px;
}

body.single-product header.wp-block-template-part nav,
body.single-product header.wp-block-template-part .wp-block-navigation {
  display: none !important;
}

body.single-product a.rt-product-menus {
  display: inline-flex;
  align-items: center;
  margin-left: auto;
  padding: 0.6rem 1.1rem;
  border-radius: 999px;
  background: var(--rt-green);
  color: #fff !important;
  text-decoration: none !important;
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1.2;
  box-shadow: 0 4px 12px rgba(28, 121, 68, 0.35);
}

/* Hide theme chrome noise */
body.single-product footer.wp-block-template-part,
body.single-product .wp-block-template-part[data-area="footer"] {
  display: none !important;
}

body.single-product .woocommerce-breadcrumb,
body.single-product .wp-block-woocommerce-breadcrumbs,
body.single-product .woocommerce-Tabs-panel--reviews,
body.single-product .woocommerce-Reviews,
body.single-product #reviews,
body.single-product .woocommerce-product-details__short-description,
body.single-product .product_meta .sku_wrapper,
body.single-product .product_meta .tagged_as,
body.single-product .wp-block-woocommerce-product-meta {
  display: none !important;
}

/* Main: use full page width */
body.single-product main,
body.single-product div.product,
body.single-product .wp-block-group.woocommerce,
body.single-product .wp-block-group.is-layout-constrained,
body.single-product .has-global-padding {
  max-width: none !important;
  width: 100% !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
}

/* Product grid shell */
body.single-product .wp-block-columns,
body.single-product main .is-layout-flex:has(.wp-block-woocommerce-product-image),
body.single-product main .is-layout-flex:has(.woocommerce-product-gallery) {
  display: flex !important;
  flex-direction: column !important;
  flex-wrap: nowrap !important;
  align-items: stretch !important;
  gap: 0 !important;
  width: 100% !important;
  max-width: var(--rt-max) !important;
  margin-left: auto !important;
  margin-right: auto !important;
  box-sizing: border-box;
}

body.single-product .wp-block-column,
body.single-product .wp-block-columns > * {
  flex: 1 1 auto !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  margin: 0 !important;
}

/* Image */
body.single-product .woocommerce-product-gallery,
body.single-product .wp-block-woocommerce-product-image {
  width: 100% !important;
  max-width: 100% !important;
  float: none !important;
  margin: 0 !important;
}

body.single-product .woocommerce-product-gallery__wrapper,
body.single-product .woocommerce-product-gallery__image,
body.single-product .woocommerce-product-gallery__image a {
  margin: 0 !important;
  width: 100% !important;
}

body.single-product .woocommerce-product-gallery__image img,
body.single-product .wp-block-woocommerce-product-image img,
body.single-product .wp-post-image {
  width: 100% !important;
  max-width: 100% !important;
  height: auto !important;
  aspect-ratio: 1 / 1;
  object-fit: cover !important;
  border-radius: 0 !important;
  display: block !important;
  box-shadow: none !important;
}

body.single-product .flex-control-thumbs,
body.single-product .flex-control-nav {
  display: none !important;
}

/* Text block */
body.single-product .wp-block-column:has(.wp-block-post-title),
body.single-product .wp-block-column:has(h1),
body.single-product .summary.entry-summary {
  padding: 1.5rem var(--rt-pad) 1.25rem !important;
  box-sizing: border-box;
  width: 100% !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: center;
  gap: 0.35rem;
}

body.single-product .product_title,
body.single-product h1.wp-block-post-title,
body.single-product .wp-block-post-title,
body.single-product h1 {
  display: block !important;
  width: 100% !important;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif !important;
  font-size: clamp(1.75rem, 3.2vw, 2.75rem) !important;
  font-weight: 750 !important;
  line-height: 1.2 !important;
  letter-spacing: normal !important;
  word-break: normal !important;
  overflow-wrap: break-word;
  white-space: normal !important;
  color: var(--rt-ink) !important;
  margin: 0 0 0.35rem !important;
  padding: 0 !important;
}

/* Precio: $ y monto en UNA sola fila */
body.single-product .wp-block-woocommerce-product-price,
body.single-product .wc-block-components-product-price,
body.single-product p.price,
body.single-product .price {
  display: block !important;
  margin: 0 0 1.15rem !important;
  color: var(--rt-green) !important;
}

body.single-product .woocommerce-Price-amount,
body.single-product .woocommerce-Price-amount.amount,
body.single-product .wc-block-components-product-price .woocommerce-Price-amount {
  display: inline-flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  align-items: baseline !important;
  gap: 0.06em;
  white-space: nowrap !important;
  font-size: clamp(1.4rem, 2.1vw, 1.85rem) !important;
  font-weight: 700 !important;
  line-height: 1.25 !important;
  letter-spacing: normal !important;
  color: var(--rt-green) !important;
  margin: 0 !important;
}

body.single-product .woocommerce-Price-amount bdi,
body.single-product .woocommerce-Price-currencySymbol {
  display: inline !important;
  margin: 0 !important;
  padding: 0 !important;
  font: inherit !important;
  color: inherit !important;
  white-space: nowrap !important;
  vertical-align: baseline;
}

body.single-product .wp-block-post-excerpt,
body.single-product .wp-block-post-excerpt p,
body.single-product .woocommerce-tabs,
body.single-product .wp-block-post-terms {
  font-size: 1.05rem !important;
  line-height: 1.55 !important;
  letter-spacing: normal !important;
}

/* Cantidad + agregar: misma fila, misma altura */
body.single-product .wp-block-add-to-cart-form,
body.single-product form.cart {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  align-items: stretch !important;
  gap: 0.75rem;
  width: 100% !important;
  max-width: 440px;
  margin: 0.5rem 0 0 !important;
  padding: 0 !important;
  box-sizing: border-box;
}

body.single-product form.cart .quantity,
body.single-product .quantity {
  display: flex !important;
  align-items: stretch !important;
  margin: 0 !important;
  float: none !important;
  width: auto !important;
  flex: 0 0 auto;
}

body.single-product .quantity input.qty,
body.single-product input.qty {
  display: block !important;
  box-sizing: border-box !important;
  width: 4.25rem !important;
  min-width: 4.25rem !important;
  height: 3.1rem !important;
  margin: 0 !important;
  border-radius: 12px !important;
  border: 1px solid rgba(26, 22, 18, 0.16) !important;
  background: #fff !important;
  font-size: 1.05rem !important;
  line-height: 1.2 !important;
  text-align: center;
  padding: 0 0.4rem !important;
}

body.single-product .single_add_to_cart_button,
body.single-product button.single_add_to_cart_button,
body.single-product form.cart .single_add_to_cart_button,
body.single-product .wp-block-button__link {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: var(--rt-green) !important;
  border: 0 !important;
  border-radius: 999px !important;
  color: #fff !important;
  font-size: 1.05rem !important;
  font-weight: 700 !important;
  line-height: 1.2 !important;
  letter-spacing: normal !important;
  padding: 0 1.4rem !important;
  height: 3.1rem !important;
  min-height: 3.1rem !important;
  flex: 1 1 auto;
  width: auto !important;
  max-width: none !important;
  margin: 0 !important;
  box-shadow: 0 4px 14px rgba(28, 121, 68, 0.3);
  white-space: nowrap;
}

/* Related — full content width */
body.single-product .related.products,
body.single-product .wp-block-woocommerce-related-products,
body.single-product .wp-block-woocommerce-product-collection,
body.single-product .wp-block-group:has(.wp-block-woocommerce-product-collection) {
  max-width: var(--rt-max) !important;
  width: 100% !important;
  margin: 2rem auto 0 !important;
  padding: 0 var(--rt-pad) 3rem !important;
  box-sizing: border-box;
}

body.single-product .related.products > h2,
body.single-product .wp-block-woocommerce-related-products .wp-block-heading,
body.single-product .wp-block-heading {
  display: block !important;
  font-size: clamp(1.2rem, 2vw, 1.45rem) !important;
  font-weight: 750 !important;
  line-height: 1.3 !important;
  letter-spacing: normal !important;
  color: var(--rt-ink) !important;
  margin: 0 0 1rem !important;
}

body.single-product ul.products,
body.single-product .wc-block-product-template,
body.single-product .wp-block-post-template {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 1rem !important;
  margin: 0 !important;
  padding: 0 !important;
  list-style: none !important;
  width: 100% !important;
  max-width: none !important;
}

body.single-product ul.products::before,
body.single-product ul.products::after {
  display: none !important;
  content: none !important;
}

body.single-product ul.products li.product,
body.single-product .wc-block-product,
body.single-product .wp-block-post {
  width: 100% !important;
  float: none !important;
  margin: 0 !important;
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(26, 22, 18, 0.07);
}

body.single-product ul.products li.product img,
body.single-product .wc-block-product img {
  aspect-ratio: 1 / 1;
  object-fit: cover;
  width: 100%;
  height: auto;
}

body.single-product ul.products li.product .woocommerce-loop-product__title,
body.single-product ul.products li.product h2,
body.single-product ul.products li.product .wp-block-post-title,
body.single-product .wc-block-product .wp-block-post-title,
body.single-product ul.products li.product .price {
  padding: 0.45rem 0.85rem 0;
  font-size: 1rem !important;
  line-height: 1.35 !important;
  letter-spacing: normal !important;
}

body.single-product ul.products li.product .price,
body.single-product ul.products li.product .woocommerce-Price-amount,
body.single-product .wc-block-product .woocommerce-Price-amount {
  display: inline-flex !important;
  flex-wrap: nowrap !important;
  align-items: baseline !important;
  white-space: nowrap !important;
  color: var(--rt-green) !important;
}

body.single-product ul.products li.product .woocommerce-Price-currencySymbol {
  display: inline !important;
  margin: 0 !important;
}

body.single-product ul.products li.product .button,
body.single-product .wc-block-components-product-button__button {
  margin: 0.5rem 0.85rem 0.9rem;
  border-radius: 999px !important;
  background: var(--rt-green) !important;
  color: #fff !important;
  font-size: 0.95rem !important;
}

/* Footer = mismo de Tienda */
body.single-product .rt-product-foot {
  max-width: var(--rt-max);
  width: 100%;
  margin: 2rem auto 0;
  padding: 1.75rem var(--rt-pad) 2.75rem;
  text-align: center;
  border-top: 1px solid rgba(26, 22, 18, 0.1);
  box-sizing: border-box;
}

body.single-product .rt-product-foot__brand {
  display: inline-block;
  margin: 0 auto 1rem;
  line-height: 0;
}

body.single-product .rt-product-foot__logo {
  display: block;
  width: min(200px, 62vw);
  height: auto;
  margin: 0 auto;
}

body.single-product .rt-product-foot__visit {
  margin: 0 0 0.3rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--rt-green);
}

body.single-product .rt-product-foot__address {
  margin: 0 0 1rem;
  font-style: normal;
  font-size: 0.88rem;
  line-height: 1.45;
}

body.single-product .rt-product-foot__address a,
body.single-product .rt-product-foot__legal a {
  color: rgba(26, 22, 18, 0.72);
  text-decoration: none;
}

body.single-product .rt-product-foot__address a:hover,
body.single-product .rt-product-foot__legal a:hover {
  color: var(--rt-ink);
  text-decoration: underline;
  text-underline-offset: 2px;
}

body.single-product .rt-product-foot__legal {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.45rem 0.85rem;
  margin-bottom: 0.65rem;
}

body.single-product .rt-product-foot__legal a {
  font-size: 0.78rem;
  font-weight: 600;
}

body.single-product .rt-product-foot__copy {
  margin: 0;
  font-size: 0.78rem;
  color: rgba(26, 22, 18, 0.55);
}

/* Desktop: imagen | ficha lado a lado, ancho real */
@media (min-width: 900px) {
  body.single-product .wp-block-columns,
  body.single-product main .is-layout-flex:has(.wp-block-woocommerce-product-image),
  body.single-product main .is-layout-flex:has(.woocommerce-product-gallery) {
    flex-direction: row !important;
    align-items: stretch !important;
    gap: 0 !important;
    min-height: min(78vh, 820px);
    padding-left: var(--rt-pad);
    padding-right: var(--rt-pad);
  }

  body.single-product .wp-block-column:has(.wp-block-woocommerce-product-image),
  body.single-product .wp-block-column:has(.woocommerce-product-gallery) {
    flex: 1 1 54% !important;
    max-width: 54% !important;
  }

  body.single-product .wp-block-column:has(.wp-block-post-title),
  body.single-product .wp-block-column:has(h1) {
    flex: 1 1 46% !important;
    max-width: 46% !important;
    padding: 2.5rem 2rem 2.5rem 2.75rem !important;
  }

  body.single-product .woocommerce-product-gallery__image img,
  body.single-product .wp-block-woocommerce-product-image img,
  body.single-product .wp-post-image {
    aspect-ratio: 1 / 1;
    max-height: min(78vh, 820px);
    object-fit: cover !important;
  }

  body.single-product ul.products,
  body.single-product .wc-block-product-template,
  body.single-product .wp-block-post-template {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 1.15rem !important;
  }
}

@media (min-width: 1200px) {
  body.single-product {
    --rt-max: 1400px;
  }

  body.single-product .wp-block-column:has(.wp-block-post-title),
  body.single-product .wp-block-column:has(h1) {
    padding: 3rem 3rem 3rem 3.5rem !important;
  }
}
