:root {
    --primary: #10B981;
    --primary-dark: #059669;
    --primary-light: #34D399;
    --primary-gradient: linear-gradient(135deg, #10B981 0%, #34D399 50%, #6EE7B7 100%);
    --secondary: #2563EB;
    --accent: #F59E0B;
    --success: #10B981;
    --warning: #F59E0B;
    --info: #2563EB;
    --dark: #1F2937;
    --bg: #f8f9fc;
    --bg-card: #ffffff;
    --text: #1F2937;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    --border: #e2e8f0;
    --shadow: 0 1px 3px rgba(0,0,0,.06);
    --shadow-md: 0 4px 12px rgba(0,0,0,.08);
    --shadow-lg: 0 8px 24px rgba(0,0,0,.1);
    --radius: 12px;
    --radius-sm: 8px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --transition: all .25s cubic-bezier(.4,0,.2,1);
}

* { margin: 0; padding: 0; box-sizing: border-box; word-break: break-word; overflow-wrap: break-word; }
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg);
    color: var(--text);
    padding-bottom: 0;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; color: inherit; }

/* ===== HEADER ===== */
.market-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(255,255,255,.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
}
.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.header-logo-img {
    height: 32px;
    width: auto;
    display: block;
}

.header-actions { display: flex; align-items: center; gap: 4px; }
.header-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: var(--text);
    cursor: pointer;
    transition: var(--transition);
    position: relative;
}
.header-icon:hover { background: var(--border); }
.badge-dot {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent);
    border: 2px solid white;
}
.badge-number {
    position: absolute;
    top: 2px;
    right: 2px;
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    background: var(--accent);
    color: white;
    font-size: .65rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    border: 2px solid white;
}

/* ===== SEARCH OVERLAY ===== */
.search-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg);
    z-index: 2000;
    display: none;
    flex-direction: column;
}
.search-overlay.show { display: flex; }
.search-overlay-header { padding: 12px 16px; background: white; border-bottom: 1px solid var(--border); }
.search-form { display: flex; align-items: center; gap: 8px; }
.search-submit {
    width: 40px; height: 40px; border-radius: 50%;
    border: none; background: var(--primary);
    color: white; display: flex; align-items: center; justify-content: center;
    cursor: pointer; flex-shrink: 0;
}
.search-input {
    flex: 1; height: 44px; border: none; outline: none;
    font-size: .95rem; background: transparent; color: var(--text);
}
.search-input::placeholder { color: var(--text-muted); }
.search-close {
    width: 40px; height: 40px; border-radius: 50%;
    border: none; background: var(--border); color: var(--text);
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; flex-shrink: 0;
}

/* ===== MOBILE MENU ===== */
.mobile-menu-overlay {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,.4); z-index: 2000; display: none;
}
.mobile-menu-overlay.show { display: block; }
.mobile-menu {
    position: fixed; top: 0; right: 0; bottom: 0; width: 280px;
    background: white; z-index: 2001; transform: translateX(100%);
    transition: transform .3s ease; display: flex; flex-direction: column;
}
#mobileMenu.show ~ .mobile-menu { transform: translateX(0); }
.mobile-menu-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 16px; border-bottom: 1px solid var(--border);
}
.mobile-menu-user {
    display: flex; align-items: center; gap: 10px;
    padding: 16px; border-bottom: 1px solid var(--border);
}
.mobile-menu-links { flex: 1; overflow-y: auto; padding: 8px 0; }
.mobile-menu-link {
    display: flex; align-items: center; gap: 12px;
    padding: 14px 16px; font-size: .9rem; color: var(--text);
    transition: var(--transition);
}
.mobile-menu-link:hover { background: var(--bg); }
.mobile-menu-link i { font-size: 1.1rem; width: 24px; text-align: center; color: var(--text-secondary); }
.menu-divider { height: 1px; background: var(--border); margin: 8px 16px; }

/* ===== HERO ===== */
.market-hero {
    position: relative;
    background: linear-gradient(135deg, #10B981 0%, #059669 40%, #34D399 70%, #6EE7B7 100%);
    padding: 32px 16px 40px;
    overflow: hidden;
}
.hero-gradient {
    position: absolute; inset: 0; overflow: hidden;
    pointer-events: none;
}
.hero-shape {
    position: absolute; border-radius: 50%;
    background: rgba(255,255,255,.06);
}
.hero-shape-1 { width: 300px; height: 300px; top: -100px; right: -80px; }
.hero-shape-2 { width: 200px; height: 200px; bottom: -60px; left: -40px; }
.hero-shape-3 { width: 150px; height: 150px; top: 50%; left: 60%; }
.hero-content { position: relative; z-index: 1; margin-bottom: 20px; }
.hero-badge {
    display: inline-block;
    background: rgba(255,255,255,.2);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: .75rem;
    font-weight: 600;
    backdrop-filter: blur(4px);
    margin-bottom: 12px;
}
.hero-title {
    font-size: 1.6rem;
    font-weight: 800;
    color: white;
    line-height: 1.2;
    margin-bottom: 8px;
}
.hero-desc {
    font-size: .9rem;
    color: rgba(255,255,255,.85);
    line-height: 1.5;
    max-width: 90%;
}
.hero-search-bar {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    background: white;
    border-radius: var(--radius-lg);
    padding: 4px 4px 4px 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,.15);
    max-width: 500px;
}
.hero-search-bar i {
    color: var(--text-muted);
    font-size: 1.1rem;
    flex-shrink: 0;
}
.hero-search-bar input {
    flex: 1;
    height: 44px;
    border: none;
    outline: none;
    padding: 0 12px;
    font-size: .9rem;
    background: transparent;
    color: var(--text);
}
.hero-search-bar input::placeholder { color: var(--text-muted); }
.hero-search-bar button {
    height: 40px;
    padding: 0 20px;
    border-radius: 30px;
    border: none;
    background: var(--primary-gradient);
    color: white;
    font-weight: 600;
    font-size: .85rem;
    cursor: pointer;
    flex-shrink: 0;
    transition: var(--transition);
}
.hero-search-bar button:hover { opacity: .9; transform: scale(1.02); }

/* ===== SECTIONS ===== */
.section-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 16px;
}
.section-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}
.section-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text);
}
.section-sub {
    font-size: .8rem;
    color: var(--text-muted);
    margin-top: 2px;
}
.see-all {
    font-size: .8rem;
    font-weight: 600;
    color: var(--primary);
    transition: var(--transition);
}
.see-all:hover { color: var(--primary-dark); }

/* ===== CATEGORIES ===== */
.categories-scroll {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 0 0 4px;
}
.categories-scroll::-webkit-scrollbar { display: none; }
.category-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
    width: 68px;
}
.cat-icon {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: white;
    box-shadow: var(--shadow);
    transition: var(--transition);
}
.category-item:hover .cat-icon { transform: scale(1.08); }
.cat-label {
    font-size: .7rem;
    font-weight: 500;
    color: var(--text-secondary);
    text-align: center;
    white-space: nowrap;
}

/* ===== BANNER ===== */
.banner-swiper { border-radius: var(--radius-lg); overflow: hidden; }
.banner-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 28px;
    min-height: 140px;
    border-radius: var(--radius-lg);
    color: white;
    position: relative;
}
.banner-text { flex: 1; z-index: 1; }
.banner-text h3 { font-size: 1.15rem; font-weight: 700; margin-bottom: 4px; }
.banner-text p { font-size: .8rem; opacity: .85; margin-bottom: 8px; }
.banner-cta { font-size: .8rem; font-weight: 700; opacity: .9; }
.banner-img { flex-shrink: 0; margin-left: 16px; z-index: 1; }
.banner-img img { width: 80px; height: 80px; border-radius: var(--radius); object-fit: cover; }
.banner-pagination { bottom: 8px !important; }
.banner-pagination .swiper-pagination-bullet {
    width: 6px; height: 6px;
    background: rgba(255,255,255,.5);
    opacity: 1;
}
.banner-pagination .swiper-pagination-bullet-active {
    background: white; width: 16px; border-radius: 3px;
}

/* ===== PRODUCT CARDS ===== */
.product-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}
.product-card {
    background: white;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}
