/* =========================================================================
   MONR — WooCommerce styling (loaded LAST, after all WC core CSS is dequeued)
   Goal: every shop surface (catalog, single product, cart→checkout, account,
   notices, related) uses the orvana/monr theme look. No stray WC styling.
   Tokens: --primary #0B5755 · --primary-2 (red) #C8102E · --line #E9E9E9
           --surface #F8F6F2 · tf-btn radius 999px
   ========================================================================= */

:root{
  --monr-primary:#0B5755;
  --monr-red:#C8102E;
  --monr-red-dark:#a50d25;
  --monr-line:#E9E9E9;
  --monr-surface:#F8F6F2;
  --monr-text:#0B5755;
}

/* -------------------------------------------------- generic WC resets */
.woocommerce .button,
.woocommerce a.button,
.woocommerce input.button,
.woocommerce #respond input#submit,
.woocommerce-page .button{
  background:var(--monr-primary);
  color:#fff;
  border:0;
  border-radius:999px;
  padding:12px 28px;
  font-weight:600;
  line-height:1.2;
  font-size:15px;
  transition:background .25s ease, transform .15s ease;
  cursor:pointer;
  text-transform:none;
  letter-spacing:0;
}
.woocommerce .button:hover,
.woocommerce a.button:hover,
.woocommerce input.button:hover,
.woocommerce #respond input#submit:hover,
.woocommerce-page .button:hover{
  background:#083f3e;
  color:#fff;
}

/* primary call-to-action buttons (add to cart / place order) go red */
.woocommerce .single_add_to_cart_button,
.woocommerce #place_order,
.woocommerce button.button.alt,
.woocommerce a.button.alt,
.woocommerce input.button.alt{
  background:var(--monr-red);
}
.woocommerce .single_add_to_cart_button:hover,
.woocommerce #place_order:hover,
.woocommerce button.button.alt:hover,
.woocommerce a.button.alt:hover,
.woocommerce input.button.alt:hover{
  background:var(--monr-red-dark);
}

/* -------------------------------------------------- product grid (archive / related) */
.woocommerce ul.products,
.woocommerce-page ul.products{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:28px;
  margin:0;
  padding:0;
  list-style:none;
}
.woocommerce ul.products::before,
.woocommerce ul.products::after{ content:none; display:none; }
.woocommerce ul.products li.product{
  width:auto;
  margin:0;
  float:none;
  text-align:left;
}
@media (max-width:991px){ .woocommerce ul.products{ grid-template-columns:repeat(2,1fr); } }
@media (max-width:575px){ .woocommerce ul.products{ grid-template-columns:1fr; } }

/* -------------------------------------------------- PRODUCT CARD image fill
   Fix: thumbnail sat in the corner. Force it to fully cover its box. */
.card-product .card-product_wrapper,
.woocommerce ul.products li.product .card-product_wrapper{
  position:relative;
  overflow:hidden;
  border-radius:12px;
  background:var(--monr-surface);
  aspect-ratio:1/1;
}
.card-product .card-product_wrapper .product-img{
  display:block;
  width:100%;
  height:100%;
}
.card-product .card-product_wrapper .product-img img,
.card-product .card-product_wrapper img.img-product,
.woocommerce ul.products li.product a img{
  width:100% !important;
  height:100% !important;
  object-fit:cover !important;
  object-position:center !important;
  display:block;
  margin:0 !important;
  border-radius:12px;
  transition:transform .5s ease;
}
.card-product:hover .card-product_wrapper img.img-product{ transform:scale(1.05); }

.card-product .card-product_info{ padding-top:16px; }
.card-product .price-new{ display:inline-block; }
.card-product .name-product{ display:block; margin:6px 0 4px; }

/* -------------------------------------------------- SINGLE PRODUCT: custom gallery */
.monr-gallery{ position:relative; }
.monr-gallery .monr-gallery-main{
  position:relative;
  width:100%;
  aspect-ratio:1/1;
  overflow:hidden;
  border-radius:16px;
  background:var(--monr-surface);
  border:1px solid var(--monr-line);
}
.monr-gallery .monr-gallery-main img{
  width:100%;
  height:100%;
  object-fit:cover;
  object-position:center;
  display:block;
}
.monr-gallery .monr-gallery-thumbs{
  display:flex;
  gap:12px;
  margin-top:14px;
  flex-wrap:wrap;
}
.monr-gallery .monr-gallery-thumbs button{
  padding:0;
  border:2px solid var(--monr-line);
  background:var(--monr-surface);
  border-radius:12px;
  overflow:hidden;
  width:88px;
  height:88px;
  cursor:pointer;
  transition:border-color .2s ease;
}
.monr-gallery .monr-gallery-thumbs button.is-active{ border-color:var(--monr-red); }
.monr-gallery .monr-gallery-thumbs button img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}

