/* =========================
   ROOT ACCENT + SAFETY OVERRIDES
========================= */
#dp-root{
  --dp-accent: var(--dp-accent, #1f6f64);
  --dp-accent-hover: color-mix(in srgb, var(--dp-accent) 86%, #000);
  --dp-accent-soft: color-mix(in srgb, var(--dp-accent) 12%, #fff);
}

@supports not (color: color-mix(in srgb, #000 50%, #fff)) {
  #dp-root{ --dp-accent-hover: var(--dp-accent); }
}

/* IMPORTANT: If the theme/page builder forces styles on buttons/links, we lock the menu UI here. */
#dp-root button,
#dp-root a{
  font-family: inherit;
}

/* Form controls inside modal/addons */
#dp-root .dp-input,
#dp-root .dp-textarea,
#dp-root .dp-select{
  width: 100%;
  box-sizing: border-box;
  padding: 10px 12px;
  border: 1px solid rgba(15,23,42,.14);
  border-radius: 12px;
  background: #fff;
  font-size: 14px;
  line-height: 1.2;
}
#dp-root .dp-textarea{ resize: vertical; min-height: 90px; }

/* =========================
   OPEN/CLOSE BADGE
========================= */
#dp-badge-open.dp-opened{
  background:#f5c542 !important;
  color:#0b1220 !important;
}
#dp-badge-open.dp-closed{
  background:#d64545 !important;
  color:#fff !important;
}

/* =========================
   ADMIN FAB (power button) position — mid right near bottom
========================= */
#dp-admin-fab{ position: fixed; right: 0; bottom: 0; z-index: 1000000; }
#dp-admin-fab .dp-admin-stack{
  position: fixed !important;
  right: 22px !important;
  bottom: 110px !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 10px !important;
  z-index: 1000001 !important;
}
#dp-admin-fab .dp-admin-btn{
  width: 56px !important;
  height: 56px !important;
  border-radius: 18px !important;
  border: none !important;
  cursor: pointer !important;
  box-shadow: 0 18px 40px rgba(0,0,0,.20) !important;
}
#dp-admin-fab .dp-admin-btn.dp-power{
  background: #111827 !important;
  color: #fff !important;
  font-size: 20px !important;
}
#dp-admin-fab .dp-admin-btn.dp-power[data-state="on"]{
  box-shadow: 0 0 0 4px rgba(245,197,66,.25), 0 18px 40px rgba(0,0,0,.20) !important;
}
#dp-admin-fab .dp-admin-btn.dp-power[data-state="off"]{
  opacity: .75 !important;
}
#dp-admin-fab .dp-admin-btn:hover{ transform: translateY(-1px); }

/* =========================
   GRID PRODUCT CARDS — fix "ugly" layout + price bottom like sample
========================= */
#dp-grid{
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
@media (min-width: 980px){
  #dp-grid{ grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.dp-item.dp-card{
  background: #fff;
  border-radius: 18px;
  border: 1px solid rgba(15,23,42,.08);
  box-shadow: 0 14px 30px rgba(0,0,0,.08);
  overflow: hidden;
  display: flex;
  gap: 12px;
  padding: 14px;
}

.dp-item.dp-card > div:first-child{
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 140px;
}

.dp-item .title{
  font-weight: 900;
  color: #0b1220;
  font-size: 15px;
  line-height: 1.25;
}
.dp-item .desc{
  color: #64748b;
  font-size: 12.5px;
  line-height: 1.4;
  margin-top: 6px;
  flex: 1;
}

.dp-item .thumb{
  width: 88px;
  height: 88px;
  border-radius: 16px;
  overflow: hidden;
  flex: 0 0 auto;
  background: #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: center;
}
.dp-item .thumb img{
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.dp-item .price{
  margin-top: 10px;
  font-weight: 900;
  font-size: 14px;
  color: var(--dp-accent) !important;
}
.dp-item .price *{ color: var(--dp-accent) !important; }

.dp-item .actions{
  margin-top: 10px;
  display: flex;
}

.dp-item .actions .dp-btn{
  width: 100%;
  border: none;
  border-radius: 16px;
  padding: 10px 12px;
  font-weight: 900;
  background: var(--dp-accent);
  color: #fff;
  box-shadow: 0 12px 24px rgba(0,0,0,.14);
  transition: transform .12s ease, background .12s ease;
}
.dp-item .actions .dp-btn:hover{
  background: var(--dp-accent-hover);
  transform: translateY(-1px);
}
.dp-item .actions .dp-btn:disabled{
  opacity: .55;
  cursor: not-allowed;
  box-shadow: none;
}

/* =========================
   PRICE PILLs (addon/option price)
========================= */
.dp-pill,
.dp-row small{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 46px;
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--dp-accent);
  box-shadow: 0 6px 18px rgba(0,0,0,.12);
  font-size: 12px;
  line-height: 1;
  color: #fff !important;
}
.dp-row:hover .dp-pill,
.dp-row:hover small{
  background: var(--dp-accent-hover);
}