.product-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.product-image {
    position: relative;
    aspect-ratio: 1;
    background: var(--bg);
    overflow: hidden;
}
.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .3s ease;
}
.product-card:hover .product-image img { transform: scale(1.04); }
.wl-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: rgba(255,255,255,.9);
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: .9rem;
    backdrop-filter: blur(4px);
    box-shadow: var(--shadow);
    transition: var(--transition);
    z-index: 2;
}
.wl-btn:hover { color: var(--accent); }
.wl-btn.active { color: var(--accent); background: rgba(255,107,107,.15); }
.wl-btn.active i { font-weight: 700; }
.discount-badge, .new-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: .65rem;
    font-weight: 700;
    color: white;
    z-index: 2;
}
.discount-badge { background: var(--accent); }
.new-badge { background: var(--success); }
.product-info { padding: 10px 12px 12px; }
.product-name {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: .85rem;
    font-weight: 600;
    color: var(--text);
    line-height: 1.3;
    margin-bottom: 4px;
}
.product-store {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: .72rem;
    color: var(--text-muted);
    margin-bottom: 6px;
}
.product-store i { font-size: .65rem; }
.product-store a:hover { color: var(--primary); }
.product-price {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 8px;
}
.product-price .current {
    font-size: .95rem;
    font-weight: 700;
    color: var(--primary);
}
.product-price .original {
    font-size: .75rem;
    color: var(--text-muted);
    text-decoration: line-through;
}
.product-actions {
    display: flex;
    gap: 6px;
}
.chat-btn {
    flex: 1;
    height: 32px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: white;
    font-size: .72rem;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    transition: var(--transition);
}
.chat-btn:hover { border-color: var(--primary); color: var(--primary); background: rgba(16,185,129,.05); }
.cart-btn {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: none;
    background: var(--primary);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .85rem;
    transition: var(--transition);
    flex-shrink: 0;
}
.cart-btn:hover { background: var(--primary-dark); transform: scale(1.05); }

/* ===== STORES ===== */
.stores-scroll {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 4px;
}
.stores-scroll::-webkit-scrollbar { display: none; }
.store-card {
    background: white;
    border-radius: var(--radius);
    padding: 16px;
    min-width: 200px;
    flex-shrink: 0;
    box-shadow: var(--shadow);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 8px;
}
.store-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.store-logo {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid var(--border);
}
.store-logo img { width: 100%; height: 100%; object-fit: cover; }
.store-name {
    font-size: .85rem;
    font-weight: 600;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 4px;
    justify-content: center;
}
.verified-icon { color: #3b82f6; font-size: .8rem; }
.store-meta {
    display: flex;
    gap: 12px;
    font-size: .7rem;
    color: var(--text-muted);
}
.store-meta i { margin-right: 2px; }
.follow-btn {
    padding: 5px 20px;
    border-radius: 20px;
    border: 1px solid var(--primary);
    background: transparent;
    color: var(--primary);
    font-size: .75rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}
.follow-btn:hover { background: var(--primary); color: white; }
.follow-btn.active { background: var(--primary); color: white; }

/* ===== SERVICES ===== */
.services-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}
.service-card {
    background: white;
    border-radius: var(--radius);
    padding: 16px;
    box-shadow: var(--shadow);
    transition: var(--transition);
}
.service-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.service-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: var(--primary-gradient);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    margin-bottom: 10px;
}
.service-name {
    font-size: .85rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 4px;
}
.service-price {
    font-size: .9rem;
    font-weight: 700;
    color: var(--primary);
}
.service-seller {
    font-size: .72rem;
    color: var(--text-muted);
    margin-top: 2px;
}

/* ===== SELLER CTA ===== */
.seller-cta {
    background: linear-gradient(135deg, #10B981 0%, #2563EB 40%, #34D399 100%);
    border-radius: var(--radius-xl);
    padding: 32px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    position: relative;
    overflow: hidden;
    color: white;
}
.cta-content { flex: 1; z-index: 1; }
.cta-content h2 { font-size: 1.3rem; font-weight: 800; margin-bottom: 8px; }
.cta-content p { font-size: .85rem; opacity: .9; line-height: 1.5; margin-bottom: 16px; }
.cta-btn {
    display: inline-block;
    padding: 10px 28px;
    border-radius: 30px;
    background: white;
    color: var(--primary);
    font-weight: 700;
    font-size: .85rem;
    transition: var(--transition);
}
.cta-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,.2); color: var(--primary-dark); }
.cta-illustration {
    position: relative;
    width: 100px;
    height: 100px;
    flex-shrink: 0;
}
.ill-circle {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: rgba(255,255,255,.1);
}
.ill-card {
    position: absolute;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: rgba(255,255,255,.95);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    box-shadow: 0 4px 12px rgba(0,0,0,.15);
}
.ill-card-1 { top: -5px; right: -5px; }
.ill-card-2 { bottom: 0; left: -10px; }
.ill-card-3 { bottom: -5px; right: 0; }

/* ===== FOOTER ===== */
.market-footer {
    background: var(--dark);
    color: rgba(255,255,255,.7);
    padding: 24px 16px 80px;
    margin-top: 16px;
}
.footer-logo {
    height: 28px;
    width: auto;
    display: block;
    margin-bottom: 4px;
    filter: brightness(0) invert(1);
}
.market-footer p { font-size: .8rem; line-height: 1.5; }
.footer-links { display: flex; flex-wrap: wrap; gap: 16px; margin: 12px 0; }
.footer-links a { font-size: .8rem; color: rgba(255,255,255,.6); }
.footer-links a:hover { color: white; }
.footer-copy { font-size: .75rem; color: rgba(255,255,255,.4); border-top: 1px solid rgba(255,255,255,.1); padding-top: 12px; }

/* ===== BOTTOM NAV ===== */
.mobile-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1050;
    background: rgba(255,255,255,.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid var(--border);
    padding: 6px 0 env(safe-area-inset-bottom, 6px);
    display: block !important;
}
.mobile-nav-container {
    display: flex;
    justify-content: space-around;
    align-items: flex-end;
    max-width: 600px;
    margin: 0 auto;
}
.mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: .6rem;
    font-weight: 500;
    padding: 4px 8px;
    border-radius: 8px;
    transition: var(--transition);
    position: relative;
    min-width: 48px;
}
.mobile-nav-item i {
    font-size: 1.3rem;
    transition: var(--transition);
}
.mobile-nav-item span { font-size: .6rem; }
.mobile-nav-item.active { color: var(--primary); }
.mobile-nav-item.active i { font-weight: 700; }
.mobile-nav-item:hover { color: var(--primary); }
.mobile-nav-item .badge {
    position: absolute;
    top: 0;
    right: 4px;
    min-width: 16px;
    height: 16px;
    border-radius: 8px;
    background: var(--accent);
    color: white;
    font-size: .55rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    border: 1.5px solid white;
}

/* Sell Button - larger, centered */
.mobile-nav-item.nav-sell {
    margin-top: -12px;
}
.mobile-nav-item.nav-sell i {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--primary-gradient);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    box-shadow: 0 4px 12px rgba(16,185,129,.35);
    margin-bottom: 2px;
}
.mobile-nav-item.nav-sell span { color: var(--primary); font-weight: 600; }

/* ===== RESPONSIVE ===== */
@media (min-width: 576px) {
    .product-grid { grid-template-columns: repeat(3, 1fr); }
    .services-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 768px) {
    .product-grid { grid-template-columns: repeat(4, 1fr); gap: 16px; }
    .services-grid { grid-template-columns: repeat(4, 1fr); gap: 16px; }
    .market-hero { padding: 48px 24px 56px; }
    .hero-title { font-size: 2rem; max-width: 500px; }
    .hero-desc { max-width: 450px; }
    .categories-scroll { gap: 16px; }
    .category-item { width: 80px; }
    .cat-icon { width: 64px; height: 64px; font-size: 1.4rem; }
    .cat-label { font-size: .78rem; }
    .stores-scroll { gap: 16px; }
    .store-card { min-width: 220px; }
    .section-container { padding: 20px 24px; }
    .section-title { font-size: 1.2rem; }
    .seller-cta { padding: 48px 40px; }
    .cta-content h2 { font-size: 1.6rem; }
    .banner-card { min-height: 170px; padding: 32px 36px; }
    .banner-text h3 { font-size: 1.3rem; }
    .banner-img img { width: 100px; height: 100px; }
    body { padding-bottom: 0; }
    .market-footer { padding-bottom: 24px; }
    .mobile-bottom-nav { display: none !important; }
}
@media (min-width: 992px) {
    .product-grid { grid-template-columns: repeat(5, 1fr); }
    .services-grid { grid-template-columns: repeat(4, 1fr); }
    .market-hero { padding: 56px 24px 64px; }
    .hero-title { font-size: 2.2rem; }
}
@media (min-width: 1200px) {
    .section-container { padding: 24px 32px; }
}

