/* ==========================================================================
   SISIMO — CATEGORY NAVIGATION SIDE DRAWER (FASHION REFERENCE)
   ========================================================================== */

/* Prevent background scrolling when drawer is active */
body.category-drawer-open {
  overflow: hidden !important;
  touch-action: none;
}

/* 1. Backdrop Overlay */
.sisimo-category-drawer-overlay {
  position: fixed !important;
  inset: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  background-color: rgba(0, 0, 0, 0.45) !important;
  z-index: 99990 !important;
  opacity: 0;
  visibility: hidden;
  transition: opacity 250ms ease, visibility 250ms ease;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

body.category-drawer-open .sisimo-category-drawer-overlay {
  opacity: 1 !important;
  visibility: visible !important;
}

/* 2. Main Drawer Shell */
.sisimo-category-drawer {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  bottom: 0 !important;
  width: 360px !important;
  max-width: 90vw !important;
  height: 100vh !important;
  height: 100dvh !important;
  background-color: #ffffff !important;
  z-index: 99995 !important;
  display: flex !important;
  flex-direction: column !important;
  transform: translateX(-100%) !important;
  transition: transform 300ms cubic-bezier(0.22, 1, 0.36, 1) !important;
  box-shadow: 8px 0 32px rgba(0, 0, 0, 0.12) !important;
  overflow: hidden !important;
  box-sizing: border-box !important;
}

body.category-drawer-open .sisimo-category-drawer {
  transform: translateX(0) !important;
}

/* 3. Drawer Header */
.sisimo-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px 14px 20px;
  background-color: #ffffff;
  border-bottom: 1px solid #f0f0f2;
  flex-shrink: 0;
  position: relative;
  z-index: 5;
}

.sisimo-drawer-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.sisimo-drawer-logo img {
  width: 135px;
  max-width: 145px;
  height: auto;
  max-height: 44px;
  object-fit: contain;
  display: block;
}

.sisimo-drawer-close {
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  border-radius: 50%;
  background-color: #f4f4f6;
  border: none;
  color: #333333;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.2s ease, color 0.2s ease;
  padding: 0;
  outline: none;
  -webkit-tap-highlight-color: transparent;
}

.sisimo-drawer-close:hover,
.sisimo-drawer-close:focus-visible {
  background-color: #ebebee;
  color: #111111;
  transform: scale(1.05);
}

.sisimo-drawer-close svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}

/* 4. Top Category Tabs */
.sisimo-drawer-tabs-wrapper {
  background-color: #ffffff;
  border-bottom: 1px solid #e8e8ea;
  flex-shrink: 0;
  position: relative;
  z-index: 4;
}

.sisimo-drawer-tabs {
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  -ms-overflow-style: none;
  -webkit-overflow-scrolling: touch;
  padding: 0 12px;
  gap: 4px;
}

.sisimo-drawer-tabs::-webkit-scrollbar {
  display: none;
}

.sisimo-drawer-tab {
  padding: 12px 14px 11px;
  font-size: 14px;
  font-weight: 500;
  color: #777777;
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
  background: none;
  border: none;
  position: relative;
  transition: color 0.2s ease;
  outline: none;
  flex-shrink: 0;
  font-family: inherit;
  display: inline-block;
  -webkit-tap-highlight-color: transparent;
}

.sisimo-drawer-tab:hover {
  color: #222222;
}

.sisimo-drawer-tab.is-active {
  color: #111111;
  font-weight: 600;
}

.sisimo-drawer-tab.is-active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 12px;
  right: 12px;
  height: 2.5px;
  background-color: #111111;
  border-radius: 2px 2px 0 0;
}

/* 5. Panels Slider Container */
.sisimo-drawer-body {
  flex: 1 1 auto;
  position: relative;
  overflow: hidden;
  background-color: #ffffff;
}

.sisimo-drawer-track {
  display: flex;
  width: 200%;
  height: 100%;
  transition: transform 280ms cubic-bezier(0.25, 1, 0.5, 1);
  will-change: transform;
}

.sisimo-drawer-track.show-subpanel {
  transform: translateX(-50%);
}