/* single product info spacing */
.tf-product-info-wrap .product-infor-name{ margin:8px 0 12px; }
.tf-product-info-wrap .product-infor-price{ margin-bottom:16px; }
.tf-product-info-wrap .br-line{ height:1px; background:var(--monr-line); border:0; }

/* add-to-cart + quantity row */
.monr-add-cart form.cart{ display:flex; align-items:stretch; gap:14px; flex-wrap:wrap; margin:0; }
.woocommerce .quantity{ display:inline-flex; }
.woocommerce .quantity input.qty{
  width:74px;
  height:50px;
  text-align:center;
  border:1px solid var(--monr-line);
  border-radius:999px;
  background:#fff;
  color:var(--monr-primary);
  font-weight:600;
  font-size:16px;
  -moz-appearance:textfield;
}
.woocommerce .quantity input.qty::-webkit-outer-spin-button,
.woocommerce .quantity input.qty::-webkit-inner-spin-button{ -webkit-appearance:none; margin:0; }
.monr-add-cart .single_add_to_cart_button{
  height:50px;
  padding:0 34px;
  display:inline-flex;
  align-items:center;
  border-radius:999px;
}
.woocommerce div.product form.cart .variations select{
  border:1px solid var(--monr-line);
  border-radius:999px;
  height:48px;
  padding:0 18px;
}