/* ===== DARK MODE OVERRIDES ===== */
[data-bs-theme="dark"] {
    --bg: #0f172a;
    --bg-card: #1e293b;
    --text: #e2e8f0;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --border: #334155;
}
[data-bs-theme="dark"] .market-header { background: rgba(15,23,42,.92); }
[data-bs-theme="dark"] .product-card,
[data-bs-theme="dark"] .store-card,
[data-bs-theme="dark"] .service-card { background: #1e293b; }
[data-bs-theme="dark"] .mobile-bottom-nav { background: rgba(30,41,59,.95); }
[data-bs-theme="dark"] .mobile-menu { background: #1e293b; }
[data-bs-theme="dark"] .header-icon:hover { background: var(--border); }
[data-bs-theme="dark"] .hero-search-bar { background: #1e293b; }
[data-bs-theme="dark"] .hero-search-bar input { color: #e2e8f0; }
[data-bs-theme="dark"] .hero-search-bar input::placeholder { color: #64748b; }
[data-bs-theme="dark"] .chat-btn { border-color: var(--border); color: var(--text-secondary); background: transparent; }
[data-bs-theme="dark"] .wl-btn { background: rgba(30,41,59,.9); }
[data-bs-theme="dark"] .badge-dot, 
[data-bs-theme="dark"] .badge-number { border-color: #1e293b; }

/* ===== LEGACY/DASHBOARD STYLES ===== */
.top-header { font-size: .8rem; }
.navbar { padding: .5rem 0; background: rgba(255,255,255,.95) !important; }
.main-content { min-height: 60vh; }

/* Dashboard Card - primary card for all non-homepage pages */
.dashboard-card {
    background: white;
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow);
    transition: var(--transition);
}
.dashboard-card:hover { box-shadow: var(--shadow-md); }

/* Sidebar (seller/buyer/admin dashboards) */
.sidebar {
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}
.sidebar .list-group-item {
    border: none;
    padding: 12px 16px;
    font-size: .88rem;
    color: var(--text);
    border-radius: 0 !important;
    transition: var(--transition);
}
.sidebar .list-group-item:hover {
    background: var(--bg);
    color: var(--primary);
}
.sidebar .list-group-item.active {
    background: rgba(16,185,129,.08);
    color: var(--primary);
    font-weight: 600;
    border-left: 3px solid var(--primary);
}
.sidebar .list-group-item i {
    width: 20px;
    margin-right: 8px;
    text-align: center;
}

/* Stat cards (number + label + icon) */
.dashboard-card .number {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text);
    line-height: 1.2;
}
.dashboard-card .label {
    font-size: .78rem;
    color: var(--text-muted);
    margin-top: 2px;
}
.dashboard-card .icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 32px 16px;
}
.empty-state i {
    font-size: 2.5rem;
    color: var(--text-muted);
    margin-bottom: 12px;
}
.empty-state h5 {
    font-weight: 600;
    color: var(--text);
}
.empty-state p {
    font-size: .85rem;
    color: var(--text-secondary);
}

/* Upload area (seller forms) */
.upload-area {
    border: 2px dashed var(--border);
    border-radius: var(--radius-sm);
    padding: 24px 16px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    color: var(--text-muted);
}
.upload-area:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: rgba(16,185,129,.04);
}
.upload-area i { font-size: 1.5rem; margin-bottom: 4px; }
.upload-area p { font-size: .8rem; margin: 0; }

/* Auth pages */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
    background: linear-gradient(135deg, #10B981, #34D399);
}
.auth-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 32px 28px;
    width: 100%;
    max-width: 420px;
    box-shadow: var(--shadow-lg);
}
.auth-header { text-align: center; margin-bottom: 24px; }
.auth-header h4 { font-weight: 700; color: var(--text); }
.auth-header p { font-size: .85rem; color: var(--text-muted); }
.auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-muted);
    font-size: .8rem;
    margin: 16px 0;
}
.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

/* Auth card animation */
@keyframes authSlideUp {
    from { opacity: 0; transform: translateY(24px) scale(.97); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}
.auth-card { animation: authSlideUp .45s cubic-bezier(.22,1,.36,1) both; }

/* Password toggle */
.password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
    font-size: 1rem;
    z-index: 5;
    line-height: 1;
}
.password-toggle:hover { color: var(--text); }

