/* ============================================================
   WooCommerce integration for MarketStyle
   ============================================================ */

/* ---------- breadcrumb ---------- */
.woocommerce-breadcrumb{
  font-size:11.5px;color:#999;display:flex;align-items:center;gap:6px;flex-wrap:wrap;margin:0;
  padding:16px 0 18px;
}
.woocommerce-breadcrumb a{color:#999}
.woocommerce-breadcrumb a:hover{color:#111;text-decoration:underline}
.woocommerce-breadcrumb span[aria-hidden="true"]{display:none}

/* ---------- product grids ---------- */
ul.products{
  list-style:none;margin:0;padding:0;display:grid;gap:18px;
  grid-template-columns:repeat(5,1fr);
}
ul.products::before,ul.products::after{content:none!important;display:none!important}
ul.products li.product{
  width:auto!important;margin:0!important;padding:0!important;float:none!important;clear:none!important;
  list-style:none;position:relative;
}
ul.products li.product a.card-link{display:block;color:inherit}
ul.products li.product .card-img img{width:100%;height:100%;object-fit:cover;margin:0;border-radius:0}
ul.products li.product .card-price ins{text-decoration:none;background:none}

/* keep discount badge above image */
ul.products li.product .card-off{z-index:2}

/* sale flash from Woo is hidden in favour of our own badge */
ul.products li.product .onsale{display:none!important}

/* ---------- single product: quantity ---------- */
.quantity{display:inline-flex;align-items:center;border:1px solid #ddd;height:40px;background:#fff}
.quantity input.qty{
  width:52px;height:38px;border:none;text-align:center;font-size:13px;color:#111;
  -moz-appearance:textfield;margin:0;
}
.quantity input.qty::-webkit-outer-spin-button,
.quantity input.qty::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}

/* ---------- variations ---------- */
.woo-variations .variations{border:none;margin:0 0 10px;width:100%}
.woo-variations .variations th,.woo-variations .variations td{
  border:none;padding:0 0 12px;text-align:left;vertical-align:middle;
}
.woo-variations .variations th.label{font-size:13px;font-weight:600;color:#111;width:96px}
.woo-variations .variations select{
  width:100%;max-width:320px;height:42px;border:1px solid #ddd;border-radius:2px;padding:0 12px;
  font-size:13px;background:#fff;color:#111;
}
.woo-variations .single_variation_wrap .woocommerce-variation-price{margin:10px 0;font-size:20px;color:var(--red);font-weight:700}
.woo-variations .woocommerce-variation-add-to-cart{display:grid;grid-template-columns:1fr;gap:10px}
.woo-variations .single_add_to_cart_button{
  height:48px;background:#111;color:#fff;font-size:14px;font-weight:600;border-radius:2px;
}

/* ---------- attributes table -> spec grid ---------- */
.spec-wrap table.woocommerce-product-attributes{
  width:100%;border:1px solid var(--line);border-collapse:collapse;margin:0 0 14px;max-width:1000px;
  display:grid;grid-template-columns:1fr 1fr;
}
.spec-wrap table.woocommerce-product-attributes tbody{display:contents}
.spec-wrap table.woocommerce-product-attributes tr{display:flex;justify-content:space-between;gap:16px;padding:11px 16px;border-bottom:1px solid var(--line)}
.spec-wrap table.woocommerce-product-attributes th,
.spec-wrap table.woocommerce-product-attributes td{
  border:none;padding:0;font-size:12.5px;text-align:left;background:none!important;
}
.spec-wrap table.woocommerce-product-attributes th{color:#8a8a8a;font-weight:400}
.spec-wrap table.woocommerce-product-attributes td{color:#222;text-align:right}
.spec-wrap .spec.extra{max-width:1000px}

/* ---------- reviews ---------- */
.woocommerce-Reviews{}
.woocommerce-Reviews-title{display:none}
#reviews .commentlist{list-style:none;margin:0;padding:0}
#reviews .commentlist li{
  border-bottom:1px solid #f0f0f0;padding:22px 0;margin:0;list-style:none;
}
#reviews .commentlist li:last-child{border-bottom:none}
#reviews .commentlist .comment_container{display:flex;gap:12px;align-items:flex-start}
#reviews .commentlist img.avatar{
  width:36px;height:36px;border-radius:50%;border:none;padding:0;margin:0;flex:none;background:#111;
}
#reviews .commentlist .comment-text{
  border:none;padding:0;margin:0;flex:1;
}
#reviews .commentlist .comment-text .meta{
  margin:0 0 6px;font-size:13px;color:#111;font-weight:600;
}
#reviews .commentlist .comment-text .meta time{font-weight:400;font-size:11.5px;color:#a3a3a3;margin-left:8px}
#reviews .commentlist .comment-text p{
  font-size:14px;line-height:1.8;color:#333;margin:0;
}
#reviews .commentlist .comment-text p.meta em{font-style:normal;font-weight:400;color:#a3a3a3;font-size:11.5px}
#reviews .star-rating{
  float:none;margin:0 0 8px;font-size:13px;color:#ffa41c;width:5.4em;
}
#reviews .star-rating::before{color:#dfdfdf}
#reviews #review_form_wrapper{margin-top:26px;background:var(--soft);padding:24px;border-radius:3px}
#reviews #review_form_wrapper .comment-reply-title{font-size:15px;font-weight:600;display:block;margin-bottom:14px}
#reviews .comment-form label{font-size:12.5px;color:#666;display:block;margin-bottom:6px}
#reviews .comment-form input[type=text],
#reviews .comment-form input[type=email],
#reviews .comment-form textarea{
  width:100%;border:1px solid #ddd;border-radius:2px;padding:10px 12px;font-size:13px;background:#fff;
}
#reviews .comment-form textarea{min-height:110px}
#reviews .comment-form .submit{
  height:44px;padding:0 26px;background:#111;color:#fff;font-size:13px;font-weight:600;border-radius:2px;border:none;
}
#reviews .comment-form-rating p.stars{display:flex;gap:4px;margin-bottom:6px}

