#cart-button { position: relative; background: none; border: none; cursor: pointer; }

#cart-count {
    position: absolute;
    top: -7px;
    right: -10px;
    background-color: black;
    color: #fff;
    font-size: 12px;
    font-weight: bold;
    width: 20px;
    height: 20px;
    line-height: 20px;
    text-align: center;
    border-radius: 50%;
    pointer-events: none;
    box-shadow: 0 0 2px rgba(0,0,0,0.5);
}

.category-dropdown {
    display: none;
    width: 175px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    background-color: #fff;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.25s ease;
}

.category-item:hover > .category-dropdown {
    display: block;
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.category-dropdown a:hover {
    background-color: #f0f0f0;
    border-radius: 4px;
}

.mobile-categories-wrapper {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    z-index: 40;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    display: none;
}

.nav-for-mobile.open .mobile-categories-wrapper {
    display: block;
}

.mobile-dropdown-toggle {
    background: none;
    border: none;
    cursor: pointer;
}

.mobile-category-dropdown a:hover {
    background-color: #f5f5f5;
}


/* cart css  */
.cart-offcanvas {
    position: fixed;
    top: 0;
    right: 0;
    width: 350px;
    height: 100%;
    border: none;
    padding: 20px;
}


   /* OFFCANVAS — complete correct CSS */
/* ── Base: all dialogs hidden by default ── */
dialog {
  display: none;
}
dialog[open] {
  display: block;
}

/* ── Shared offCanvas base ── */
dialog.offCanvas {
  position: fixed;
  top: 0;
  bottom: 0;
  margin: 0;
  padding: 0;
  border: none;
  width: 100%;
  max-width: 420px;
  height: 100vh;
  max-height: 100vh;
  overflow-y: auto;
  background: #ffffff;
  z-index: 999;
}

/* ── Backdrop (dark overlay behind dialog) ── */
dialog.offCanvas::backdrop {
  background: rgba(0, 0, 0, 0.45);
}

/* ── RIGHT slide-in: Cart, Wishlist, Category ── */
dialog.offCanvas.right {
  right: 0;
  left: auto;
  animation: offcanvas-slide-in-right 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── LEFT / BOTTOM slide-in: Burger menu ── */
dialog.offCanvas.bottom {
  left: 0;
  right: auto;
  max-width: 420px;
  animation: offcanvas-slide-in-left 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── TOP slide-in: Search ── */
dialog.offCanvas.top {
  top: 0;
  left: 0;
  right: 0;
  bottom: auto;
  width: 100%;
  max-width: 100%;
  height: auto;
  max-height: 90vh;
  animation: offcanvas-slide-in-top 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Animations ── */
@keyframes offcanvas-slide-in-right {
  from { transform: translateX(100%); }
  to   { transform: translateX(0); }
}

@keyframes offcanvas-slide-in-left {
  from { transform: translateX(-100%); }
  to   { transform: translateX(0); }
}

@keyframes offcanvas-slide-in-top {
  from { transform: translateY(-100%); }
  to   { transform: translateY(0); }
}

/* ── Prevent body scroll when any offCanvas is open ── */
body:has(dialog.offCanvas[open]) {
  overflow: hidden;
}

/* ── Cart offcanvas inner layout ── */
#cart-offcanvas .cart-data {
  display: grid;
  grid-template-rows: auto 1fr auto;
  height: 100%;
}

/* ── Wishlist offcanvas inner layout ── */
#wishlist-offcanvas > div {
  display: grid;
  grid-template-rows: auto 1fr;
  height: 100%;
}