/* Password strength meter */
.password-strength { margin-top: 6px; }
.password-strength .bar {
    height: 4px;
    border-radius: 4px;
    background: var(--border);
    overflow: hidden;
    transition: var(--transition);
}
.password-strength .bar span {
    display: block;
    height: 100%;
    width: 0;
    border-radius: 4px;
    transition: width .3s ease, background .3s ease;
}
.password-strength .label {
    font-size: .72rem;
    margin-top: 3px;
    transition: color .3s ease;
}
.strength-empty .bar span { width: 0; background: var(--border); }
.strength-empty .label { color: var(--text-muted); }
.strength-weak .bar span { width: 25%; background: #ef4444; }
.strength-weak .label { color: #ef4444; }
.strength-medium .bar span { width: 50%; background: #f59e0b; }
.strength-medium .label { color: #f59e0b; }
.strength-strong .bar span { width: 75%; background: #10b981; }
.strength-strong .label { color: #10b981; }
.strength-very-strong .bar span { width: 100%; background: #059669; }
.strength-very-strong .label { color: #059669; }

/* Role toggle cards */
.role-card {
    flex: 1;
    cursor: pointer;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    padding: 16px 12px;
    text-align: center;
    transition: var(--transition);
    background: var(--bg-card);
    user-select: none;
}
.role-card:hover { border-color: var(--primary-light); background: rgba(16,185,129,.04); }
.role-card.active {
    border-color: var(--primary);
    background: rgba(16,185,129,.08);
    box-shadow: 0 0 0 3px rgba(16,185,129,.15);
}
.role-card .icon {
    font-size: 1.6rem;
    margin-bottom: 6px;
    color: var(--text-muted);
    transition: var(--transition);
}
.role-card.active .icon { color: var(--primary); }
.role-card .label {
    font-weight: 600;
    font-size: .82rem;
    color: var(--text);
}
.role-card .desc {
    font-size: .72rem;
    color: var(--text-muted);
    margin-top: 2px;
}

/* Auth flash messages */
.auth-flash {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    font-size: .84rem;
    margin-bottom: 16px;
    animation: fadeIn .3s ease;
}
.auth-flash i { font-size: 1.1rem; margin-top: 1px; flex-shrink: 0; }
.auth-flash-danger {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
}
.auth-flash-success {
    background: #f0fdf4;
    color: #16a34a;
    border: 1px solid #bbf7d0;
}

/* Auth submit button loading */
.btn-auth {
    position: relative;
    height: 44px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: .9rem;
    transition: var(--transition);
    overflow: hidden;
}
.btn-auth .btn-text { transition: opacity .2s; }
.btn-auth .btn-loader {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity .2s;
}
.btn-auth.loading .btn-text { opacity: 0; }
.btn-auth.loading .btn-loader { opacity: 1; }
.btn-auth:disabled { pointer-events: none; opacity: .7; }

/* Auth brand logo */
.auth-brand {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}
.auth-logo {
    height: 36px;
    width: auto;
    display: block;
}

/* Auth links */
.auth-link {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    font-size: .85rem;
    transition: var(--transition);
}
.auth-link:hover { color: var(--primary-dark); text-decoration: underline; }

/* Checkbox remember */
.remember-check {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: .82rem;
    color: var(--text-secondary);
    cursor: pointer;
}
.remember-check input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--primary);
    cursor: pointer;
}

/* Product search / listing page */
.image-wrap {
    width: 100px;
    height: 100px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    flex-shrink: 0;
}
.image-wrap img { width: 100%; height: 100%; object-fit: cover; }
.product-search-item .body { flex: 1; min-width: 0; }
.product-search-item .name {
    font-size: .9rem;
    font-weight: 600;
    color: var(--text);
    display: block;
    margin-bottom: 2px;
}
.product-search-item .price {
    font-size: .9rem;
    font-weight: 700;
    color: var(--primary);
}
.product-search-item .compare-price {
    font-size: .75rem;
    color: var(--text-muted);
    text-decoration: line-through;
    margin-left: 6px;
}
.product-search-item .rating {
    font-size: .75rem;
    color: var(--text-muted);
    margin-top: 4px;
}
.product-search-item .store-name {
    font-size: .78rem;
    color: var(--text-secondary);
}
.badge-wrap { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 4px; }
.badge-featured {
    background: rgba(16,185,129,.12);
    color: var(--primary);
    font-size: .65rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 4px;
}
.badge-deal {
    background: rgba(255,107,107,.15);
    color: var(--accent);
    font-size: .65rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 4px;
}
.action-btns { display: flex; gap: 6px; flex-wrap: wrap; }
.action-btn {
    height: 34px;
    padding: 0 16px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: white;
    color: var(--text-secondary);
    font-size: .8rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: var(--transition);
}
.action-btn:hover { border-color: var(--primary); color: var(--primary); }
.action-btn-primary {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}
.action-btn-primary:hover { background: var(--primary-dark); color: white; }
.icon-wrap {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}

/* Cart item */
.cart-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: var(--radius-sm);
    background: var(--bg);
    transition: var(--transition);
}
.cart-item:hover { background: white; box-shadow: var(--shadow); }
.cart-item .image {
    width: 64px;
    height: 64px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    flex-shrink: 0;
}
.cart-item .image img { width: 100%; height: 100%; object-fit: cover; }
.cart-item .details {
    flex: 1;
    min-width: 0;
}
.cart-item .details .store-name {
    font-size: .72rem;
    color: var(--text-muted);
    margin-bottom: 2px;
}
.cart-item .details .name {
    font-size: .85rem;
    font-weight: 600;
    color: var(--text);
    display: block;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.cart-item .details .price {
    font-size: .85rem;
    font-weight: 700;
    color: var(--primary);
}
.qty-control {
    display: flex;
    align-items: center;
    gap: 0;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    overflow: hidden;
}
.qty-minus, .qty-plus {
    width: 32px;
    height: 32px;
    border: none;
    background: var(--bg);
    color: var(--text);
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}
.qty-minus:hover, .qty-plus:hover { background: var(--border); }
.qty-control .qty {
    width: 36px;
    text-align: center;
    font-size: .85rem;
    font-weight: 600;
    background: transparent;
    border: none;
    border-left: 1px solid var(--border);
    border-right: 1px solid var(--border);
    height: 32px;
    line-height: 32px;
}

@media (max-width: 576px) {
    .cart-item {
        flex-wrap: wrap;
        gap: 8px;
    }
    .cart-item .image {
        width: 48px;
        height: 48px;
    }
    .cart-item .details {
        flex: 1 1 60%;
        min-width: 0;
    }
    .cart-item .details .name {
        font-size: .8rem;
    }
    .cart-item .qty-control {
        order: 3;
        flex: 0 0 auto;
    }
    .cart-item .text-end {
        order: 4;
        flex: 0 0 auto;
        min-width: auto;
    }
    .cart-item .btn-outline-danger {
        order: 5;
        flex: 0 0 auto;
    }
}

/* Product view page */
.product-gallery { position: relative; }
.main-image {
    width: 100%;
    aspect-ratio: 1;
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--bg);
}
.main-image img { width: 100%; height: 100%; object-fit: cover; }
.thumbnails {
    display: flex;
    gap: 8px;
    margin-top: 8px;
    overflow-x: auto;
}
.thumb {
    width: 60px;
    height: 60px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    flex-shrink: 0;
    transition: var(--transition);
}
.thumb.active { border-color: var(--primary); }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.product-details { padding-top: 8px; }
.price-display {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--primary);
}
.compare-price-display {
    font-size: .95rem;
    color: var(--text-muted);
    text-decoration: line-through;
    margin-left: 8px;
}
.specs-table td {
    padding: 8px 12px;
    font-size: .85rem;
    border-bottom: 1px solid var(--border);
}
.specs-table td:first-child {
    font-weight: 600;
    color: var(--text);
    width: 120px;
}
.star-rating { color: var(--warning); font-size: .9rem; }

/* Category page */
.category-card {
    background: white;
    border-radius: var(--radius);
    padding: 24px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: var(--transition);
}
.category-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.category-card .icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 8px;
    font-size: 1.3rem;
}
.category-card .name { font-size: .9rem; font-weight: 600; color: var(--text); }
.category-card .count { font-size: .78rem; color: var(--text-muted); }

/* Store listing page */
.banner-wrap {
    position: relative;
    height: 200px;
    border-radius: var(--radius);
    overflow: hidden;
}
.banner-wrap img { width: 100%; height: 100%; object-fit: cover; }
.store-info {
    position: relative;
    margin-top: -40px;
    padding: 0 20px;
    display: flex;
    align-items: flex-end;
    gap: 16px;
}
.logo-wrap {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid white;
    box-shadow: var(--shadow);
    flex-shrink: 0;
}
.logo-wrap img { width: 100%; height: 100%; object-fit: cover; }
.store-desc { font-size: .88rem; color: var(--text-secondary); line-height: 1.6; }

/* Filter card (search page) */
.filter-card {
    background: white;
    border-radius: var(--radius);
    padding: 16px;
    box-shadow: var(--shadow);
}
.filter-title {
    font-size: .85rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 8px;
}

/* Input group for currency symbol */
.input-group-text {
    background: var(--bg);
    border-color: var(--border);
    color: var(--text);
    font-size: .85rem;
}

/* Table styles for all dashboard tables */
.table {
    margin-bottom: 0;
}
.table thead th {
    font-size: .78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .5px;
    color: var(--text-muted);
    border-bottom-width: 1px;
}
.table td {
    font-size: .85rem;
    vertical-align: middle;
}
.table-hover tbody tr:hover {
    background: rgba(16,185,129,.03);
}
.table-responsive {
    border-radius: var(--radius);
}

/* Pagination */
.pagination .page-link {
    border-radius: var(--radius-sm) !important;
    margin: 0 2px;
    color: var(--text);
    font-size: .85rem;
    border-color: var(--border);
}
.pagination .page-item.active .page-link {
    background: var(--primary);
    border-color: var(--primary);
}

/* Alert flash messages */
.alert { border-radius: var(--radius-sm); font-size: .88rem; }
.flash-message { animation: fadeIn .3s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: translateY(0); } }
@keyframes spin { to { transform: rotate(360deg); } }
.spinning { animation: spin .6s linear infinite; }

/* Filter tags, small chips */
.filter-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 20px;
    background: rgba(16,185,129,.1);
    color: var(--primary);
    font-size: .75rem;
    font-weight: 500;
}

/* Alert override */
.alert-success, .alert-danger {
    border-radius: 0 !important;
}

/* Search suggestions */
.search-suggestions {
    flex: 1;
    overflow-y: auto;
    background: var(--bg);
}
.search-suggestions .hover-bg:hover { background: var(--border); }
.search-suggestions .text-dark { color: var(--text) !important; }

/* Toast container - high z-index for overlay */
.toast-container {
    position: fixed;
    top: 72px;
    right: 16px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-width: 360px;
}
.toast {
    border-radius: var(--radius-sm) !important;
    box-shadow: var(--shadow-lg);
    animation: slideInRight .3s ease;
}
@keyframes slideInRight {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* Product card data attributes support */
[data-product-id] { cursor: default; }

/* Safeguard for non-homepage padding */
body:not(.homepage) { padding-bottom: 70px; }
@media (min-width: 768px) {
    body:not(.homepage) { padding-bottom: 0; }
}

/* Payment Options */
.payment-option {
    display: block;
    cursor: pointer;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    padding: 16px;
    transition: all 0.2s ease;
}
.payment-option:hover {
    border-color: #c0c0c0;
    background: #f8f9fc;
}
.payment-option.active {
    border-color: #10B981;
    background: #f3edff;
}
.payment-radio {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 2px solid #ccc;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.2s ease;
}
.payment-option.active .payment-radio {
    border-color: #10B981;
}
.payment-radio-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: transparent;
    transition: all 0.2s ease;
}
.payment-option.active .payment-radio-dot {
    background: #10B981;
}
.payment-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* Dark mode overrides */
[data-bs-theme="dark"] .payment-option {
    border-color: #444;
}
[data-bs-theme="dark"] .payment-option:hover {
    background: #2a2a2a;
}
[data-bs-theme="dark"] .payment-option.active {
    border-color: #10B981;
    background: #2a1f3d;
}
[data-bs-theme="dark"] .payment-radio {
    border-color: #666;
}

/* ===== PRODUCT DETAIL PAGE ===== */
.product-detail-page {
    background: var(--bg);
    min-height: 60vh;
}
.product-breadcrumb {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: .78rem;
    color: var(--text-muted);
}
.product-breadcrumb a {
    color: var(--text-muted);
    transition: var(--transition);
}
.product-breadcrumb a:hover { color: var(--primary); }
.product-breadcrumb i { font-size: .6rem; }
.product-breadcrumb span { color: var(--text-secondary); font-weight: 500; }

/* Gallery */
.product-gallery-wrap { position: relative; }
.product-main-image {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: white;
    aspect-ratio: 1;
    box-shadow: var(--shadow);
}
.product-main-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .3s ease;
}
.product-main-image:hover img { transform: scale(1.03); }
.gallery-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: rgba(255,255,255,.9);
    color: var(--text);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--shadow);
    transition: var(--transition);
    z-index: 2;
    font-size: .9rem;
}
.gallery-nav-btn:hover { background: white; box-shadow: var(--shadow-md); }
.gallery-nav-btn.prev { left: 12px; }
.gallery-nav-btn.next { right: 12px; }
.gallery-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    z-index: 2;
}
.badge-discount {
    background: var(--accent);
    color: white;
    padding: 3px 10px;
    border-radius: 4px;
    font-size: .72rem;
    font-weight: 700;
}
.badge-new {
    background: var(--success);
    color: white;
    padding: 3px 10px;
    border-radius: 4px;
    font-size: .72rem;
    font-weight: 700;
}
.product-thumbs {
    display: flex;
    gap: 8px;
    margin-top: 10px;
    overflow-x: auto;
    padding-bottom: 4px;
}
.thumb-item {
    width: 60px;
    height: 60px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    flex-shrink: 0;
    transition: var(--transition);
    background: white;
}
.thumb-item.active { border-color: var(--primary); }
.thumb-item:hover { border-color: var(--primary-light); }
.thumb-item img { width: 100%; height: 100%; object-fit: cover; }