/* =========================
   MODAL LEFT SLIDE — space for addons + price next to add button
========================= */
#dp-modal .dp-modal-panel{
  height: 100vh;
  max-height: 100vh;
  display: flex;
  flex-direction: column;
  border-radius: 0 24px 24px 0;
  overflow: hidden;
  background: #fff;
}

#dp-modal .dp-modal-top{
  padding: 14px 16px 10px 16px;
  gap: 12px;
}

#dp-modal .dp-modal-img{
  width: 100%;
  height: 240px;
  object-fit: contain;
  border-radius: 18px;
  box-shadow: 0 18px 36px rgba(0,0,0,.12);
}

#dp-modal #dp-modal-options{
  flex: 1;
  overflow: auto;
  padding: 8px 16px 140px 16px;
}

.dp-fieldset{
  border: 1px solid rgba(15,23,42,.08);
  background: #fff;
  border-radius: 16px;
  padding: 12px;
  margin: 10px 0;
  box-shadow: 0 10px 24px rgba(0,0,0,.08);
}
.dp-fieldset legend{
  padding: 0 8px;
  font-weight: 900;
  color: #0b1220;
}

.dp-row{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 8px;
  border-radius: 12px;
}
.dp-row:hover{ background: rgba(15,23,42,.03); }
.dp-row label{
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  cursor: pointer;
}
.dp-row input[type="radio"],
.dp-row input[type="checkbox"]{
  width: 18px;
  height: 18px;
  accent-color: var(--dp-accent);
}

/* sticky footer */
#dp-modal .dp-modal-foot{
  position: sticky;
  bottom: 0;
  padding: 14px 16px;
  background: #fff;
  border-top: 1px solid rgba(15,23,42,.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  box-shadow: 0 -16px 40px rgba(0,0,0,.08);
}

#dp-add-to-cart{
  flex: 1;
  border-radius: 18px !important;
  padding: 12px 18px !important;
  font-weight: 900 !important;
  background: var(--dp-accent) !important;
  color: #fff !important;
  border: none !important;
  box-shadow: 0 14px 30px rgba(0,0,0,.16) !important;
}
#dp-add-to-cart:hover{
  background: var(--dp-accent-hover) !important;
  transform: translateY(-1px);
}
#dp-modal-total{
  font-weight: 950;
  font-size: 18px;
  color: #0b1220;
  min-width: 92px;
  text-align: right;
}

/* =========================
   CART FAB (white quarter circle + inner accent square)
========================= */
#dp-fab-cart.dp-fab-cart{
  background: #fff !important;
  color: #fff !important;
  border: none !important;
  box-shadow: 0 18px 40px rgba(0,0,0,.18) !important;
  display: grid !important;
  place-items: end start !important;
  padding: 18px !important;
}

#dp-fab-cart .dp-fab-inner{
  background: var(--dp-accent) !important;
  border-radius: 22px !important;
  padding: 16px 16px 14px 16px !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 6px !important;
  box-shadow: 0 14px 30px rgba(0,0,0,.14) !important;
  transition: transform .14s ease, background .14s ease;
}

#dp-fab-cart .dp-fab-text{
  font-weight: 950 !important;
  font-size: 16px !important;
  line-height: 1.1 !important;
  color: #fff !important;
}

#dp-fab-cart .dp-fab-count{
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  color: rgba(255,255,255,.92);
  font-weight: 900;
  font-size: 13px;
}

#dp-fab-cart .dp-fab-badge{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(255,255,255,.18);
  color: #fff;
}

@media (hover:hover) and (pointer:fine){
  #dp-fab-cart.dp-fab-cart:hover .dp-fab-inner{
    background: var(--dp-accent-hover) !important;
    animation: dpWiggle .35s ease-in-out;
  }
}

