/**
 * Starter Developer Theme - Floating Elements Styles
 */

/* ====================================
   FLOATING CART
   ==================================== */
.starter-floating-cart {
  position: fixed;
  z-index: 9999;
  display: none;
}

.starter-floating-cart[data-visible="true"] {
  display: block;
  animation: starter-fly-up 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Fly-up animation for floating cart */
@keyframes starter-fly-up {
  0% {
    opacity: 0;
    transform: translateY(100px) scale(0.8);
  }
  50% {
    opacity: 1;
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Bounce animation when item added */
.starter-floating-cart.item-added .starter-floating-cart__toggle {
  animation: starter-bounce 0.6s ease;
}

@keyframes starter-bounce {
  0%, 100% {
    transform: scale(1);
  }
  25% {
    transform: scale(1.2);
  }
  50% {
    transform: scale(0.95);
  }
  75% {
    transform: scale(1.1);
  }
}

.starter-floating-cart--bottom-right {
  bottom: var(--starter-spacing-lg);
  right: var(--starter-spacing-lg);
}

.starter-floating-cart--bottom-left {
  bottom: var(--starter-spacing-lg);
  left: var(--starter-spacing-lg);
}

/* Toggle Button */
.starter-floating-cart__toggle {
  position: relative;
  width: 60px;
  height: 60px;
  background: var(--starter-primary);
  color: #fff;
  border: none;
  border-radius: var(--starter-radius-full);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--starter-shadow-lg);
  transition: var(--starter-transition);
}

.starter-floating-cart__toggle:hover {
  transform: scale(1.05);
  box-shadow: var(--starter-shadow-xl);
}

.starter-floating-cart__icon {
  width: 28px;
  height: 28px;
}

.starter-floating-cart__count {
  position: absolute;
  top: -5px;
  right: -5px;
  min-width: 24px;
  height: 24px;
  padding: 0 8px;
  background: var(--starter-error);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  line-height: 24px;
  text-align: center;
  border-radius: var(--starter-radius-full);
  box-shadow: var(--starter-shadow);
}

/* Dropdown */
.starter-floating-cart__dropdown {
  position: absolute;
  bottom: 70px;
  width: 360px;
  max-height: 500px;
  background: var(--starter-card-bg);
  border-radius: var(--starter-radius);
  box-shadow: var(--starter-shadow-xl);
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: var(--starter-transition);
}

.starter-floating-cart--bottom-right .starter-floating-cart__dropdown {
  right: 0;
}

.starter-floating-cart--bottom-left .starter-floating-cart__dropdown {
  left: 0;
}

.starter-floating-cart.is-open .starter-floating-cart__dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* Header */
.starter-floating-cart__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--starter-spacing-md) var(--starter-spacing-lg);
  border-bottom: 1px solid var(--starter-border-color);
}

.starter-floating-cart__title {
  font-size: var(--starter-font-size-lg);
  font-weight: 700;
  margin: 0;
}

.starter-floating-cart__close {
  width: 32px;
  height: 32px;
  padding: 0;
  background: transparent;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--starter-text-muted);
  border-radius: var(--starter-radius-sm);
  transition: var(--starter-transition);
}

.starter-floating-cart__close:hover {
  background: var(--starter-background);
  color: var(--starter-text-primary);
}

.starter-floating-cart__close svg {
  width: 20px;
  height: 20px;
}

/* Items */
.starter-floating-cart__items {
  max-height: 300px;
  overflow-y: auto;
  padding: var(--starter-spacing-md);
}

.starter-floating-cart__empty {
  text-align: center;
  color: var(--starter-text-muted);
  padding: var(--starter-spacing-xl) 0;
}

.starter-floating-cart__item {
  display: flex;
  gap: var(--starter-spacing-md);
  padding: var(--starter-spacing-sm) 0;
  border-bottom: 1px solid var(--starter-border-color);
}

.starter-floating-cart__item:last-child {
  border-bottom: none;
}

.starter-floating-cart__item-image {
  flex-shrink: 0;
  width: 60px;
  height: 60px;
}