/* ---------- shop toolbar / pagination ---------- */
.woocommerce-result-count,.woocommerce-ordering{display:none}
.woocommerce-pagination{margin:34px 0 10px;text-align:center}
.woocommerce-pagination ul{
  display:inline-flex;gap:6px;list-style:none;border:none;margin:0;padding:0;
}
.woocommerce-pagination ul li{border:none;margin:0}
.woocommerce-pagination ul li a,
.woocommerce-pagination ul li span{
  display:grid;place-items:center;min-width:36px;height:36px;padding:0 10px;border:1px solid var(--line);
  font-size:12.5px;color:#555;border-radius:2px;
}
.woocommerce-pagination ul li a:hover{border-color:#111;color:#111}
.woocommerce-pagination ul li span.current{background:#111;border-color:#111;color:#fff}
.no-products{padding:60px 0;text-align:center;color:#999;font-size:14px}
.archive-desc{font-size:13px;color:#777;line-height:1.8;max-width:820px;margin:-8px 0 24px}

/* ---------- notices ---------- */
.woocommerce-message,.woocommerce-info,.woocommerce-error,.woocommerce-noreviews{
  list-style:none;border:none;border-radius:3px;padding:14px 18px;font-size:13px;margin:0 0 20px;
  background:#f6f6f6;color:#333;display:flex;align-items:center;gap:12px;flex-wrap:wrap;
}
.woocommerce-message{background:#f1f8f2;color:#1d6b2f}
.woocommerce-info{background:#f4f7fb;color:#2a4d7a}
.woocommerce-error{background:#fdf1f0;color:#b32a22}
.woocommerce-message::before,.woocommerce-info::before,.woocommerce-error::before{display:none}
.woocommerce-message .button,.woocommerce-info .button,.woocommerce-error .button{
  margin-left:auto;height:32px;padding:0 16px;background:#111;color:#fff;font-size:12px;
  border-radius:2px;display:inline-flex;align-items:center;
}

/* ---------- generic woo buttons ---------- */
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button,
.woocommerce #respond input#submit{
  background:#111;color:#fff;font-size:13px;font-weight:600;border-radius:2px;padding:12px 22px;
  line-height:1.2;border:none;
}
.woocommerce a.button:hover,
.woocommerce button.button:hover,
.woocommerce input.button:hover{background:#333;color:#fff}
.woocommerce a.button.alt,.woocommerce button.button.alt{background:#111;color:#fff}
.woocommerce a.button.alt:hover{background:#333}

/* ---------- cart page ---------- */
.woocommerce-cart .wrap,.woocommerce-checkout .wrap{padding-top:8px}
.woocommerce table.shop_table{
  border:1px solid var(--line);border-radius:3px;border-collapse:collapse;
}
.woocommerce table.shop_table th{
  background:var(--soft);font-size:12px;letter-spacing:.4px;text-transform:uppercase;color:#777;
  padding:14px 12px;border-bottom:1px solid var(--line);
}
.woocommerce table.shop_table td{
  padding:16px 12px;border-bottom:1px solid #f2f2f2;font-size:13.5px;vertical-align:middle;
}
.woocommerce table.shop_table td.product-name a{color:#111;font-size:13.5px}
.woocommerce table.shop_table td.product-thumbnail img{width:74px;height:auto;border-radius:2px}
.woocommerce table.cart td.actions .coupon .input-text{
  height:40px;border:1px solid #ddd;border-radius:2px;padding:0 12px;font-size:13px;width:180px;
}
.woocommerce .cart-collaterals .cart_totals h2{font-size:16px;margin-bottom:12px}
.woocommerce .cart-collaterals .cart_totals table th{background:none;text-transform:none;letter-spacing:0;font-size:13px;color:#666}
.woocommerce .wc-proceed-to-checkout a.checkout-button{height:48px;display:flex;align-items:center;justify-content:center;font-size:14px}

/* ---------- checkout ---------- */
.woocommerce form .form-row label{font-size:12.5px;color:#555}
.woocommerce form .form-row input.input-text,
.woocommerce form .form-row textarea,
.woocommerce form .form-row select{
  height:42px;border:1px solid #ddd;border-radius:2px;padding:0 12px;font-size:13px;background:#fff;
}
.woocommerce form .form-row textarea{height:auto;padding:10px 12px}
.woocommerce-checkout h3{font-size:15px;font-weight:600}
#order_review,#order_review_heading{margin-top:26px}
.woocommerce #payment{background:var(--soft);border-radius:3px}
.woocommerce #payment #place_order{height:48px;font-size:14px}

/* ---------- my account ---------- */
.woocommerce-account .woocommerce-MyAccount-navigation ul{list-style:none;padding:0}
.woocommerce-account .woocommerce-MyAccount-navigation li{
  border-bottom:1px solid var(--line);padding:10px 0;font-size:13px;
}
.woocommerce-account .woocommerce-MyAccount-navigation li.is-active a{font-weight:600;color:#111}

/* ---------- misc ---------- */
.woocommerce .star-rating span::before{color:#ffa41c}
.screen-reader-text{position:absolute!important;width:1px;height:1px;overflow:hidden;clip:rect(1px,1px,1px,1px)}

@media(max-width:1080px){
  ul.products{grid-template-columns:repeat(4,1fr)}
}
@media(max-width:900px){
  ul.products{grid-template-columns:repeat(3,1fr)}
  .spec-wrap table.woocommerce-product-attributes{grid-template-columns:1fr}
}
@media(max-width:620px){
  ul.products{grid-template-columns:repeat(2,1fr);gap:12px}
  #reviews #review_form_wrapper{padding:16px}
}

/* ---------- fixes ---------- */
.bnpl b.klarna,
.bnpl .klarna{color:#ffb3c7!important;background:#111!important;border-radius:2px}
.opt-label .opt-val:empty{display:none}

/* letter avatars */
#reviews .commentlist .ava-letter,
.ava-letter{
  width:36px;height:36px;border-radius:50%;background:#111;color:#fff;display:grid;place-items:center;
  font-size:14px;font-weight:600;flex:none;line-height:1;
}
#reviews .commentlist .comment_container .ava-letter{margin-top:2px}

/* review form stars */
#reviews .comment-form-rating .stars{display:flex;gap:6px;margin:4px 0 10px}
#reviews .comment-form-rating .stars a{font-size:18px;color:#ffa41c;text-decoration:none;line-height:1}
#reviews .comment-form-rating .stars a::before{content:"★";color:#dfdfdf}
#reviews .comment-form-rating .stars a:hover::before,
#reviews .comment-form-rating .stars.selected a::before{color:#ffa41c}

/* force card images to fill their 3:4 frame */
ul.products li.product .card-img{position:relative;overflow:hidden}
ul.products li.product .card-img img,
ul.products li.product .card-img img.attachment-woocommerce_thumbnail{
  position:absolute!important;inset:0!important;
  width:100%!important;height:100%!important;max-width:none!important;
  object-fit:cover!important;margin:0!important;
}

/* ---------- generic page wrapper (cart / checkout / account) ---------- */
.page-body{padding:6px 0 60px}
.page-body .page-title{font-size:22px;margin-bottom:22px}
.entry-content{font-size:14px;line-height:1.85;color:#333}
.woocommerce-cart .entry-content,
.woocommerce-checkout .entry-content,
.woocommerce-account .entry-content{font-size:14px}

/* cart layout */
.woocommerce-cart .woocommerce{display:block}
.woocommerce-cart-form{width:100%}
.woocommerce table.shop_table.cart th.product-remove,
.woocommerce table.shop_table.cart td.product-remove{padding-left:8px;width:34px}
.woocommerce table.shop_table.cart td.product-remove a.remove{
  color:#999;font-size:18px;text-decoration:none;border-radius:50%;width:24px;height:24px;
  display:grid;place-items:center;
}
.woocommerce table.shop_table.cart td.product-remove a.remove:hover{background:#f3f3f3;color:#111}
.woocommerce table.shop_table.cart td.product-price,
.woocommerce table.shop_table.cart td.product-subtotal{font-weight:600;color:#111}
.woocommerce table.shop_table.cart td.actions{padding:16px 12px}
.woocommerce .cart-collaterals{display:flex;justify-content:flex-end;margin-top:22px}
.woocommerce .cart-collaterals .cart_totals{width:380px;max-width:100%}
.woocommerce .cart-collaterals .cart_totals table{margin-bottom:14px}

/* checkout layout */
.woocommerce-checkout .col2-set{display:grid;grid-template-columns:1fr 1fr;gap:26px;width:auto!important;float:none!important}
.woocommerce-checkout .col2-set .col-1,
.woocommerce-checkout .col2-set .col-2{width:auto!important;float:none!important}
#customer_details{margin-bottom:20px}
.woocommerce-checkout #order_review_heading,
.woocommerce-checkout #order_review{width:100%!important;float:none!important}
.woocommerce-checkout #order_review{background:#fff;padding:0}
.woocommerce #payment ul.payment_methods{border-bottom:1px solid var(--line);padding:14px 18px}
.woocommerce #payment div.form-row{padding:14px 18px}

@media(max-width:760px){
  .woocommerce-checkout .col2-set{grid-template-columns:1fr}
  .woocommerce .cart-collaterals .cart_totals{width:100%}
}