/* =========================
   ADMIN FLOAT (match sample: white rounded box + small green dot)
========================= */
#dp-admin-fab .dp-admin-fabbox{
  position: fixed !important;
  right: 18px !important;
  bottom: 120px !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 10px !important;
  padding: 10px !important;
  background: rgba(255,255,255,.92) !important;
  border: 1px solid rgba(15,23,42,.08) !important;
  border-radius: 16px !important;
  box-shadow: 0 18px 40px rgba(0,0,0,.18) !important;
  backdrop-filter: blur(10px);
}
#dp-admin-fab .dp-admin-fabbox::after{
  content: '';
  position: absolute;
  top: 8px;
  right: 8px;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #22c55e;
  box-shadow: 0 0 0 3px rgba(34,197,94,.20);
}
#dp-admin-fab .dp-admin-fabbox .dp-admin-btn{
  width: 52px !important;
  height: 52px !important;
  border-radius: 14px !important;
  border: none !important;
  background: transparent !important;
  box-shadow: none !important;
  display: grid !important;
  place-items: center !important;
  cursor: pointer !important;
  transition: transform .12s ease, background .12s ease;
}
#dp-admin-fab .dp-admin-fabbox .dp-admin-btn:hover{
  background: rgba(15,23,42,.06) !important;
  transform: translateY(-1px);
}
#dp-admin-fab .dp-admin-fabbox .dp-admin-btn svg{ display:block; }
#dp-admin-fab .dp-admin-fabbox .dp-admin-btn.dp-power{ color: #ef4444 !important; }
#dp-admin-fab .dp-admin-fabbox .dp-admin-btn.dp-orders{ color: #0f172a !important; }
#dp-admin-fab .dp-admin-fabbox .dp-admin-btn.dp-power[data-state="off"]{ opacity: .55 !important; }

/* =========================
   CART FAB hover wiggle (desktop)
========================= */
@keyframes dpWiggle {
  0%{ transform: translateX(0); }
  25%{ transform: translateX(-6px); }
  50%{ transform: translateX(6px); }
  75%{ transform: translateX(-4px); }
  100%{ transform: translateX(0); }
}
/* (wiggle moved to inner square above) */

/* =========================
   CART DRAWER card UI (match sample)
========================= */
#dp-cart .dp-cart-body{ padding: 14px 14px 160px 14px; }
.dp-cart-card{
  border: 1px solid rgba(15,23,42,.08);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 14px 30px rgba(0,0,0,.08);
  padding: 14px;
  margin: 14px 0;
  text-align: center;
}
.dp-cart-card-head{ display:flex; justify-content:flex-start; }
.dp-cart-edit{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: none;
  background: transparent;
  cursor: pointer;
  color: var(--dp-accent);
  font-weight: 800;
  padding: 6px 8px;
  border-radius: 12px;
}
.dp-cart-edit:hover{ background: rgba(15,23,42,.04); }
.dp-cart-imgwrap{ display:flex; justify-content:center; margin: 8px 0 6px; }
.dp-cart-img{
  width: 132px;
  height: 132px;
  object-fit: contain;
  border-radius: 20px;
  background: #f1f5f9;
}
.dp-cart-name{ font-weight: 950; color:#0b1220; margin-top: 6px; }
.dp-cart-meta{ margin-top: 6px; color: var(--dp-accent); font-size: 13px; line-height: 1.35; }
.dp-cart-meta-line{ margin: 2px 0; }
.dp-cart-price{ font-weight: 950; margin-top: 10px; color:#0b1220; }
.dp-cart-actions{
  margin-top: 12px;
  display:flex;
  align-items:center;
  justify-content:center;
  gap: 12px;
}

.dp-cart-minus{
  width: 54px;
  height: 44px;
  border-radius: 16px;
  border: 1px solid rgba(15,23,42,.14);
  background: #fff;
  cursor: pointer;
  font-size: 20px;
  font-weight: 950;
  line-height: 1;
}
.dp-cart-minus:hover{ background: rgba(15,23,42,.04); }
.dp-cart-plus{
  width: 54px;
  height: 44px;
  border-radius: 16px;
  border: none;
  background: var(--dp-accent);
  color: #fff;
  font-weight: 950;
  font-size: 20px;
  cursor: pointer;
  box-shadow: 0 12px 24px rgba(0,0,0,.14);
}
.dp-cart-plus:hover{ background: var(--dp-accent-hover); }
.dp-cart-qty{ min-width: 26px; font-weight: 900; }
.dp-cart-remove{
  width: 54px;
  height: 44px;
  border-radius: 16px;
  border: 1px solid rgba(15,23,42,.14);
  background: #fff;
  cursor: pointer;
  font-size: 18px;
}
.dp-cart-remove:hover{ background: rgba(15,23,42,.04); }

/* Cart checkout button should follow accent (not hard red) */
#dp-cart .dp-checkout{
  background: var(--dp-accent) !important;
  border-radius: 18px !important;
  padding: 14px 14px !important;
  box-shadow: 0 18px 36px rgba(0,0,0,.12) !important;
}
#dp-cart .dp-checkout:hover{ background: var(--dp-accent-hover) !important; }

/* =========================
   BACKDROPS — make outside-click reliable
========================= */
#dp-modal .dp-modal-backdrop,
#dp-cart .dp-cart-backdrop,
#dp-drawer .dp-drawer-backdrop{
  position: absolute;
  inset: 0;
  z-index: 0;
  background: rgba(0,0,0,.40);
}

