:root{
  --cart-red:#cf0a2c;
  --cart-red-dark:#a90020;
  --cart-ink:#1f1d20;
  --cart-muted:#7b777c;
  --cart-line:#e8e5e7;
  --cart-surface:#fff;
  --cart-bg:#f4f5f7;
}

.cart-body{
  background:var(--cart-bg);
}

.cart-body .search button{
  width:76px;
  font:800 11px Manrope,sans-serif;
}

.cart-main{
  display:block;
  min-height:70vh;
  background:var(--cart-bg);
  padding:34px 0 68px;
}

.cart-status{
  min-height:240px;
  padding-top:80px;
  color:var(--cart-muted);
  text-align:center;
  font-weight:700;
}

.cart-empty{
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  min-height:max(440px,75vh);
  border-radius:10px;
  background:#fff;
  padding:24px 30px 30px;
  text-align:center;
  box-shadow:0 0 30px rgba(0,0,0,.05);
}

.cart-empty-image{
  display:block;
  flex:none;
  width:100px;
  height:100px;
  object-fit:contain;
  margin:0 0 30px;
}

.cart-empty h1{
  margin:0 0 16px;
  color:#000;
  font-size:18px;
  font-weight:600;
  line-height:1;
  letter-spacing:0;
}

.cart-empty p{
  max-width:100%;
  margin:0 0 24px;
  color:#828c98;
  font-size:14px;
  font-weight:500;
  line-height:18px;
}

.cart-empty a{
  display:inline-flex;
  flex:none;
  width:200px;
  max-width:100%;
  min-height:56px;
  align-items:center;
  justify-content:center;
  border-radius:20px;
  background:#000;
  padding:16px 10px;
  color:#fff;
  font-size:16px;
  font-weight:400;
  line-height:24px;
  text-decoration:none;
}

.cart-empty a:hover{
  background:#242424;
}

.cart-empty a:focus-visible{
  outline:3px solid var(--cart-red);
  outline-offset:4px;
}

.cart-layout{
  display:grid;
  grid-template-columns:minmax(0,1fr) 320px;
  align-items:start;
  gap:24px;
}

.cart-flow{
  display:grid;
  min-width:0;
  gap:20px;
}

.checkout-card,
.order-summary{
  border:1px solid #efedef;
  border-radius:18px;
  background:var(--cart-surface);
  box-shadow:0 12px 32px rgba(35,30,34,.05);
}

.checkout-card-title{
  min-height:78px;
  display:flex;
  align-items:center;
  border-bottom:1px solid var(--cart-line);
  padding:0 30px;
}

.checkout-card-title h1,
.checkout-card-title h2{
  margin:0;
  color:var(--cart-ink);
  font-size:28px;
  letter-spacing:-.9px;
}

.checkout-card-content{
  padding:28px 30px 32px;
}

.cart-bulk-row{
  min-height:66px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:20px;
  padding:0 30px;
}

.cart-bulk-row button,
.cart-remove{
  min-height:36px;
  border:0;
  background:none;
  padding:7px 0;
  color:var(--cart-red);
  font:700 12px Manrope,sans-serif;
  cursor:pointer;
}

.cart-body button:focus-visible,
.cart-body a:focus-visible,
.choice-card:has(input:focus-visible){
  outline:3px solid rgba(207,10,44,.28);
  outline-offset:3px;
}

.cart-check:has(input:focus-visible) span{
  outline:3px solid rgba(207,10,44,.28);
  outline-offset:3px;
}

.cart-check{
  display:inline-flex;
  align-items:center;
  gap:10px;
  cursor:pointer;
  user-select:none;
}

.cart-check input{
  position:absolute;
  opacity:0;
  pointer-events:none;
}

.cart-check span{
  width:24px;
  height:24px;
  display:grid;
  place-items:center;
  flex:none;
  border:2px solid #d8d4d7;
  border-radius:50%;
  background:#fff;
}

.cart-check input:checked+span{
  border-color:var(--cart-red);
  background:var(--cart-red);
}

.cart-check input:checked+span:after{
  content:'';
  width:8px;
  height:4px;
  border:solid #fff;
  border-width:0 0 2px 2px;
  transform:rotate(-45deg) translate(1px,-1px);
}

.cart-check b{
  font-size:12px;
}

.cart-product-list{
  padding:0 30px 10px;
}

