#ama-cart-overlay{
  position:fixed;
  inset:0;
  background:rgba(0,0,0,.38);
  opacity:0;
  visibility:hidden;
  transition:.25s ease;
  z-index:99998;
}
#ama-cart-overlay.active{
  opacity:1;
  visibility:visible;
}

#ama-cart-drawer{
  position:fixed;
  right:0;
  background:#fff;
  transform:translateX(100%);
  transition:transform .28s ease;
  z-index:99999;
  box-shadow:-12px 0 30px rgba(0,0,0,.14);
  max-width:100vw;
}
#ama-cart-drawer.open{
  transform:translateX(0);
}

.ama-cart-inner{
  display:flex;
  flex-direction:column;
  height:100%;
}

.ama-cart-header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:14px 16px;
  border-bottom:1px solid #ececec;
  background:#f7f7f7;
}
.ama-cart-header h3{
  margin:0;
  font-size:17px;
  font-weight:800;
  color:#111827;
  letter-spacing:.02em;
}
#ama-cart-close{
  border:none;
  background:transparent;
  color:#111827;
  font-size:28px;
  line-height:1;
  cursor:pointer;
  padding:0;
  width:28px;
  height:28px;
}

.ama-cart-body{
  flex:1;
  overflow:auto;
  padding:8px 12px 0;
}

.ama-cart-item{
  position:relative;
  display:grid;
  grid-template-columns:72px 1fr auto;
  gap:12px;
  padding:10px 26px 10px 0;
  border-bottom:1px solid #f1f1f1;
  align-items:start;
}
.ama-thumb img{
  width:72px !important;
  height:72px !important;
  object-fit:cover;
  border-radius:8px;
  display:block;
  background:#f3f4f6;
}
.ama-title{
  display:block;
  color:#374151;
  text-decoration:none;
  font-size:14px;
  line-height:1.45;
  font-weight:500;
  margin:1px 0 10px;
}
.ama-title:hover{color:#111827;}

.ama-bottom-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
}
.ama-qty{
  display:inline-flex;
  align-items:center;
  border:1px solid #d6d6d6;
  height:28px;
  background:#fff;
}
.ama-qty-btn{
  width:24px;
  height:26px;
  border:none;
  background:#f7f7f7;
  color:#111827;
  font-size:16px;
  cursor:pointer;
  padding:0;
}
.ama-qty-input{
  width:30px;
  height:26px;
  border:none;
  text-align:center;
  font-size:13px;
  color:#111827;
  padding:0;
  appearance:textfield;
  -moz-appearance:textfield;
}
.ama-qty-input::-webkit-outer-spin-button,
.ama-qty-input::-webkit-inner-spin-button{
  -webkit-appearance:none;
  margin:0;
}
.ama-price{
  font-size:14px;
  font-weight:700;
  color:#111827;
  white-space:nowrap;
}
.ama-remove{
  position:absolute;
  right:0;
  top:10px;
  border:none;
  background:transparent;
  color:#ef4444;
  font-size:28px;
  line-height:1;
  cursor:pointer;
  padding:0;
  width:24px;
  height:24px;
}

.ama-cart-footer{
  border-top:1px solid #ececec;
  padding:12px;
  background:#fff;
}
.ama-cart-subtotal{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-bottom:12px;
  font-size:15px;
  color:#111827;
}
.ama-cart-subtotal strong{
  font-size:16px;
}
.ama-cart-actions{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:10px;
}
.ama-btn{
  height:40px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  text-decoration:none !important;
  border-radius:4px;
  font-size:14px;
  font-weight:700;
  border:none;
}
.ama-btn-dark{
  background:#111827;
  color:#fff !important;
}
.ama-btn-primary{
  background:#ef2f7a;
  color:#fff !important;
}

#ama-cart-button{
  position:fixed;
  bottom:18px;
  border:none;
  z-index:100000;
  background:#0b1535;
  color:#fff;
  border-radius:50%;
  display:flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
  box-shadow:0 10px 24px rgba(0,0,0,.28);
  padding:0;
  transition:opacity .2s ease, visibility .2s ease, transform .2s ease;
}
#ama-cart-button .ama-cart-icon{
  font-size:20px;
  line-height:1;
}
#ama-cart-button .count{
  position:absolute;
  top:-4px;
  right:-4px;
  width:24px;
  height:24px;
  border-radius:50%;
  background:#fff;
  color:#111827;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:12px;
  font-weight:800;
}
#ama-cart-button.ama-bump{
  animation: amaCartBump .6s ease;
}
@keyframes amaCartBump{
  0%{transform:scale(1);}
  25%{transform:scale(1.18);}
  50%{transform:scale(.95);}
  100%{transform:scale(1);}
}
body.ama-cart-open #ama-cart-button{
  opacity:0;
  visibility:hidden;
  pointer-events:none;
  transform:scale(.9);
}

