/* Metallfy 1.10.0 polish: consistent spacing, product gallery, shop cards, buttons, notices. */
.metallfy-theme{--mf-gap:clamp(16px,3vw,28px);--mf-section:clamp(32px,5vw,56px)}

/* Page container padding and titles */
.metallfy-theme .woocommerce-products-header__title,.metallfy-theme .page-title,.metallfy-theme .mf-page-title{font-size:clamp(34px,5vw,56px);line-height:1.05;letter-spacing:-.02em;margin:.4em 0 .25em}
.metallfy-theme .woocommerce-result-count{margin:0 0 var(--mf-gap)}
.metallfy-theme .woocommerce-ordering{margin:0 0 var(--mf-gap)}

/* Shop and category grid */
.metallfy-theme ul.products{grid-template-columns:repeat(auto-fill,minmax(min(100%,260px),1fr));gap:var(--mf-gap);margin:var(--mf-gap) 0 var(--mf-section)}
.metallfy-theme ul.products li.product{display:flex!important;flex-direction:column;width:auto!important;margin:0!important;float:none!important;padding:0!important}
.metallfy-theme ul.products li.product a.woocommerce-LoopProduct-link{display:block}
.metallfy-theme ul.products li.product a img{display:block!important;width:100%!important;height:auto!important;aspect-ratio:1/1!important;object-fit:contain!important;background:#eceee5!important;border-radius:6px!important;margin:0 0 14px!important}
.metallfy-theme ul.products li.product .woocommerce-loop-product__title{font-size:17px;line-height:1.3;margin:0 0 6px;padding:0}
.metallfy-theme ul.products li.product .price{display:block;margin:0 0 14px}
.metallfy-theme ul.products li.product .button{margin-top:auto;align-self:flex-start}

/* Buttons: one style everywhere */
.metallfy-theme .button,.metallfy-theme a.button,.metallfy-theme button.button,.metallfy-theme .add_to_cart_button,.metallfy-theme .single_add_to_cart_button{display:inline-flex!important;align-items:center!important;justify-content:center!important;text-align:center!important;min-height:44px!important;padding:0 22px!important;border:0!important;border-radius:999px!important;background:var(--mf-accent,#d6f266)!important;color:var(--mf-ink,#232820)!important;font-weight:600;line-height:1!important;text-decoration:none;cursor:pointer;transition:filter .15s,transform .15s}
.metallfy-theme .button:hover,.metallfy-theme .add_to_cart_button:hover,.metallfy-theme .single_add_to_cart_button:hover{filter:brightness(.95);color:var(--mf-ink,#232820)}
.metallfy-theme .button:focus-visible{outline:2px solid var(--mf-ink,#232820);outline-offset:2px}
.metallfy-theme .added_to_cart{display:inline-block;margin-left:10px;font-size:14px}

/* Single product gallery */
.metallfy-theme .woocommerce-product-gallery{margin:0 0 var(--mf-gap)}
.metallfy-theme .woocommerce-product-gallery__wrapper{margin:0}
.metallfy-theme .woocommerce-product-gallery__image img{display:block!important;width:100%!important;height:auto!important;border-radius:6px!important;background:#eceee5}
.metallfy-theme .flex-control-thumbs{list-style:none!important;margin:12px 0 0!important;padding:0!important;display:grid!important;grid-template-columns:repeat(auto-fill,minmax(72px,1fr))!important;gap:10px!important}
.metallfy-theme .flex-control-thumbs li{margin:0!important;padding:0!important;float:none!important;width:auto!important}
.metallfy-theme .flex-control-thumbs img{display:block!important;width:100%!important;height:auto!important;aspect-ratio:1/1!important;object-fit:cover!important;border-radius:5px!important;background:#eceee5;opacity:.6!important;cursor:pointer;transition:opacity .15s}
.metallfy-theme .flex-control-thumbs img.flex-active,.metallfy-theme .flex-control-thumbs img:hover{opacity:1!important}

/* Product summary, tabs and related products */
.metallfy-theme div.product .summary{margin-bottom:var(--mf-section)}
.metallfy-theme .woocommerce-tabs{margin:var(--mf-section) 0}
.metallfy-theme .related.products,.metallfy-theme .upsells.products{margin:var(--mf-section) 0 0}
.metallfy-theme .related.products>h2,.metallfy-theme .upsells.products>h2{font-size:clamp(22px,3vw,30px);margin:0 0 var(--mf-gap)}

/* Notices */
.metallfy-theme .woocommerce-message,.metallfy-theme .woocommerce-info,.metallfy-theme .woocommerce-error{margin:0 0 var(--mf-gap);padding:14px 18px;border-radius:6px;list-style:none}
.metallfy-theme .woocommerce-message{display:flex;flex-wrap:wrap;align-items:center;gap:10px 16px}
.metallfy-theme .woocommerce-message .button{order:2;margin-left:auto;min-height:36px;padding:0 16px}
/* Notice icon: WooCommerce draws it absolutely and expects 3.5em of left padding. The reset above removed that
   padding, so the icon sat on top of the first words. Reserve room for it and centre it on the notice. */
.metallfy-theme .woocommerce-message,.metallfy-theme .woocommerce-info,.metallfy-theme .woocommerce-error{position:relative;padding-left:52px}
.metallfy-theme .woocommerce-message::before,.metallfy-theme .woocommerce-info::before,.metallfy-theme .woocommerce-error::before{top:50%;left:18px;transform:translateY(-50%);font-size:20px;line-height:1}

/* Cart and checkout breathing room */
.metallfy-theme .woocommerce-cart .entry-content,.metallfy-theme .woocommerce-checkout .entry-content{padding-bottom:var(--mf-section)}

@media(max-width:600px){
 .metallfy-theme ul.products{grid-template-columns:repeat(2,minmax(0,1fr));gap:18px 12px}
 .metallfy-theme ul.products li.product .woocommerce-loop-product__title{font-size:15px}
 .metallfy-theme ul.products li.product .button{width:100%}
}

/* Classic WooCommerce archives. Keep all product names in their native links. */
.metallfy-theme .mf-catalog ul.products > li.product{min-width:0}
.metallfy-theme .mf-catalog ul.products > li.product .woocommerce-loop-product__title{
 display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:3;
 overflow:hidden;overflow-wrap:anywhere;line-height:1.35;min-height:4.05em;padding:0
}
.metallfy-theme .mf-catalog ul.products > li.product > .button{
 margin-top:auto;max-width:100%;white-space:normal;overflow-wrap:anywhere
}
.metallfy-theme .mf-catalog ul.products > li.product .woocommerce-loop-product__link{min-width:0;padding-bottom:12px}
.metallfy-theme .mf-catalog .woocommerce-ordering{max-width:100%}
.metallfy-theme .mf-catalog .woocommerce-ordering select{max-width:100%}
@media(max-width:480px){
 .metallfy-theme .mf-catalog ul.products{grid-template-columns:minmax(0,1fr);gap:26px}
 .metallfy-theme .mf-catalog ul.products > li.product .woocommerce-loop-product__title{min-height:0}
 .metallfy-theme .mf-catalog .woocommerce-ordering,.metallfy-theme .mf-catalog .woocommerce-result-count{float:none}
}
