/* =========================================================
   THE MAHOHA — CART DRAWER V2
   Dark Burgundy / Plum Editorial Commerce Drawer
   Built for EasyOrders data-cart DOM
========================================================= */

:root{
  --mhc-burgundy:#74162C;
  --mhc-burgundy-2:#8B1D3A;
  --mhc-plum:#2B1028;
  --mhc-plum-deep:#1E0B1C;
  --mhc-wasabi:#D8F24A;
  --mhc-blush:#F7E9EC;
  --mhc-blue:#D7EFFF;
  --mhc-white:#FFFFFF;
  --mhc-muted:rgba(255,255,255,.62);
  --mhc-line:rgba(255,255,255,.10);
  --mhc-ease:cubic-bezier(.16,1,.3,1);
}

/* ---------------- MODAL / OVERLAY ---------------- */

[data-cart="root"]{
  direction:rtl;
  z-index:60 !important;
}

[data-cart="overlay"]{
  background:rgba(18,5,16,.58) !important;
  /* HeadlessUI owns opacity / transition state */
}

[data-cart="overlay"][data-headlessui-state="open"]{
  backdrop-filter:blur(10px) saturate(.82) !important;
  -webkit-backdrop-filter:blur(10px) saturate(.82) !important;
}

/* ---------------- DRAWER GEOMETRY ---------------- */

[data-cart="panel-container"]{
  padding-inline-start:0 !important;
}

[data-cart="panel"]{
  width:min(92vw,405px) !important;
  max-width:min(92vw,405px) !important;
}