/* Product Info */
.product-info-section { padding-top: 4px; }
.product-store-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--bg);
    padding: 6px 14px 6px 6px;
    border-radius: 30px;
    margin-bottom: 12px;
}
.store-mini-logo {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    object-fit: cover;
}
.store-link {
    font-size: .82rem;
    font-weight: 600;
    color: var(--text);
    transition: var(--transition);
}
.store-link:hover { color: var(--primary); }
.verified-icon { color: #3b82f6; font-size: .85rem; margin-left: 3px; }
.product-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text);
    line-height: 1.3;
    margin-bottom: 10px;
}
.product-rating-row {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: .82rem;
    margin-bottom: 14px;
    flex-wrap: wrap;
}
.product-rating-row i { font-size: .85rem; }
.rating-score { font-weight: 700; color: var(--warning); }
.rating-count { color: var(--text-muted); }
.rating-separator { color: var(--border); }
.rating-sold { color: var(--text-muted); }

/* Price box */
.product-price-box {
    background: linear-gradient(135deg, rgba(16,185,129,.06), rgba(37,99,235,.04));
    border: 1px solid rgba(16,185,129,.12);
    border-radius: var(--radius);
    padding: 16px 20px;
    margin-bottom: 16px;
}
.price-current {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--primary);
}
.price-original {
    font-size: .95rem;
    color: var(--text-muted);
    text-decoration: line-through;
    margin-left: 8px;
}
.price-save {
    display: inline-block;
    background: rgba(16,185,129,.12);
    color: var(--success);
    font-size: .75rem;
    font-weight: 600;
    padding: 2px 10px;
    border-radius: 4px;
    margin-left: 8px;
}
.product-desc-short {
    font-size: .88rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 14px;
}

/* Meta strip */
.product-meta-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 16px;
}
.meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: .78rem;
    color: var(--text-secondary);
    background: var(--bg);
    padding: 6px 12px;
    border-radius: 8px;
}
.meta-item i { color: var(--text-muted); font-size: .85rem; }

/* Variations */
.product-variations { margin-bottom: 16px; }
.variation-label {
    font-size: .82rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 8px;
    display: block;
}
.variation-list { display: flex; flex-wrap: wrap; gap: 8px; }
.variation-chip {
    padding: 8px 16px;
    border-radius: 30px;
    border: 1.5px solid var(--border);
    background: white;
    font-size: .8rem;
    font-weight: 500;
    color: var(--text);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    align-items: center;
}
.variation-chip:hover { border-color: var(--primary); color: var(--primary); }
.variation-chip.selected {
    border-color: var(--primary);
    background: rgba(16,185,129,.08);
    color: var(--primary);
    font-weight: 600;
}
.variation-chip small { font-size: .65rem; color: var(--text-muted); margin-top: 1px; }
.variation-chip.selected small { color: var(--primary); }

/* Actions */
.product-actions-row {
    display: flex;
    gap: 10px;
    margin-bottom: 12px;
    align-items: center;
}
.qty-selector {
    display: flex;
    align-items: center;
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    flex-shrink: 0;
}
.qty-btn {
    width: 38px;
    height: 38px;
    border: none;
    background: var(--bg);
    color: var(--text);
    font-size: .9rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}
.qty-btn:hover { background: var(--border); }
.qty-input {
    width: 44px;
    height: 38px;
    text-align: center;
    border: none;
    border-left: 1.5px solid var(--border);
    border-right: 1.5px solid var(--border);
    font-weight: 600;
    font-size: .9rem;
    color: var(--text);
    background: transparent;
    -moz-appearance: textfield;
}
.qty-input::-webkit-inner-spin-button { -webkit-appearance: none; }
.btn-add-cart {
    flex: 1;
    height: 44px;
    border: none;
    border-radius: var(--radius);
    background: var(--primary-gradient);
    color: white;
    font-weight: 700;
    font-size: .88rem;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}
.btn-add-cart:hover { opacity: .92; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(16,185,129,.3); }
.btn-wishlist {
    width: 44px;
    height: 44px;
    border-radius: var(--radius);
    border: 1.5px solid var(--border);
    background: white;
    color: var(--text-muted);
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: var(--transition);
}
.btn-wishlist:hover { border-color: var(--accent); color: var(--accent); }
.btn-wishlist.active { border-color: var(--accent); color: var(--accent); background: rgba(255,107,107,.08); }

/* Contact buttons */
.product-contact-row {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}
.contact-btn {
    flex: 1;
    height: 38px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    font-size: .78rem;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
}
.contact-btn.chat { background: rgba(59,130,246,.1); color: #3b82f6; border: 1px solid rgba(59,130,246,.2); }
.contact-btn.chat:hover { background: #3b82f6; color: white; }
.contact-btn.whatsapp { background: rgba(37,211,102,.1); color: #25d366; border: 1px solid rgba(37,211,102,.2); }
.contact-btn.whatsapp:hover { background: #25d366; color: white; }
.contact-btn.call { background: rgba(16,185,129,.1); color: var(--success); border: 1px solid rgba(16,185,129,.2); }
.contact-btn.call:hover { background: var(--success); color: white; }

/* Tags */
.product-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag {
    font-size: .7rem;
    color: var(--text-muted);
    background: var(--bg);
    padding: 3px 10px;
    border-radius: 4px;
    border: 1px solid var(--border);
}

/* Seller Side Card */
.seller-side-card {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    overflow: hidden;
    position: sticky;
    top: 80px;
}
.seller-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    border-bottom: 1px solid var(--border);
    position: relative;
}
.seller-store-logo {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border);
}
.seller-avatar-img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border);
    flex-shrink: 0;
}
.seller-mini-logo {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    object-fit: cover;
    vertical-align: middle;
}
.seller-card-rating a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: .75rem;
}
.seller-card-rating a:hover {
    color: var(--primary);
}
.seller-card-name {
    font-size: .9rem;
    font-weight: 700;
    color: var(--text);
    margin: 0;
}
.seller-card-rating {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: .72rem;
    color: var(--text-muted);
}
.seller-card-rating i { font-size: .7rem; }
.seller-card-rating span { font-weight: 600; color: var(--warning); }
.verified-badge {
    position: absolute;
    top: 16px;
    right: 16px;
    color: #3b82f6;
    font-size: 1.2rem;
}
.seller-card-body {
    display: flex;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
}
.seller-stat {
    flex: 1;
    text-align: center;
}
.stat-value {
    display: block;
    font-size: 1rem;
    font-weight: 700;
    color: var(--text);
}
.stat-label {
    display: block;
    font-size: .68rem;
    color: var(--text-muted);
    margin-top: 1px;
}
.seller-card-actions {
    padding: 12px 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.btn-store {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 40px;
    border-radius: var(--radius-sm);
    background: var(--bg);
    color: var(--text);
    font-size: .82rem;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
    border: 1px solid var(--border);
}
.btn-store:hover { background: var(--primary); color: white; border-color: var(--primary); }
.btn-follow {
    height: 40px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--primary);
    background: transparent;
    color: var(--primary);
    font-size: .82rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}
.btn-follow:hover { background: var(--primary); color: white; }
.btn-follow.active { background: var(--primary); color: white; }
.seller-card-contact {
    padding: 12px 16px;
    background: var(--bg);
    border-top: 1px solid var(--border);
}
.contact-line {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: .78rem;
    color: var(--text-secondary);
    text-decoration: none;
    padding: 4px 0;
}
.contact-line i { font-size: .9rem; }