#dp-modal .dp-modal-panel,
#dp-cart .dp-cart-panel,
#dp-drawer .dp-drawer-panel{
  position: absolute;
  z-index: 1;
}

/* Keep rounded corners clean (no background bleed) */
#dp-cart .dp-cart-panel,
#dp-modal .dp-modal-panel,
#dp-drawer .dp-drawer-panel{
  overflow: hidden !important;
}

#dp-cart .dp-cart-body,
#dp-modal #dp-modal-options,
#dp-drawer .dp-drawer-body{
  overflow: auto;
}

/* =========================
   v5 UI FIXES (requested)
========================= */

/* Make overlays actually cover the page so outside-click works */
#dp-modal,
#dp-cart,
#dp-drawer{
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: none;
  pointer-events: none;
}
#dp-modal.show,
#dp-cart.show,
#dp-drawer.show{
  display: block;
  pointer-events: auto;
}

#dp-modal .dp-modal-backdrop,
#dp-cart .dp-cart-backdrop,
#dp-drawer .dp-drawer-backdrop{
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.42);
  z-index: 0;
}

/* Panels */
#dp-modal .dp-modal-panel{
  left: 0;
  top: 0;
  width: min(460px, 94vw);
  transform: translateX(-110%);
  transition: transform .22s ease;
  box-shadow: 18px 0 46px rgba(0,0,0,.22);
}
#dp-modal.show .dp-modal-panel{ transform: translateX(0); }

#dp-cart .dp-cart-panel{
  right: 0;
  top: 0;
  width: min(420px, 94vw);
  height: 100vh;
  transform: translateX(110%);
  transition: transform .22s ease;
  box-shadow: -18px 0 46px rgba(0,0,0,.22);
}
#dp-cart.show .dp-cart-panel{ transform: translateX(0); }

/* Ensure cart content never spills outside */
#dp-cart .dp-cart-panel,
#dp-modal .dp-modal-panel{
  max-width: 94vw;
}
#dp-cart .dp-cart-body{
  overflow-x: hidden !important;
}
.dp-cart-item,
.nildasi-cart-card{
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box;
}

/* Smaller, more elegant sizes */
.dp-cart-plus,
.dp-cart-minus,
.dp-cart-remove{
  width: 46px;
  height: 40px;
  border-radius: 14px;
}
.dp-cart-plus{ font-size: 18px; }
.dp-cart-minus{ font-size: 18px; }
.dp-cart-remove{ font-size: 16px; }

/* Product card thumb: keep image size but no crop + rounded matches frame */
.dp-item .thumb{
  border-radius: 18px;
}
.dp-item .thumb img{
  object-fit: contain !important;
  border-radius: 18px;
  background: #fff;
}

/* Cart images: slightly larger and no crop */
.ci-thumb{
  width: 140px;
  height: 140px;
  object-fit: contain;
  border-radius: 18px;
  background: #fff;
}

/* ===== Cart FAB: white quarter-circle + accent square inside ===== */
.nildasi-cart-fab{
  width: 124px !important;
  height: 124px !important;
  background: #fff !important;
  border-top-left-radius: 124px !important;
  box-shadow: 0 14px 38px rgba(0,0,0,.18) !important;
}
.nildasi-cart-fab .inner{
  width: 86px !important;
  height: 86px !important;
  border-radius: 20px !important;
  background: var(--dp-accent) !important;
  color: #fff !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 10px !important;
  font-weight: 800 !important;
  font-size: 12px !important;
  line-height: 1.15 !important;
  box-shadow: 0 12px 26px rgba(0,0,0,.16);
}
.nildasi-cart-fab .inner .count{
  margin-top: 6px !important;
  font-weight: 900 !important;
  opacity: .95;
  font-size: 12px !important;
}

@media (hover:hover) and (pointer:fine){
  .nildasi-cart-fab .inner:hover{ animation: nildasiCartWiggle .45s ease-in-out; }
  .nildasi-cart-fab:hover{ animation: none; }
}

/* ===== Admin dot should turn grey when closed ===== */
#dp-admin-fab.dp-closed .nildasi-admin-fab::before,
#dp-admin-fab.dp-closed .dp-admin-stack::before{
  background: #9ca3af !important;
}

/* =========================
   v5 Overlay + Layout fixes
========================= */

/* Ensure overlays cover the full viewport (outside-click close) */
#dp-modal,
#dp-cart,
#dp-drawer{
  position: fixed !important;
  inset: 0 !important;
  z-index: 100000 !important;
  display: none;
  pointer-events: none;
}
#dp-modal.show,
#dp-cart.show,
#dp-drawer.show{
  display: block;
  pointer-events: auto;
}