[data-cart="panel-inner"]{
  position:relative;
  isolation:isolate;
  overflow-x:hidden !important;

  background:
    radial-gradient(circle at 10% 7%,rgba(216,242,74,.12),transparent 18%),
    radial-gradient(circle at 96% 30%,rgba(215,239,255,.08),transparent 28%),
    linear-gradient(155deg,#8A1B39 0%,#74162C 38%,#401127 72%,#2B1028 100%) !important;

  color:#fff !important;

  border-inline-end:1px solid rgba(216,242,74,.12) !important;

  box-shadow:
    28px 0 80px rgba(9,2,8,.40),
    8px 0 28px rgba(43,16,40,.32),
    inset -1px 0 rgba(255,255,255,.05) !important;

  scrollbar-width:none;
}

[data-cart="panel-inner"]::-webkit-scrollbar{width:0}

/* background watermark */
[data-cart="panel-inner"]::before{
  content:"";
  position:absolute;
  z-index:-2;
  top:92px;
  right:-64px;
  width:320px;
  height:320px;

  background:url("https://files.easy-orders.net/1785172310835268772.png") center/contain no-repeat;
  opacity:.045;
  filter:grayscale(.15) brightness(1.2);
  pointer-events:none;
}

/* ambient wasabi aura */
[data-cart="panel-inner"]::after{
  content:"";
  position:absolute;
  z-index:-1;
  top:-76px;
  left:-88px;
  width:270px;
  height:270px;
  border-radius:50%;

  background:radial-gradient(
    circle,
    rgba(216,242,74,.22) 0%,
    rgba(216,242,74,.08) 36%,
    transparent 72%
  );
  filter:blur(22px);
  pointer-events:none;
}

/* ---------------- CONTENT ---------------- */

[data-cart="content"]{
  position:relative;
  z-index:2;
  padding:20px 18px 24px !important;
}

/* minimal brand strip injected by JS */
.mhc-brand{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;

  margin:0 0 18px;
  padding:0 0 15px;

  border-bottom:1px solid var(--mhc-line);
}

.mhc-brand-left{
  display:flex;
  align-items:center;
  gap:10px;
  min-width:0;
}

.mhc-brand-logo{
  width:42px;
  height:42px;
  flex:0 0 42px;
  display:grid;
  place-items:center;

  border:1px solid rgba(216,242,74,.18);
  border-radius:12px;
  background:rgba(255,255,255,.06);

  box-shadow:
    inset 0 1px rgba(255,255,255,.08),
    0 8px 22px rgba(15,4,13,.16);
}

.mhc-brand-logo img{
  width:37px;
  height:37px;
  object-fit:contain;
}

.mhc-brand-text{
  min-width:0;
}

.mhc-brand-kicker{
  display:block;
  margin-bottom:3px;

  color:var(--mhc-wasabi);
  font-family:Arial,sans-serif;
  font-size:7px;
  font-weight:800;
  letter-spacing:.16em;
}

.mhc-brand-title{
  margin:0;
  color:#fff;
  font-family:Georgia,"Times New Roman",serif;
  font-size:18px;
  font-weight:500;
  line-height:1;
  letter-spacing:-.02em;
}

.mhc-brand-count{
  flex:0 0 auto;

  padding:6px 8px;

  border:1px solid rgba(216,242,74,.18);
  border-radius:9px;
  background:rgba(216,242,74,.08);

  color:var(--mhc-wasabi);
  font-family:Arial,sans-serif;
  font-size:8px;
  font-weight:800;
  letter-spacing:.06em;
}

/* native header row */
[data-cart="header"]{
  min-height:42px;
  align-items:center !important;
  margin:0 0 8px !important;
}

[data-cart="title"]{
  color:#fff !important;
  font-family:Tajawal,Cairo,sans-serif !important;
  font-size:15px !important;
  font-weight:800 !important;
}

[data-cart="close-wrapper"]{
  height:auto !important;
  margin-inline-start:10px !important;
}

[data-cart="close-button"]{
  width:39px !important;
  height:39px !important;
  display:grid !important;
  place-items:center !important;

  margin:0 !important;
  padding:0 !important;

  border:1px solid rgba(255,255,255,.12) !important;
  border-radius:11px !important;

  background:rgba(255,255,255,.055) !important;
  color:#fff !important;

  box-shadow:
    inset 0 1px rgba(255,255,255,.06),
    0 7px 20px rgba(14,4,12,.14) !important;

  transition:
    transform .22s var(--mhc-ease),
    background-color .22s ease,
    color .22s ease,
    border-color .22s ease !important;
}

[data-cart="close-button"]:hover,
[data-cart="close-button"]:active{
  background:var(--mhc-wasabi) !important;
  color:var(--mhc-plum) !important;
  border-color:var(--mhc-wasabi) !important;
  transform:rotate(4deg) scale(.97);
}

[data-cart="close-button"] svg{
  width:18px !important;
  height:18px !important;
}

/* ---------------- EMPTY STATE ---------------- */

[data-cart="empty-state"]{
  min-height:60vh !important;
  height:auto !important;

  margin-top:0 !important;
  padding:30px 8px 46px !important;

  display:flex !important;
  flex-direction:column !important;
  justify-content:center !important;
  align-items:center !important;
  gap:16px !important;

  text-align:center;
}

[data-cart="empty-animation-wrapper"]{
  position:relative;
  width:188px;
  height:188px;
  display:grid;
  place-items:center;

  border:1px solid rgba(255,255,255,.10);
  border-radius:50%;

  background:
    radial-gradient(circle at 50% 42%,rgba(216,242,74,.13),transparent 42%),
    rgba(255,255,255,.055);

  box-shadow:
    0 26px 58px rgba(15,4,13,.20),
    0 0 0 10px rgba(255,255,255,.018),
    inset 0 1px rgba(255,255,255,.08);

  backdrop-filter:blur(12px);
  -webkit-backdrop-filter:blur(12px);
}

[data-cart="empty-animation-wrapper"]::before{
  content:"";
  position:absolute;
  inset:13px;
  border:1px dashed rgba(216,242,74,.20);
  border-radius:50%;
}

[data-cart="empty-animation-wrapper"] > *{
  position:relative;
  z-index:2;
  transform:scale(.82);
  filter:brightness(1.15) saturate(.8);
}

[data-cart="empty-title"]{
  margin:6px 0 0 !important;

  color:#fff !important;
  font-family:Georgia,"Times New Roman",Tajawal,serif !important;
  font-size:29px !important;
  font-weight:500 !important;
  line-height:1.05 !important;
  letter-spacing:-.025em;
}

[data-cart="empty-subtitle"]{
  max-width:250px;
  margin:0 auto !important;

  color:rgba(255,255,255,.62) !important;
  font-family:Tajawal,Cairo,sans-serif !important;
  font-size:11px !important;
  line-height:1.75 !important;
}

.mhc-empty-cta{
  margin-top:5px;

  min-height:44px;
  padding:0 16px;

  border:1px solid var(--mhc-wasabi);
  border-radius:11px;

  background:var(--mhc-wasabi);
  color:var(--mhc-plum);

  font-family:Tajawal,Cairo,sans-serif;
  font-size:11px;
  font-weight:900;

  box-shadow:
    0 12px 26px rgba(13,4,11,.16),
    0 0 0 4px rgba(216,242,74,.045);

  cursor:pointer;

  transition:
    transform .24s var(--mhc-ease),
    background-color .24s ease,
    color .24s ease;
}

.mhc-empty-cta:hover{
  transform:translateY(-2px);
  background:#e4fb74;
}

/* ---------------- ITEMS ---------------- */

[data-cart="items-section"]{
  margin-top:10px !important;
}

[data-cart="items-section"] > .flow-root{
  margin-top:0 !important;
}

[data-cart="items-list"]{
  margin:0 !important;
}

[data-cart="item"]{
  position:relative;
  gap:13px;

  margin:0 0 12px;
  padding:13px !important;

  border:1px solid rgba(255,255,255,.10) !important;
  border-radius:17px !important;

  background:
    linear-gradient(
      145deg,
      rgba(255,255,255,.095),
      rgba(255,255,255,.045)
    ) !important;

  box-shadow:
    0 13px 30px rgba(14,4,12,.14),
    inset 0 1px rgba(255,255,255,.07);

  backdrop-filter:blur(12px);
  -webkit-backdrop-filter:blur(12px);

  transition:
    transform .25s var(--mhc-ease),
    border-color .25s ease,
    box-shadow .25s ease;
}

[data-cart="item"]:hover{
  transform:translateY(-2px);
  border-color:rgba(216,242,74,.24) !important;
  box-shadow:
    0 17px 38px rgba(14,4,12,.18),
    0 0 0 3px rgba(216,242,74,.035),
    inset 0 1px rgba(255,255,255,.08);
}

/* image */
[data-cart="item-image-wrapper"]{
  width:108px !important;
  height:126px !important;
  flex:0 0 108px !important;

  border:1px solid rgba(255,255,255,.10) !important;
  border-radius:14px !important;

  background:
    radial-gradient(circle at 50% 38%,rgba(216,242,74,.10),transparent 45%),
    var(--mhc-blush) !important;

  box-shadow:
    0 12px 26px rgba(14,4,12,.16),
    inset 0 1px rgba(255,255,255,.88);
}

[data-cart="item-image"]{
  width:100% !important;
  height:100% !important;
  object-fit:cover !important;
  border-radius:13px !important;
}

/* info */
[data-cart="item-body"]{
  min-width:0;
  margin-inline-start:0 !important;
}

[data-cart="item-header"]{
  align-items:flex-start;
  gap:8px;
}

[data-cart="item-name"]{
  min-width:0;

  color:#fff !important;
  font-family:Georgia,"Times New Roman",Tajawal,serif !important;
  font-size:15px !important;
  font-weight:500 !important;
  line-height:1.12 !important;
  letter-spacing:-.012em;
}

[data-cart="item-price"]{
  flex:0 0 auto;
  margin-inline-start:0 !important;

  color:var(--mhc-wasabi) !important;
  font-family:Tajawal,Cairo,sans-serif !important;
  font-size:13px !important;
  font-weight:900 !important;
  white-space:nowrap;
}

[data-cart="item-variant"]{
  margin-top:7px !important;
  color:rgba(255,255,255,.56) !important;
  font-size:10px !important;
  font-weight:600 !important;
}

[data-cart="item-footer"]{
  margin-top:9px;
  gap:8px !important;
}

[data-cart="item-total"]{
  color:rgba(255,255,255,.46) !important;
  font-size:9.5px !important;
  font-weight:600 !important;
}

/* quantity */
[data-cart="item-actions"]{
  align-items:center;
}

[data-cart="item-quantity-counter"]{
  align-items:center;
  gap:2px;

  padding:3px;
  border:1px solid rgba(255,255,255,.10);
  border-radius:10px;

  background:rgba(13,4,11,.18);
}

[data-cart="item-increase"],
[data-cart="item-decrease"]{
  width:30px;
  height:30px;
  display:grid;
  place-items:center;

  padding:0 !important;

  border:1px solid rgba(255,255,255,.07) !important;
  border-radius:8px !important;

  background:rgba(255,255,255,.07) !important;
  color:#fff !important;

  transition:
    transform .2s var(--mhc-ease),
    background-color .2s ease,
    color .2s ease,
    border-color .2s ease !important;
}

[data-cart="item-increase"]:hover,
[data-cart="item-decrease"]:hover{
  background:var(--mhc-wasabi) !important;
  color:var(--mhc-plum) !important;
  border-color:var(--mhc-wasabi) !important;
  transform:scale(1.05);
}

[data-cart="item-increase"] svg,
[data-cart="item-decrease"] svg{
  width:13px !important;
  height:13px !important;
  color:inherit !important;
}

[data-cart="item-increase"] svg *,
[data-cart="item-decrease"] svg *{
  fill:currentColor !important;
}

[data-cart="item-quantity"]{
  width:32px !important;
  color:#fff !important;
  font-size:11px !important;
  font-weight:900 !important;
}

[data-cart="item-remove"]{
  width:30px;
  height:30px;

  display:grid;
  place-items:center;

  margin-inline-start:6px !important;

  border:1px solid rgba(255,116,130,.10);
  border-radius:8px;

  background:rgba(255,116,130,.055);
  color:#FF8B98 !important;

  transition:
    transform .2s var(--mhc-ease),
    background-color .2s ease;
}

[data-cart="item-remove"]:hover{
  background:rgba(255,116,130,.12);
  transform:scale(1.05);
}

[data-cart="item-remove"] svg{
  width:15px !important;
  height:15px !important;
  color:inherit !important;
}

[data-cart="item-remove"] svg *{
  fill:currentColor !important;
}

/* ---------------- FOOTER ---------------- */

[data-cart="footer"]{
  position:relative;
  z-index:4;

  padding:16px 18px calc(18px + env(safe-area-inset-bottom)) !important;

  background:
    linear-gradient(
      180deg,
      rgba(43,16,40,.82),
      rgba(30,11,28,.96)
    ) !important;

  border-top:1px solid rgba(216,242,74,.12);

  box-shadow:
    0 -18px 40px rgba(12,3,10,.22),
    inset 0 1px rgba(255,255,255,.035);

  backdrop-filter:blur(18px);
  -webkit-backdrop-filter:blur(18px);
}

[data-invoice="invoice"]{
  padding-top:0 !important;
  border-top:0 !important;
}

[data-invoice="invoice-subtotal"]{
  min-height:46px;
  padding:0 1px 11px;

  border-bottom:1px solid rgba(255,255,255,.09);
}

[data-invoice="invoice-subtotal"] dt{
  color:rgba(255,255,255,.54) !important;
  font-size:10px !important;
  font-weight:700 !important;
}

[data-invoice="invoice-subtotal-value"]{
  color:var(--mhc-wasabi) !important;
  font-size:22px !important;
  font-weight:900 !important;
}

/* checkout */
[data-cart="checkout-wrapper"]{
  margin-top:13px !important;
}

[data-cart="checkout-wrapper"] > button{
  min-height:54px;

  padding:0 18px !important;

  border:1px solid var(--mhc-wasabi) !important;
  border-radius:12px !important;

  background:var(--mhc-wasabi) !important;
  color:var(--mhc-plum) !important;

  font-family:Tajawal,Cairo,sans-serif !important;
  font-size:13px !important;
  font-weight:900 !important;

  box-shadow:
    0 15px 32px rgba(9,2,8,.24),
    0 0 0 4px rgba(216,242,74,.045),
    inset 0 1px rgba(255,255,255,.34) !important;

  transition:
    transform .24s var(--mhc-ease),
    background-color .24s ease,
    color .24s ease,
    box-shadow .24s ease !important;
}

[data-cart="checkout-wrapper"] > button::after{
  content:"←";
  display:inline-grid;
  place-items:center;

  width:29px;
  height:29px;
  margin-inline-start:10px;

  border-radius:8px;
  background:var(--mhc-plum);
  color:var(--mhc-wasabi);

  font-family:Arial,sans-serif;
  font-size:12px;
  font-weight:900;
}

[data-cart="checkout-wrapper"] > button:hover{
  transform:translateY(-2px);
  background:#e5fa78 !important;
  box-shadow:
    0 18px 36px rgba(9,2,8,.26),
    0 0 0 5px rgba(216,242,74,.055) !important;
}

/* continue shopping */
[data-cart="continue-wrapper"]{
  margin-top:13px !important;
  color:rgba(255,255,255,.42) !important;
  font-size:10px !important;
}

[data-cart="continue-shopping"]{
  padding:4px 7px !important;

  color:#fff !important;
  text-decoration:none !important;
  border-radius:7px;

  transition:
    color .2s ease,
    background-color .2s ease !important;
}

[data-cart="continue-shopping"]:hover{
  color:var(--mhc-plum) !important;
  background:var(--mhc-wasabi);
}

/* ---------------- MOBILE ---------------- */

@media(max-width:640px){
  [data-cart="panel"]{
    width:94vw !important;
    max-width:94vw !important;
  }

  [data-cart="content"]{
    padding:17px 14px 22px !important;
  }

  .mhc-brand{
    margin-bottom:14px;
    padding-bottom:13px;
  }

  .mhc-brand-logo{
    width:39px;
    height:39px;
    flex-basis:39px;
  }

  .mhc-brand-logo img{
    width:34px;
    height:34px;
  }

  .mhc-brand-title{
    font-size:17px;
  }

  [data-cart="item"]{
    gap:10px;
    padding:11px !important;
    border-radius:15px !important;
  }

  [data-cart="item-image-wrapper"]{
    width:91px !important;
    height:108px !important;
    flex-basis:91px !important;
  }

  [data-cart="item-name"]{
    font-size:13.5px !important;
  }

  [data-cart="item-price"]{
    font-size:11.5px !important;
  }

  [data-cart="footer"]{
    padding-left:14px !important;
    padding-right:14px !important;
  }

  [data-cart="empty-animation-wrapper"]{
    width:172px;
    height:172px;
  }

  [data-cart="empty-title"]{
    font-size:26px !important;
  }
}

@media(prefers-reduced-motion:reduce){
  [data-cart="root"] *,
  [data-cart="root"] *::before,
  [data-cart="root"] *::after{
    transition:none !important;
    animation:none !important;
  }
}