.starter-floating-cart__item-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--starter-radius-sm);
}

.starter-floating-cart__item-details {
  flex: 1;
  min-width: 0;
}

.starter-floating-cart__item-title {
  font-size: var(--starter-font-size-sm);
  font-weight: 600;
  margin: 0 0 4px 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.starter-floating-cart__item-qty {
  display: block;
  font-size: var(--starter-font-size-xs);
  color: var(--starter-text-muted);
}

.starter-floating-cart__item-price {
  display: block;
  font-size: var(--starter-font-size-sm);
  font-weight: 600;
  color: var(--starter-text-primary);
}

.starter-floating-cart__item-remove {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  padding: 0;
  background: transparent;
  border: none;
  color: var(--starter-text-muted);
  font-size: 18px;
  cursor: pointer;
  align-self: center;
  transition: var(--starter-transition);
}

.starter-floating-cart__item-remove:hover {
  color: var(--starter-error);
}

/* Footer */
.starter-floating-cart__footer {
  padding: var(--starter-spacing-md) var(--starter-spacing-lg);
  background: var(--starter-background);
  border-top: 1px solid var(--starter-border-color);
}

.starter-floating-cart__subtotal {
  display: flex;
  justify-content: space-between;
  margin-bottom: var(--starter-spacing-md);
  font-weight: 600;
}

.starter-floating-cart__total {
  font-size: var(--starter-font-size-lg);
  color: var(--starter-text-primary);
}

.starter-floating-cart__actions {
  display: flex;
  gap: var(--starter-spacing-sm);
}

.starter-floating-cart__actions .starter-btn {
  flex: 1;
  justify-content: center;
  padding: var(--starter-spacing-sm) var(--starter-spacing-md);
  font-size: var(--starter-font-size-sm);
}

/* ====================================
   FLOATING SIDEBAR - VERTICAL TAB STYLE
   ==================================== */
.starter-floating-sidebar {
  position: fixed;
  z-index: 9998;
  /* Default: hidden until visible condition is met */
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

/* Show sidebar when visible */
.starter-floating-sidebar[data-visible="true"] {
  opacity: 1;
  visibility: visible;
}

/* Always visible (no trigger needed) */
.starter-floating-sidebar[data-trigger="always"] {
  opacity: 1;
  visibility: visible;
}

/* ====================================
   HORIZONTAL POSITION (Left or Right side)
   ==================================== */
.starter-floating-sidebar--left {
  left: 0;
}

.starter-floating-sidebar--right {
  right: 0;
}

/* ====================================
   VERTICAL POSITION (Top, Middle, Bottom)
   ==================================== */
.starter-floating-sidebar--v-top {
  top: 100px;
}

.starter-floating-sidebar--v-middle {
  top: 50%;
  transform: translateY(-50%);
}

.starter-floating-sidebar--v-bottom {
  bottom: 100px;
  top: auto;
}

/* Admin bar adjustments */
.admin-bar .starter-floating-sidebar--v-top {
  top: 132px;
}

@media screen and (max-width: 782px) {
  .admin-bar .starter-floating-sidebar--v-top {
    top: 146px;
  }
}

/* ====================================
   VERTICAL TAB BUTTON (Glued to side)
   ==================================== */
.starter-floating-sidebar__tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 12px 10px;
  background: var(--starter-secondary, #10b981);
  color: #fff;
  border: none;
  cursor: pointer;
  box-shadow: var(--starter-shadow-lg);
  transition: var(--starter-transition);
  writing-mode: vertical-rl;
  text-orientation: mixed;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.3px;
}

/* Left side tab - text reads bottom to top, rounded on right (outward) */
.starter-floating-sidebar--left .starter-floating-sidebar__tab {
  border-radius: 0 var(--starter-radius) var(--starter-radius) 0;
  flex-direction: row-reverse; /* icon at top, text at bottom (reads bottom-to-top) */
}

/* Right side tab - text reads top to bottom, rounded on left (outward) */
.starter-floating-sidebar--right .starter-floating-sidebar__tab {
  border-radius: var(--starter-radius) 0 0 var(--starter-radius);
  flex-direction: row; /* text at top, icon at bottom (reads top-to-bottom) */
}

.starter-floating-sidebar__tab:hover {
  background: var(--starter-secondary-hover, #059669);
}

/* Expand tab slightly on hover */
.starter-floating-sidebar--left .starter-floating-sidebar__tab:hover {
  padding-right: 16px;
}

.starter-floating-sidebar--right .starter-floating-sidebar__tab:hover {
  padding-left: 16px;
}

.starter-floating-sidebar__tab-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.starter-floating-sidebar__tab-text {
  display: inline;
}

/* Hide toggle button (replaced by tab) */
.starter-floating-sidebar__toggle {
  display: none;
}

/* ====================================
   PANEL - Slides from side
   ==================================== */
.starter-floating-sidebar__panel {
  position: fixed;
  top: 0;
  width: 380px;
  height: 100vh;
  max-height: 100vh;
  background: var(--starter-card-bg);
  box-shadow: var(--starter-shadow-xl);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transition: transform 0.3s ease, opacity 0.3s ease, visibility 0.3s ease;
  z-index: 10000;
}

/* Left side panel */
.starter-floating-sidebar--left .starter-floating-sidebar__panel {
  left: 0;
  transform: translateX(-100%);
  border-radius: 0 var(--starter-radius) var(--starter-radius) 0;
}

/* Right side panel */
.starter-floating-sidebar--right .starter-floating-sidebar__panel {
  right: 0;
  transform: translateX(100%);
  border-radius: var(--starter-radius) 0 0 var(--starter-radius);
}

/* Open state */
.starter-floating-sidebar.is-open .starter-floating-sidebar__panel {
  opacity: 1;
  visibility: visible;
  transform: translateX(0);
}

/* Hide tab when panel is open */
.starter-floating-sidebar.is-open .starter-floating-sidebar__tab {
  opacity: 0;
  visibility: hidden;
}

/* Header */
.starter-floating-sidebar__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--starter-spacing-lg);
  border-bottom: 1px solid var(--starter-border-color);
}

.starter-floating-sidebar__title {
  font-size: var(--starter-font-size-xl);
  font-weight: 700;
  margin: 0;
}

.starter-floating-sidebar__close {
  width: 40px;
  height: 40px;
  padding: 0;
  background: transparent;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--starter-text-muted);
  border-radius: var(--starter-radius-sm);
  transition: var(--starter-transition);
}