#dp-modal .dp-modal-backdrop,
#dp-cart .dp-cart-backdrop,
#dp-drawer .dp-drawer-backdrop{
  position: fixed !important;
  inset: 0 !important;
  z-index: 0 !important;
  background: rgba(0,0,0,.40) !important;
}

#dp-modal .dp-modal-panel,
#dp-cart .dp-cart-panel,
#dp-drawer .dp-drawer-panel{
  position: absolute !important;
  z-index: 1 !important;
  pointer-events: auto;
}

/* Cart panel sizing + prevent content spilling out */
#dp-cart .dp-cart-panel{
  right: 0 !important;
  top: 0 !important;
  height: 100vh !important;
  width: min(420px, 92vw) !important;
  max-width: 92vw !important;
  border-radius: 24px 0 0 24px !important;
  overflow: hidden !important;
}
#dp-cart .dp-cart-body{
  overflow-x: hidden !important;
  overflow-y: auto !important;
}

/* Any inner grid/flex must allow shrinking */
#dp-cart *{ min-width: 0; }

/* Product cards: image should not crop; frame + image rounded match */
.dp-item .thumb{
  border-radius: 18px !important;
}
.dp-item .thumb img{
  object-fit: contain !important;
  border-radius: 18px !important;
}

/* Cart item image bigger + no crop */
.ci-thumb{
  width: 140px !important;
  height: 140px !important;
  object-fit: contain !important;
  border-radius: 18px !important;
}

/* Make buttons/texts a bit more subtle */
.dp-cart-plus,
.dp-cart-minus,
.dp-cart-remove{
  width: 46px !important;
  height: 40px !important;
  border-radius: 14px !important;
  font-size: 18px !important;
}
.dp-cart-plus{ font-size: 20px !important; }

/* Cart cards should look like product cards and stay inside */
.nildasi-cart-card{
  width: 100% !important;
  box-sizing: border-box !important;
}

/* Floating cart FAB fixed size + thinner text (as requested) */
.nildasi-cart-fab{
  width: 120px !important;
  height: 120px !important;
  border-top-left-radius: 120px !important;
}
.nildasi-cart-fab .inner{
  width: 84px !important;
  height: 84px !important;
  border-radius: 18px !important;
  font-size: 12px !important;
  font-weight: 800 !important;
}


/* Drawer uses aria-hidden toggling (not .show) */
#dp-drawer[aria-hidden="false"]{
  display: block !important;
  pointer-events: auto !important;
}

/* Fix bottom bars that were fixed to viewport (causing "sticking out") */
#dp-cart .dp-cart-foot{
  position: sticky !important;
  bottom: 0 !important;
  right: auto !important;
  width: 100% !important;
  box-sizing: border-box !important;
}
#dp-modal .dp-modal-foot,
#dp-modal .dp-sticky-add{
  position: sticky !important;
  bottom: 0 !important;
  left: auto !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

/* Extra guard against horizontal spill */
#dp-cart .dp-cart-panel,
#dp-modal .dp-modal-panel{
  overflow-x: hidden !important;
}
.ci-qty{ flex-wrap: wrap !important; }
.ci-image img{ max-width: 100% !important; height: auto; }

/* =========================
   v6 HOTFIX (UI polish + reliable outside click)
========================= */

/* 1) Admin FAB: smaller + dot state */
#dp-admin-fab .dp-admin-fabbox{ 
  right: 16px !important;
  bottom: 132px !important;
  padding: 8px !important;
  border-radius: 14px !important;
}
#dp-admin-fab .dp-admin-fabbox::after{ 
  top: 7px !important;
  right: 7px !important;
  width: 7px !important;
  height: 7px !important;
}
#dp-admin-fab.dp-closed .dp-admin-fabbox::after{
  background: #9ca3af !important;
  box-shadow: 0 0 0 3px rgba(156,163,175,.22) !important;
}
#dp-admin-fab .dp-admin-fabbox .dp-admin-btn{
  width: 44px !important;
  height: 44px !important;
  border-radius: 12px !important;
}
#dp-admin-fab .dp-admin-fabbox .dp-admin-btn svg{
  width: 20px !important;
  height: 20px !important;
}