.ama-fly-image{
  position:fixed;
  z-index:100001;
  pointer-events:none;
  object-fit:cover;
  border-radius:10px;
  box-shadow:0 12px 30px rgba(0,0,0,.25);
  transition:all .75s cubic-bezier(.2,.8,.2,1);
}

.ama-empty{
  padding:26px 12px;
  text-align:center;
  color:#6b7280;
}

body.ama-cart-open{
  overflow:hidden;
}

@media (max-width:768px){
  #ama-cart-drawer{
    width:100vw !important;
    top:0 !important;
    height:100dvh !important;
  }
  .ama-cart-item{
    grid-template-columns:64px 1fr auto;
    gap:10px;
    padding-right:24px;
  }
  .ama-thumb img{
    width:64px !important;
    height:64px !important;
  }
  .ama-title{
    font-size:13px;
    margin-bottom:8px;
  }
  .ama-price{
    font-size:13px;
  }
  .ama-cart-actions{
    grid-template-columns:1fr;
  }
}

#ama-cart-button{
  overflow:visible;
}
#ama-cart-button::after{
  content:"";
  position:absolute;
  inset:-7px;
  border-radius:50%;
  border:2px solid rgba(255,255,255,.55);
  opacity:0;
  transform:scale(.82);
  pointer-events:none;
}
#ama-cart-button.ama-flash{
  animation: amaCartGlow 1.15s ease 2;
}
#ama-cart-button.ama-flash::after{
  animation: amaCartRing 1.15s ease 2;
}
#ama-cart-button .ama-cart-ripple{
  position:absolute;
  inset:-12px;
  border-radius:50%;
  background:radial-gradient(circle, rgba(255,255,255,.2) 0%, rgba(255,255,255,0) 65%);
  opacity:0;
  transform:scale(.75);
  pointer-events:none;
}
#ama-cart-button.ama-flash .ama-cart-ripple{
  animation: amaCartRipple .95s ease 2;
}
#ama-cart-toast{
  position:fixed;
  right:24px;
  bottom:94px;
  z-index:100002;
  background:#111827;
  color:#fff;
  padding:12px 16px;
  border-radius:12px;
  font-size:14px;
  font-weight:700;
  box-shadow:0 18px 34px rgba(0,0,0,.24);
  opacity:0;
  visibility:hidden;
  transform:translateY(14px) scale(.96);
  transition:opacity .24s ease, transform .24s ease, visibility .24s ease;
  pointer-events:none;
}
#ama-cart-toast.show{
  opacity:1;
  visibility:visible;
  transform:translateY(0) scale(1);
}
#ama-cart-drawer.ama-highlight{
  animation: amaDrawerNotice .7s ease;
}
@keyframes amaCartGlow{
  0%,100%{box-shadow:0 10px 24px rgba(0,0,0,.28);transform:scale(1);}
  25%{box-shadow:0 0 0 10px rgba(239,47,122,.18),0 18px 40px rgba(0,0,0,.32);transform:scale(1.12);}
  50%{box-shadow:0 0 0 18px rgba(239,47,122,.1),0 18px 40px rgba(0,0,0,.32);transform:scale(1.06);}
}
@keyframes amaCartRing{
  0%{opacity:0;transform:scale(.82);}
  30%{opacity:.95;transform:scale(1.15);}
  100%{opacity:0;transform:scale(1.48);}
}
@keyframes amaCartRipple{
  0%{opacity:0;transform:scale(.75);}
  35%{opacity:1;transform:scale(1.12);}
  100%{opacity:0;transform:scale(1.55);}
}
@keyframes amaDrawerNotice{
  0%{transform:translateX(100%);}
  35%{transform:translateX(-12px);}
  55%{transform:translateX(6px);}
  100%{transform:translateX(0);}
}
@media (max-width:768px){
  #ama-cart-toast{
    right:14px;
    left:14px;
    bottom:88px;
    text-align:center;
  }
}
