/* ict-scope: cart */
/* Klasik [woocommerce_cart] sayfası: ürün tablosu solda, "Sepet toplamları" sağda ve kaydırırken sabit. */
@media (min-width:960px){
  .wp-block-post-content>.woocommerce:has(>.woocommerce-cart-form),.entry-content>.woocommerce:has(>.woocommerce-cart-form){display:grid;grid-template-columns:minmax(0,1fr) minmax(20rem,24rem);grid-template-areas:"notices notices" "items totals" "cross totals";column-gap:2rem;align-items:start}
  .woocommerce:has(>.woocommerce-cart-form)>.woocommerce-notices-wrapper{grid-area:notices}
  .woocommerce:has(>.woocommerce-cart-form)>.woocommerce-cart-form{grid-area:items;min-width:0}
  .woocommerce:has(>.woocommerce-cart-form)>.cart-collaterals{display:contents}
  .woocommerce:has(>.woocommerce-cart-form)>.cart-collaterals>.cart_totals{grid-area:totals;align-self:start;position:sticky;top:calc(var(--ict-hdr-reserve,4.5rem) + 1rem)}
  .woocommerce:has(>.woocommerce-cart-form)>.cart-collaterals>.cross-sells{grid-area:cross;float:none;width:auto;margin:2rem 0 0;min-width:0}
}
.woocommerce .cart-collaterals{float:none;width:auto;margin:0}
.woocommerce .cart-collaterals .cart_totals{float:none;width:100%;margin:0;padding:1.25rem;border:1px solid var(--border);border-radius:var(--radius-xl);background:var(--card);box-shadow:var(--shadow-sm)}
.woocommerce .cart-collaterals .cart_totals>h2{margin:0 0 .75rem;padding:0 0 .75rem;border-bottom:1px solid var(--border);font-size:var(--text-lg);font-weight:600}
.woocommerce .cart-collaterals .cart_totals table.shop_table{width:100%;margin:0;border:0;border-radius:0;background:transparent}
.woocommerce .cart-collaterals .cart_totals table.shop_table :is(th,td){padding:.625rem 0;border:0;border-bottom:1px solid var(--border);background:transparent;font-size:var(--text-sm);text-align:left;vertical-align:top}
.woocommerce .cart-collaterals .cart_totals table.shop_table :is(th){width:34%;font-weight:600;padding-right:.75rem}
.woocommerce .cart-collaterals .cart_totals table.shop_table tr:last-child :is(th,td){border-bottom:0}
.woocommerce .cart-collaterals .cart_totals .order-total :is(th,td){font-size:var(--text-base);font-weight:700}
.woocommerce .cart-collaterals .wc-proceed-to-checkout{padding:1rem 0 0}
.woocommerce .cart-collaterals .wc-proceed-to-checkout .checkout-button{display:flex;align-items:center;justify-content:center;width:100%;min-height:3rem;margin:0;font-size:var(--text-base);font-weight:600}
@media (max-width:959px){
  .woocommerce:has(>.woocommerce-cart-form)>.cart-collaterals{margin-top:1.5rem}
}
.woocommerce .cross-sells>h2{margin:0 0 1rem;font-size:var(--text-lg);font-weight:600}
.woocommerce .cross-sells .wc-block-product-template,.woocommerce .cross-sells ul.products{display:grid;grid-template-columns:repeat(auto-fill,minmax(10rem,1fr));gap:1rem;margin:0;padding:0;list-style:none}
.woocommerce .cross-sells .wc-block-product-template img,.woocommerce .cross-sells ul.products img{width:100%;height:auto;aspect-ratio:4/5;object-fit:cover;border-radius:var(--radius-lg)}
.woocommerce .cross-sells ul.products{grid-template-columns:repeat(auto-fill,minmax(11rem,1fr))}
.woocommerce .cross-sells ul.products li.product{float:none;width:auto;margin:0;padding:0;display:flex;flex-direction:column;gap:.5rem;position:relative}
.woocommerce .cross-sells ul.products li.product .onsale{position:absolute;top:.5rem;left:.5rem;right:auto;z-index:1}
.woocommerce .cross-sells ul.products li.product .woocommerce-loop-product__title{margin:0;font-size:var(--text-sm);font-weight:500;line-height:1.35}
.woocommerce .cross-sells ul.products li.product .button{margin-top:auto;justify-content:center;width:100%;text-align:center}
.woocommerce .cross-sells ul.products::before,.woocommerce .cross-sells ul.products::after{content:none;display:none}