/* 2) Cart FAB: white quarter circle + square inner (match sample) */
#dp-fab-cart.dp-fab-cart{
  width: 120px !important;
  height: 120px !important;
  right: 12px !important;
  bottom: 12px !important;
  padding: 0 !important;
  background: #fff !important;
  border: 1px solid rgba(15,23,42,.10) !important;
  border-top-left-radius: 120px !important;
  border-top-right-radius: 18px !important;
  border-bottom-left-radius: 18px !important;
  border-bottom-right-radius: 18px !important;
  box-shadow: 0 18px 40px rgba(0,0,0,.18) !important;
  overflow: hidden !important;
}
#dp-fab-cart .dp-fab-inner{
  width: 78px !important;
  height: 78px !important; /* square */
  border-radius: 16px !important;
  background: var(--dp-accent) !important;
  color: #fff !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 4px !important;
  margin-left: 18px !important;
  margin-top: 18px !important;
  text-align: center !important;
}
#dp-fab-cart .dp-fab-text{
  font-size: 12px !important;
  line-height: 1.05 !important;
  font-weight: 800 !important;
  color: #fff !important;
}
#dp-fab-cart .dp-fab-count{
  display: flex !important;
  align-items: baseline !important;
  gap: 4px !important;
  color: #fff !important;
}
#dp-fab-cart .dp-fab-badge{
  min-width: 0 !important;
  height: auto !important;
  padding: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  font-weight: 900 !important;
}
#dp-fab-cart .dp-fab-suffix{ font-size: 11px !important; opacity: .95; }

@media (hover:hover) and (pointer:fine){
  #dp-fab-cart.dp-fab-cart:hover .dp-fab-inner{
    background: var(--dp-accent-hover) !important;
    animation: dpWiggle .35s ease-in-out;
  }
}

/* 3) Modal image: rounded corners, never overflow */
#dp-modal .dp-modal-top{ padding: 14px !important; }
#dp-modal #dp-modal-img.dp-modal-img{
  width: 100% !important;
  max-width: 100% !important;
  height: 220px !important;
  object-fit: contain !important;
  background: #f3f4f6 !important;
  border-radius: 16px !important;
  display: block !important;
}

/* 4) Cart items: prevent any horizontal overflow */
#dp-cart .dp-cart-panel,
#dp-cart .dp-cart-body,
#dp-cart .dp-cart-foot{ overflow-x: hidden !important; }
.dp-cart-card{ max-width: 100% !important; }
.dp-cart-card *{ min-width: 0; }
/* =========================
   FINAL MODAL FIX (clean)
========================= */

/* overlay */
#dp-modal{
  position: fixed !important;
  inset: 0 !important;
  z-index: 100000 !important;
  display: none;
}
#dp-modal.show{ display: block !important; }

/* backdrop clickable area */
#dp-modal .dp-modal-backdrop{
  position: fixed !important;
  inset: 0 !important;
  background: rgba(0,0,0,.40) !important;
  z-index: 0 !important;
}

/* panel */
#dp-modal .dp-modal-panel{
  position: fixed !important;      /* مهم: مرجع ثابت */
  left: 0 !important;
  top: 0 !important;
  height: 100vh !important;
  width: min(460px, 92vw) !important;   /* مهم: هرگز 100vw نشود */
  max-width: 92vw !important;
  background: #fff !important;
  overflow: hidden !important;
  box-sizing: border-box !important;
  border-radius: 0 24px 24px 0 !important;
  z-index: 1 !important;

  transform: translateX(-110%);
  transition: transform .22s ease;
}
#dp-modal.show .dp-modal-panel{ transform: translateX(0); }

/* close button: always inside panel, top-right */
#dp-modal #dp-modal-close{
  position: absolute !important;
  top: 10px !important;
  right: 10px !important;
  left: auto !important;
  z-index: 5 !important;
  width: 34px !important;
  height: 34px !important;
  border-radius: 10px !important;
}

/* content */
#dp-modal .dp-modal-top{
  padding: 14px 16px 10px 16px !important;
  padding-top: 44px !important; /* جا برای ضربدر */
  box-sizing: border-box !important;
}

#dp-modal .dp-modal-img{
  width: 100% !important;
  height: 200px !important;
  max-width: 100% !important;
  object-fit: contain !important;
  border-radius: 18px !important;
  display: block !important;
  box-shadow: none !important;
}

#dp-modal #dp-modal-options{
  flex: 1;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  padding: 8px 16px 140px 16px !important;
  box-sizing: border-box !important;
}

/* stop any accidental horizontal overflow inside modal */
#dp-modal .dp-modal-panel *{
  min-width: 0 !important;
  box-sizing: border-box !important;
}
/* =========================
   TOPBAR FIX — Logo box جدا + Actions box جدا (روی هم)
   (Paste at VERY END of app-v4.css)
========================= */

#dp-root .dp-topbar{
  background: var(--damon-header-bg, #0b0b0b) !important;
  border-radius: 22px !important;
  padding: 22px 16px 18px !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 14px !important;
  margin: 0 0 14px !important;
}

/* Logo = کادر مستقل */
#dp-root .dp-logo{
  display: grid !important;
  place-items: center !important;
}