/* product meta (sku / category) */
.product-meta .sku_wrapper,
.product-meta .posted_in{ display:block; color:#5c6b6a; font-size:14px; margin-bottom:4px; }
.product-meta a{ color:var(--monr-primary); }

/* -------------------------------------------------- CART (shortcode) */
.woocommerce table.shop_table{
  border:1px solid var(--monr-line);
  border-radius:14px;
  border-collapse:separate;
  border-spacing:0;
  overflow:hidden;
  background:#fff;
}
.woocommerce table.shop_table th{
  background:var(--monr-surface);
  color:var(--monr-primary);
  font-weight:600;
  padding:16px;
  border:0;
}
.woocommerce table.shop_table td{
  padding:16px;
  border-top:1px solid var(--monr-line);
  color:#2a3a39;
}
.woocommerce table.shop_table img{ width:64px; height:64px; object-fit:cover; border-radius:8px; }
.woocommerce a.remove{
  color:var(--monr-red) !important;
  border:1px solid var(--monr-line);
  border-radius:50%;
  line-height:22px;
  width:24px;
  height:24px;
}
.woocommerce a.remove:hover{ background:var(--monr-red); color:#fff !important; }

/* mini-cart drawer "Удалить" is a text link, not the round WC remove icon.
   The template's .tf-btn-line uses gradient background-clip:text which renders
   the label transparent/invisible — force a solid red, visible label here. */
.canvas-shop-cart a.remove,
.tf-mini-cart-items a.remove,
.canvas-shop-cart a.remove .text-caption-01,
.tf-mini-cart-items a.remove .text-caption-01{
  width:auto !important;
  height:auto !important;
  border:0 !important;
  border-radius:0 !important;
  line-height:1.4 !important;
  background:none !important;
  -webkit-background-clip:border-box !important;
  background-clip:border-box !important;
  -webkit-text-fill-color:var(--monr-red) !important;
  color:var(--monr-red) !important;
  visibility:visible !important;
  opacity:1 !important;
  white-space:nowrap;
  overflow:visible;
  text-decoration:underline;
}
.canvas-shop-cart a.remove:hover,
.tf-mini-cart-items a.remove:hover,
.canvas-shop-cart a.remove:hover .text-caption-01,
.tf-mini-cart-items a.remove:hover .text-caption-01{
  background:none !important;
  -webkit-text-fill-color:var(--monr-red-dark) !important;
  color:var(--monr-red-dark) !important;
}
.canvas-shop-cart .mini-product-cart .prd-action{ align-items:flex-start; gap:6px; }

/* -------------------------------------------------- CHECKOUT (orvana)
   Markup is form-checkout.php + review-order.php with the template's own
   classes (.tf-page-checkout, .box-ip-checkout, .box-your-order, .tf-select,
   .payment_accordion, .list-order-product, .list-total, .last-total), so the
   theme's styles.css does the heavy lifting. Only a few safety rules here. */
/* Defensive: keep the form a single vertical stack. A stale build shipped a
   2-column grid on form.checkout that truncated every input — force one column
   and full-width fields so the orvana layout stays neat. */
.woocommerce-checkout form.checkout.tf-checkout-cart-main,
.woocommerce-checkout .tf-page-checkout{
  display:block !important;
  grid-template-columns:none !important;
}
.woocommerce-checkout .box-ip-checkout,
.woocommerce-checkout .box-ip-payment{ margin-bottom:32px; }
.woocommerce-checkout .form-content input[type="text"],
.woocommerce-checkout .form-content input[type="email"],
.woocommerce-checkout .form-content input[type="tel"],
.woocommerce-checkout .form-content select,
.woocommerce-checkout .form-content textarea{
  width:100%;
  box-sizing:border-box;
}
.woocommerce-checkout .s-check-out .woocommerce-NoticeGroup,
.woocommerce-checkout .s-check-out .woocommerce-error,
.woocommerce-checkout .s-check-out .woocommerce-message{ margin-bottom:20px; }
.woocommerce-checkout #place_order{ margin-top:8px; }
.woocommerce-checkout .box-your-order .ip-discount-code{ margin:20px 0; }
/* WC blocks a stale spinner overlay on #order_review during ajax; keep it tidy */
.woocommerce-checkout #order_review.processing{ opacity:.7; }

/* -------------------------------------------------- MY ACCOUNT */
.woocommerce-account .woocommerce-MyAccount-navigation ul{ list-style:none; padding:0; }
.woocommerce-account .woocommerce-MyAccount-navigation li{
  border-bottom:1px solid var(--monr-line);
}
.woocommerce-account .woocommerce-MyAccount-navigation li a{
  display:block; padding:12px 4px; color:var(--monr-primary); font-weight:500;
}
.woocommerce-account .woocommerce-MyAccount-navigation li.is-active a{ color:var(--monr-red); }

/* -------------------------------------------------- NOTICES */
.woocommerce-message,
.woocommerce-info,
.woocommerce-error{
  border-radius:12px;
  border:1px solid var(--monr-line);
  border-top:3px solid var(--monr-primary);
  background:#fff;
  padding:16px 20px;
  color:var(--monr-primary);
  box-shadow:0 6px 20px rgba(11,87,85,.06);
}
.woocommerce-message{ border-top-color:var(--monr-primary); }
.woocommerce-error{ border-top-color:var(--monr-red); color:var(--monr-red); }
.woocommerce-message .button,
.woocommerce-info .button{ float:right; padding:8px 18px; font-size:14px; }

/* -------------------------------------------------- section titles / related */
.related.products > h2,
.upsells.products > h2{
  color:var(--monr-primary);
  font-weight:600;
  font-size:32px;
  line-height:1.2;
  margin-bottom:28px;
}

/* Related "Похожие товары" — 4 cards per row, tighter card typography */
.related.products ul.products,
.upsells.products ul.products{
  grid-template-columns:repeat(4,1fr);
  gap:24px;
}
@media (max-width:1199px){
  .related.products ul.products,
  .upsells.products ul.products{ grid-template-columns:repeat(3,1fr); }
}
@media (max-width:991px){
  .related.products ul.products,
  .upsells.products ul.products{ grid-template-columns:repeat(2,1fr); }
}
@media (max-width:575px){
  .related.products ul.products,
  .upsells.products ul.products{ grid-template-columns:1fr; }
}
/* shrink oversized product names inside related/upsell cards */
.related.products .card-product .name-product,
.upsells.products .card-product .name-product,
.related.products ul.products li.product .woocommerce-loop-product__title,
.upsells.products ul.products li.product .woocommerce-loop-product__title{
  font-size:16px !important;
  line-height:1.35 !important;
  margin:6px 0 4px;
}
.related.products .card-product .price-new,
.upsells.products .card-product .price-new,
.related.products ul.products li.product .price,
.upsells.products ul.products li.product .price{
  font-size:16px !important;
}
.related.products .card-product .product-cate,
.upsells.products .card-product .product-cate{ font-size:11px; }

/* Shop control bar, sorting dropdown, layout switch, sidebar facets and the
   noUiSlider price filter are all styled natively by the orvana styles.css —
   we render the template's own markup, so no overrides are needed here. */

/* hide leftover WC star ratings / stock clutter (honesty rules, no fake reviews) */
.woocommerce .star-rating,
.woocommerce .woocommerce-product-rating,
.woocommerce .products .star-rating{ display:none !important; }

/* price color unification */
.woocommerce span.price,
.woocommerce div.product p.price,
.woocommerce ul.products li.product .price{ color:var(--monr-primary); font-weight:600; }
.woocommerce del{ opacity:.5; }