.starter-floating-sidebar__close:hover {
  background: var(--starter-background);
  color: var(--starter-text-primary);
}

.starter-floating-sidebar__close svg {
  width: 24px;
  height: 24px;
}

/* Category Tabs */
.starter-floating-sidebar__tabs {
  display: flex;
  gap: var(--starter-spacing-xs);
  padding: var(--starter-spacing-md);
  overflow-x: auto;
  border-bottom: 1px solid var(--starter-border-color);
}

.starter-floating-sidebar__tab-btn {
  flex-shrink: 0;
  padding: var(--starter-spacing-xs) var(--starter-spacing-md);
  background: var(--starter-background);
  color: var(--starter-text-secondary);
  border: none;
  border-radius: var(--starter-radius-full);
  font-size: var(--starter-font-size-sm);
  font-weight: 500;
  cursor: pointer;
  transition: var(--starter-transition);
}

.starter-floating-sidebar__tab-btn:hover,
.starter-floating-sidebar__tab-btn.active {
  background: var(--starter-primary);
  color: #fff;
}

/* Content */
.starter-floating-sidebar__content {
  flex: 1;
  overflow-y: auto;
  padding: var(--starter-spacing-md);
}

.starter-floating-sidebar__loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--starter-spacing-md);
  padding: var(--starter-spacing-2xl) 0;
  color: var(--starter-text-muted);
}

.starter-floating-sidebar__products[data-loading="true"] .starter-sidebar-products {
  display: none;
}

