/* Critical shell for cart drawer + mobile menu (no token deps — must work even if header-nav fails) */

.ifil-cart-fab {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 10000020;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 9999px;
  background: #dd0000;
  color: #fff;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(58, 58, 58, 0.22);
}

.ifil-cart-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000020;
  background: rgba(58, 58, 58, 0.35);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.24s ease;
}

.ifil-cart-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}

.ifil-cart-drawer {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 10000025;
  width: min(480px, 92vw);
  height: 100vh;
  max-height: 100dvh;
  margin: 0;
  padding: 0;
  background: #fff;
  color: #3a3a3a;
  border-left: 1px solid rgba(58, 58, 58, 0.12);
  box-shadow: -12px 0 36px rgba(58, 58, 58, 0.12);
  transform: translateX(100%);
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
  display: grid;
  grid-template-rows: auto 1fr auto;
  overflow: hidden;
}

.ifil-cart-drawer.is-open {
  transform: translateX(0);
}

.ifil-cart-drawer[hidden],
.ifil-mm-sheet[hidden] {
  display: none !important;
}

.ifil-mm-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000018;
  background: rgba(0, 0, 0, 0.55);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.ifil-mm-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}

.ifil-mm-sheet {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10000019;
  height: min(90vh, 800px);
  max-height: 90dvh;
  margin: 0;
  background: #fff;
  color: #3a3a3a;
  border-radius: 16px 16px 0 0;
  box-shadow: 0 -12px 30px rgba(0, 0, 0, 0.25);
  transform: translateY(100%);
  transition: transform 0.2s ease-in-out;
  display: grid;
  grid-template-rows: auto 1fr;
  overflow: hidden;
}

.ifil-mm-sheet.is-open {
  transform: translateY(0);
}

/* Mini-cart layout inside drawer */
.ifil-drawer-items {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
}

.ifil-drawer-item {
  display: grid;
  grid-template-columns: 72px 1fr auto;
  gap: 12px;
  align-items: start;
}

.ifil-drawer-item__img {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: 8px;
  display: block;
}

.ifil-drawer-item__title {
  font-size: 0.875rem;
  font-weight: 600;
  color: #3a3a3a;
  text-decoration: none;
  line-height: 1.35;
}

.ifil-cart-body {
  overflow: auto;
  padding: 12px 16px;
}

.ifil-cart-header,
.ifil-cart-footer {
  padding: 16px 20px;
}

.ifil-cart-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid rgba(58, 58, 58, 0.1);
}

.ifil-cart-footer {
  border-top: 1px solid rgba(58, 58, 58, 0.1);
}