/* ===== Sepet satırları (kart) ===== */
.ict-cart-heading{margin:0 0 1rem;font-size:var(--text-xl);font-weight:700;letter-spacing:-.015em}
.ict-cart-lines{display:grid;gap:.75rem;margin:0 0 1rem;padding:0;list-style:none}
.ict-line{display:grid;grid-template-columns:6rem minmax(0,1fr) auto;gap:1rem;align-items:start;padding:1rem;border:1px solid var(--border);border-radius:var(--radius-xl);background:var(--card)}
.ict-line__img img{display:block;width:6rem;height:6rem;border-radius:var(--radius-lg);background:var(--muted);object-fit:cover}
.ict-line__main{display:grid;gap:.375rem;min-width:0}
.ict-line .product-name{font-size:var(--text-sm);font-weight:600;line-height:1.4}
.ict-line .product-name a{color:var(--foreground);text-decoration:none}
.ict-line .product-name a:hover{text-decoration:underline;text-underline-offset:3px}
.ict-line .product-name dl.variation,.ict-line .product-name .variation{margin:.25rem 0 0;color:var(--muted-foreground);font-size:var(--text-xs)}
.ict-line__unit{color:var(--muted-foreground);font-size:var(--text-sm)}
.ict-line__unit del{margin-right:.25rem}
.ict-line__total{font-size:var(--text-base);font-weight:700;font-variant-numeric:tabular-nums;white-space:nowrap}
.ict-line__controls{display:flex;flex-wrap:wrap;align-items:center;gap:.5rem 1rem;margin-top:.5rem}
.ict-line__save,.ict-line .product-remove a.remove{padding:0;border:0;background:transparent;color:var(--muted-foreground);font:500 var(--text-xs)/1.2 var(--font-sans);text-decoration:underline;text-underline-offset:3px;cursor:pointer;width:auto;height:auto;display:inline}
.ict-line__save:hover,.ict-line .product-remove a.remove:hover{color:var(--foreground);background:transparent}
.ict-line .product-remove a.remove:hover{color:var(--destructive)}
.ict-line .product-remove{display:inline;padding:0;border:0}

/* Miktar +/− */
.ict-qty .quantity{display:inline-flex;align-items:center;height:2.25rem;border:1px solid var(--input,var(--border));border-radius:var(--radius-md);background:var(--background);overflow:hidden}
.ict-qty .quantity input.qty{width:2.5rem;height:100%;padding:0;border:0;border-radius:0;background:transparent;text-align:center;font:500 var(--text-sm)/1 var(--font-sans);-moz-appearance:textfield;box-shadow:none}
.ict-qty .quantity input.qty::-webkit-outer-spin-button,.ict-qty .quantity input.qty::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}
.ict-qty__btn{display:inline-flex;align-items:center;justify-content:center;width:2.25rem;height:100%;padding:0;border:0;background:transparent;color:var(--foreground);font:400 1.125rem/1 var(--font-sans);cursor:pointer}
.ict-qty__btn:hover{background:var(--accent)}

/* Kupon: katlanır, alan ve düğme aynı yükseklikte */
.ict-cart-actions{display:grid;gap:.75rem}
.ict-coupon{border:1px solid var(--border);border-radius:var(--radius-xl);background:var(--card)}
.ict-coupon summary{display:flex;align-items:center;justify-content:space-between;padding:.875rem 1rem;font-size:var(--text-sm);font-weight:500;cursor:pointer;list-style:none}
.ict-coupon summary::-webkit-details-marker{display:none}
.ict-coupon summary::after{content:"";width:1rem;height:1rem;background:currentColor;-webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") center/contain no-repeat;mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") center/contain no-repeat;transition:transform .2s var(--ease)}
.ict-coupon[open] summary::after{transform:rotate(180deg)}
.ict-coupon .coupon{display:flex;gap:.5rem;padding:0 1rem 1rem}
.ict-coupon .coupon input.input-text{flex:1;min-width:0;height:2.75rem;padding:0 .875rem;border:1px solid var(--input,var(--border));border-radius:var(--radius-md);background:var(--background);color:var(--foreground);font:400 var(--text-sm)/1 var(--font-sans);box-shadow:none}
.ict-coupon .coupon input.input-text:focus{outline:2px solid var(--ring);outline-offset:1px;border-color:var(--ring)}
.ict-coupon .coupon .button{flex:none;height:2.75rem;min-height:0;padding:0 1.25rem;border-radius:var(--radius-md);font:600 var(--text-sm)/1 var(--font-sans)}
.ict-cart-js .ict-update-cart{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);border:0}
.ict-update-cart{justify-self:end}