/* Panel Individual */
.sisimo-panel {
  width: 50%;
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 16px 16px 28px 16px;
  box-sizing: border-box;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.sisimo-panel::-webkit-scrollbar {
  display: none;
}

/* 6. Promotional Category Blocks */
.sisimo-promo-stack {
  display: flex;
  flex-direction: column;
  gap: 9px;
  margin-bottom: 20px;
}

.sisimo-promo-card {
  height: 50px;
  min-height: 50px;
  border-radius: 6px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  text-decoration: none !important;
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: -0.1px;
  transition: transform 0.18s ease, filter 0.18s ease;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

.sisimo-promo-card:hover {
  filter: brightness(0.96);
  transform: translateY(-1px);
}

.sisimo-promo-card .promo-text {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding-right: 8px;
}

.sisimo-promo-card .promo-arrow {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sisimo-promo-card .promo-arrow svg {
  width: 16px;
  height: 16px;
  stroke-width: 2.2;
}

/* Promo Card Variants */
.sisimo-promo--green {
  background-color: #00ab66;
  color: #ffffff !important;
}

.sisimo-promo--red {
  background-color: #f0505b;
  color: #ffffff !important;
}

.sisimo-promo--blue {
  background-color: #5271ff;
  color: #ffffff !important;
}

.sisimo-promo--pink {
  background-color: #fff0f3;
  color: #c82348 !important;
  border: 1px solid rgba(200, 35, 72, 0.15);
}

/* 7. Section Title */
.sisimo-drawer-section-title {
  font-size: 16px;
  font-weight: 600;
  color: #222222;
  margin: 6px 0 12px 2px;
  letter-spacing: -0.2px;
}

/* 8. Category Blocks List */
.sisimo-categories-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
}

.sisimo-category-row {
  background-color: #F5F5F7;
  height: 50px;
  min-height: 50px;
  border-radius: 6px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  text-decoration: none !important;
  font-size: 14.5px;
  font-weight: 500;
  color: #222222 !important;
  border: none;
  cursor: pointer;
  width: 100%;
  box-sizing: border-box;
  font-family: inherit;
  transition: background-color 0.18s ease;
  -webkit-tap-highlight-color: transparent;
}

.sisimo-category-row:hover,
.sisimo-category-row:focus-visible {
  background-color: #ebebeb;
}

.sisimo-category-row .cat-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding-right: 8px;
}

.sisimo-category-row .cat-arrow {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  color: #666666;
  transition: transform 0.18s ease, color 0.18s ease;
}

.sisimo-category-row .cat-arrow svg {
  width: 16px;
  height: 16px;
  stroke-width: 2;
}

.sisimo-category-row:hover .cat-arrow {
  transform: translateX(3px);
  color: #111111;
}

/* Browse All Collection row */
.sisimo-category-row--browse {
  font-weight: 600;
  color: #111111 !important;
}

/* 9. See More Uppercase Link */
.sisimo-drawer-footer-link {
  text-align: left;
  padding: 12px 4px 6px;
}

.sisimo-drawer-footer-link a {
  display: inline-block;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.8px;
  color: #222222;
  text-transform: uppercase;
  text-decoration: underline;
  text-underline-offset: 4px;
  transition: color 0.18s ease;
}

.sisimo-drawer-footer-link a:hover {
  color: var(--theme-color, #F76188);
}

/* 10. Submenu Panel */
.sisimo-subpanel-header {
  margin-bottom: 12px;
}

.sisimo-subpanel-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: none;
  border: none;
  font-size: 14px;
  font-weight: 500;
  color: #555555;
  cursor: pointer;
  padding: 4px 0 14px 0;
  transition: color 0.18s ease;
  font-family: inherit;
  outline: none;
  -webkit-tap-highlight-color: transparent;
}

.sisimo-subpanel-back:hover {
  color: #111111;
}

.sisimo-subpanel-back svg {
  width: 16px;
  height: 16px;
  stroke-width: 2.2;
}

.sisimo-subpanel-title {
  font-size: 18px;
  font-weight: 700;
  color: #111111;
  margin: 0 0 8px 0;
  letter-spacing: -0.2px;
}

/* 11. Mobile Adaptations */
@media (max-width: 480px) {
  .sisimo-category-drawer {
    width: 100vw !important;
    max-width: 100vw !important;
  }

  .sisimo-panel {
    padding: 14px 14px 24px 14px;
  }

  .sisimo-drawer-header {
    padding: 14px 16px 12px 16px;
  }

  .sisimo-drawer-close {
    width: 44px;
    height: 44px;
  }

  .sisimo-drawer-tab {
    font-size: 13.5px;
    padding: 11px 12px 10px;
  }

  .sisimo-promo-card {
    height: 48px;
    min-height: 48px;
    font-size: 14px;
  }

  .sisimo-category-row {
    height: 48px;
    min-height: 48px;
    font-size: 14.5px;
  }
}