.cart-product{
  display:grid;
  grid-template-columns:24px 104px minmax(0,1fr) 128px 130px;
  align-items:center;
  gap:18px;
  min-height:160px;
  border-top:1px dashed #dedadd;
  padding:22px 0;
}

.cart-product:first-child{
  border-top:0;
}

.cart-product-image{
  width:104px;
  height:104px;
  overflow:hidden;
  border-radius:12px;
  background:#faf7f8;
  display:grid;
  place-items:center;
  color:#a99fa3;
  font-size:11px;
  font-weight:700;
}

.cart-product-image img{
  display:block;
  width:100%;
  height:100%;
  object-fit:contain;
}

.cart-product-copy{
  align-self:stretch;
  display:flex;
  min-width:0;
  flex-direction:column;
  justify-content:center;
  align-items:flex-start;
}

.cart-product-copy a{
  max-width:430px;
  color:var(--cart-ink);
  font-size:14px;
  font-weight:800;
  line-height:1.4;
  text-decoration:none;
}

.cart-product-copy small{
  display:block;
  margin-top:7px;
  color:#8d8990;
  font-size:11px;
}

.cart-remove{
  margin-top:11px;
}

.cart-line-price{
  font-size:17px;
  font-weight:800;
  white-space:nowrap;
}

.cart-quantity{
  height:46px;
  display:grid;
  grid-template-columns:40px 1fr 40px;
  align-items:center;
  border-radius:12px;
  background:#f5f5f7;
  overflow:hidden;
}

.cart-quantity button{
  height:100%;
  border:0;
  background:transparent;
  color:#7e7980;
  font:500 24px Arial,sans-serif;
  cursor:pointer;
}

.cart-quantity button:disabled{
  opacity:.28;
  cursor:not-allowed;
}

.cart-quantity span{
  text-align:center;
  font-weight:800;
}

.choice-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:12px;
}

.choice-card{
  position:relative;
  min-height:54px;
  display:grid;
  place-items:center;
  border:1px solid #e2dfe1;
  border-radius:14px;
  background:#f7f7f8;
  cursor:pointer;
}

.choice-card input{
  position:absolute;
  opacity:0;
}

.choice-card:has(input:checked){
  border:2px solid var(--cart-red);
  background:#fff;
}

.choice-card>span{
  color:#2b282b;
  font-size:13px;
  font-weight:800;
}

.choice-card-detail{
  min-height:76px;
  place-items:stretch;
  padding:15px 18px;
}

.choice-card-detail>span{
  display:flex;
  flex-direction:column;
  justify-content:center;
}

.choice-card-detail small{
  margin-top:4px;
  color:var(--cart-muted);
  font-weight:500;
}

.recipient-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:14px;
  margin-top:22px;
}

.recipient-grid[hidden]{
  display:none;
}

.recipient-grid label,
.delivery-panel label,
.comment-field{
  color:#4a4549;
  font-size:11px;
  font-weight:800;
}

.recipient-grid input,
.delivery-panel textarea,
.comment-field textarea{
  width:100%;
  display:block;
  margin-top:7px;
  border:1px solid #dedadd;
  border-radius:12px;
  background:#fff;
  padding:13px 14px;
  color:var(--cart-ink);
  font:600 13px Manrope,sans-serif;
  outline:0;
}

.recipient-grid input:focus,
.delivery-panel textarea:focus,
.comment-field textarea:focus{
  border-color:var(--cart-red);
  box-shadow:0 0 0 3px rgba(207,10,44,.08);
}

.recipient-grid input[readonly]{
  background:#f7f7f8;
  color:#6f6970;
}

.delivery-panel{
  margin-top:22px;
  border:1px solid #e2dfe1;
  border-radius:14px;
  background:#fffafa;
  padding:18px 20px;
}

.delivery-panel>b,
.delivery-panel>span{
  display:block;
}

.delivery-panel>b{
  font-size:14px;
}

.delivery-panel>span{
  margin-top:6px;
  color:var(--cart-muted);
  font-size:12px;
  line-height:1.5;
}

.delivery-panel textarea{
  min-height:88px;
  resize:vertical;
}

.payment-grid{
  margin-bottom:20px;
}

.kaspi-invoice-phone-panel{
  display:grid;
  gap:14px;
  margin-bottom:20px;
  border:1px solid #e2dfe1;
  border-radius:14px;
  background:#fffafa;
  padding:18px 20px;
}

.kaspi-invoice-phone-current{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
}

.kaspi-invoice-phone-current span,
.kaspi-invoice-phone-panel>small{
  color:var(--cart-muted);
  font-size:11px;
  line-height:1.5;
}