/* Toplamlar: güven şeridi */
.ict-cart-trust{display:grid;gap:.625rem;margin:1rem 0 0;padding:1rem 0 0;border-top:1px solid var(--border);list-style:none;font-size:var(--text-xs);color:var(--muted-foreground)}
.ict-cart-trust li{display:flex;align-items:center;gap:.625rem}
.ict-cart-trust svg{flex:none;color:var(--foreground)}
.ict-cart-trust a{color:inherit;text-decoration:underline;text-underline-offset:3px}
.ict-cart-trust a:hover{color:var(--foreground)}

/* Öneriler */

/* Mobil */
.ict-cart-bar{display:none}
@media (max-width:959px){
  .ict-line{grid-template-columns:5rem minmax(0,1fr);gap:.75rem}
  .ict-line__img img{width:5rem;height:5rem}
  .ict-line__total{grid-column:2;justify-self:start}
  .ict-cart-bar{position:fixed;left:0;right:0;bottom:0;z-index:40;display:flex;align-items:center;justify-content:space-between;gap:1rem;padding:.75rem var(--gutter,1rem) calc(.75rem + env(safe-area-inset-bottom));border-top:1px solid var(--border);background:var(--background);box-shadow:0 -4px 16px rgb(0 0 0/.06)}
  .ict-cart-bar__sum{display:grid;gap:.125rem}
  .ict-cart-bar__sum small{color:var(--muted-foreground);font-size:var(--text-xs)}
  .ict-cart-bar__sum strong{font-size:var(--text-lg);font-variant-numeric:tabular-nums}
  .ict-cart-bar__go{display:inline-flex;align-items:center;justify-content:center;flex:1;max-width:16rem;height:2.75rem;min-height:0;border-radius:var(--radius-md);font-weight:600}
  body.woocommerce-cart main{padding-bottom:5rem}
}
body.woocommerce-page .woocommerce-cart-form .ict-line .ict-line__img{width:6rem;min-width:0}
body.woocommerce-page .woocommerce-cart-form .ict-line .product-thumbnail a img{width:6rem;height:6rem;max-width:none;aspect-ratio:1;object-fit:cover}
body.woocommerce-page .woocommerce-cart-form .ict-line .product-remove a.remove{width:auto;height:auto;border-radius:0;background:transparent;color:var(--muted-foreground);font-size:var(--text-xs);line-height:1.2}
body.woocommerce-page .woocommerce-cart-form .ict-line .product-remove a.remove:hover{background:transparent;color:var(--destructive)}
@media (max-width:959px){body.woocommerce-page .woocommerce-cart-form .ict-line .ict-line__img,body.woocommerce-page .woocommerce-cart-form .ict-line .product-thumbnail a img{width:5rem;height:auto}body.woocommerce-page .woocommerce-cart-form .ict-line .product-thumbnail a img{height:5rem}}
body.woocommerce-page .ict-coupon .coupon input.input-text{box-sizing:border-box;height:2.75rem;min-height:0;margin:0;padding:0 .875rem;line-height:1}
body.woocommerce-page .ict-coupon .coupon .button{box-sizing:border-box;height:2.75rem;margin:0}
body.woocommerce-page .woocommerce-cart-form .ict-coupon #coupon_code{height:2.75rem;width:auto;min-height:0;padding:0 .875rem}

.ict-coupon__result{margin:.5rem 0 0;font-size:var(--text-sm,.875rem);font-weight:500}
.ict-coupon__result.is-ok{color:var(--success,#15803d)}
.ict-coupon__result.is-err{color:var(--destructive,#b91c1c)}