#dp-root .dp-logo img{
  width: 96px !important;
  height: 96px !important;
  object-fit: contain !important;
  display: block !important;

  background: #ffffff !important;
  padding: 10px !important;
  border-radius: 26px !important; /* کمی گرد، نه الزاماً دایره */
  box-shadow: 0 12px 26px rgba(0,0,0,.18) !important;
}

/* Actions = کادر مستقل جدا از لوگو */
#dp-root .dp-top-actions{
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 10px !important;

  background: var(--damon-actions-bg, #ffffff) !important;
  padding: 10px 12px !important;
  border-radius: 16px !important;
  box-shadow: 0 12px 26px rgba(0,0,0,.16) !important;
}

/* Mine ordrer دکمه مستقل داخل کادر actions */
#dp-root #dp-my-orders{
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;

  background: #ffffff !important;
  color: #0b1220 !important;
  border: 1px solid rgba(15,23,42,.12) !important;
  border-radius: 14px !important;
  padding: 10px 14px !important;
  font-weight: 800 !important;
  text-decoration: none !important;
}

/* Burger دکمه مربع و تمیز */
#dp-root #dp-burger{
  width: 44px !important;
  height: 44px !important;
  padding: 0 !important;

  background: #ffffff !important;
  color: #0b1220 !important;
  border: 1px solid rgba(15,23,42,.12) !important;
  border-radius: 14px !important;
  display: grid !important;
  place-items: center !important;
  font-size: 20px !important;
  line-height: 1 !important;
}
/* =========================
   TOPBAR FINAL OVERRIDE (fix black + fix logo rendering)
   Paste at VERY END of app-v4.css
========================= */

/* اگر نمی‌خوای پس‌زمینه مشکی باشه */
#dp-root .dp-topbar{
  background: transparent !important;  /* اگر سفید می‌خوای: #fff */
}

/* لوگو: استایل رو از img بردار، بده به wrapper تا خراب نشه */
#dp-root #dp-logo.dp-logo{
  width: 96px !important;
  height: 96px !important;
  border-radius: 18px !important;
  background: #fff !important;
  display: grid !important;
  place-items: center !important;
  overflow: hidden !important;
  box-shadow: 0 12px 26px rgba(0,0,0,.18) !important;
}

/* خود تصویر: بدون padding/background و با مرکز */
#dp-root #dp-logo.dp-logo img{
  width: 86% !important;
  height: 86% !important;
  object-fit: contain !important;
  object-position: center center !important;
  display: block !important;

  padding: 0 !important;
  background: transparent !important;
  border-radius: 12px !important;
}
/* =========================
   HEADER DROPDOWN (inside topbar) — FINAL
   Paste at VERY END of app-v4.css
========================= */

#dp-root .dp-header-drop{
  width: 100%;
  margin-top: 10px;
}
#dp-root .dp-header-drop[hidden]{
  display: none !important;
}

#dp-root .dp-header-drop-inner{
  background: #fff;
  border: 1px solid rgba(15,23,42,.10);
  border-radius: 16px;
  box-shadow: 0 18px 40px rgba(0,0,0,.14);
  padding: 10px;
}

#dp-root .dp-nav-drop{
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

#dp-root .dp-nav-drop a{
  display: block;
  padding: 10px 12px;
  border-radius: 12px;
  text-decoration: none;
  color: #0b1220;
  font-weight: 800;
}

#dp-root .dp-nav-drop a:hover{
  background: rgba(15,23,42,.06);
}

/* Badge باید تمام ارتفاع کارت را بگیرد */
#dp-root .dp-rest-head{
  position: relative;
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 12px;
}
#dp-root #dp-badge-open{
  align-self: stretch !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  height: auto !important;
}
/* =========================
   PRODUCT MODAL: description readability upgrade
========================= */

/* title */
#dp-modal .dp-modal-title{
  font-weight: 950;
  font-size: 18px;
  line-height: 1.25;
  color: #0b1220;
  margin: 10px 0 6px;
}

/* description (ingredients) */
#dp-modal .dp-modal-desc{
  font-size: 14px;
  line-height: 1.55;
  color: #334155;                 /* خواناتر از خاکستری روشن */
  font-weight: 600;
  letter-spacing: .1px;
  margin: 0 0 10px;
}

/* make the description block feel “designed” */
#dp-modal .dp-modal-headtext{
  background: rgba(15,23,42,.035);
  border: 1px solid rgba(15,23,42,.06);
  border-radius: 14px;
  padding: 10px 12px;
  margin-top: 10px;
}