.starter-floating-sidebar__products[data-loading="false"] .starter-floating-sidebar__loading {
  display: none;
}

/* Spinner */
.starter-spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--starter-border-color);
  border-top-color: var(--starter-primary);
  border-radius: 50%;
  animation: starter-spin 1s linear infinite;
}

@keyframes starter-spin {
  to { transform: rotate(360deg); }
}

/* Products List */
.starter-sidebar-products {
  display: flex;
  flex-direction: column;
  gap: var(--starter-spacing-md);
}

.starter-sidebar-product {
  display: flex;
  gap: var(--starter-spacing-md);
  padding: var(--starter-spacing-sm);
  background: var(--starter-background);
  border-radius: var(--starter-radius-sm);
  transition: var(--starter-transition);
}

.starter-sidebar-product:hover {
  box-shadow: var(--starter-shadow);
}

.starter-sidebar-product__link {
  display: flex;
  gap: var(--starter-spacing-md);
  flex: 1;
  min-width: 0;
  text-decoration: none;
}

.starter-sidebar-product__image {
  flex-shrink: 0;
  width: 70px;
  height: 70px;
}

.starter-sidebar-product__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--starter-radius-sm);
}

.starter-sidebar-product__info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.starter-sidebar-product__title {
  font-size: var(--starter-font-size-sm);
  font-weight: 600;
  margin: 0 0 4px 0;
  color: var(--starter-text-primary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.starter-sidebar-product__price {
  font-size: var(--starter-font-size-sm);
  font-weight: 700;
  color: var(--starter-primary);
}

.starter-sidebar-product__add-to-cart {
  flex-shrink: 0;
  align-self: center;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: var(--starter-spacing-xs) var(--starter-spacing-sm);
  background: var(--starter-secondary);
  color: #fff;
  border: none;
  border-radius: var(--starter-radius-sm);
  font-size: var(--starter-font-size-xs);
  font-weight: 600;
  cursor: pointer;
  transition: var(--starter-transition);
}

.starter-sidebar-product__add-to-cart:hover {
  background: var(--starter-secondary-hover);
  transform: scale(1.05);
}

.starter-sidebar-product__add-to-cart svg {
  width: 14px;
  height: 14px;
}

.starter-sidebar-empty {
  text-align: center;
  color: var(--starter-text-muted);
  padding: var(--starter-spacing-xl) 0;
}

/* Category List Display */
.starter-sidebar-categories {
  display: flex;
  flex-direction: column;
  gap: var(--starter-spacing-sm);
}

.starter-sidebar-category {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--starter-spacing-md);
  background: var(--starter-background);
  border-radius: var(--starter-radius-sm);
  text-decoration: none;
  color: var(--starter-text-primary);
  transition: var(--starter-transition);
}

.starter-sidebar-category:hover {
  background: var(--starter-primary);
  color: #fff;
  transform: translateX(4px);
}

.starter-sidebar-category__name {
  font-weight: 600;
  font-size: var(--starter-font-size-sm);
}

.starter-sidebar-category__count {
  background: rgba(0, 0, 0, 0.1);
  padding: 2px 8px;
  border-radius: var(--starter-radius-full);
  font-size: var(--starter-font-size-xs);
  font-weight: 600;
}

.starter-sidebar-category:hover .starter-sidebar-category__count {
  background: rgba(255, 255, 255, 0.2);
}

/* Footer */
.starter-floating-sidebar__footer {
  padding: var(--starter-spacing-lg);
  border-top: 1px solid var(--starter-border-color);
}

.starter-floating-sidebar__footer .starter-btn {
  width: 100%;
  justify-content: center;
}

/* Overlay */
.starter-floating-sidebar__overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  opacity: 0;
  visibility: hidden;
  transition: var(--starter-transition);
  z-index: -1;
}

.starter-floating-sidebar.is-open .starter-floating-sidebar__overlay {
  opacity: 1;
  visibility: visible;
}

/* ====================================
   RESPONSIVE
   ==================================== */