.kaspi-invoice-phone-current b{
  font-size:14px;
}

.kaspi-alternate-toggle{
  display:flex;
  align-items:center;
  gap:9px;
  color:var(--cart-ink);
  font-size:12px;
  font-weight:800;
  cursor:pointer;
}

.kaspi-alternate-toggle input{
  width:18px;
  height:18px;
  accent-color:var(--cart-red);
}

.kaspi-alternate-phone{
  color:#4a4549;
  font-size:11px;
  font-weight:800;
}

.kaspi-alternate-phone input{
  width:100%;
  display:block;
  margin-top:7px;
  border:1px solid #dedadd;
  border-radius:12px;
  background:#fff;
  padding:13px 14px;
  color:var(--cart-ink);
  font:600 13px Manrope,sans-serif;
  outline:0;
}

.kaspi-alternate-phone input:focus{
  border-color:var(--cart-red);
  box-shadow:0 0 0 3px rgba(207,10,44,.08);
}

.comment-field{
  display:block;
}

.comment-field textarea{
  min-height:104px;
  resize:vertical;
}

.order-summary{
  position:sticky;
  top:98px;
  padding:27px 28px 24px;
}

.summary-section{
  margin-bottom:21px;
}

.summary-section span,
.summary-section b,
.summary-section small{
  display:block;
}

.summary-section span{
  margin-bottom:5px;
  color:#817a80;
  font-size:11px;
  font-weight:800;
  text-transform:uppercase;
  letter-spacing:.6px;
}

.summary-section b{
  color:var(--cart-ink);
  font-size:13px;
  line-height:1.45;
}

.summary-section small{
  margin-top:3px;
  color:var(--cart-muted);
  line-height:1.45;
}

.promo-box{
  margin:4px 0 22px;
  padding:16px;
  border:1px solid var(--cart-line);
  border-radius:14px;
  background:#faf9fa;
}

.promo-box>label{
  display:block;
  margin-bottom:9px;
  color:var(--cart-ink);
  font-size:12px;
  font-weight:800;
}

.promo-control{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:8px;
}

.promo-control input{
  width:100%;
  min-width:0;
  height:43px;
  border:1px solid #dcd7da;
  border-radius:10px;
  background:#fff;
  padding:0 12px;
  color:var(--cart-ink);
  font:700 12px Manrope,sans-serif;
  text-transform:uppercase;
  outline:none;
}

.promo-control input:focus{
  border-color:var(--cart-red);
  box-shadow:0 0 0 3px rgba(207,10,44,.08);
}

.promo-control button{
  min-height:43px;
  border:0;
  border-radius:10px;
  background:#251f22;
  padding:0 13px;
  color:#fff;
  font:800 11px Manrope,sans-serif;
  cursor:pointer;
}

.promo-control button:disabled{
  opacity:.5;
  cursor:not-allowed;
}

.promo-feedback{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:10px;
  margin-top:9px;
}

.promo-feedback small{
  color:var(--cart-muted);
  font-size:10px;
  line-height:1.4;
}

.promo-feedback small.success,
.summary-discount b{
  color:#159552;
  font-weight:800;
}

.promo-feedback button{
  border:0;
  background:transparent;
  padding:0;
  color:var(--cart-red);
  font:800 10px Manrope,sans-serif;
  cursor:pointer;
}

.summary-totals{
  border-top:1px solid var(--cart-line);
  padding-top:20px;
}

.summary-totals>div{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:20px;
  margin-bottom:11px;
  color:#777178;
  font-size:12px;
}

.summary-totals b{
  color:var(--cart-ink);
  text-align:right;
}

.summary-totals .summary-total{
  align-items:baseline;
  margin:19px 0 0;
  color:var(--cart-ink);
  font-size:18px;
  font-weight:800;
}

.summary-total b{
  font-size:24px;
}

.summary-totals .summary-discount{
  color:#159552;
}

.checkout-consent{
  display:flex;
  align-items:flex-start;
  gap:10px;
  margin-top:22px;
  color:#5f595e;
  font-size:11px;
  line-height:1.55;
}

.checkout-consent input{
  flex:0 0 auto;
  width:17px;
  height:17px;
  margin:1px 0 0;
  accent-color:var(--cart-red);
}

.checkout-consent a{
  color:#b80022;
  text-underline-offset:2px;
}