/* Content cards (description, reviews) */
.content-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow);
    margin-bottom: 16px;
}
.content-card-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.content-card-title i { color: var(--primary); font-size: 1.1rem; }
.content-card-title-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}
.product-description p {
    font-size: .9rem;
    color: var(--text-secondary);
    line-height: 1.7;
}
.specs-title {
    font-size: .9rem;
    font-weight: 700;
    color: var(--text);
    margin-top: 24px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.specs-title i { color: var(--primary); }

/* Reviews */
.btn-write-review {
    padding: 7px 18px;
    border-radius: 20px;
    border: 1px solid var(--primary);
    background: transparent;
    color: var(--primary);
    font-size: .78rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}
.btn-write-review:hover { background: var(--primary); color: white; }
.review-form-wrap {
    display: none;
    margin-bottom: 20px;
}
.review-form-wrap.show { display: block; }
.review-form-wrap form {
    background: var(--bg);
    border-radius: var(--radius);
    padding: 16px;
}
.star-select { margin-bottom: 12px; }
.star-label { font-size: .82rem; font-weight: 600; color: var(--text); display: block; margin-bottom: 6px; }
.star-input { display: flex; flex-direction: row-reverse; justify-content: flex-end; gap: 2px; }
.star-input input { display: none; }
.star-input label { font-size: 1.3rem; color: var(--border); cursor: pointer; transition: var(--transition); }
.star-input label:hover,
.star-input label:hover ~ label,
.star-input input:checked ~ label { color: var(--warning); }
.review-form-wrap textarea {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    font-size: .85rem;
    resize: vertical;
    background: white;
    color: var(--text);
    margin-bottom: 10px;
}
.review-form-wrap textarea:focus { outline: none; border-color: var(--primary); }
.btn-submit-review {
    padding: 8px 24px;
    border-radius: var(--radius-sm);
    border: none;
    background: var(--primary);
    color: white;
    font-weight: 600;
    font-size: .82rem;
    cursor: pointer;
    transition: var(--transition);
}
.btn-submit-review:hover { background: var(--primary-dark); }
.empty-reviews {
    text-align: center;
    padding: 32px;
    color: var(--text-muted);
}
.empty-reviews i { font-size: 2rem; margin-bottom: 8px; }

.reviews-list { display: flex; flex-direction: column; gap: 0; }
.review-item {
    padding: 16px 0;
    border-bottom: 1px solid var(--border);
}
.review-item:last-child { border-bottom: none; }
.review-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}
.review-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
}
.reviewer-name {
    font-size: .82rem;
    font-weight: 600;
    color: var(--text);
}
.review-stars i { font-size: .75rem; }
.review-date {
    margin-left: auto;
    font-size: .72rem;
    color: var(--text-muted);
}
.review-text {
    font-size: .85rem;
    color: var(--text-secondary);
    line-height: 1.5;
}
.verified-badge {
    font-size: .72rem;
    color: var(--success);
    font-weight: 500;
}

/* Related Products */
.related-list { display: flex; flex-direction: column; gap: 10px; }
.related-item {
    display: flex;
    gap: 10px;
    text-decoration: none;
    padding: 8px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}
.related-item:hover { background: var(--bg); }
.related-img {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    flex-shrink: 0;
    background: var(--bg);
}
.related-img img { width: 100%; height: 100%; object-fit: cover; }
.related-name {
    font-size: .8rem;
    font-weight: 600;
    color: var(--text);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.3;
    margin-bottom: 4px;
}
.related-price {
    font-size: .82rem;
    font-weight: 700;
    color: var(--primary);
}

/* Mobile Sticky Cart Bar */
.mobile-cart-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1040;
    background: rgba(255,255,255,.97);
    backdrop-filter: blur(12px);
    border-top: 1px solid var(--border);
    padding: 10px 16px;
    padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px));
    display: none;
    align-items: center;
    gap: 12px;
}
.mobile-cart-price { flex: 1; min-width: 0; }
.mob-price-current { font-size: 1.2rem; font-weight: 800; color: var(--primary); }
.mob-price-old { font-size: .78rem; color: var(--text-muted); text-decoration: line-through; margin-left: 6px; }
.mobile-cart-actions { display: flex; gap: 8px; flex-shrink: 0; }
.mob-wishlist {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-sm);
    border: 1.5px solid var(--border);
    background: white;
    color: var(--text-muted);
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}
.mob-wishlist.active { border-color: var(--accent); color: var(--accent); }
.mob-add-cart {
    height: 44px;
    padding: 0 24px;
    border-radius: var(--radius-sm);
    border: none;
    background: var(--primary-gradient);
    color: white;
    font-weight: 700;
    font-size: .85rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: var(--transition);
}
.mob-add-cart:hover { opacity: .92; }

/* Responsive */
@media (max-width: 991px) {
    .seller-side-card { position: static; }
    .mobile-cart-bar { display: flex; }
    .product-detail-page { padding-bottom: 70px; }
    .product-title { font-size: 1.1rem; }
    .price-current { font-size: 1.3rem; }
    .product-contact-row { flex-wrap: wrap; }
    .contact-btn { min-width: calc(50% - 4px); }
    .product-actions-row { flex-wrap: wrap; }
    .btn-add-cart { min-width: calc(100% - 130px); }
    .content-card { padding: 16px; }
}
@media (min-width: 992px) {
    .product-info-section { padding-left: 8px; }
}
@media (min-width: 768px) {
    .product-thumbs { gap: 10px; }
    .thumb-item { width: 70px; height: 70px; }
}