/* if text is long, keep it neat */
#dp-modal .dp-modal-desc{
  text-wrap: pretty;
}
/* =========================================================
   REST CARD — CLEAN FIX (ONLY 3 PARTS)
   1) name
   2) fee
   3) badge (right side, only left curve)
   Paste at VERY END of your CSS
========================================================= */

#dp-root .dp-rest-card{
  display: grid !important;
  grid-template-columns: 1fr 150px !important; /* left + badge */
  grid-template-rows: auto auto !important;    /* name + fee */
  gap: 0 !important;

  border-radius: 18px !important;
  overflow: hidden !important;                /* هیچ چیز نزنه بیرون */
  background: #fff !important;
  border: 1px solid rgba(15,23,42,.08) !important;
}

@media (max-width: 420px){
  #dp-root .dp-rest-card{ grid-template-columns: 1fr 132px !important; }
}

/* چون badge داخل .dp-rest-head هست باید این کار رو بکنیم */
#dp-root .dp-rest-head{
  display: contents !important; /* بچه‌هاش مستقیم grid-item کارت میشن */
}

/* 1) NAME */
#dp-root #dp-restname.dp-restname,
#dp-root .dp-restname{
  grid-column: 1 / 2 !important;
  grid-row: 1 / 2 !important;

  margin: 0 !important;
  padding: 14px 14px 6px 14px !important;

  font-weight: 950 !important;
  font-size: 16px !important;
  line-height: 1.2 !important;
  color: #0b1220 !important;
}

/* 2) FEE */
#dp-root #dp-fee.dp-fee,
#dp-root .dp-fee{
  grid-column: 1 / 2 !important;
  grid-row: 2 / 3 !important;

  margin: 0 !important;
  padding: 0 14px 14px 14px !important;

  color: #64748b !important;
  font-weight: 700 !important;
}

/* 3) BADGE */
#dp-root #dp-badge-open.dp-badge,
#dp-root #dp-badge-open{
  grid-column: 2 / 3 !important;
  grid-row: 1 / 3 !important;

  width: 100% !important;
  height: 100% !important;

  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;

  padding: 12px 10px !important;
  margin: 0 !important;

  /* فقط سمت چپ خمیده */
  border-radius: 999px 0 0 999px !important;
  overflow: hidden !important;

  font-weight: 900 !important;
  text-align: center !important;
}

/* lamp icon */
#dp-root #dp-badge-open::before{
  content: "💡" !important;
  display: block !important;
  font-size: 22px !important;
  line-height: 1 !important;
  margin-bottom: 6px !important;
}

/* states */
#dp-root #dp-badge-open.dp-opened{
  background:#f5c542 !important;
  color:#0b1220 !important;
}
#dp-root #dp-badge-open.dp-closed{
  background:#7a7a7a !important;
  color:#fff !important;
}

/* safety */
#dp-root .dp-rest-card *{
  box-sizing: border-box !important;
  min-width: 0 !important;
}
/* =========================================================
   REST BADGE POLISH (4 fixes)
   Paste at VERY END
========================================================= */

/* 1) Restaurant name bigger */
#dp-root #dp-restname.dp-restname,
#dp-root .dp-restname{
  font-size: 19px !important;
  font-weight: 950 !important;
}

/* 2) Text white + more space between icon and text */
#dp-root #dp-badge-open{
  color: #fff !important;                 /* force white text */
  gap: 10px !important;                   /* more space */
}
#dp-root #dp-badge-open *{
  color: #fff !important;                 /* also inside spans */
}

/* 4) Fill the whole badge area (no inner white border look) */
#dp-root #dp-badge-open{
  background-clip: padding-box !important;
  box-shadow: none !important;
  border: 0 !important;
}
#dp-root .dp-rest-card{
  background: #fff !important;            /* keep card clean */
}

/* 3) Closed icon: white + with a slash line */
#dp-root #dp-badge-open.dp-closed::before{
  content: "" !important;
  width: 26px !important;
  height: 26px !important;
  display: block !important;
  position: relative !important;
}

/* Build the "muted lamp" yourself (simple + reliable) */
#dp-root #dp-badge-open.dp-closed::before{
  border-radius: 999px !important;
  border: 2px solid rgba(255,255,255,.95) !important; /* white circle */
}

/* the slash */
#dp-root #dp-badge-open.dp-closed::after{
  content: "" !important;
  position: absolute !important;
  width: 30px !important;
  height: 3px !important;
  background: rgba(255,255,255,.95) !important;
  border-radius: 99px !important;
  transform: rotate(-35deg) !important;
  /* center it over the icon */
  top: 18px !important;
  right: 54px !important;
}

/* keep OPEN icon as lamp (white) */
#dp-root #dp-badge-open.dp-opened::before{
  content: "💡" !important;
  filter: grayscale(0) brightness(2) !important;
}
