/* =============================================================================
   E&G FITNESS SPORT — components.css
   ============================================================================= */

/* ── Google Material Symbols ── */
.material-symbols-outlined { font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24; }
.icon-fill { font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 24; }
.icon-sm   { font-size: 18px !important; }
.icon-xs   { font-size: 14px !important; }

/* ── Scrollbar ── */
.no-scrollbar::-webkit-scrollbar { display: none; }
.no-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }

.sidebar-scroll::-webkit-scrollbar { width: 3px; }
.sidebar-scroll::-webkit-scrollbar-track { background: transparent; }
.sidebar-scroll::-webkit-scrollbar-thumb { background: #d4d4d4; border-radius: 2px; }
.dark .sidebar-scroll::-webkit-scrollbar-thumb { background: #353534; }

/* ── Badges ── */
.badge {
  display: inline-flex; align-items: center;
  font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: 9px;
  letter-spacing: 0.15em; padding: 3px 8px; text-transform: uppercase;
}
.badge-bestseller { background: #eaea00; color: #131313; }
.badge-new        { background: #00c9a7; color: #131313; }
.badge-sale       { background: #ff4d4d; color: #ffffff; }
.badge-pro        { background: #a78bfa; color: #131313; }
.badge-popular    { background: #fb923c; color: #131313; }
.badge-toprated   { background: #38bdf8; color: #131313; }
.badge-discount   { background: #dc2626; color: #ffffff; }

/* ── Stars ── */
.stars { display: flex; align-items: center; gap: 1px; }
.star { font-size: 13px; line-height: 1; }
.star.filled { color: #eaea00; font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 20; }
.star.empty { color: #d4d4d4; font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 20; }
.dark .star.empty { color: #353534; }
.stars-sm .star { font-size: 11px; }
.stars-lg .star { font-size: 16px; }

/* ── Toast ── */
.toast {
  position: fixed; bottom: 80px; left: 50%; transform: translateX(-50%);
  background: #eaea00; color: #131313; border: 1px solid #d4d4d4;
  font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: 13px;
  letter-spacing: 0.05em; padding: 12px 24px; z-index: 9999; white-space: nowrap;
  box-shadow: 0 8px 32px rgba(0,0,0,0.1); transition: opacity 0.3s;
}
.dark .toast { background: #201f1f; color: #e5e2e1; border: 1px solid #353534; box-shadow: 0 8px 32px rgba(0,0,0,0.4); }
@media (min-width: 768px) { .toast { bottom: 32px; } }

/* ── Stock ── */
.stock-in  { display: flex; align-items: center; gap: 6px; color: #16a34a; font-size: 13px; }
.dark .stock-in { color: #4ade80; }
.stock-out { display: flex; align-items: center; gap: 6px; color: #dc2626; font-size: 13px; }
.dark .stock-out { color: #f87171; }

/* ── Animations ── */
@keyframes shimmer { 0% { background-position: -200% 0; } 100% { background-position: 200% 0; } }
.skeleton {
  background: linear-gradient(90deg, #f5f5f5 25%, #e5e5e5 50%, #f5f5f5 75%);
  background-size: 200% 100%; animation: shimmer 1.5s infinite;
}
.dark .skeleton {
  background: linear-gradient(90deg, #1c1b1b 25%, #2a2a2a 50%, #1c1b1b 75%);
}
@keyframes spin { to { transform: rotate(360deg); } }
.spin { animation: spin 1s linear infinite; }

/* ── Search Bar ── */
.search-bar {
  display: flex; align-items: center; gap: 8px;
  background: #fdfdfd; border: 1px solid #e5e5e5;
  padding: 8px 12px; transition: border-color 0.2s;
}
.search-bar:focus-within { border-color: #cdcd00; }
.search-bar input { background: transparent; outline: none; font-family: 'Inter', sans-serif; font-size: 13px; color: #131313; width: 100%; }
.search-bar input::placeholder { color: #a3a3a3; }

.dark .search-bar { background: #1c1b1b; border-color: rgba(72,72,49,0.4); }
.dark .search-bar:focus-within { border-color: #eaea00; }
.dark .search-bar input { color: #e5e2e1; }
.dark .search-bar input::placeholder { color: #474746; }

/* ── Mobile Drawer ── */
.mobile-drawer {
    position: fixed;
    top: 0;
    right: 0;
    width: 280px;
    height: 100%;
    background: #fff;
    z-index: 100;
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    box-shadow: -10px 0 30px rgba(0,0,0,0.1);
}
.dark .mobile-drawer { background: #131313; box-shadow: -10px 0 30px rgba(0,0,0,0.4); }
.dark .mobile-drawer .mt-auto { background: #1a1a1a !important; border-top-color: rgba(255,255,255,0.05) !important; }
.mobile-drawer.open { transform: translateX(0); }

.drawer-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 90;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
    backdrop-filter: blur(4px);
}
.drawer-overlay.active { opacity: 1; visibility: visible; }

/* ── Bottom Nav (Mobile Only) ── */
.bottom-nav {
    display: none; /* hidden on desktop */
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 64px;
    z-index: 80;
}

@media (max-width: 767px) {
    .bottom-nav {
        display: flex;
        justify-content: space-around;
        align-items: center;
        background: rgba(255,255,255,0.9);
        backdrop-filter: blur(12px);
        border-top: 1px solid rgba(0,0,0,0.05);
        padding-bottom: env(safe-area-inset-bottom);
    }
}
.dark .bottom-nav { 
    background: rgba(19,19,19,0.9); 
    border-top-color: rgba(255,255,255,0.05); 
}

.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    color: #737373;
    font-size: 10px;
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: color 0.2s;
}
.bottom-nav-item.active { color: #ccf200; }
.dark .bottom-nav-item.active { color: #eaea00; }
.bottom-nav-item .material-symbols-outlined { font-size: 24px; }
.font-brand { font-family: 'Outfit', sans-serif; font-weight: 900; }

/* ── Cart Counter (Global: Desktop & Mobile) ── */
#cart-count, #cart-count-mobile {
    position: absolute;
    top: -4px !important;
    right: -6px !important;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 16px !important;
    height: 16px !important;
    background-color: #dc2626 !important;
    color: #ffffff !important;
    font-size: 9px !important;
    font-weight: 700 !important;
    border-radius: 9999px !important;
    line-height: 1 !important;
    z-index: 10;
    pointer-events: none;
}