@media (max-width: 768px) {
  /* Floating Cart */
  .starter-floating-cart__toggle {
    width: 50px;
    height: 50px;
  }
  
  .starter-floating-cart__icon {
    width: 24px;
    height: 24px;
  }
  
  .starter-floating-cart__dropdown {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    max-height: 70vh;
    border-radius: var(--starter-radius) var(--starter-radius) 0 0;
  }
  
  /* ========================================
     MOBILE SIDEBAR - HORIZONTAL TAB AT TOP
     ======================================== */
  
  /* Position sidebar at top-left on mobile */
  .starter-floating-sidebar,
  .starter-floating-sidebar[data-visible="true"],
  .starter-floating-sidebar[data-trigger="always"],
  .starter-floating-sidebar--v-top,
  .starter-floating-sidebar--v-middle,
  .starter-floating-sidebar--v-bottom {
    transform: none !important;
    top: 100px !important;
    bottom: auto !important;
  }
  
  /* Force sidebar to left edge on mobile */
  .starter-floating-sidebar--left,
  .starter-floating-sidebar--right {
    left: 0 !important;
    right: auto !important;
  }
  
  /* Admin bar offset on mobile */
  .admin-bar .starter-floating-sidebar {
    top: 146px !important;
  }
  
  /* ========================================
     MOBILE SIDEBAR TAB - KEEP VERTICAL!
     The tab should remain a vertical strip
     on the left edge, identical to desktop.
     Only the PANEL changes to bottom drawer.
     ======================================== */
  
  /* DO NOT change tab to horizontal - keep it vertical */
  .starter-floating-sidebar__tab {
    /* Keep vertical text */
    writing-mode: vertical-rl !important;
    text-orientation: mixed !important;
    /* Compact sizing */
    padding: 10px 6px !important;
    gap: 5px !important;
    font-size: 11px !important;
    /* Rounded on outward side only */
    border-radius: 0 var(--starter-radius-sm, 6px) var(--starter-radius-sm, 6px) 0 !important;
  }
  
  /* Left side: arrow at bottom, text reads bottom-to-top */
  .starter-floating-sidebar--left .starter-floating-sidebar__tab {
    flex-direction: row-reverse !important;
    border-radius: 0 var(--starter-radius-sm, 6px) var(--starter-radius-sm, 6px) 0 !important;
  }
  
  /* Right side: arrow at top, text reads top-to-bottom */
  .starter-floating-sidebar--right .starter-floating-sidebar__tab {
    flex-direction: row !important;
    border-radius: var(--starter-radius-sm, 6px) 0 0 var(--starter-radius-sm, 6px) !important;
  }
  
  .starter-floating-sidebar__tab-text {
    display: inline !important;
    font-size: 11px !important;
  }
  
  .starter-floating-sidebar__tab-icon {
    width: 12px !important;
    height: 12px !important;
  }
  
  /* Minimal hover - just slight padding increase */
  .starter-floating-sidebar--left .starter-floating-sidebar__tab:hover,
  .starter-floating-sidebar--right .starter-floating-sidebar__tab:hover {
    padding: 10px 8px !important;
  }
  
  /* Mobile panel - Full width bottom drawer */
  .starter-floating-sidebar__panel {
    position: fixed !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    top: auto !important;
    width: 100% !important;
    max-width: 100% !important;
    height: 85vh;
    max-height: 85vh;
    border-radius: 20px 20px 0 0;
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.2);
    /* Hidden state: off-screen at bottom */
    transform: translateY(100%);
    opacity: 1;
    visibility: hidden;
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.35s;
  }
  
  /* Open state - slide up from bottom */
  .starter-floating-sidebar.is-open .starter-floating-sidebar__panel {
    transform: translateY(0);
    visibility: visible;
  }
  
  /* Override all position variants on mobile - always bottom drawer */
  .starter-floating-sidebar--left .starter-floating-sidebar__panel,
  .starter-floating-sidebar--right .starter-floating-sidebar__panel {
    position: fixed !important;
    bottom: 0 !important;
    top: auto !important;
    left: 0 !important;
    right: 0 !important;
    transform: translateY(100%);
    visibility: hidden;
    border-radius: 20px 20px 0 0;
  }
  
  /* Open state for all position variants */
  .starter-floating-sidebar.is-open.starter-floating-sidebar--left .starter-floating-sidebar__panel,
  .starter-floating-sidebar.is-open.starter-floating-sidebar--right .starter-floating-sidebar__panel {
    transform: translateY(0);
    visibility: visible;
  }
  
  /* Admin bar offset on mobile */
  .admin-bar .starter-floating-sidebar__panel {
    height: calc(85vh - 46px);
    max-height: calc(85vh - 46px);
  }
  
  /* Drag handle indicator */
  .starter-floating-sidebar__panel::before {
    content: '';
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 4px;
    background: var(--starter-border-color, #e5e7eb);
    border-radius: 2px;
  }
  
  /* Header adjustments */
  .starter-floating-sidebar__header {
    padding: 24px 16px 16px;
    border-bottom: 1px solid var(--starter-border-color, #e5e7eb);
  }
  
  .starter-floating-sidebar__title {
    font-size: 18px;
    font-weight: 700;
  }
  
  .starter-floating-sidebar__close {
    width: 36px;
    height: 36px;
    background: var(--starter-background, #f3f4f6);
    border-radius: 50%;
  }
  
  .starter-floating-sidebar__close svg {
    width: 20px;
    height: 20px;
  }
  
  /* Tabs - horizontal scroll */
  .starter-floating-sidebar__tabs {
    display: flex;
    gap: 8px;
    padding: 12px 16px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }
  
  .starter-floating-sidebar__tabs::-webkit-scrollbar {
    display: none;
  }
  
  .starter-floating-sidebar__tab-btn {
    flex-shrink: 0;
    padding: 8px 16px;
    font-size: 14px;
    border-radius: 20px;
  }
  
  /* Content area - scrollable */
  .starter-floating-sidebar__content {
    padding: 16px;
    padding-bottom: 100px; /* Extra padding to account for fixed footer */
    height: calc(100% - 140px);
    max-height: none;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Product cards in sidebar - 2 column grid */
  .starter-sidebar-products {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
  
  .starter-sidebar-product {
    flex-direction: column;
    padding: 8px;
    gap: 8px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  }
  
  .starter-sidebar-product__link {
    flex-direction: column;
    gap: 8px;
  }
  
  .starter-sidebar-product__image {
    width: 100%;
    height: auto;
    aspect-ratio: 1/1;
    border-radius: 8px;
    overflow: hidden;
  }
  
  .starter-sidebar-product__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
  
  .starter-sidebar-product__info {
    text-align: center;
    padding: 4px 0;
  }
  
  .starter-sidebar-product__title {
    font-size: 13px;
    font-weight: 500;
    -webkit-line-clamp: 2;
    line-height: 1.3;
    margin-bottom: 4px;
  }
  
  .starter-sidebar-product__price {
    font-size: 15px;
    font-weight: 700;
    color: var(--starter-primary, #2563eb);
  }
  
  .starter-sidebar-product__add-to-cart {
    width: 100%;
    justify-content: center;
    padding: 10px 12px;
    font-size: 13px;
    border-radius: 8px;
  }
  
  /* Overlay - full screen with blur */
  .starter-floating-sidebar__overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: -1;
  }
  
  /* Category list view on mobile */
  .starter-sidebar-categories {
    display: flex;
    flex-direction: column;
    gap: 8px;
  }
  
  .starter-sidebar-category {
    padding: 14px 16px;
    border-radius: 10px;
    font-size: 15px;
  }
  
  /* Footer */
  .starter-floating-sidebar__footer {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 16px;
    background: #fff;
    border-top: 1px solid var(--starter-border-color, #e5e7eb);
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.05);
  }
  
  /* Body scroll lock when sidebar is open */
  body.starter-sidebar-open {
    overflow: hidden;
    position: fixed;
    width: 100%;
  }
}

/* Extra small devices */
@media (max-width: 375px) {
  .starter-floating-sidebar__panel {
    height: 90vh;
    max-height: 90vh;
  }
  
  .starter-sidebar-products {
    gap: 8px;
  }
  
  .starter-sidebar-product {
    padding: 6px;
  }
  
  .starter-sidebar-product__title {
    font-size: 12px;
  }
  
  .starter-sidebar-product__price {
    font-size: 14px;
  }
  
  .starter-sidebar-product__add-to-cart {
    padding: 8px 10px;
    font-size: 12px;
    font-size: 12px;
  }
  
  .starter-sidebar-product__add-to-cart svg {
    width: 14px;
    height: 14px;
  }
  
  /* Category tabs scroll on mobile */
  .starter-floating-sidebar__tabs {
    padding: var(--starter-spacing-sm);
    gap: 6px;
    -webkit-overflow-scrolling: touch;
    flex-wrap: nowrap;
    overflow-x: auto;
  }
  
  .starter-floating-sidebar__tab-btn {
    padding: 8px 14px;
    font-size: 12px;
    white-space: nowrap;
    flex-shrink: 0;
  }
  
  /* Footer */
  .starter-floating-sidebar__footer {
    padding: var(--starter-spacing-md);
    border-radius: 0 0 var(--starter-radius-lg) var(--starter-radius-lg);
  }
  
  /* Overlay */
  .starter-floating-sidebar__overlay {
    top: 44px; /* Below the trigger bar */
  }
  
  /* Category list on mobile - 2 columns */
  .starter-sidebar-categories {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--starter-spacing-sm);
  }
  
  .starter-sidebar-category {
    padding: var(--starter-spacing-sm);
    font-size: 13px;
  }
}

@media (max-width: 480px) {
  .starter-floating-cart--bottom-right,
  .starter-floating-cart--bottom-left {
    bottom: var(--starter-spacing-md);
    right: var(--starter-spacing-md);
    left: auto;
  }
  
  /* Smaller mobile toggle bar */
  .starter-floating-sidebar__mobile-toggle {
    height: 40px;
    font-size: 13px;
  }
  
  /* Adjust panel max height */
  .starter-floating-sidebar__panel {
    top: 40px;
    max-height: calc(85vh - 40px);
  }
  
  /* Smaller product cards */
  .starter-sidebar-product__title {
    font-size: 11px;
  }
  
  .starter-sidebar-product__price {
    font-size: 13px;
  }
  
  .starter-sidebar-product__add-to-cart {
    padding: 6px 10px;
    font-size: 11px;
  }
}

/* Touch device improvements */
@media (hover: none) and (pointer: coarse) {
  .starter-floating-sidebar__mobile-toggle:active {
    opacity: 0.9;
  }
  
  .starter-sidebar-product__add-to-cart:hover {
    transform: none;
  }
  
  .starter-sidebar-product__add-to-cart:active {
    opacity: 0.8;
  }
}

/* ====================================
   MOBILE TOGGLE (OLD - DEPRECATED)
   Now using circular button like cart
   ==================================== */
/* The old mobile toggle bar is no longer used.
   The circular toggle button is now used on all screen sizes. */
.starter-floating-sidebar__mobile-toggle {
  display: none !important; /* No longer used */
}

/* Extra small mobile screens - smaller toggle */
@media (max-width: 480px) {
  .starter-floating-sidebar__toggle {
    width: 46px;
    height: 46px;
  }
  
  .starter-floating-sidebar__icon {
    width: 22px;
    height: 22px;
  }
}

/* Touch device improvements for circular button */
@media (hover: none) and (pointer: coarse) {
  .starter-floating-sidebar__toggle:active {
    transform: scale(0.95);
    opacity: 0.9;
  }
}

/* Desktop admin bar is 32px */
@media (min-width: 783px) {
  .admin-bar .starter-floating-sidebar__mobile-toggle {
    top: 44px; /* 32px admin bar + 12px spacing */
  }
  
  .admin-bar .starter-floating-sidebar__panel {
    top: 98px;
  }
}