/* Cart and checkout (owner 2026-10-20: "daha UI ve UX dostu"). Loaded only on the cart and checkout,
   after modern.css. Markup: woocommerce/cart/cart.php and inc/cart-checkout.php. */

/* ── Shared card ─────────────────────────────────────────────────────── */
.if-wc-page{--co-line:var(--line,#dce7f1);--co-radius:16px;--co-shadow:0 12px 36px #0c32670b;--co-sticky:calc(var(--if-head,88px) + 20px)}

/* ── Trust chips (cart summary, under "Siparişi onayla") ─────────────── */
.if-trust{display:grid;gap:8px;margin:16px 0 0;padding:14px 0 0;border-top:1px dashed var(--co-line);list-style:none;font-size:14px;line-height:1.45;color:var(--muted)}
.if-trust li{display:flex;align-items:center;gap:9px}
.if-trust li::before{content:"";flex:none;width:16px;height:16px;background:#16a34a;-webkit-mask:var(--if-i-circle-check) center/contain no-repeat;mask:var(--if-i-circle-check) center/contain no-repeat}
.if-trust li:first-child::before{background:var(--blue);-webkit-mask-image:var(--if-i-lock);mask-image:var(--if-i-lock)}

/* ── Cart ────────────────────────────────────────────────────────────── */
.if-wc-page .if-cart{display:grid;grid-template-columns:minmax(0,1fr) 380px;gap:32px;align-items:start}
.if-wc-page .if-cart__main{min-width:0;margin:0}
.if-wc-page .if-cart__items{display:grid;gap:16px;margin:0;border:0;border-radius:0;background:none}
.if-wc-page .if-cart-item{display:grid;grid-template-columns:176px minmax(0,1fr) auto;gap:22px;align-items:start;padding:18px;border:1px solid var(--co-line);border-radius:var(--co-radius);background:#fff}
.if-wc-page .if-cart-item__media{overflow:hidden;border-radius:12px;background:var(--ice,#e9f5ff);aspect-ratio:4/3}
.if-wc-page .if-cart-item__media img{width:100%;height:100%;object-fit:cover}
.if-wc-page .if-cart-item__body{min-width:0;padding:0}
.if-wc-page .if-cart-item__title{margin:2px 0 8px;font-family:var(--font-display);font-size:22px;font-weight:700;line-height:1.3;letter-spacing:-.02em}
.if-wc-page .if-cart-item__title a{color:var(--navy)}
.if-wc-page .if-cart-item__title a:hover{color:var(--blue)}
.if-wc-page .if-cart-item__facts{display:flex;flex-wrap:wrap;gap:4px 0;margin:0 0 8px;padding:0;list-style:none;font-size:15px;color:var(--muted)}
.if-wc-page .if-cart-item__facts li+li::before{content:"·";margin:0 9px;color:#9fb2c5}
.if-wc-page .if-cart-item__facts li{color:var(--text)}
.if-wc-page .if-cart-item__data dl.variation{display:flex;flex-wrap:wrap;gap:4px 8px;margin:0;font-size:15px}
.if-wc-page .if-cart-item__data dt{margin:0;font-weight:600;color:var(--navy)}
.if-wc-page .if-cart-item__data dd{margin:0;color:var(--text)}
.if-wc-page .if-cart-item__data dd p{margin:0}
.if-wc-page .if-cart-item__actions{display:flex;flex-wrap:wrap;align-items:center;gap:8px 20px;margin-top:14px;font-size:15px;font-weight:600}
.if-wc-page .if-cart-item__edit{color:var(--blue)}
.if-wc-page .if-cart-item__edit:hover{text-decoration:underline;text-underline-offset:3px}
.if-wc-page .product-remove a.if-cart-item__remove{display:inline;width:auto;height:auto;padding:0;border-radius:0;background:none;color:var(--muted)!important;font-size:15px;font-weight:600;line-height:inherit}
.if-wc-page .product-remove a.if-cart-item__remove:hover{background:none;color:#b42318!important;text-decoration:underline;text-underline-offset:3px}
.if-wc-page .if-cart-item__price{display:flex;flex-direction:column;align-items:flex-end;gap:2px;padding:2px 2px 0 0;text-align:right;white-space:nowrap}
.if-wc-page .if-cart-item__label{font-size:14px;color:var(--muted)}
.if-wc-page .if-cart-item__price strong{font-size:24px;font-weight:700;letter-spacing:-.02em;color:var(--navy)}
.if-wc-page .if-cart__actions{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:4px 2px}
.if-wc-page .if-cart__actions button.if-cart__update{display:none!important}
.if-wc-page .if-cart__coupon summary{display:inline-flex;align-items:center;gap:8px;color:var(--blue);font-size:16px;font-weight:600;list-style:none;cursor:pointer}
.if-wc-page .if-cart__coupon summary::-webkit-details-marker{display:none}
.if-wc-page .if-cart__coupon summary::after{content:"+";font-size:20px;line-height:1}
.if-wc-page .if-cart__coupon[open] summary::after{content:"−"}
.if-wc-page .if-cart__coupon .coupon{display:flex;flex-wrap:wrap;gap:8px;margin-top:12px;float:none;width:auto}
.if-wc-page .if-cart__coupon input.input-text{width:240px;min-height:48px;margin:0;padding:0 14px;border:1px solid var(--co-line);border-radius:10px;font:inherit;font-size:16px}
.if-wc-page .if-cart__coupon .button{min-height:48px;padding:0 20px;border-radius:10px}

.if-wc-page .if-cart__side{position:sticky;top:var(--co-sticky);width:auto;margin:0}
.if-wc-page .if-cart__side .cart_totals{float:none;width:auto;margin:0;padding:24px;border:1px solid var(--co-line);border-radius:var(--co-radius);background:#fff;box-shadow:var(--co-shadow)}
.if-wc-page .if-cart__side .cart_totals h2{margin:0 0 10px;font-family:var(--font-display);font-size:22px;font-weight:700;letter-spacing:-.02em;color:var(--navy)}
.if-wc-page .if-cart__side .cart_totals table{width:100%;margin:0;border:0;border-collapse:collapse}
.if-wc-page .if-cart__side .cart_totals :is(th,td){padding:12px 0;border:0;border-top:1px solid var(--co-line);background:none;font-size:16px;font-weight:500;color:var(--text);vertical-align:top}
.if-wc-page .if-cart__side .cart_totals td{text-align:right}
.if-wc-page .if-cart__side .cart_totals tr:first-child :is(th,td){border-top:0}
.if-wc-page .if-cart__side .cart_totals .order-total :is(th,td){padding-top:14px;font-size:19px;font-weight:700;color:var(--navy)}
.if-wc-page .if-cart__side .cart_totals .order-total td small{display:block;font-size:13px;font-weight:500;color:var(--muted)}
.if-wc-page .if-cart__side .wc-proceed-to-checkout{margin:0;padding:16px 0 0}
.if-wc-page .if-cart__side .wc-proceed-to-checkout .checkout-button{display:flex;width:100%;min-height:54px;margin:0;font-size:17px;border-radius:12px}
.if-wc-page .if-cart__side .cross-sells{display:none}

@media(max-width:1000px){
  .if-wc-page .if-cart{grid-template-columns:1fr;gap:24px}
  .if-wc-page .if-cart__side{position:static}
}
@media(max-width:640px){
  .if-wc-page .if-cart-item{grid-template-columns:92px minmax(0,1fr);gap:14px;padding:14px}
  .if-wc-page .if-cart-item__title{font-size:18px}
  .if-wc-page .if-cart-item__price{grid-column:1/-1;flex-direction:row;align-items:baseline;justify-content:space-between;padding:12px 0 0;border-top:1px solid var(--co-line)}
  .if-wc-page .if-cart-item__price strong{font-size:21px}
  .if-wc-page .if-cart__coupon input.input-text{width:100%;flex:1}
}

/* ── Checkout ────────────────────────────────────────────────────────── */
/* Coupon line above the form: quiet, one line. */
body.woocommerce-checkout .if-wc-page .woocommerce-form-coupon-toggle .woocommerce-info{margin:0 0 18px;padding:12px 16px;border:1px dashed var(--co-line);border-radius:12px;background:#fff;font-size:15px;color:var(--muted)}
body.woocommerce-checkout .if-wc-page .woocommerce-form-coupon-toggle .woocommerce-info::before{display:none}
body.woocommerce-checkout .if-wc-page .woocommerce-form-coupon-toggle .showcoupon{color:var(--blue);font-weight:600}
body.woocommerce-checkout .if-wc-page form.checkout_coupon{margin:0 0 18px;padding:16px;border:1px solid var(--co-line);border-radius:12px}

/* Two columns: steps on the left, the sticky summary on the right. Children of the form go to column 1;
   #order_review spans the rows of column 1 so it can stick. Row gap is 0: spanned empty rows would add gaps. */
body.woocommerce-checkout .if-wc-page .woocommerce form.checkout.checkout{grid-template-columns:minmax(0,1fr) 420px;grid-template-rows:none;column-gap:32px;row-gap:0;counter-reset:ifstep}
body.woocommerce-checkout .if-wc-page .woocommerce form.checkout.checkout>*{grid-column:1;min-width:0}
body.woocommerce-checkout .if-wc-page .woocommerce form.checkout.checkout>.woocommerce-NoticeGroup{grid-column:1/-1;margin-bottom:18px}
body.woocommerce-checkout .if-wc-page .woocommerce form.checkout.checkout>#customer_details{grid-row:auto;display:block}
body.woocommerce-checkout .if-wc-page #customer_details::before,body.woocommerce-checkout .if-wc-page #customer_details::after{display:none}
body.woocommerce-checkout .if-wc-page #customer_details>:is(.col-1,.col-2){float:none;width:auto;max-width:none}
body.woocommerce-checkout .if-wc-page #customer_details>.col-1{margin-bottom:20px}
body.woocommerce-checkout .if-wc-page #order_review_heading{display:none}
body.woocommerce-checkout .if-wc-page .woocommerce form.checkout.checkout>#order_review{grid-column:2;grid-row:1/span 40;position:sticky;top:var(--co-sticky);align-self:start;margin:0;padding:24px;border:1px solid var(--co-line);border-radius:var(--co-radius);background:#fff;box-shadow:var(--co-shadow)}

/* Step cards */
body.woocommerce-checkout .if-wc-page .if-checkout-people,
body.woocommerce-checkout .if-wc-page #customer_details>.col-1,
body.woocommerce-checkout .if-wc-page #customer_details>.col-2{margin:0;padding:24px;border:1px solid var(--co-line);border-radius:var(--co-radius);background:#fff}
body.woocommerce-checkout .if-wc-page .if-checkout-people{margin-bottom:20px}
body.woocommerce-checkout .if-wc-page #customer_details>.col-2:not(:has(.woocommerce-additional-fields__field-wrapper > *)){display:none}
body.woocommerce-checkout .if-wc-page :is(.if-checkout-people>h3,.woocommerce-billing-fields>h3,.woocommerce-additional-fields>h3){display:flex;align-items:center;gap:12px;margin:0 0 6px;font-family:var(--font-display);font-size:21px;font-weight:700;letter-spacing:-.02em;color:var(--navy)}
body.woocommerce-checkout .if-wc-page :is(.if-checkout-people>h3,.woocommerce-billing-fields>h3,.woocommerce-additional-fields>h3)::before{counter-increment:ifstep;content:counter(ifstep);display:grid;place-items:center;flex:none;width:30px;height:30px;border-radius:50%;background:var(--navy);color:#fff;font-size:15px;font-weight:700;letter-spacing:0}
body.woocommerce-checkout .if-wc-page .if-people-for{margin:0 0 16px 42px;font-size:15px;color:var(--muted)}
body.woocommerce-checkout .if-wc-page .woocommerce-billing-fields>h3,body.woocommerce-checkout .if-wc-page .woocommerce-additional-fields>h3{margin-bottom:18px}

/* Summary */
body.woocommerce-checkout .if-wc-page .if-co-sum__title{margin:0 0 6px;font-family:var(--font-display);font-size:22px;font-weight:700;letter-spacing:-.02em;color:var(--navy)}
body.woocommerce-checkout .if-wc-page #order_review table.shop_table{width:100%;margin:0 0 6px;border:0;border-collapse:collapse;background:none}
body.woocommerce-checkout .if-wc-page #order_review table.shop_table thead{display:none}
body.woocommerce-checkout .if-wc-page #order_review table.shop_table :is(th,td){padding:12px 0;border:0;border-top:1px solid var(--co-line);background:none;font-size:16px;vertical-align:top}
body.woocommerce-checkout .if-wc-page #order_review table.shop_table tbody tr:first-child td{border-top:0}
body.woocommerce-checkout .if-wc-page #order_review table.shop_table td:last-child,body.woocommerce-checkout .if-wc-page #order_review table.shop_table tfoot td{text-align:right}
body.woocommerce-checkout .if-wc-page #order_review .cart_item .product-name{font-weight:600;color:var(--navy)}
body.woocommerce-checkout .if-wc-page #order_review .cart_item .product-quantity{display:none}
body.woocommerce-checkout .if-wc-page #order_review .cart_item dl.variation{margin:4px 0 0;font-size:14px;font-weight:500;color:var(--muted)}
body.woocommerce-checkout .if-wc-page #order_review .cart_item dl.variation :is(dt,dd,p){display:inline;margin:0}
body.woocommerce-checkout .if-wc-page #order_review .cart_item dl.variation dd{margin-left:4px}
body.woocommerce-checkout .if-wc-page #order_review tfoot .order-total :is(th,td){padding-top:14px;font-size:19px;font-weight:700;color:var(--navy)}
body.woocommerce-checkout .if-wc-page #order_review #payment{margin:6px 0 0;padding:0;border-radius:0;background:none}
body.woocommerce-checkout .if-wc-page #order_review #payment ul.payment_methods{padding:12px 0;border-bottom:1px solid var(--co-line)}
body.woocommerce-checkout .if-wc-page #order_review #payment .form-row.place-order{margin:0;padding:16px 0 0}
body.woocommerce-checkout .if-wc-page #order_review #place_order{display:flex;width:100%;min-height:54px;margin-top:14px;border-radius:12px;font-size:17px;float:none}

/* Phone summary on top */
body.woocommerce-checkout .if-wc-page .if-co-mobile{display:none}
@media(max-width:1000px){
  body.woocommerce-checkout .if-wc-page .woocommerce form.checkout.checkout{grid-template-columns:1fr}
  body.woocommerce-checkout .if-wc-page .woocommerce form.checkout.checkout>#order_review{grid-column:1;grid-row:auto;position:static;margin-top:20px}
  body.woocommerce-checkout .if-wc-page .if-co-mobile{display:block;margin:0 0 20px;border:1px solid var(--co-line);border-radius:14px;background:var(--snow,#f5f9fd)}
  body.woocommerce-checkout .if-wc-page .if-co-mobile summary{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:14px 16px;font-size:16px;font-weight:600;color:var(--navy);list-style:none;cursor:pointer}
  body.woocommerce-checkout .if-wc-page .if-co-mobile summary::-webkit-details-marker{display:none}
  body.woocommerce-checkout .if-wc-page .if-co-mobile summary>span::after{content:"⌄";margin-left:8px;color:var(--blue)}
  body.woocommerce-checkout .if-wc-page .if-co-mobile[open] summary>span::after{content:"⌃"}
  body.woocommerce-checkout .if-wc-page .if-co-mobile__total{font-size:18px}
  body.woocommerce-checkout .if-wc-page .if-co-mobile ul{margin:0;padding:0 16px 14px;list-style:none;font-size:15px}
  body.woocommerce-checkout .if-wc-page .if-co-mobile li{display:grid;gap:2px;color:var(--muted)}
  body.woocommerce-checkout .if-wc-page .if-co-mobile li b{color:var(--navy)}
}
@media(max-width:640px){
  body.woocommerce-checkout .if-wc-page .if-checkout-people,
  body.woocommerce-checkout .if-wc-page #customer_details>.col-1,
  body.woocommerce-checkout .if-wc-page #customer_details>.col-2,
  body.woocommerce-checkout .if-wc-page .woocommerce form.checkout.checkout>#order_review{padding:18px}
  body.woocommerce-checkout .if-wc-page .if-people-for{margin-left:0}
}
