/* AMURWEB Figaro Next 0.6.2: targeted WooCommerce / ThemeComplete fixes.
 * Do not hide required choices, touch cart submission, or override payment logic.
 */

/* ARCHIVES — the native Woo loop is bypassed by woocommerce.php, so plugin
   totals and option forms cannot appear inside a catalog item. */
.fg-wc-archive .fg-archive-clean{width:100%;min-width:0;clear:both}
.fg-wc-archive .fg-archive-toolbar{display:flex;align-items:center;justify-content:space-between;gap:18px;flex-wrap:wrap;margin:0 0 22px}
.fg-wc-archive .fg-archive-toolbar p{color:#716156;font-size:14px;margin:0}
.fg-wc-archive .fg-archive-toolbar .woocommerce-ordering{margin:0!important;float:none!important}
.fg-wc-archive .fg-archive-clean .fg-catalog-grid{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:20px!important;align-items:stretch;width:100%;min-width:0}
.fg-wc-archive .fg-archive-clean .fg-catalog-item{display:flex;flex-direction:column;min-width:0;max-width:100%;margin:0;float:none;position:relative;overflow:hidden;border-radius:18px;background:#fff;box-shadow:0 10px 28px rgba(54,31,23,.065);border:1px solid #eadbd0}
.fg-wc-archive .fg-archive-clean .fg-catalog-photo{display:block;flex:0 0 auto;width:100%;aspect-ratio:4/3;overflow:hidden;background:#fff8f0}
.fg-wc-archive .fg-archive-clean .fg-catalog-photo img{display:block;width:100%!important;height:100%!important;object-fit:contain;margin:0!important;max-width:100%}
.fg-wc-archive .fg-archive-clean .fg-catalog-info{display:flex;flex:1;flex-direction:column;min-width:0;padding:19px;gap:11px}
.fg-wc-archive .fg-archive-clean .fg-catalog-info h3{margin:0;font:700 clamp(19px,1.8vw,23px)/1.3 Georgia,serif;overflow-wrap:anywhere;color:#30231f}
.fg-wc-archive .fg-archive-clean .fg-catalog-info p{margin:0;font-size:13px;line-height:1.55;color:#76665b;overflow-wrap:anywhere}
.fg-wc-archive .fg-archive-clean .fg-catalog-buy{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;margin-top:auto;padding-top:15px;border-top:1px solid #f3e7de;min-width:0}
.fg-wc-archive .fg-archive-clean .fg-catalog-price{display:block;min-width:0;max-width:100%;font:800 clamp(16px,1.55vw,19px)/1.3 Arial,sans-serif;overflow-wrap:anywhere;white-space:normal;color:var(--fg-red)}
.fg-wc-archive .fg-archive-clean .fg-catalog-price :is(.woocommerce-Price-amount,.amount){white-space:nowrap;max-width:100%}
.fg-wc-archive .fg-archive-clean .fg-catalog-buy a.fg-btn{display:inline-flex!important;align-items:center;justify-content:center;width:auto;min-width:130px;min-height:44px;padding:10px 16px;background:var(--fg-red)!important;color:#fff!important;font:800 13px/1.3 Arial,sans-serif!important;white-space:nowrap;text-align:center;text-decoration:none;border:0;border-radius:10px;cursor:pointer}
.fg-wc-archive .fg-archive-clean .fg-catalog-buy a.fg-btn:hover{background:var(--fg-red-dark)!important}
.fg-wc-archive .fg-archive-clean .fg-catalog-buy a.fg-btn:focus-visible{outline:3px solid #b47758;outline-offset:3px}
.fg-wc-archive .fg-archive-clean .fg-catalog-pagination{clear:both}

/* SINGLE PRODUCT — Woo EPO injects groups into form.cart. 0.6.0's flex-wrap
   treated each EPO element as an independent flex item and caused the 4-digit
   price and required selects to overlap. The form must stay block-flow. */
body.fg-context-product .fg-wc-single .fg-woocommerce-area div.product{box-sizing:border-box;min-width:0;max-width:100%;width:100%;grid-template-columns:minmax(0,43%) minmax(0,1fr)!important;gap:clamp(22px,3vw,46px)!important;align-items:start}
body.fg-context-product .fg-wc-single div.product .summary,
body.fg-context-product .fg-wc-single div.product .entry-summary{box-sizing:border-box;float:none!important;width:100%!important;max-width:100%!important;min-width:0!important;margin:0!important;padding:0!important;overflow:visible}
body.fg-context-product .fg-wc-single div.product .summary>h1.product_title{float:none!important;position:static!important;display:block!important;max-width:100%;font-size:clamp(28px,3vw,43px)!important;line-height:1.15!important;overflow-wrap:anywhere;margin:0 0 20px!important}
body.fg-context-product .fg-wc-single div.product .summary>p.price,
body.fg-context-product .fg-wc-single div.product .summary>span.price{display:block!important;position:static!important;float:none!important;clear:both!important;width:100%!important;max-width:100%!important;min-width:0!important;margin:0 0 22px!important;font:800 clamp(23px,2.5vw,31px)/1.2 Arial,sans-serif!important;color:var(--fg-red)!important;white-space:normal!important;overflow-wrap:anywhere}
body.fg-context-product .fg-wc-single div.product .summary>p.price .amount,
body.fg-context-product .fg-wc-single div.product .summary>span.price .amount{white-space:normal!important;overflow-wrap:anywhere}
body.fg-context-product .fg-wc-single div.product .summary form.cart,
body.fg-context-product .fg-wc-single div.product .summary form.cart.variations_form{display:block!important;position:relative;float:none!important;clear:both!important;width:100%!important;max-width:100%!important;min-width:0!important;margin:0 0 20px!important;padding:0!important}
body.fg-context-product .fg-wc-single .summary form.cart :is(.tm-extra-product-options,.tc-extra-product-options,.tm-extra-product-options-fields,.tc-epo-totals,.tm-epo-totals,.tm-epo-totals-container,.tm-extra-product-options-totals,.tmcp-field-wrap,.tc-cell,.tc-row,.tmcp-ul-wrap){max-width:100%!important;min-width:0!important;box-sizing:border-box}
body.fg-context-product .fg-wc-single .summary form.cart :is(.tm-extra-product-options,.tc-extra-product-options,.tm-extra-product-options-fields,.tc-epo-totals,.tm-epo-totals,.tm-epo-totals-container,.tm-extra-product-options-totals){width:100%!important;float:none!important;clear:both!important;position:static!important;flex:none!important;display:block!important}
body.fg-context-product .fg-wc-single .summary form.cart :is(select,input,textarea){box-sizing:border-box;max-width:100%}
body.fg-context-product .fg-wc-single .summary form.cart select{display:block;width:100%!important;min-height:46px;max-width:100%;border:1px solid #d8c6ba;border-radius:10px;background:#fff;color:#3c302b;font-size:15px;padding:9px 13px}
body.fg-context-product .fg-wc-single .summary form.cart :is(.tm-epo-totals,.tm-extra-product-options-totals,.tc-epo-totals){margin:16px 0 18px!important;border-top:1px solid #ebded6;padding-top:12px}
body.fg-context-product .fg-wc-single .summary form.cart :is(.tc-final-totals,.tm-final-totals){max-width:100%;overflow-wrap:anywhere;white-space:normal}
body.fg-context-product .fg-wc-single .summary form.cart :is(.tc-final-totals,.tm-final-totals,.woocommerce-Price-amount){overflow-wrap:anywhere}
body.fg-context-product .fg-wc-single .summary form.cart :is(.quantity,button.single_add_to_cart_button){vertical-align:middle;margin:8px 10px 0 0!important}
body.fg-context-product .fg-wc-single .summary form.cart button.single_add_to_cart_button{display:inline-flex!important;min-height:48px;align-items:center;justify-content:center;color:#fff!important;background:var(--fg-red)!important;cursor:pointer!important;pointer-events:auto!important}
body.fg-context-product .fg-wc-single .summary form.cart button.single_add_to_cart_button:disabled{pointer-events:none!important;cursor:not-allowed!important}
body.fg-context-product .fg-wc-single div.product .product_meta{clear:both!important;float:none!important;max-width:100%;overflow-wrap:anywhere}
body.fg-context-product .fg-wc-single div.product .woocommerce-tabs{clear:both!important}

@media(max-width:1100px){
  .fg-wc-archive .fg-archive-clean .fg-catalog-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  body.fg-context-product .fg-wc-single .fg-woocommerce-area div.product{grid-template-columns:minmax(0,44%) minmax(0,1fr)!important}
}
@media(max-width:760px){
  body.fg-context-product .fg-wc-single .fg-woocommerce-area div.product{display:block!important;padding:16px!important}
  body.fg-context-product .fg-wc-single div.product .woocommerce-product-gallery{width:100%!important;float:none!important;margin:0 0 26px!important}
  body.fg-context-product .fg-wc-single div.product .summary{width:100%!important;float:none!important}
  body.fg-context-product .fg-wc-single div.product .summary>h1.product_title{font-size:clamp(28px,7.8vw,39px)!important}
}
@media(max-width:620px){
  .fg-wc-archive .fg-archive-clean .fg-catalog-grid{gap:11px!important}
  .fg-wc-archive .fg-archive-clean .fg-catalog-info{padding:12px}
  .fg-wc-archive .fg-archive-clean .fg-catalog-info h3{font-size:17px}
  .fg-wc-archive .fg-archive-clean .fg-catalog-buy{display:flex;flex-direction:column;align-items:stretch;gap:11px}
  .fg-wc-archive .fg-archive-clean .fg-catalog-buy a.fg-btn{width:100%;min-width:0}
  .fg-wc-archive .fg-archive-toolbar{align-items:stretch}
}
@media(max-width:370px){
  .fg-wc-archive .fg-archive-clean .fg-catalog-grid{grid-template-columns:1fr!important}
}

/* 0.6.2: do not allow legacy EPO or theme controls to float side by side.
   This stylesheet is enqueued after AMURWEB Menu's assets. */
body.single-product .fg-wc-single .fg-woocommerce-area div.product .summary,
body.single-product .fg-wc-single .fg-woocommerce-area div.product .entry-summary {
  display:flex!important; flex-direction:column!important; align-items:stretch!important;
  flex-wrap:nowrap!important; justify-content:flex-start!important;
  min-width:0!important; max-width:100%!important;
  float:none!important; position:static!important;
}
body.single-product .fg-wc-single .summary > :is(.product_title,.price,form.cart,.woocommerce-product-details__short-description,.product_meta),
body.single-product .fg-wc-single .summary > form.cart {
  box-sizing:border-box!important; float:none!important; clear:both!important;
  width:100%!important; min-width:0!important; max-width:100%!important;
  position:static!important; grid-column:auto!important;
}
body.single-product .fg-wc-single .summary > .price,
body.single-product .fg-wc-single .summary > .price :is(.amount,.woocommerce-Price-amount),
body.single-product .fg-wc-single .summary > .price :is(bdi,span) {
  max-width:100%!important; overflow-wrap:anywhere!important;
  white-space:normal!important; box-sizing:border-box!important;
}
body.single-product .fg-wc-single .summary > .price {font-size:clamp(22px,2.6vw,34px)!important;line-height:1.25!important}
body.single-product .fg-wc-single .summary > form.cart {
  display:block!important;flex:none!important;align-self:stretch!important;
  margin:14px 0 20px!important;padding:0!important;
}
body.single-product .fg-wc-single .summary form.cart > :is(div,section,fieldset,ul,p) {
  box-sizing:border-box;max-width:100%;min-width:0;
}
body.single-product .fg-wc-single .summary form.cart :is(.tm-extra-product-options,.tc-extra-product-options,.tm-extra-product-options-fields,.tm-epo-totals,.tc-epo-totals,.tm-epo-totals-container,.tm-extra-product-options-totals) {
  display:block!important;float:none!important;clear:both!important;
  box-sizing:border-box!important;width:100%!important;max-width:100%!important;
  min-width:0!important;position:static!important;flex:none!important;
}
body.single-product .fg-wc-single .summary form.cart :is(.tmcp-field-wrap,.tc-cell,.tc-row,select) {min-width:0!important;max-width:100%!important}
body.single-product .fg-wc-single .summary form.cart select {width:100%!important;box-sizing:border-box!important}
/* The catalog template writes its own product cards, not a WooCommerce loop. */
.fg-wc-archive .fg-catalog-grid {display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:18px!important;width:100%!important}
.fg-wc-archive .fg-catalog-item {width:100%!important;max-width:100%!important;min-width:0!important;float:none!important;}
.fg-wc-archive .fg-catalog-item :is(.fg-catalog-photo,.fg-catalog-info) {min-width:0;max-width:100%;}
.fg-wc-archive .fg-catalog-item .fg-catalog-buy a.fg-btn {width:auto!important;min-width:134px!important;max-width:100%;padding:12px 16px!important}
@media(max-width:950px){.fg-wc-archive .fg-catalog-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}}
@media(max-width:580px){.fg-wc-archive .fg-catalog-grid{grid-template-columns:1fr!important}}
