/* Shared cart drawer + product-card Add to cart buttons (home page style) */
:root{
  --cart-blue: var(--blue, #004ebc);
  --cart-blue-dark: var(--blue-dark, #003894);
  --cart-blue-soft: var(--blue-soft, rgba(0, 78, 188, 0.08));
  --cart-line: var(--line, #e6e9ee);
  --cart-ink-soft: var(--ink-soft, #5b6878);
  --cart-red: var(--trus-red, #ee3a4b);
  --cart-page-pad: var(--page-pad, 16px);
  --cart-radius-pill: var(--radius-pill, 999px);
}

/* ---------- product card buttons ---------- */
.product-card .add-cart-btn,
.product-card .add-to-cart{
  width:100%;
  background:var(--cart-blue);
  color:#fff;
  font-family:'Buenos Aires',sans-serif;
  font-weight:700;
  font-size:.92rem;
  padding:11px;
  min-height:44px;
  border-radius:var(--cart-radius-pill);
  box-shadow:0 3px 0 var(--cart-blue-dark);
  transition:transform .08s;
  border:none;
  cursor:pointer;
  text-align:center;
  display:block;
}
.product-card .add-cart-btn:active,
.product-card .add-to-cart:active{
  transform:translateY(2px);
  box-shadow:none;
}
@media (hover:hover){
  .product-card .add-cart-btn:hover,
  .product-card .add-to-cart:hover{filter:brightness(1.08);}
}

/* ---------- nav cart badge ---------- */
.cart-nav-btn{position:relative;}
.cart-badge{
  position:absolute;
  top:0;
  right:0;
  min-width:17px;
  height:17px;
  padding:0 4px;
  background:var(--cart-red);
  color:#fff;
  font-size:10px;
  font-weight:800;
  border-radius:999px;
  display:none;
  align-items:center;
  justify-content:center;
  line-height:1;
  pointer-events:none;
}
.cart-badge.is-visible{display:flex;}

/* ---------- cart drawer ---------- */
.cart-overlay{
  position:fixed;
  inset:0;
  background:rgba(17,33,74,.45);
  z-index:1100;
  opacity:0;
  visibility:hidden;
  transition:opacity .28s ease, visibility .28s;
}
.cart-overlay.is-open{
  opacity:1;
  visibility:visible;
}
.cart-drawer{
  position:fixed;
  top:0;
  right:0;
  bottom:0;
  width:min(100%, 480px);
  background:#fff;
  z-index:1101;
  transform:translateX(100%);
  transition:transform .32s cubic-bezier(.4,0,.2,1);
  display:flex;
  flex-direction:column;
  overflow:hidden;
  box-shadow:-8px 0 32px rgba(15,20,60,.15);
}
.cart-drawer.is-open{transform:translateX(0);}
body.cart-open{overflow:hidden;}

.cart-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:20px var(--cart-page-pad) 16px;
  flex:none;
}
.cart-head-left{
  display:flex;
  align-items:center;
  gap:10px;
}
.cart-head-left h2{
  font-size:1.2rem;
  font-weight:800;
  margin:0;
  color:#212427;
}
.cart-head-left svg{
  width:22px;
  height:22px;
  stroke:currentColor;
  fill:none;
  stroke-width:2;
}
.cart-drawer-close{
  background:transparent;
  border:none;
  color:#212427;
  width:40px;
  height:40px;
  display:flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
  padding:0;
  border-radius:50%;
}
.cart-drawer-close:hover{background:var(--cart-blue-soft);}
.cart-drawer-close svg{
  width:20px;
  height:20px;
  stroke:currentColor;
  fill:none;
  stroke-width:2;
  stroke-linecap:round;
}

.cart-body{
  flex:1;
  overflow-y:auto;
  -webkit-overflow-scrolling:touch;
  padding:0 var(--cart-page-pad);
}
.col-headers{
  display:flex;
  justify-content:space-between;
  padding-bottom:10px;
  font-size:14px;
  color:#212427;
  font-weight:600;
}
.col-rules{
  display:flex;
  gap:18px;
  margin-bottom:12px;
}
.col-rules span{
  flex:1;
  border-bottom:1px solid var(--cart-line);
}

.cart-item{
  display:flex;
  gap:14px;
  padding:16px 0;
  border-bottom:1px solid var(--cart-line);
  align-items:flex-start;
}
.cart-item:last-child{border-bottom:none;}
.cart-item .thumb{
  width:72px;
  height:72px;
  border-radius:10px;
  flex:none;
  overflow:hidden;
  background:#f3f4f6;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:2rem;
}
.cart-item .thumb svg,
.cart-item .thumb img{
  width:100%;
  height:100%;
  object-fit:contain;
  display:block;
}
.cart-item .item-info{flex:1;min-width:0;}
.cart-item .item-title{
  font-weight:700;
  font-size:.9rem;
  line-height:1.35;
  margin:0 0 6px;
  color:#212427;
}
.cart-item .item-price{
  color:var(--cart-ink-soft);
  font-size:.85rem;
  margin:0 0 10px;
  font-weight:600;
}
.qty-row{
  display:flex;
  align-items:center;
  gap:12px;
}
.qty-pill{
  display:flex;
  align-items:center;
  border:1px solid var(--cart-line);
  border-radius:999px;
  overflow:hidden;
  height:32px;
}
.qty-pill button{
  width:32px;
  height:32px;
  border:none;
  background:#fff;
  cursor:pointer;
  font-size:15px;
  color:#212427;
  display:flex;
  align-items:center;
  justify-content:center;
}
.qty-pill button:hover{background:var(--cart-blue-soft);}
.qty-pill .qty-val{
  width:28px;
  text-align:center;
  font-size:13px;
  font-weight:700;
}
.delete-btn{
  background:none;
  border:none;
  cursor:pointer;
  color:var(--cart-red);
  display:flex;
  align-items:center;
  justify-content:center;
  padding:4px;
  border-radius:8px;
}
.delete-btn:hover{background:#fdeaea;}
.item-total{
  flex:none;
  font-weight:800;
  font-size:.9rem;
  white-space:nowrap;
  color:#212427;
}

.cart-empty{
  flex:1;
  display:flex;
  flex-direction:column;
  align-items:center;
  text-align:center;
  padding:10px 0 24px;
}
.cart-empty-msg{
  font-family:'Buenos Aires',sans-serif;
  font-size:1.15rem;
  font-weight:600;
  color:#212427;
  margin:8px 0 22px;
}
.cart-continue-btn{
  display:block;
  width:100%;
  max-width:320px;
  background:var(--cart-blue);
  color:#fff;
  font-family:'Buenos Aires',sans-serif;
  font-weight:700;
  font-size:1.05rem;
  padding:15px 24px;
  border:none;
  border-radius:var(--cart-radius-pill);
  cursor:pointer;
  box-shadow:0 4px 0 var(--cart-blue-dark);
  margin-bottom:18px;
}
.cart-continue-btn:active{transform:translateY(2px);box-shadow:0 2px 0 var(--cart-blue-dark);}
.cart-login{
  font-family:'Buenos Aires',sans-serif;
  font-size:.95rem;
  font-weight:600;
  color:#212427;
  margin:0 0 8px;
  line-height:1.45;
}
.cart-login a{
  color:var(--cart-blue);
  text-decoration:underline;
  font-weight:700;
}
.cart-featured{
  width:min(336px, 90vw);
  margin:0 auto 8px;
  aspect-ratio:1;
  display:flex;
  align-items:center;
  justify-content:center;
}
.cart-featured img{
  width:100%;
  height:100%;
  object-fit:contain;
}
.cart-shop-age{
  align-self:flex-start;
  font-family:'Buenos Aires',sans-serif;
  font-size:1.05rem;
  font-weight:700;
  color:#212427;
  text-decoration:none;
}
.cart-shop-age:active{opacity:.7;}

.cart-foot{
  padding:16px var(--cart-page-pad) 24px;
  flex:none;
  border-top:1px solid var(--cart-line);
  background:#fff;
}
.cart-total-row{
  display:flex;
  justify-content:space-between;
  align-items:baseline;
  font-weight:800;
  font-size:1.1rem;
  margin-bottom:8px;
  color:#212427;
}
.cart-foot-note{
  font-size:.82rem;
  color:var(--cart-ink-soft);
  margin:0 0 14px;
  font-weight:600;
  line-height:1.4;
}
.checkout-btn{
  display:block;
  width:100%;
  background:var(--cart-blue);
  color:#fff;
  font-family:'Buenos Aires',sans-serif;
  font-weight:700;
  font-size:1.05rem;
  padding:15px 24px;
  border:none;
  border-radius:var(--cart-radius-pill);
  cursor:pointer;
  box-shadow:0 4px 0 var(--cart-blue-dark);
  transition:transform .08s ease;
}
.checkout-btn:active{
  transform:translateY(2px);
  box-shadow:0 2px 0 var(--cart-blue-dark);
}
