/* ===========================
   FASHION ECOM – PREMIUM DESIGN SYSTEM
   A refined, editorial fashion-marketplace look
   =========================== */

:root {
    /* Brand */
    --primary: #B6225C;          /* refined burgundy-rose */
    --primary-dark: #8f1a48;
    --accent: #C8923A;           /* warm gold */
    --accent-dark: #a8772d;
    --dark: #14122B;             /* deep ink */
    --dark-2: #1d1a3a;
    --ink: #2A2640;
    --surface: #FAF7F2;          /* warm cream surface */
    --surface-2: #F3EEE6;
    --line: rgba(20,18,43,0.10);
    --line-strong: rgba(20,18,43,0.16);
    --success: #1F8A57;
    --danger: #C23B3B;
    --bs-primary: #B6225C;
    --bs-primary-rgb: 182,34,92;

    /* Shadows (tinted, not flat black) */
    --shadow-sm: 0 2px 8px rgba(20,18,43,0.06);
    --shadow-md: 0 10px 28px rgba(20,18,43,0.10);
    --shadow-lg: 0 20px 48px rgba(20,18,43,0.14);
    --shadow-gold: 0 10px 28px rgba(200,146,58,0.22);

    /* Radius scale */
    --r-sm: 8px;
    --r-md: 14px;
    --r-lg: 20px;
    --r-xl: 28px;
}

/* Fonts & Base */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@600;700;800&family=Inter:wght@300;400;500;600;700;800&display=swap');

* { box-sizing: border-box; }
body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    font-size: 14px;
    background: var(--surface);
    color: var(--ink);
    transition: background 0.3s, color 0.3s;
    -webkit-font-smoothing: antialiased;
}

/* Reboot overrides */
h1,h2,h3,h4,h5,h6 { font-weight: 700; letter-spacing: -0.01em; color: var(--dark); }
.text-white h1, .text-white h2, .text-white h3,
.text-white h4, .text-white h5, .text-white h6 { color: #fff; }
a { color: var(--primary); }
a:hover { color: var(--primary-dark); }
.fw-700 { font-weight: 700 !important; }
.fw-800 { font-weight: 800 !important; }

/* Editorial display headings — used sparingly for hero/section titles */
.display-serif,
.hero-section h1,
section h2.h4,
section h2.h3 {
    font-family: 'Playfair Display', Georgia, serif;
    letter-spacing: -0.01em;
}
.hero-section h1 { font-weight: 800; }
section h2.h4, section h2.h3 { font-weight: 700; }

/* Eyebrow / section label pattern */
.section-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--accent-dark);
}
.section-eyebrow::before {
    content: '';
    width: 18px;
    height: 2px;
    background: var(--accent);
    display: inline-block;
}