.checkout-consent a:focus-visible{
  outline:2px solid rgba(207,10,44,.3);
  outline-offset:2px;
}

.checkout-submit{
  width:100%;
  min-height:54px;
  margin-top:16px;
  border:0;
  border-radius:13px;
  background:linear-gradient(110deg,var(--cart-red),var(--cart-red-dark));
  color:#fff;
  font:800 14px Manrope,sans-serif;
  cursor:pointer;
  box-shadow:0 12px 24px rgba(207,10,44,.2);
}

.checkout-submit:disabled{
  opacity:.45;
  cursor:not-allowed;
  box-shadow:none;
}

.order-summary>p{
  margin:13px 0 0;
  color:#777178;
  font-size:10px;
  line-height:1.5;
  text-align:center;
}
.order-summary>p a{color:#b80022;text-underline-offset:2px}
.order-summary>p a:focus-visible{outline:2px solid rgba(207,10,44,.3);outline-offset:2px}

@media(max-width:1000px){
  .cart-layout{
    grid-template-columns:minmax(0,1fr) 285px;
    gap:16px;
  }
  .cart-product{
    grid-template-columns:24px 86px minmax(0,1fr) 112px;
  }
  .cart-product-image{
    width:86px;
    height:86px;
  }
  .cart-quantity{
    grid-column:3 / 5;
    width:128px;
    justify-self:end;
  }
}

@media(max-width:780px){
  .cart-main{
    padding-top:18px;
  }
  .cart-layout{
    grid-template-columns:1fr;
  }
  .order-summary{
    position:static;
  }
}

@media(max-width:600px){
  .cart-body .unified-header.store-header{
    display:grid!important;
    grid-template-columns:minmax(92px,112px) 78px repeat(3,48px)!important;
    grid-template-rows:48px 46px!important;
    column-gap:4px!important;
    row-gap:8px!important;
    justify-content:space-between!important;
    padding-top:10px!important;
    padding-bottom:10px!important;
  }
  .cart-body .unified-header .brand-logo{
    grid-column:1;
    grid-row:1;
    width:104px!important;
    align-self:center;
  }
  .cart-body .unified-header .catalog-btn{
    grid-column:2;
    grid-row:1;
    width:78px;
    min-width:78px;
    height:48px;
    padding:6px;
    gap:4px;
    font-size:11px;
  }
  .cart-body .unified-header .catalog-btn svg{
    display:none;
  }
  .cart-body .unified-header .account-action{
    grid-column:3;
    grid-row:1;
  }
  .cart-body .unified-header .orders-action{
    grid-column:4;
    grid-row:1;
    width:48px!important;
    min-width:48px!important;
    height:48px!important;
    padding:0 2px;
    font-size:8px;
  }
  .cart-body .unified-header #cartButton{
    grid-column:5;
    grid-row:1;
  }
  .cart-body .unified-header .search{
    grid-column:1 / -1;
    grid-row:2;
    width:100%;
    height:46px;
  }
  .cart-main{
    padding-bottom:32px;
  }
  .cart-layout{
    width:100%;
    gap:12px;
  }
  .checkout-card,
  .order-summary{
    border-radius:0;
    border-right:0;
    border-left:0;
    box-shadow:none;
  }
  .checkout-card-title{
    min-height:66px;
    padding:0 16px;
  }
  .checkout-card-title h1,
  .checkout-card-title h2{
    font-size:23px;
  }
  .checkout-card-content{
    padding:20px 16px 24px;
  }
  .cart-bulk-row,
  .cart-product-list{
    padding-right:16px;
    padding-left:16px;
  }
  .cart-bulk-row button{
    font-size:11px;
  }
  .cart-product{
    grid-template-columns:24px 76px minmax(0,1fr);
    gap:11px;
    padding:18px 0;
  }
  .cart-product-image{
    width:76px;
    height:76px;
  }
  .cart-product-copy a{
    font-size:12px;
  }
  .cart-line-price{
    grid-column:2;
    font-size:15px;
  }
  .cart-quantity{
    grid-column:3;
    width:118px;
  }
  .choice-grid,
  .recipient-grid{
    grid-template-columns:1fr;
  }
  .payment-grid{
    grid-template-columns:1fr;
  }
  .order-summary{
    padding:24px 16px;
  }
  .cart-empty{
    width:calc(100% - 24px);
    min-height:max(440px,65svh);
    padding:32px 16px;
  }
}

/* Hidden states must win over component display rules. */
.cart-body [hidden]{
  display:none!important;
}
