/* RENNiS STEP193 — catalog archive only. Home and single-product cards unchanged. */
@media (min-width: 1100px) {
  body.post-type-archive-product main ul.products,
  body.tax-product_cat main ul.products,
  body.tax-product_tag main ul.products,
  body.rn052-archive main ul.products,
  body.tax-product_cat main .rn-products-grid,
  body.post-type-archive-product main .rn-products-grid {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0,1fr)) !important;
    gap: 22px !important;
    align-items: stretch !important;
    justify-items: stretch !important;
  }
  body.post-type-archive-product main ul.products > li.product,
  body.tax-product_cat main ul.products > li.product,
  body.tax-product_tag main ul.products > li.product,
  body.rn052-archive main ul.products > li.product,
  body.tax-product_cat main .rn-products-grid > *,
  body.post-type-archive-product main .rn-products-grid > * {
    float: none !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
    margin: 0 !important;
    flex: initial !important;
  }
  body.post-type-archive-product main ul.products img,
  body.tax-product_cat main ul.products img,
  body.tax-product_tag main ul.products img,
  body.rn052-archive main ul.products img {
    display: block !important;
    width: 100% !important;
    max-height: 300px !important;
    aspect-ratio: 1 / 1;
    object-fit: contain !important;
  }
  body.tax-product_cat main .rn-products-grid .rn-product-photo img,
  body.post-type-archive-product main .rn-products-grid .rn-product-photo img {
    width: 100% !important;
    max-height: 300px !important;
    object-fit: contain !important;
  }
  body.tax-product_cat main ul.products .woocommerce-loop-product__title,
  body.post-type-archive-product main ul.products .woocommerce-loop-product__title,
  body.rn052-archive main ul.products .woocommerce-loop-product__title,
  body.tax-product_cat main .rn-product-name,
  body.post-type-archive-product main .rn-product-name {
    font-size: 16px !important;
    line-height: 1.4 !important;
    overflow-wrap: anywhere;
  }
  body.tax-product_cat main ul.products .price,
  body.post-type-archive-product main ul.products .price,
  body.rn052-archive main ul.products .price {
    font-size: 18px !important;
    line-height: 1.35 !important;
  }
}
@media (min-width: 660px) and (max-width: 1099px) {
  body.tax-product_cat main ul.products,
  body.post-type-archive-product main ul.products {
    display: grid !important;
    grid-template-columns: repeat(2,minmax(0,1fr)) !important;
    gap: 14px !important;
  }
  body.tax-product_cat main ul.products > li.product,
  body.post-type-archive-product main ul.products > li.product {
    float: none !important;
    width: auto !important;
    margin: 0 !important;
  }
}

/* Checkout Blocks: do not replace its checkout, shipping logic or validation. */
body.rn193-checkout .wc-block-components-address-form__last_name,
body.rn193-checkout .wc-block-components-address-form__postcode {
  display: none !important;
}
body.rn193-checkout .wc-block-components-address-form__first_name {
  flex-basis: 100% !important;
  width: 100% !important;
  max-width: none !important;
}
body.rn193-checkout .wc-block-components-address-form__first_name input {
  min-width: 0;
  font-size: 16px;
}
body.rn193-checkout [data-rn193-mode="pickup"] .wc-block-components-address-form__company,
body.rn193-checkout [data-rn193-mode="pickup"] .wc-block-components-address-form__address_2,
body.rn193-checkout [data-rn193-mode="pickup"] .wc-block-components-address-form__city,
body.rn193-checkout [data-rn193-mode="pickup"] .wc-block-components-address-form__state {
  display: none !important;
}
body.rn193-checkout [data-rn193-mode="pickup"] .wc-block-components-address-form__address_1 input[readonly] {
  background: #f6f7f9 !important;
  color: #1d2835 !important;
}
.rn193-document-slot {
  padding: 13px 15px;
  border: 1px solid #d7dfe9;
  border-radius: 8px;
  margin: 16px 0;
  background: #fff;
}
.rn193-document-slot label {
  display: block;
  color: #1a283b;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.4;
  margin-bottom: 8px;
}
.rn193-document-slot input {
  width: 100%;
  min-height: 44px;
  border: 1px solid #aab6c7;
  border-radius: 5px;
  padding: 9px 12px;
  font-family: inherit;
  font-size: 16px;
  line-height: 1.3;
}
/* Hide only the original document field after the replacement input was created
   and is synchronized with the native Woo React-controlled order field. */