/* Dark mode overrides */
[data-bs-theme="dark"] .product-main-image { background: #1e293b; }
[data-bs-theme="dark"] .product-thumbs .thumb-item { background: #1e293b; }
[data-bs-theme="dark"] .gallery-nav-btn { background: rgba(30,41,59,.9); color: #94a3b8; }
[data-bs-theme="dark"] .gallery-nav-btn:hover { background: #334155; }
[data-bs-theme="dark"] .seller-side-card { background: #1e293b; }
[data-bs-theme="dark"] .seller-card-contact { background: #0f172a; }
[data-bs-theme="dark"] .content-card { background: #1e293b; }
[data-bs-theme="dark"] .product-price-box { background: rgba(16,185,129,.1); border-color: rgba(16,185,129,.2); }
[data-bs-theme="dark"] .review-form-wrap form { background: #0f172a; }
[data-bs-theme="dark"] .variation-chip { background: #0f172a; border-color: #334155; }
[data-bs-theme="dark"] .variation-chip:hover { border-color: var(--primary); }
[data-bs-theme="dark"] .mobile-cart-bar { background: rgba(15,23,42,.97); }
[data-bs-theme="dark"] .mob-wishlist { background: #1e293b; border-color: #334155; color: #94a3b8; }
[data-bs-theme="dark"] .product-meta-strip .meta-item { background: #0f172a; }
[data-bs-theme="dark"] .product-store-badge { background: #0f172a; }
[data-bs-theme="dark"] .btn-store { background: #0f172a; border-color: #334155; }
[data-bs-theme="dark"] .btn-store:hover { background: var(--primary); border-color: var(--primary); color: white; }
[data-bs-theme="dark"] .qty-selector { border-color: #334155; }
[data-bs-theme="dark"] .qty-btn { background: #0f172a; }
[data-bs-theme="dark"] .qty-btn:hover { background: #334155; }
[data-bs-theme="dark"] .qty-input { background: transparent; border-color: #334155; color: #e2e8f0; }
[data-bs-theme="dark"] .star-input label { color: #334155; }
[data-bs-theme="dark"] .review-form-wrap textarea { background: #0f172a; border-color: #334155; color: #e2e8f0; }
[data-bs-theme="dark"] .tag { background: #0f172a; border-color: #334155; }

/* ===== ADMIN LAYOUT ===== */
.admin-body {
    display: flex;
    min-height: calc(100vh - 60px);
    gap: 0;
}
.admin-sidebar {
    width: 240px;
    flex-shrink: 0;
    position: sticky;
    top: 60px;
    height: calc(100vh - 60px);
    overflow-y: auto;
    padding: 16px 12px;
}
.admin-main {
    flex: 1;
    min-width: 0;
    padding: 24px 24px 40px;
    max-width: calc(100% - 240px);
}

/* Sidebar Redesign */
.sidebar {
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    border: 1px solid var(--border);
}
.sidebar-header {
    padding: 16px;
    border-bottom: 1px solid var(--border);
    background: var(--primary-gradient);
    color: white;
}
.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1rem;
    font-weight: 700;
}
.sidebar-brand i { font-size: 1.3rem; }
.sidebar-nav { padding: 8px; }
.sidebar-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    font-size: .85rem;
    font-weight: 500;
    color: var(--text);
    transition: var(--transition);
    text-decoration: none;
    margin-bottom: 2px;
}
.sidebar-link:hover {
    background: var(--bg);
    color: var(--primary);
}
.sidebar-link.active {
    background: rgba(16,185,129,.08);
    color: var(--primary);
    font-weight: 600;
}
.sidebar-link i {
    width: 20px;
    text-align: center;
    font-size: 1rem;
    color: var(--text-muted);
    transition: var(--transition);
}
.sidebar-link:hover i { color: var(--primary); }
.sidebar-link.active i { color: var(--primary); }
.sidebar-divider {
    height: 1px;
    background: var(--border);
    margin: 8px 12px;
}

/* Page Header */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 12px;
}
.page-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text);
    margin: 0;
}
.page-subtitle {
    font-size: .85rem;
    color: var(--text-muted);
    margin: 2px 0 0;
}

/* Stat Cards */
.stat-row {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}
.stat-card {
    background: white;
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 16px;
    border: 1px solid var(--border);
}
.stat-card:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }
.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    flex-shrink: 0;
}
.stat-info { min-width: 0; }
.stat-number {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text);
    line-height: 1.2;
}
.stat-label {
    font-size: .78rem;
    color: var(--text-muted);
    margin-top: 2px;
}

/* Search Box */
.search-box {
    position: relative;
    min-width: 220px;
}
.search-box i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: .9rem;
    pointer-events: none;
}
.search-box .form-control {
    padding-left: 36px;
    height: 38px;
    font-size: .85rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--bg);
}
.search-box .form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(16,185,129,.1);
    background: white;
}

/* Card Overrides for Admin */
.admin-main .card {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}
.admin-main .card-header {
    background: white;
    border-bottom: 1px solid var(--border);
    padding: 14px 20px;
    font-size: .88rem;
}
.admin-main .card-body { padding: 20px; }
.admin-main .card-title { font-size: .9rem; }

/* Table Styles */
.admin-main .table {
    margin-bottom: 0;
    font-size: .85rem;
}
.admin-main .table thead th {
    font-size: .72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .5px;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border);
    padding: 12px 16px;
    background: var(--bg);
    white-space: nowrap;
}
.admin-main .table td {
    padding: 12px 16px;
    vertical-align: middle;
    border-bottom: 1px solid var(--border);
    color: var(--text);
}
.admin-main .table tbody tr:last-child td { border-bottom: none; }
.admin-main .table tbody tr:hover { background: rgba(16,185,129,.02); }
.admin-main .table-responsive {
    border-radius: 0;
}

/* Status Badges */
.status-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: .72rem;
    font-weight: 600;
    letter-spacing: .2px;
}
.status-active {
    background: rgba(16,185,129,.12);
    color: var(--success);
}
.status-warning {
    background: rgba(245,158,11,.12);
    color: var(--warning);
}
.status-danger {
    background: rgba(255,107,107,.12);
    color: var(--accent);
}
.status-inactive {
    background: rgba(148,163,184,.12);
    color: var(--text-muted);
}
.status-info {
    background: rgba(59,130,246,.12);
    color: #3b82f6;
}

/* Soft Badges */
.badge-soft-primary {
    background: rgba(16,185,129,.1);
    color: var(--primary);
    font-weight: 500;
    font-size: .75rem;
    padding: 3px 10px;
    border-radius: 6px;
}
.badge-soft-secondary {
    background: rgba(148,163,184,.12);
    color: var(--text-muted);
    font-weight: 500;
    font-size: .75rem;
    padding: 3px 10px;
    border-radius: 6px;
}
.badge-soft-info {
    background: rgba(59,130,246,.1);
    color: #3b82f6;
    font-weight: 500;
    font-size: .75rem;
    padding: 3px 10px;
    border-radius: 6px;
}
.badge-soft-success {
    background: rgba(16,185,129,.1);
    color: var(--success);
    font-weight: 500;
    font-size: .75rem;
    padding: 3px 10px;
    border-radius: 6px;
}
.badge-soft-warning {
    background: rgba(245,158,11,.1);
    color: var(--warning);
    font-weight: 500;
    font-size: .75rem;
    padding: 3px 10px;
    border-radius: 6px;
}
.badge-soft-danger {
    background: rgba(255,107,107,.1);
    color: var(--accent);
    font-weight: 500;
    font-size: .75rem;
    padding: 3px 10px;
    border-radius: 6px;
}

/* Action Buttons */
.action-btns {
    display: flex;
    gap: 4px;
    justify-content: flex-end;
}
.btn-soft-primary {
    background: rgba(16,185,129,.1);
    color: var(--primary);
    border: none;
    font-size: .8rem;
    padding: 4px 10px;
    border-radius: 6px;
    transition: var(--transition);
}
.btn-soft-primary:hover { background: var(--primary); color: white; }
.btn-soft-info {
    background: rgba(59,130,246,.1);
    color: #3b82f6;
    border: none;
    font-size: .8rem;
    padding: 4px 10px;
    border-radius: 6px;
    transition: var(--transition);
}
.btn-soft-info:hover { background: #3b82f6; color: white; }
.btn-soft-success {
    background: rgba(16,185,129,.1);
    color: var(--success);
    border: none;
    font-size: .8rem;
    padding: 4px 10px;
    border-radius: 6px;
    transition: var(--transition);
}
.btn-soft-success:hover { background: var(--success); color: white; }
.btn-soft-warning {
    background: rgba(245,158,11,.1);
    color: var(--warning);
    border: none;
    font-size: .8rem;
    padding: 4px 10px;
    border-radius: 6px;
    transition: var(--transition);
}
.btn-soft-warning:hover { background: var(--warning); color: white; }
.btn-soft-danger {
    background: rgba(255,107,107,.1);
    color: var(--accent);
    border: none;
    font-size: .8rem;
    padding: 4px 10px;
    border-radius: 6px;
    transition: var(--transition);
}
.btn-soft-danger:hover { background: var(--accent); color: white; }

/* Category Item Card */
.category-item-card {
    background: white;
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    text-align: center;
    transition: var(--transition);
    position: relative;
}
.category-item-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.cat-icon-wrap {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: rgba(16,185,129,.08);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    margin: 0 auto 10px;
}
.cat-item-name {
    font-size: .9rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 6px;
}
.cat-item-meta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 12px;
}
.cat-item-actions {
    display: flex;
    justify-content: center;
    gap: 6px;
}

/* Banner Admin Card */
.banner-admin-card {
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    overflow: hidden;
    transition: var(--transition);
}
.banner-admin-card:hover { box-shadow: var(--shadow-md); }
.banner-admin-img {
    width: 100%;
    height: 140px;
    overflow: hidden;
    background: var(--bg);
}
.banner-admin-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .3s ease;
}
.banner-admin-card:hover .banner-admin-img img { transform: scale(1.03); }
.banner-admin-body { padding: 14px; }
.banner-admin-body h6 { font-size: .9rem; }

/* Color Picker */
.color-picker {
    width: 44px;
    height: 44px;
    padding: 3px;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    background: none;
}
.color-picker::-webkit-color-swatch-wrapper { padding: 0; }
.color-picker::-webkit-color-swatch { border: none; border-radius: 4px; }

/* Page Actions Button Group */
.page-actions { display: flex; align-items: center; gap: 8px; }
.page-actions .btn {
    height: 38px;
    font-size: .85rem;
    border-radius: var(--radius-sm);
}

/* Admin Main Buttons */
.admin-main .btn-primary {
    background: var(--primary);
    border-color: var(--primary);
    font-weight: 600;
    font-size: .85rem;
    border-radius: var(--radius-sm);
}
.admin-main .btn-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); }
.admin-main .btn-light {
    background: var(--bg);
    border: 1px solid var(--border);
    color: var(--text);
    font-weight: 500;
}
.admin-main .btn-light:hover { background: var(--border); }

/* Modal Overrides */
.admin-main .modal-content {
    border: none;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
}
.admin-main .modal-header {
    border-bottom: 1px solid var(--border);
    padding: 16px 20px;
}
.admin-main .modal-header .modal-title { font-size: 1rem; font-weight: 700; }
.admin-main .modal-body { padding: 20px; }
.admin-main .modal-footer {
    border-top: 1px solid var(--border);
    padding: 12px 20px;
}

/* Mobile Sidebar Toggle */
.sidebar-toggle {
    display: none;
    width: 38px;
    height: 38px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: white;
    color: var(--text);
    font-size: 1.1rem;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    flex-shrink: 0;
}
.sidebar-toggle:hover { background: var(--bg); color: var(--primary); }

/* Responsive */
@media (max-width: 991px) {
    .sidebar-toggle { display: flex; }
    .admin-sidebar {
        display: none;
        width: 100%;
        position: static;
        height: auto;
        padding: 12px;
    }
    .admin-sidebar.open { display: block; }
    .admin-main {
        max-width: 100%;
        padding: 16px;
    }
    .admin-body { flex-direction: column; }
    .stat-row { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
    .search-box { min-width: 160px; }
    .page-header { flex-direction: column; align-items: flex-start; }
    .page-actions { width: 100%; }
    .page-actions .search-box { flex: 1; }
}
@media (max-width: 576px) {
    .stat-row { grid-template-columns: repeat(2, 1fr); }
    .admin-main .table thead th { white-space: normal; font-size: .68rem; padding: 10px 8px; }
    .admin-main .table td { padding: 10px 8px; font-size: .78rem; }
}

/* ===== MISSING LAYOUT CLASSES ===== */

/* Seller layout */
.seller-layout { display: flex; min-height: 100vh; background: var(--bg); }
.sidebar-wrap { width: 250px; position: fixed; top: 0; left: 0; height: 100vh; z-index: 1040; display: flex; flex-direction: column; background: #fff; border-right: 1px solid var(--border); transition: transform .3s ease; }
.sidebar-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 1035; }
.sidebar-logo { width: 38px; height: 38px; border-radius: 10px; object-fit: cover; }
.sidebar-brand-info { line-height: 1.2; }
.sidebar-brand-info small { font-size: .75rem; color: var(--muted); }

/* Stat cards */
.stat-body { padding: 12px 0; }
.stat-card .number { font-size: 1.5rem; font-weight: 700; color: var(--heading); }
.stat-card .label { font-size: .8rem; color: var(--muted); }

/* Quick actions */
.quick-actions { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.quick-action { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 16px 8px; background: #f8f9fc; border-radius: 12px; text-decoration: none; color: var(--body); font-size: .82rem; transition: all .2s; }
.quick-action:hover { background: var(--primary); color: #fff; }
.quick-action .bi { font-size: 1.3rem; }

/* Recent orders */
.recent-orders-wrap { background: #fff; border-radius: 12px; padding: 20px; box-shadow: 0 1px 3px rgba(0,0,0,.06); }
.order-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }

/* Form card */
.form-card { background: #fff; border-radius: 12px; padding: 24px; box-shadow: 0 1px 3px rgba(0,0,0,.06); margin-bottom: 24px; }
.form-section-title { font-size: 1rem; font-weight: 600; color: var(--heading); margin-bottom: 20px; padding-bottom: 12px; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 8px; }

/* Action buttons */
.action-icon-btn { width: 32px; height: 32px; border-radius: 8px; border: none; background: #f1f3f5; color: #495057; display: inline-flex; align-items: center; justify-content: center; font-size: .9rem; transition: all .2s; }
.action-icon-btn:hover { background: var(--primary); color: #fff; }

/* Avatar */
.avatar-wrap { width: 100px; height: 100px; border-radius: 50%; overflow: hidden; margin: 0 auto; position: relative; cursor: pointer; }
.avatar-wrap img { width: 100%; height: 100%; object-fit: cover; }

/* Product image thumb */
.product-image-thumb { width: 42px; height: 42px; border-radius: 8px; object-fit: cover; }

/* Orders */
.orders-card { background: #fff; border-radius: 12px; padding: 20px; box-shadow: 0 1px 3px rgba(0,0,0,.06); }

/* Filter button group */
.filter-btn-group { display: flex; gap: 8px; flex-wrap: wrap; }

/* ===== CHAT ===== */
.chat-app { display: flex; height: calc(100vh - 150px); background: #fff; border-radius: 12px; overflow: hidden; box-shadow: 0 1px 3px rgba(0,0,0,.06); }
.chat-sidebar { width: 340px; min-width: 340px; border-right: 1px solid var(--border); display: flex; flex-direction: column; }
.chat-main { flex: 1; display: flex; flex-direction: column; }

/* Chat sidebar */
.chat-sidebar-header { padding: 16px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
.conversation-list { flex: 1; overflow-y: auto; }
.conversation-item { display: flex; align-items: center; gap: 12px; padding: 14px 16px; cursor: pointer; transition: background .15s; border-bottom: 1px solid var(--border); }
.conversation-item:hover { background: #f8f9fc; }
.conversation-item.active { background: rgba(16,185,129,.08); }
.conversation-avatar { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; }
.conversation-info { flex: 1; min-width: 0; }
.conv-name { font-weight: 600; font-size: .9rem; color: var(--heading); }
.conv-preview { font-size: .82rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.conv-time { font-size: .72rem; color: var(--muted); white-space: nowrap; }

/* Chat main */
.chat-main-view { display: flex; flex-direction: column; height: 100%; }
.chat-header { padding: 14px 20px; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 12px; }
.chat-back-btn { display: none; width: 32px; height: 32px; border-radius: 8px; border: none; background: #f1f3f5; color: #495057; align-items: center; justify-content: center; font-size: 1rem; }
.chat-header-avatar { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; }
.chat-header-info { flex: 1; }
.chat-header-name { font-weight: 600; font-size: .9rem; color: var(--heading); }
.chat-header-status { font-size: .75rem; color: var(--muted); }

/* Messages */
.chat-messages-area { flex: 1; overflow-y: auto; padding: 20px; display: flex; flex-direction: column; gap: 12px; }
.chat-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100%; color: var(--muted); }
.chat-empty .bi { font-size: 2.5rem; margin-bottom: 8px; }
.message { display: flex; margin-bottom: 8px; }
.message.sent { justify-content: flex-end; }
.message.received { justify-content: flex-start; }
.message-bubble { max-width: 70%; padding: 10px 14px; border-radius: 14px; font-size: .88rem; line-height: 1.4; position: relative; }
.message.sent .message-bubble { background: var(--primary); color: #fff; border-bottom-right-radius: 4px; }
.message.received .message-bubble { background: #f1f3f5; color: var(--body); border-bottom-left-radius: 4px; }
.message-time { font-size: .68rem; color: inherit; opacity: .6; margin-top: 4px; display: block; text-align: right; }

/* Input bar */
.chat-input-bar { padding: 14px 20px; border-top: 1px solid var(--border); display: flex; gap: 10px; align-items: center; }
.chat-input-bar .form-control { border-radius: 20px; }
.guest-fields { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.input-row { display: flex; gap: 8px; flex: 1; align-items: center; }

/* Responsive chat */
@media (max-width: 768px) {
    .chat-sidebar { width: 100%; min-width: 100%; }
    .chat-main { display: none; }
    .chat-main.show { display: flex; position: fixed; inset: 0; z-index: 1050; background: #fff; }
    .chat-back-btn { display: flex; }
    .message-bubble { max-width: 85%; }
}

/* ===== DARK OVERRIDES ===== */
[data-bs-theme="dark"] .seller-layout { background: #0f172a; }
[data-bs-theme="dark"] .sidebar-wrap { background: #1e293b; border-color: #334155; }
[data-bs-theme="dark"] .form-card,
[data-bs-theme="dark"] .recent-orders-wrap,
[data-bs-theme="dark"] .orders-card,
[data-bs-theme="dark"] .chat-app { background: #1e293b; }
[data-bs-theme="dark"] .quick-action { background: #0f172a; color: #94a3b8; }
[data-bs-theme="dark"] .quick-action:hover { background: var(--primary); color: #fff; }
[data-bs-theme="dark"] .action-icon-btn { background: #334155; color: #94a3b8; }
[data-bs-theme="dark"] .action-icon-btn:hover { background: var(--primary); color: #fff; }
[data-bs-theme="dark"] .conversation-item { border-color: #334155; }
[data-bs-theme="dark"] .conversation-item:hover { background: #0f172a; }
[data-bs-theme="dark"] .conversation-item.active { background: rgba(16,185,129,.15); }
[data-bs-theme="dark"] .message.received .message-bubble { background: #334155; color: #e2e8f0; }
[data-bs-theme="dark"] .chat-input-bar { border-color: #334155; }
[data-bs-theme="dark"] .chat-header { border-color: #334155; }
[data-bs-theme="dark"] .chat-sidebar-header { border-color: #334155; }

/* Dark mode overrides for admin */
[data-bs-theme="dark"] .sidebar,
[data-bs-theme="dark"] .stat-card,
[data-bs-theme="dark"] .category-item-card,
[data-bs-theme="dark"] .banner-admin-card,
[data-bs-theme="dark"] .admin-main .card,
[data-bs-theme="dark"] .admin-main .card-header,
[data-bs-theme="dark"] .admin-main .modal-content,
[data-bs-theme="dark"] .admin-main .modal-header,
[data-bs-theme="dark"] .admin-main .modal-footer { background: #1e293b; }
[data-bs-theme="dark"] .admin-main .table thead th { background: #0f172a; }
[data-bs-theme="dark"] .admin-main .table td { border-color: #334155; }
[data-bs-theme="dark"] .admin-main .table tbody tr:hover { background: rgba(255,255,255,.02); }
[data-bs-theme="dark"] .search-box .form-control { background: #0f172a; border-color: #334155; color: #e2e8f0; }
[data-bs-theme="dark"] .search-box .form-control:focus { background: #1e293b; }
[data-bs-theme="dark"] .sidebar-link:hover { background: #0f172a; }
[data-bs-theme="dark"] .sidebar-link.active { background: rgba(16,185,129,.15); }
[data-bs-theme="dark"] .admin-main .btn-light { background: #0f172a; border-color: #334155; color: #e2e8f0; }
[data-bs-theme="dark"] .admin-main .btn-light:hover { background: #334155; }
[data-bs-theme="dark"] .cat-icon-wrap { background: rgba(16,185,129,.15); }