/* ====== DARK MODE ====== */
body.dark-mode {
    background: #0f0e1f;
    color: #e7e3f5;
}
body.dark-mode h1, body.dark-mode h2, body.dark-mode h3,
body.dark-mode h4, body.dark-mode h5, body.dark-mode h6 { color: #f3f1fb; }
body.dark-mode .card { background: #1a1830; border-color: #2c2950 !important; }
body.dark-mode .navbar, body.dark-mode .main-navbar { background: #14122B !important; }
body.dark-mode .form-control, body.dark-mode .form-select { background: #1a1830; color: #eee; border-color: #3a3666; }
body.dark-mode .table { --bs-table-bg: #1a1830; color: #ddd; }
body.dark-mode .bg-light, body.dark-mode .bg-body { background: #1a1830 !important; }
body.dark-mode .border { border-color: #2c2950 !important; }
body.dark-mode .text-dark { color: #ddd !important; }
body.dark-mode .text-muted { color: #9a93c0 !important; }

/* ====== ANNOUNCEMENT BAR ====== */
.announcement-bar {
    background: linear-gradient(135deg, var(--dark), var(--dark-2));
    letter-spacing: 0.3px;
}
.announcement-bar a { color: var(--accent); font-weight: 600; }
.announcement-bar a:hover { color: #e0b768; }

/* ====== NAVBAR ====== */
.main-navbar {
    background: #fff;
    border-bottom: 1px solid var(--line);
    position: sticky;
    top: 0;
    z-index: 1030;
}
.navbar-brand-text {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary);
}
.mega-menu-wrapper { position: relative; }
.mega-menu,
#catMegaMenu {
    border-radius: var(--r-lg) !important;
    box-shadow: var(--shadow-lg) !important;
    border: 1px solid var(--line) !important;
}
.mega-menu {
    position: absolute;
    top: 100%;
    left: 0;
    width: 700px;
    background: #fff;
    display: none;
    z-index: 1000;
    padding: 1.5rem;
    animation: slideDown 0.2s ease;
}
.mega-menu.show { display: flex; }
@keyframes slideDown { from { opacity:0; transform:translateY(-8px); } to { opacity:1; transform:translateY(0); } }

/* Nav text links get a refined underline-on-hover treatment */
.main-navbar .btn-link.text-dark {
    position: relative;
    font-weight: 500;
    color: var(--ink) !important;
}
.main-navbar .btn-link.text-dark::after {
    content: '';
    position: absolute;
    left: 8px; right: 8px; bottom: 2px;
    height: 2px;
    background: var(--accent);
    transform: scaleX(0);
    transition: transform 0.2s ease;
}
.main-navbar .btn-link.text-dark:hover::after { transform: scaleX(1); }
#catMenuBtn {
    border-color: var(--line-strong) !important;
    color: var(--ink);
    font-weight: 500;
}
#catMenuBtn:hover { background: var(--surface); border-color: var(--primary) !important; color: var(--primary); }

/* ====== SEARCH BAR ====== */
.search-wrapper { position: relative; }
.search-wrapper .input-group {
    border-color: var(--line-strong) !important;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.search-wrapper .input-group:focus-within {
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 3px rgba(182,34,92,0.10);
}
.search-wrapper .form-control:focus { box-shadow: none; }
.search-wrapper .btn.bg-primary { background: var(--primary) !important; }
.search-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    box-shadow: var(--shadow-lg);
    z-index: 1100;
    display: none;
    max-height: 450px;
    overflow-y: auto;
}
.search-dropdown.show { display: block; }
.search-dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    cursor: pointer;
    transition: background 0.15s;
    text-decoration: none;
    color: inherit;
}
.search-dropdown-item:hover { background: var(--surface); }
.search-img { width: 44px; height: 44px; object-fit: cover; border-radius: var(--r-sm); flex-shrink: 0; }

/* ====== PRODUCT CARDS ====== */
.product-card {
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
    cursor: pointer;
    border: 1px solid var(--line) !important;
    box-shadow: var(--shadow-sm) !important;
    background: #fff;
}
.product-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-md) !important;
    border-color: var(--line-strong) !important;
}
.product-card:hover .product-img { transform: scale(1.06); }
.product-card:hover .quick-view-btn { opacity: 1 !important; transform: translateX(-50%) translateY(0) !important; }
.product-img { transition: transform 0.5s cubic-bezier(.22,1,.36,1); }
.product-img-wrap { overflow: hidden; background: var(--surface-2); }
.product-card .card-title { color: var(--ink); }
.product-card .text-primary.fw-700 { letter-spacing: -0.01em; }

/* ====== TRUST BADGE ====== */
.trust-badge {
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
    border: 1px solid var(--line) !important;
}
.trust-badge:hover { transform: translateY(-3px); box-shadow: var(--shadow-md) !important; border-color: var(--line-strong) !important; }

/* ====== CATEGORY CARD ====== */
.category-card {
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    border: 1px solid var(--line) !important;
}
.category-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-md) !important; }
.category-card .card-title { color: var(--ink); }

/* ====== CART SIDEBAR ====== */
.cart-sidebar {
    position: fixed;
    top: 0;
    right: -420px;
    width: 420px;
    height: 100vh;
    background: #fff;
    z-index: 1050;
    box-shadow: -16px 0 48px rgba(20,18,43,0.20);
    transition: right 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.cart-sidebar.open { right: 0; }
.cart-sidebar .border-bottom, .cart-sidebar .border-top { border-color: var(--line) !important; }
.cart-overlay {
    position: fixed;
    inset: 0;
    background: rgba(20,18,43,0.45);
    z-index: 1049;
    display: none;
    backdrop-filter: blur(2px);
}
.cart-overlay.show { display: block; }

/* ====== WISHLIST BTN ====== */
.wishlist-btn:hover { transform: scale(1.15); }
.wishlist-btn { transition: transform 0.2s; box-shadow: var(--shadow-sm) !important; }

/* ====== NOTIFICATIONS ====== */
.notification-item { border-bottom: 1px solid var(--line); transition: background 0.15s; }
.notification-item:hover { background: var(--surface); }
.notification-item.unread { background: rgba(182,34,92,0.05); }
.notification-dot { width: 8px; height: 8px; background: var(--primary); border-radius: 50%; flex-shrink: 0; }

/* ====== STAR RATINGS ====== */
.star-rating { color: var(--accent); font-size: 0.8rem; }

/* ====== STICKY ADD TO CART (Mobile) ====== */
.sticky-atc {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 900;
    background: #fff;
    border-top: 1px solid var(--line);
    padding: 12px 16px;
    display: none;
    box-shadow: 0 -8px 28px rgba(20,18,43,0.10);
}
@media (max-width: 768px) { .sticky-atc { display: flex; gap: 12px; } }

/* ====== TOAST NOTIFICATIONS ====== */
.toast-container-custom {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.toast-item {
    padding: 12px 16px;
    border-radius: var(--r-md);
    color: #fff;
    font-weight: 500;
    font-size: 13px;
    max-width: 300px;
    box-shadow: var(--shadow-lg);
    animation: slideInRight 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}
.toast-item.success { background: var(--success); }
.toast-item.error   { background: var(--danger); }
.toast-item.warning { background: var(--accent-dark); }
.toast-item.info    { background: #2f5fae; }
@keyframes slideInRight { from { transform: translateX(100px); opacity:0; } to { transform: translateX(0); opacity:1; } }
@keyframes slideOutRight { from { transform: translateX(0); opacity:1; } to { transform: translateX(120px); opacity:0; } }

/* ====== VIDEO FEED ====== */
.video-feed-grid { -webkit-overflow-scrolling: touch; scrollbar-width: thin; }
.video-feed-grid::-webkit-scrollbar { height: 4px; }
.video-feed-item .video-play-btn { transition: transform 0.2s; }
.video-feed-item:hover .video-play-btn { transform: translate(-50%,-50%) scale(1.1); }

/* ====== BREADCRUMB ====== */
.breadcrumb { background: none; padding: 0; margin-bottom: 1rem; }
.breadcrumb-item { font-size: 12.5px; }
.breadcrumb-item + .breadcrumb-item::before { content: '/'; font-size: 0.9rem; color: var(--line-strong); }
.breadcrumb-item.active { color: var(--ink); font-weight: 500; }

/* ====== FOOTER ====== */
.footer-main { background: linear-gradient(180deg, var(--dark), #0f0d24); color: rgba(255,255,255,0.72); }
.footer-main a { color: rgba(255,255,255,0.62); transition: color 0.2s; }
.footer-main a:hover { color: var(--accent); }
.footer-main h6 { color: #fff; }
.footer-main .border-secondary { border-color: rgba(255,255,255,0.12) !important; }
.footer-main .btn-outline-light { border-color: rgba(255,255,255,0.25); }
.footer-main .btn-outline-light:hover { background: var(--accent); border-color: var(--accent); color: var(--dark); }
.footer-main .badge.bg-white.bg-opacity-10 { border: 1px solid rgba(255,255,255,0.12); }

/* ====== CHAT WIDGET ====== */
.chat-bubble {
    position: fixed;
    bottom: 90px;
    right: 24px;
    z-index: 999;
    box-shadow: var(--shadow-lg) !important;
}
@media (max-width: 768px) { .chat-bubble { bottom: 80px; right: 16px; } }

/* ====== TRANSITIONS ====== */
.transition { transition: all 0.25s ease; }
.hover-shadow:hover { box-shadow: var(--shadow-md) !important; }

/* ====== UGC ITEM ====== */
.ugc-item { cursor: pointer; overflow: hidden; border-radius: var(--r-md); }
.ugc-item img { transition: transform 0.5s ease; }
.ugc-item:hover img { transform: scale(1.07); }
.ugc-overlay { transition: opacity 0.3s; }

/* ====== COLOR SWATCHES ====== */
.color-swatch { border: 2px solid var(--line-strong) !important; }
.color-swatch.selected { border-color: var(--primary) !important; box-shadow: 0 0 0 3px rgba(182,34,92,0.22) !important; }

/* ====== VIP BADGE ====== */
.vip-badge-none   { background: rgba(100,100,100,0.1); }
.vip-badge-bronze { background: linear-gradient(135deg, #cd7f32, #e8a87c); }
.vip-badge-silver { background: linear-gradient(135deg, #a8a8a8, #d4d4d4); }
.vip-badge-gold   { background: linear-gradient(135deg, var(--accent), #e3b96a); }

/* ====== PWA / APP BANNER ====== */
.pwa-install-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 998;
    padding: 12px 16px;
    background: #fff;
    border-top: 2px solid var(--accent);
    box-shadow: 0 -8px 28px rgba(20,18,43,0.12);
    display: none;
    align-items: center;
    gap: 12px;
}
.pwa-install-banner.show { display: flex; }

/* ====== SIZE GUIDE TABLE ====== */
.size-table th { background: var(--dark); color: #fff; font-weight: 600; }
.size-table td { vertical-align: middle; }

/* ====== SCROLLBAR ====== */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(20,18,43,0.22); border-radius: 10px; }

/* ====== AUTH PAGE ====== */
.auth-page { background: linear-gradient(135deg, #fdf6f0, #fbeef2); }
.auth-page .card { border: 1px solid var(--line) !important; box-shadow: var(--shadow-lg) !important; }

/* ====== SPIN WHEEL ====== */
#spinCanvas { display: block; margin: 0 auto; }

/* ====== PRODUCT GALLERY ZOOM ====== */
.main-image { cursor: zoom-in; }
.main-image.zoomed { cursor: zoom-out; }

/* ====== LOADING SKELETON ====== */
.skeleton {
    background: linear-gradient(90deg, var(--surface-2) 25%, #e8e1d4 50%, var(--surface-2) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: var(--r-sm);
}
@keyframes shimmer { 0% { background-position: -200% 0; } 100% { background-position: 200% 0; } }

/* ====== BOTTOM NAV (Mobile) ====== */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: #fff;
    border-top: 1px solid var(--line);
    display: none;
    padding: 0;
    box-shadow: 0 -8px 28px rgba(20,18,43,0.10);
}
@media (max-width: 992px) { .bottom-nav { display: flex; } body { padding-bottom: 60px; } }
.bottom-nav a {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 8px 4px;
    font-size: 10px;
    color: #7d7892;
    text-decoration: none;
    transition: color 0.2s;
}
.bottom-nav a.active, .bottom-nav a:hover { color: var(--primary); }
.bottom-nav i { font-size: 20px; display: block; margin-bottom: 2px; }

/* ====== RESPONSIVE ====== */
@media (max-width: 768px) {
    .hero-section { margin-left: -12px; margin-right: -12px; }
    .product-card .card-body { padding: 10px; }
    .cart-sidebar { width: 100vw; right: -100vw; }
}

/* ====== BUTTON OVERRIDES ====== */
.btn { font-weight: 500; letter-spacing: 0.1px; }
.btn-primary { background: var(--primary); border-color: var(--primary); }
.btn-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); }
.btn-primary:focus, .btn-primary:active { background: var(--primary-dark) !important; border-color: var(--primary-dark) !important; box-shadow: 0 0 0 3px rgba(182,34,92,0.25) !important; }
.btn-outline-primary { color: var(--primary); border-color: var(--primary); }
.btn-outline-primary:hover { background: var(--primary); border-color: var(--primary); }
.btn-warning {
    background: var(--accent) !important;
    border-color: var(--accent) !important;
    color: #1d1407 !important;
}
.btn-warning:hover { background: var(--accent-dark) !important; border-color: var(--accent-dark) !important; }
.btn-dark { background: var(--dark) !important; border-color: var(--dark) !important; }
.btn-dark:hover { background: var(--dark-2) !important; border-color: var(--dark-2) !important; }
.text-primary { color: var(--primary) !important; }
.bg-primary { background: var(--primary) !important; }
.text-warning { color: var(--accent) !important; }
.bg-warning { background: var(--accent) !important; }
.btn-lg, .btn { border-radius: var(--r-md); }
.rounded-pill.btn-lg, .btn-lg.rounded-pill { border-radius: 50px; }

/* Card radius/shadow harmonization across the whole site */
.card.shadow-sm { box-shadow: var(--shadow-sm) !important; }
.card.rounded-4 { border-radius: var(--r-lg) !important; }
.card.rounded-3 { border-radius: var(--r-md) !important; }

/* Form controls */
.form-control, .form-select {
    border-color: var(--line-strong);
    border-radius: var(--r-sm);
}
.form-control:focus, .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(182,34,92,0.10);
}
.form-control-lg, .form-select-lg { border-radius: var(--r-md); }

/* Badges */
.badge { font-weight: 600; letter-spacing: 0.2px; }
.badge.bg-danger { background: var(--danger) !important; }
.badge.bg-success { background: var(--success) !important; }

/* Prose (product description) */
.prose p { margin-bottom: 0.75rem; line-height: 1.7; }
.prose ul, .prose ol { padding-left: 1.5rem; margin-bottom: 0.75rem; }
.prose li { margin-bottom: 0.25rem; }
.prose h3, .prose h4 { margin-top: 1.25rem; }

/* Quick view */
.quick-view-btn { opacity: 0; background: var(--dark) !important; }
.product-card:hover .quick-view-btn { opacity: 1; }

/* Letter spacing */
.letter-spacing-3 { letter-spacing: 3px; }
.letter-spacing-2 { letter-spacing: 2px; }

/* Badge fix */
.badge.bg-white { --bs-badge-color: inherit; }

/* Inset utility */
.inset-0 { inset: 0; }

/* ====== HERO SECTION POLISH ====== */
.hero-section .carousel-caption { background: linear-gradient(180deg, transparent, rgba(20,18,43,0.55)); border-radius: 0 0 var(--r-lg) var(--r-lg); }
.hero-section .carousel-control-prev, .hero-section .carousel-control-next { width: 6%; opacity: 0; transition: opacity 0.2s; }
.hero-section:hover .carousel-control-prev, .hero-section:hover .carousel-control-next { opacity: 0.8; }
.hero-section .carousel-indicators [data-bs-target] { background-color: var(--accent); }

/* ====== SECTION HEADER PATTERN ====== */
section > .d-flex.justify-content-between h2 { display: flex; align-items: center; gap: 10px; }

/* ====== GOLD DIVIDER UTILITY (signature touch) ====== */
.gold-rule {
    height: 3px;
    width: 56px;
    background: linear-gradient(90deg, var(--accent), var(--primary));
    border-radius: 3px;
}


/* ============================================================
   WHOLESALER PORTAL — COMPLETE STYLES
   All classes used in wholesaler/ folder
   ============================================================ */

/* ── Auth pages (login, register, forgot-password) ── */
.auth-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #fdf6f0, #fbeef2);
  padding: 24px 16px;
}
.auth-card {
  background: #fff;
  border-radius: var(--r-lg, 14px);
  box-shadow: 0 4px 32px rgba(182,34,92,0.10);
  padding: 40px 36px;
  width: 100%;
  max-width: 420px;
}
.auth-logo {
  text-align: center;
  margin-bottom: 20px;
}
.auth-logo h2 {
  color: var(--primary, #b6225c);
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0 0 4px;
}
.auth-logo p {
  color: #888;
  font-size: 13px;
  margin: 0;
}
.auth-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 20px;
  color: var(--text, #1a1a2e);
}

/* ── Layout shell ── */
.wrapper {
  display: flex;
  min-height: 100vh;
  background: #f5f5f8;
}
.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.page-content {
  flex: 1;
  padding: 24px;
  overflow-y: auto;
}

/* ── Sidebar ── */
.sidebar {
  width: 240px;
  min-height: 100vh;
  background: #1a1830;
  color: #fff;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}
.sidebar-brand {
  padding: 20px 18px 16px;
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.3px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.sidebar-brand i { color: var(--primary, #b6225c); margin-right: 6px; }

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.sidebar-user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--primary, #b6225c);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 15px;
  flex-shrink: 0;
}
.sidebar-user-name {
  font-weight: 600;
  font-size: 13px;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 140px;
}
.sidebar-user-role {
  font-size: 11px;
  color: rgba(255,255,255,0.5);
}

.sidebar-nav {
  flex: 1;
  padding: 10px 0;
  display: flex;
  flex-direction: column;
}
.sidebar-section {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: rgba(255,255,255,0.35);
  padding: 14px 18px 4px;
}
.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 18px;
  color: rgba(255,255,255,0.72);
  text-decoration: none;
  font-size: 13.5px;
  transition: background 0.15s, color 0.15s;
  border-left: 3px solid transparent;
}
.sidebar-nav a:hover,
.sidebar-nav a.active {
  background: rgba(255,255,255,0.07);
  color: #fff;
  border-left-color: var(--primary, #b6225c);
}
.sidebar-nav a i { width: 16px; text-align: center; }

/* ── Topbar ── */
.topbar {
  height: 56px;
  background: #fff;
  border-bottom: 1px solid #eee;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 50;
}
.topbar-title {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text, #1a1a2e);
}
.topbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
}
.topbar-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #555;
  text-decoration: none;
  background: #f5f5f8;
  position: relative;
  transition: background 0.15s;
}
.topbar-icon:hover { background: #eee; color: var(--primary, #b6225c); }

/* ── Notification dot ── */
.notif-dot {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--danger, #dc3545);
  border: 2px solid #fff;
}

/* ── Badge count (sidebar) ── */
.badge-count {
  background: var(--primary, #b6225c);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  border-radius: 12px;
  padding: 1px 6px;
  margin-left: auto;
  min-width: 18px;
  text-align: center;
  line-height: 16px;
}

/* ── Stats grid ── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}
.stat-card {
  background: #fff;
  border-radius: var(--r-lg, 14px);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}
.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}
.stat-icon.pink   { background: #fce4ec; color: #c2185b; }
.stat-icon.blue   { background: #e3f2fd; color: #1565c0; }
.stat-icon.green  { background: #e8f5e9; color: #2e7d32; }
.stat-icon.orange { background: #fff3e0; color: #e65100; }
.stat-icon.purple { background: #f3e5f5; color: #6a1b9a; }

.stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text, #1a1a2e);
  line-height: 1;
}
.stat-label {
  font-size: 12px;
  color: #888;
  margin-top: 4px;
}

/* ── Filter row ── */
.filter-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

/* ── Form rows ── */
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.form-row-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 16px;
}
@media (max-width: 640px) {
  .form-row, .form-row-3 { grid-template-columns: 1fr; }
}
.form-group {
  margin-bottom: 16px;
}
.form-hint {
  font-size: 12px;
  color: #888;
  margin-top: 4px;
}

/* ── Empty state ── */
.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: #aaa;
}
.empty-state i {
  font-size: 2.5rem;
  margin-bottom: 12px;
  display: block;
}
.empty-state p {
  font-size: 14px;
  margin: 0;
}

/* ── Buttons ── */
.btn-block { display: block; width: 100%; }
.btn-outline {
  background: transparent;
  border: 1px solid var(--primary, #b6225c);
  color: var(--primary, #b6225c);
  padding: 6px 14px;
  border-radius: var(--r-md, 8px);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background 0.15s, color 0.15s;
}
.btn-outline:hover {
  background: var(--primary, #b6225c);
  color: #fff;
}

/* ── MOQ badge ── */
.moq-badge {
  display: inline-block;
  background: #f3e5f5;
  color: #6a1b9a;
  font-size: 11px;
  font-weight: 600;
  border-radius: 6px;
  padding: 2px 8px;
}

/* ── Invoice styles ── */
.invoice-wrap {
  max-width: 800px;
  margin: 0 auto;
  background: #fff;
  padding: 40px;
  border-radius: var(--r-lg, 14px);
  box-shadow: 0 2px 16px rgba(0,0,0,0.07);
}
.inv-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 2px solid var(--primary, #b6225c);
}
.inv-brand { font-size: 1.4rem; font-weight: 800; color: var(--primary, #b6225c); }
.inv-title { font-size: 1.1rem; font-weight: 700; color: #333; }
.inv-meta  { font-size: 12px; color: #666; margin-top: 4px; }
.inv-party {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 24px;
}
.inv-details { margin-bottom: 24px; }
.inv-detail-item {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  border-bottom: 1px solid #f0f0f0;
  font-size: 14px;
}
.inv-footer {
  margin-top: 28px;
  padding-top: 16px;
  border-top: 1px solid #eee;
  font-size: 12px;
  color: #999;
  text-align: center;
}
.total-row {
  font-weight: 700;
  font-size: 15px;
  background: #fdf6f0;
}

/* ── Search bar in wholesaler pages ── */
.search-bar {
  display: flex;
  gap: 8px;
  align-items: center;
}

/* ── Responsive sidebar on small screens ── */
@media (max-width: 768px) {
  .sidebar { display: none; }
  .page-content { padding: 16px; }
}


/* ============================================================
   WHOLESALER PORTAL — BOOTSTRAP COMPATIBILITY & TABLE FIXES
   ============================================================ */

/* -- Bare <table> inside wholesaler pages get Bootstrap-like styling -- */
.admin-main table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
  background: #fff;
}
.admin-main table thead th {
  background: #f8f9fa;
  font-weight: 600;
  color: #555;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 10px 12px;
  border-bottom: 2px solid #e9ecef;
  white-space: nowrap;
}
.admin-main table tbody tr {
  border-bottom: 1px solid #f0f0f0;
  transition: background 0.12s;
}
.admin-main table tbody tr:hover { background: #fafafa; }
.admin-main table tbody td {
  padding: 10px 12px;
  vertical-align: middle;
  color: #444;
}
.admin-main table tbody tr:last-child { border-bottom: none; }

/* -- card-header flex layout fix -- */
.admin-main .card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  background: #fff;
  border-bottom: 1px solid #eee;
  border-radius: var(--r-lg, 14px) var(--r-lg, 14px) 0 0;
  gap: 12px;
}
.admin-main .card-header h3,
.admin-main .card-header h4 {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}
.admin-main .card {
  border-radius: var(--r-lg, 14px) !important;
  border: 1px solid #eee !important;
  box-shadow: 0 2px 12px rgba(0,0,0,0.05) !important;
  overflow: hidden;
  background: #fff;
  margin-bottom: 20px;
}
.admin-main .card-body { padding: 16px 18px; }

/* -- Alert styles (override Bootstrap slightly for wholesaler) -- */
.admin-main .alert {
  border-radius: var(--r-sm, 8px);
  padding: 12px 16px;
  margin-bottom: 16px;
  font-size: 13.5px;
  border: none;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.admin-main .alert i { margin-top: 1px; flex-shrink: 0; }

/* -- badge-* shorthand used as .badge.badge-success etc -- */
.badge-success  { background: #1F8A57 !important; color: #fff !important; }
.badge-danger   { background: #C23B3B !important; color: #fff !important; }
.badge-warning  { background: #C8923A !important; color: #fff !important; }
.badge-info     { background: #2f5fae !important; color: #fff !important; }
.badge-secondary{ background: #6c757d !important; color: #fff !important; }
.badge-primary  { background: var(--primary) !important; color: #fff !important; }
.badge { border-radius: 6px; padding: 3px 8px; font-size: 11px; font-weight: 600; }

/* -- btn-group fix -- */
.admin-main .btn-group { display: inline-flex; gap: 4px; }

/* -- btn-sm size -- */
.admin-main .btn-sm { padding: 4px 10px; font-size: 12px; }

/* -- btn-secondary / btn-danger / btn-warning colors -- */
.admin-main .btn-secondary { background:#6c757d; border-color:#6c757d; color:#fff; }
.admin-main .btn-secondary:hover { background:#5a6268; border-color:#5a6268; color:#fff; }
.admin-main .btn-danger { background: var(--danger,#C23B3B); border-color:var(--danger,#C23B3B); color:#fff; }
.admin-main .btn-danger:hover { background:#a32f2f; border-color:#a32f2f; color:#fff; }
.admin-main .btn-warning { background: var(--accent,#C8923A) !important; border-color:var(--accent,#C8923A) !important; color:#1d1407 !important; }
.admin-main .btn-success { background: var(--success,#1F8A57); border-color:var(--success,#1F8A57); color:#fff; }
.admin-main .btn-success:hover { background:#186e45; border-color:#186e45; color:#fff; }
.admin-main .btn { border-radius: var(--r-sm,8px); font-size: 13.5px; font-weight: 500; }

/* -- table-responsive wrapper -- */
.admin-main .table-responsive { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* -- form-control inside wholesaler (make sure it looks right under Bootstrap) -- */
.admin-main .form-control,
.admin-main .form-select {
  border: 1px solid #d0d5dd;
  border-radius: var(--r-sm, 8px);
  padding: 8px 12px;
  font-size: 13.5px;
  color: #333;
  background: #fff;
  width: 100%;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.admin-main .form-control:focus,
.admin-main .form-select:focus {
  outline: none;
  border-color: var(--primary, #b6225c);
  box-shadow: 0 0 0 3px rgba(182,34,92,0.10);
}
.admin-main label {
  font-size: 13px;
  font-weight: 600;
  color: #444;
  margin-bottom: 5px;
  display: block;
}

/* -- Body padding-bottom override: admin panel has no bottom-nav -- */
.wrapper ~ *:not(.ub-popup):not(.ub-modal-overlay) { display: none; }
body:has(.wrapper) { padding-bottom: 0 !important; }
body:has(.admin-main) { padding-bottom: 0 !important; }

/* -- bottom-nav hidden inside admin/wholesaler panels -- */
.wrapper + .bottom-nav,
body:has(.wrapper) .bottom-nav { display: none !important; }
body:has(.admin-main) .bottom-nav { display: none !important; }
body:has(.admin-navbar) .bottom-nav { display: none !important; }

/* -- Auth page body: no padding-bottom either -- */
.auth-wrapper ~ .bottom-nav { display: none !important; }
body:has(.auth-wrapper) { padding-bottom: 0 !important; }

/* -- Print: hide sidebar/topbar -- */
@media print {
  .sidebar, .topbar, .admin-navbar, .admin-sidebar, .filter-row, .no-print { display: none !important; }
  .wrapper { display: block; }
  .admin-main { margin-left: 0 !important; margin-top: 0 !important; }
  .main-content { width: 100%; }
  .page-content { padding: 0; }
}

/* ── Product card (buyer shop listing, homepage, product page) ──
   Brought in line with the site's actual brand system (burgundy/gold/cream,
   Playfair Display for names) instead of generic Flipkart blue/orange —
   dimensions, aspect ratios and grid breakpoints are unchanged so mobile
   layout is identical, only the visual language changed. */
.fk-product-card{background:#fff;border-radius:var(--r-md,14px);overflow:hidden;transition:box-shadow .2s,transform .2s,border-color .2s;border:1px solid var(--line,rgba(20,18,43,.08))}
.fk-product-card:hover{box-shadow:0 12px 28px rgba(20,18,43,.13);transform:translateY(-3px);border-color:rgba(182,34,92,.18)}
.fk-card-media{position:relative;background:linear-gradient(135deg,var(--surface,#FAF7F2),var(--surface-2,#F3EEE6));padding:.75rem}
.fk-card-img{width:100%;aspect-ratio:1/1;object-fit:contain;display:block}
.fk-wishlist-btn{position:absolute;top:10px;right:10px;z-index:2;width:30px;height:30px;border-radius:50%;border:none;background:rgba(255,255,255,.92);box-shadow:0 1px 4px rgba(20,18,43,.15);display:flex;align-items:center;justify-content:center;color:var(--ink,#2A2640);font-size:15px}
.fk-ad-tag{position:absolute;top:10px;left:10px;z-index:2;background:rgba(20,18,43,.85);color:#fff;font-size:10.5px;font-weight:600;padding:2px 8px;border-radius:3px}
.fk-card-body{padding:.7rem .8rem 0;display:flex;flex-direction:column;gap:.25rem}
.fk-rating-chip{display:inline-flex;align-items:center;gap:3px;background:var(--success,#1F8A57);color:#fff;font-size:11px;font-weight:700;padding:1px 6px;border-radius:4px;width:fit-content}
.fk-rating-chip i{font-size:9px}
.fk-rating-count{color:#e8f5e9;font-weight:500;margin-left:2px}
.fk-brand{font-size:11px;color:var(--accent-dark,#a8772d);font-weight:700;text-transform:uppercase;letter-spacing:.4px}
.fk-name{font-family:'Playfair Display',Georgia,serif;font-size:13.5px;color:var(--ink,#2A2640);line-height:1.35;min-height:2.2em;font-weight:600}
.fk-price-row{display:flex;align-items:center;gap:.4rem;flex-wrap:wrap;margin-top:.15rem}
.fk-price{font-size:16px;font-weight:800;color:var(--dark,#14122B)}
.fk-mrp{font-size:12.5px;color:#9a9490;text-decoration:line-through}
.fk-discount{font-size:12.5px;color:var(--success,#1F8A57);font-weight:700;display:flex;align-items:center}
.fk-discount i{font-size:11px}
.fk-tag{display:inline-block;font-size:11px;font-weight:700;padding:2px 8px;border-radius:4px;margin-top:.3rem;width:fit-content}
.fk-tag-lowest{background:#e9f9ee;color:#1a9c4b}
.fk-tag-new{background:rgba(200,146,58,.14);color:var(--accent-dark,#a8772d)}
.fk-tag-few{background:#fdeaea;color:var(--danger,#C23B3B)}
.fk-tag-out{background:#f0f0f0;color:#878787}
.fk-card-footer{padding:.6rem .8rem .8rem}
.fk-add-btn{background:var(--dark,#14122B);border:none;color:#fff;font-weight:700;transition:background .18s}
.fk-add-btn:hover{background:var(--primary,#B6225C);color:#fff}
.fk-add-btn:disabled{background:#e5e2dc;color:#9a9490}

/* Category-wise product rails (Flipkart-style horizontal scroll) */
.category-rail { -webkit-overflow-scrolling: touch; scrollbar-width: thin; }
.category-rail::-webkit-scrollbar { height: 4px; }
.category-rail .col { width: 170px; padding: 0; }
.category-rail-more {
    width: 48px; height: 48px;
    background: #fff;
    border: 1px solid #e0e0e0;
    color: #B6225C;
    font-size: 1.2rem;
    box-shadow: 0 1px 4px rgba(0,0,0,.08);
    transition: background .15s, transform .15s;
}
.category-rail-more:hover { background: #B6225C; color: #fff; transform: translateX(2px); }

/* ══════════════════════════════════════════════════════════
   Home v2 — mobile-app style homepage (hero / categories / grid)
   Brand colors: navy #14122B (dark), gold #C8923A (accent)
   ══════════════════════════════════════════════════════════ */

/* Hero */
.home2-hero { width: 100%; }
.home2-hero .carousel-inner { border-radius: 0; }
.home2-hero-media { position: relative; width: 100%; height: 340px; background: #14122B; overflow: hidden; }
.home2-hero-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.home2-hero-overlay {
    position: absolute; inset: 0;
    background: linear-gradient(to top, rgba(20,18,43,0.92) 0%, rgba(20,18,43,0.45) 55%, transparent 100%);
}
.home2-hero-content { position: absolute; bottom: 0; left: 0; width: 100%; padding: 24px 20px; color: #fff; }
.home2-hero-title { font-size: 1.8rem; font-weight: 800; line-height: 1.15; margin-bottom: 8px; }
.home2-hero-subtitle { font-size: 14px; color: #e9e6f5; font-weight: 500; margin-bottom: 16px; max-width: 480px; }
.home2-btn-primary {
    background: #C8923A; color: #1d1407; font-size: 14px; font-weight: 700;
    padding: 10px 24px; border: none; border-radius: 8px; text-decoration: none; display: inline-block;
    transition: background .15s, transform .15s;
}
.home2-btn-primary:hover { background: #dba24a; color: #1d1407; transform: translateY(-1px); }
.home2-btn-secondary {
    background: rgba(255,255,255,0.12); color: #fff; font-size: 14px; font-weight: 600;
    padding: 10px 24px; border: 1px solid rgba(255,255,255,0.45); border-radius: 8px;
    backdrop-filter: blur(4px); text-decoration: none; display: inline-block;
    transition: background .15s, transform .15s;
}
.home2-btn-secondary:hover { background: rgba(255,255,255,0.22); color: #fff; transform: translateY(-1px); }
.home2-hero .carousel-control-prev, .home2-hero .carousel-control-next { width: 6%; opacity: 0; transition: opacity .2s; }
.home2-hero:hover .carousel-control-prev, .home2-hero:hover .carousel-control-next { opacity: 0.9; }

/* Section title / view all */
.home2-section-title { font-size: 18px; font-weight: 700; margin-bottom: 14px; color: #14122B; }
.home2-view-all { font-size: 13px; color: #B6225C; font-weight: 600; text-decoration: none; }
.home2-view-all:hover { text-decoration: underline; }

/* Categories horizontal scroll */
.home2-cat-scroll {
    display: flex; gap: 14px; overflow-x: auto; padding: 2px 2px 8px 2px;
    -ms-overflow-style: none; scrollbar-width: none;
}
.home2-cat-scroll::-webkit-scrollbar { display: none; }
.home2-cat-item { display: flex; flex-direction: column; align-items: center; min-width: 58px; flex-shrink: 0; }
.home2-cat-icon {
    width: 52px; height: 52px; background: #FAF7F2; border-radius: 50%;
    display: flex; align-items: center; justify-content: center; font-size: 20px;
    border: 1px solid #F0E4D0; box-shadow: 0 1px 3px rgba(0,0,0,.06);
    color: #C8923A; transition: transform .15s, box-shadow .15s;
}
.home2-cat-item:hover .home2-cat-icon { transform: translateY(-2px); box-shadow: 0 4px 10px rgba(0,0,0,.12); }
.home2-cat-icon img { width: 26px; height: 26px; object-fit: contain; }
.home2-cat-name {
    font-size: 10.5px; font-weight: 600; color: #4b5563; margin-top: 6px;
    text-align: center; line-height: 1.2; max-width: 64px;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* Product grid (2-column mobile → wider desktop grid) — reuses fk-product-card markup */
.home2-product-grid {
    display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px;
}
.home2-product-grid .fk-product-card { border: 1px solid #f3f4f6; box-shadow: 0 1px 2px rgba(0,0,0,0.05); }
.home2-product-grid .fk-wishlist-btn { background: rgba(255,255,255,0.92); }

/* ══════════════════════════════════════════════════════════
   Desktop / tablet refinements — home v2
   ══════════════════════════════════════════════════════════ */
@media (min-width: 576px) {
    .home2-product-grid { grid-template-columns: repeat(3, 1fr); gap: 16px; }
}
@media (min-width: 768px) {
    .home2-hero-media { height: 420px; }
    .home2-hero-title { font-size: 2.4rem; }
    .home2-hero-subtitle { font-size: 15.5px; }
    .home2-hero-content { padding: 36px 44px; }
    .home2-section-title { font-size: 21px; }
    .home2-product-grid { grid-template-columns: repeat(4, 1fr); gap: 18px; }
    .home2-cat-scroll { gap: 24px; }
    .home2-cat-item { min-width: 84px; }
    .home2-cat-icon { width: 76px; height: 76px; font-size: 30px; border-width: 1px; }
    .home2-cat-icon img { width: 38px; height: 38px; }
    .home2-cat-name { font-size: 13px; max-width: 84px; }
    .category-rail .category-rail-item { width: 200px !important; }
    .category-rail-more { width: 56px; height: 56px; font-size: 1.4rem; }
}
@media (min-width: 992px) {
    .home2-hero-media { height: 480px; }
    .home2-hero-title { font-size: 2.9rem; }
    .home2-hero-content { padding: 48px 64px; max-width: 900px; }
    .home2-hero-subtitle { font-size: 17px; max-width: 560px; }
    .home2-btn-primary, .home2-btn-secondary { font-size: 15px; padding: 12px 30px; }
    .home2-product-grid { grid-template-columns: repeat(5, 1fr); gap: 20px; }
    .home2-cat-icon { width: 88px; height: 88px; font-size: 34px; }
    .home2-cat-icon img { width: 44px; height: 44px; }
    .home2-cat-name { font-size: 14px; }
}
@media (min-width: 1200px) {
    .home2-hero-media { height: 520px; }
    .home2-product-grid { grid-template-columns: repeat(6, 1fr); }
}