.rn193-document-mirrored .wc-block-components-text-input:has(> input[id*="transport-document"]),
.rn193-document-mirrored .wc-block-components-text-input:has(> input[name*="transport-document"]) {
  display: none !important;
}
.rn193-carrier-notice {
  margin: 12px 0;
  padding: 12px 14px;
  border: 1px solid #ffc78d;
  border-radius: 7px;
  background: #fff7ed;
  color: #572f0e;
  font-size: 14px;
  line-height: 1.5;
}
#rn193-carrier-toast {
  position: fixed;
  bottom: 80px;
  right: 18px;
  z-index: 12000;
  max-width: min(420px,calc(100vw - 36px));
  display: flex;
  gap: 12px;
  align-items: flex-start;
  background: #fff7ed;
  color: #2c251f;
  border: 1px solid #f4a56c;
  border-left: 5px solid #f36a21;
  border-radius: 10px;
  padding: 13px 15px;
  box-shadow: 0 8px 28px #15253626;
  font-size: 14px;
  line-height: 1.45;
}
#rn193-carrier-toast button {
  border: 0;
  background: transparent;
  color: #333;
  font-size: 22px;
  line-height: 1;
  padding: 0 3px;
  cursor: pointer;
}

/* STEP195: The actual archive has rn052-archive+rn052-catalogue and
 * STEP054 uses a more specific :is() selector with !important four columns.
 * This rule is intentionally MORE specific and needs no JS-added classes. */
@media (min-width:1100px) {
  body.rn052-archive.rn052-catalogue :is(ul.products, .ct-products-container ul.products) {
    display:grid !important;
    grid-template-columns:repeat(3,minmax(0,1fr)) !important;
    gap:20px !important;
    align-items:stretch !important;
  }
  body.rn052-archive.rn052-catalogue ul.products > li.product {
    min-width:0 !important;
    box-sizing:border-box !important;
  }
  body.rn052-archive.rn052-catalogue ul.products > li.product :is(img,.ct-image-container) {
    width:100% !important;
    height:238px !important;
    max-height:238px !important;
    object-fit:contain !important;
  }
  body.rn052-archive.rn052-catalogue ul.products > li.product :is(h2,.woocommerce-loop-product__title) {
    font-size:17px !important;
    line-height:1.45 !important;
  }
}
@media (min-width:660px) and (max-width:1099px) {
  body.rn052-archive.rn052-catalogue :is(ul.products,.ct-products-container ul.products) {
    grid-template-columns:repeat(2,minmax(0,1fr)) !important;
  }
}
/* React/WooCommerce Blocks may replace field wrappers on focus/rerender.
 * Derive layout from STABLE native input IDs, not JS-added classes.
 * Use Woo's own floating label; do not override its transforms. */
body.rn193-checkout .wc-block-components-address-form {
  display:flex !important;
  flex-wrap:wrap !important;
  align-items:flex-start !important;
}
body.rn193-checkout .wc-block-components-address-form > :has(input[id*="first_name"],input[name*="first_name"]) {
  order:10 !important;flex:0 0 100% !important;width:100% !important;max-width:100% !important;
}
body.rn193-checkout .wc-block-components-address-form > :has(input[id*="phone"],input[name*="phone"]) {
  order:20 !important;flex:0 0 100% !important;width:100% !important;max-width:100% !important;
}
body.rn193-checkout .wc-block-components-address-form > #rn193-document-slot {
  order:30 !important;flex:0 0 100% !important;width:100% !important;max-width:100% !important;
}
body.rn193-checkout .wc-block-components-address-form > :has(input[id*="address_1"],input[name*="address_1"]) {
  order:40 !important;flex:0 0 100% !important;width:100% !important;max-width:100% !important;
}
body.rn193-checkout .wc-block-components-address-form > :not(:has(input[id*="first_name"],input[name*="first_name"],input[id*="phone"],input[name*="phone"],input[id*="address_1"],input[name*="address_1"])):not(#rn193-document-slot) {
  order:50 !important;
}
body.rn193-checkout .wc-block-components-address-form input[id*="first_name"]::placeholder {
  color:transparent !important;
}
