/* ============================================================
   ODCure - Modern E-Commerce Stylesheet
   ============================================================ */

:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-light: #eff6ff;
    --secondary: #16a34a;
    --secondary-light: #f0fdf4;
    --danger: #dc2626;
    --warning: #f59e0b;
    --info: #0ea5e9;
    --dark: #111827;
    --gray-900: #1f2937;
    --gray-700: #374151;
    --gray: #6b7280;
    --gray-400: #9ca3af;
    --gray-300: #d1d5db;
    --light-gray: #f3f4f6;
    --lighter-gray: #f9fafb;
    --border: #e5e7eb;
    --white: #ffffff;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0,0,0,0.1), 0 10px 10px -5px rgba(0,0,0,0.04);
    --radius: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --transition: all 0.2s ease;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 14px;
    line-height: 1.6;
    color: var(--dark);
    background: var(--white);
}

a { color: var(--primary); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--primary-dark); }

img { max-width: 100%; height: auto; }

/* ---- Container ---- */
.container { max-width: 1280px; margin: 0 auto; padding: 0 20px; }
.container-fluid { padding: 0 20px; }

/* ---- Grid ---- */
.row { display: flex; flex-wrap: wrap; margin: 0 -10px; }
.col { flex: 1; padding: 0 10px; }
.col-2 { width: 16.66%; padding: 0 10px; }
.col-3 { width: 25%; padding: 0 10px; }
.col-4 { width: 33.33%; padding: 0 10px; }
.col-6 { width: 50%; padding: 0 10px; }
.col-8 { width: 66.66%; padding: 0 10px; }
.col-9 { width: 75%; padding: 0 10px; }
.col-12 { width: 100%; padding: 0 10px; }

/* ---- Top Bar ---- */
.top-bar {
    background: var(--dark);
    color: var(--gray-400);
    font-size: 12px;
    padding: 8px 0;
    letter-spacing: 0.3px;
}
.top-bar .container { display: flex; justify-content: space-between; align-items: center; }
.top-bar a { color: var(--gray-300); }
.top-bar a:hover { color: var(--white); }

/* ---- Header / Navbar ---- */
.navbar {
    background: var(--white);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: var(--transition);
}
.navbar.scrolled { box-shadow: var(--shadow-md); }

.navbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 20px;
    height: 64px;
}

.navbar-brand {
    font-size: 26px;
    font-weight: 800;
    color: var(--primary);
    letter-spacing: -0.5px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.navbar-brand span:not(.brand-icons) { color: var(--secondary); }

/* Brand animated icons - cycle medicine capsule, syringe, mortar */
.brand-icons {
    position: relative;
    width: 32px;
    height: 32px;
    flex-shrink: 0;
}
.brand-icon {
    position: absolute;
    inset: 0;
    width: 32px;
    height: 32px;
    opacity: 0;
    transform: scale(0.3) rotate(-15deg);
    animation: brandIconCycle 4.5s ease-in-out infinite;
    filter: drop-shadow(0 1px 2px rgba(0,0,0,0.15));
}
.brand-icon:nth-child(1) { animation-delay: 0s; }
.brand-icon:nth-child(2) { animation-delay: 1.5s; }
.brand-icon:nth-child(3) { animation-delay: 3s; }

@keyframes brandIconCycle {
    0%   { opacity: 0; transform: scale(0.3) rotate(-15deg); }
    5%   { opacity: 1; transform: scale(1.12) rotate(3deg); }
    10%  { opacity: 1; transform: scale(1) rotate(0deg); }
    28%  { opacity: 1; transform: scale(1) rotate(0deg); }
    33%  { opacity: 0; transform: scale(0.8) translateY(-4px); }
    100% { opacity: 0; }
}

.navbar-menu {
    display: flex;
    align-items: center;
    gap: 4px;
    list-style: none;
}

.navbar-menu a {
    color: var(--gray-700);
    font-weight: 500;
    font-size: 14px;
    padding: 8px 16px;
    border-radius: var(--radius);
    transition: var(--transition);
    position: relative;
}
.navbar-menu a:hover { color: var(--primary); background: var(--primary-light); }
.navbar-menu a.active { color: var(--primary); background: var(--primary-light); font-weight: 600; }

.navbar-actions { display: flex; align-items: center; gap: 12px; }

/* ---- Header Search with Autosuggest ---- */
.nav-search-wrapper {
    position: relative;
    flex: 1;
    max-width: 420px;
    margin: 0 24px;
}
.nav-search {
    display: flex;
    align-items: center;
    background: var(--light-gray);
    border: 1.5px solid transparent;
    border-radius: 50px;
    padding: 8px 16px;
    gap: 8px;
    transition: var(--transition);
}
.nav-search:focus-within {
    background: var(--white);
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37,99,235,0.1);
}
.nav-search input {
    border: none;
    background: transparent;
    outline: none;
    font-size: 13px;
    width: 100%;
    color: var(--dark);
}
.nav-search input::placeholder { color: var(--gray-400); }
.search-kbd {
    font-size: 10px;
    color: var(--gray-400);
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 1px 6px;
    font-family: inherit;
    white-space: nowrap;
    flex-shrink: 0;
}

.search-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: 6px;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    z-index: 1001;
    display: none;
    max-height: 420px;
    overflow-y: auto;
}
.search-dropdown.active { display: block; }
.search-dropdown-inner { padding: 6px; }

.search-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: var(--radius);
    text-decoration: none;
    color: var(--dark);
    transition: var(--transition);
}
.search-item:hover, .search-item.active {
    background: var(--primary-light);
    color: var(--dark);
}
.search-item-img {
    width: 44px;
    height: 44px;
    border-radius: var(--radius);
    object-fit: contain;
    background: var(--lighter-gray);
    flex-shrink: 0;
}
.search-item-info { flex: 1; min-width: 0; }
.search-item-name {
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.search-item-meta {
    font-size: 11px;
    color: var(--gray);
    display: flex;
    gap: 8px;
    align-items: center;
}
.search-item-price { font-weight: 700; color: var(--dark); font-size: 13px; flex-shrink: 0; }
.search-no-results {
    padding: 24px 16px;
    text-align: center;
    color: var(--gray);
    font-size: 13px;
}
.search-footer {
    padding: 10px 12px;
    border-top: 1px solid var(--border);
    text-align: center;
}
.search-footer a {
    font-size: 13px;
    font-weight: 600;
    color: var(--primary);
}
.search-loading {
    padding: 20px;
    text-align: center;
    color: var(--gray);
    font-size: 13px;
}

/* ---- Shop Filters ---- */
.filter-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.filter-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--primary-light);
    color: var(--primary);
    padding: 5px 12px;
    border-radius: 50px;
    font-size: 12px;
    font-weight: 600;
}
.filter-tag a {
    color: var(--primary);
    font-size: 16px;
    line-height: 1;
    font-weight: 400;
    opacity: 0.7;
}
.filter-tag a:hover { opacity: 1; }

.filter-heading {
    padding: 12px 16px;
    font-weight: 600;
    font-size: 13px;
    color: var(--dark);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    user-select: none;
    border-bottom: 1px solid var(--border);
    background: var(--lighter-gray);
}
.filter-heading svg {
    transition: transform 0.2s;
    color: var(--gray);
}
.card.collapsed .filter-heading svg { transform: rotate(-90deg); }
.card.collapsed .filter-body { display: none; }

.filter-body { padding: 12px 16px; }

.filter-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
    max-height: 220px;
    overflow-y: auto;
}
.filter-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 8px;
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 13px;
    color: var(--gray-700);
    transition: var(--transition);
}
.filter-checkbox:hover { background: var(--lighter-gray); }
.filter-checkbox input { accent-color: var(--primary); flex-shrink: 0; }
.filter-checkbox span:first-of-type { flex: 1; }
.filter-count {
    font-size: 11px;
    color: var(--gray-400);
    background: var(--light-gray);
    padding: 1px 7px;
    border-radius: 10px;
}
.filter-show-more {
    background: none;
    border: none;
    color: var(--primary);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    padding: 6px 8px;
    margin-top: 4px;
}
.filter-show-more:hover { text-decoration: underline; }

.filter-search-box {
    display: flex;
    align-items: center;
    gap: 6px;
    background: var(--lighter-gray);
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    padding: 0 10px;
    transition: var(--transition);
}
.filter-search-box:focus-within {
    border-color: var(--primary);
    background: var(--white);
}
.filter-search-box input { font-size: 13px; }

.price-range-inputs {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}
.price-input-group {
    display: flex;
    align-items: center;
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    padding: 0 8px;
    flex: 1;
    background: var(--white);
}
.price-input-group:focus-within { border-color: var(--primary); }
.price-input-group span { color: var(--gray); font-size: 13px; }
.price-input-group input {
    border: none;
    outline: none;
    padding: 7px 4px;
    font-size: 13px;
    width: 100%;
    background: transparent;
}
.price-dash { color: var(--gray-400); font-size: 13px; }

.price-quick-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.price-quick-btn {
    background: var(--lighter-gray);
    border: 1px solid var(--border);
    border-radius: 50px;
    padding: 4px 10px;
    font-size: 11px;
    color: var(--gray-700);
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}
.price-quick-btn:hover {
    background: var(--primary-light);
    border-color: var(--primary);
    color: var(--primary);
}

.rating-stars {
    color: var(--warning);
    font-size: 14px;
    letter-spacing: 1px;
}

/* ---- Shop Layout ---- */
.shop-row {
    display: flex;
    gap: 24px;
    align-items: flex-start;
}
.shop-sidebar {
    width: 260px;
    flex-shrink: 0;
}
.shop-content {
    flex: 1;
    min-width: 0;
}
@media (max-width: 768px) {
    .shop-row { flex-direction: column; gap: 16px; }
    .shop-sidebar { width: 100%; position: static; max-height: none; }
}

/* ---- Buttons ---- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border: none;
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    line-height: 1.4;
}
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow-md); }

.btn-primary { background: var(--primary); color: var(--white); }
.btn-primary:hover { background: var(--primary-dark); color: var(--white); }
.btn-success { background: var(--secondary); color: var(--white); }
.btn-success:hover { background: #15803d; color: var(--white); }
.btn-danger { background: var(--danger); color: var(--white); }
.btn-warning { background: var(--warning); color: var(--dark); }
.btn-outline { background: transparent; border: 1.5px solid var(--border); color: var(--gray-700); }
.btn-outline:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-light); }
.btn-sm { padding: 6px 14px; font-size: 12px; }
.btn-lg { padding: 14px 32px; font-size: 16px; }
.btn-block { display: flex; width: 100%; justify-content: center; }

/* ---- Cards ---- */
.card {
    background: var(--white);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    overflow: hidden;
    transition: var(--transition);
}
.card:hover { box-shadow: var(--shadow-md); }
.card-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    font-weight: 600;
    font-size: 15px;
    background: var(--lighter-gray);
}
.card-body { padding: 20px; }
.card-footer { padding: 16px 20px; border-top: 1px solid var(--border); background: var(--lighter-gray); }

/* ---- Hero Section ---- */
.hero-section {
    background: linear-gradient(135deg, #1e40af 0%, #7c3aed 100%);
    border-radius: var(--radius-xl);
    padding: 60px 50px;
    color: var(--white);
    position: relative;
    overflow: hidden;
    margin-bottom: 40px;
}
.hero-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 500px;
    height: 500px;
    background: rgba(255,255,255,0.05);
    border-radius: 50%;
}
.hero-section::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: 30%;
    width: 300px;
    height: 300px;
    background: rgba(255,255,255,0.03);
    border-radius: 50%;
}
.hero-content { position: relative; z-index: 1; max-width: 600px; }
.hero-tag {
    display: inline-block;
    background: rgba(255,255,255,0.2);
    padding: 6px 16px;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 16px;
    backdrop-filter: blur(10px);
}
.hero-title {
    font-size: 40px;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 16px;
    letter-spacing: -0.5px;
}
.hero-subtitle {
    font-size: 17px;
    opacity: 0.9;
    margin-bottom: 28px;
    line-height: 1.6;
}
.hero-buttons { display: flex; gap: 12px; flex-wrap: wrap; }

/* ---- Hero Carousel ---- */
.hero-carousel {
    position: relative;
    border-radius: var(--radius-xl);
    overflow: hidden;
    margin-bottom: 40px;
}
.hero-carousel-track { position: relative; height: 440px; }
.hero-carousel-slide {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    opacity: 0;
    transition: opacity 0.8s ease;
    pointer-events: none;
    overflow: hidden;
}
.hero-carousel-slide.active {
    opacity: 1;
    pointer-events: auto;
}
.hero-carousel-slide.active .hero-slide-content {
    animation: heroSlideIn 0.8s ease-out both;
}
.hero-carousel-slide.active .hero-slide-visual {
    animation: heroImgIn 0.9s ease-out 0.15s both;
}
@keyframes heroSlideIn {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes heroImgIn {
    from { opacity: 0; transform: scale(0.85) translateX(40px); }
    to { opacity: 1; transform: scale(1) translateX(0); }
}
.hero-slide-content {
    position: relative;
    z-index: 2;
    color: var(--white);
    max-width: 520px;
    padding: 0 70px;
    flex-shrink: 0;
}
.hero-slide-visual {
    position: relative;
    z-index: 1;
    width: 420px;
    height: 340px;
    flex-shrink: 0;
    margin-right: 40px;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,0.35), 0 0 0 3px rgba(255,255,255,0.2), 0 0 80px rgba(255,255,255,0.08);
    transform: rotate(-2deg);
    transition: transform 0.4s ease;
}
.hero-carousel-slide:hover .hero-slide-visual {
    transform: rotate(0deg) scale(1.02);
}
.hero-slide-visual::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 20px;
    background: linear-gradient(135deg, rgba(255,255,255,0.12) 0%, transparent 50%);
    pointer-events: none;
}
.hero-slide-visual img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.hero-carousel-slide::before {
    content: '';
    position: absolute;
    top: -50%; right: -15%;
    width: 500px; height: 500px;
    background: rgba(255,255,255,0.05);
    border-radius: 50%;
    z-index: 0;
}
.hero-carousel-slide::after {
    content: '';
    position: absolute;
    bottom: -40%; left: 25%;
    width: 350px; height: 350px;
    background: rgba(255,255,255,0.03);
    border-radius: 50%;
    z-index: 0;
}
.hero-btn-outline {
    background: rgba(255,255,255,0.15) !important;
    color: white !important;
    border: 1.5px solid rgba(255,255,255,0.3) !important;
    backdrop-filter: blur(10px);
}
.hero-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 5;
    background: rgba(255,255,255,0.2);
    backdrop-filter: blur(8px);
    color: white;
    border: none;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    font-size: 18px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}
.hero-nav:hover { background: rgba(255,255,255,0.35); }
.hero-nav-prev { left: 16px; }
.hero-nav-next { right: 16px; }
.hero-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 5;
    display: flex;
    gap: 8px;
}
.hero-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255,255,255,0.4);
    border: none;
    cursor: pointer;
    transition: var(--transition);
    padding: 0;
}
.hero-dot.active {
    background: white;
    width: 28px;
    border-radius: 5px;
}

/* ---- Product Carousel ---- */
.product-carousel {
    overflow: hidden;
    position: relative;
}
.product-carousel-track {
    display: flex;
    gap: 20px;
    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.product-carousel-item {
    min-width: 250px;
    max-width: 250px;
    flex-shrink: 0;
}
.carousel-nav-group {
    display: flex;
    align-items: center;
    gap: 8px;
}
.carousel-nav-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1.5px solid var(--border);
    background: var(--white);
    color: var(--gray-700);
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}
.carousel-nav-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-light);
}

.hero-slider { margin-bottom: 30px; border-radius: var(--radius-xl); overflow: hidden; }
.hero-slide { position: relative; }
.hero-slide img { width: 100%; height: 420px; object-fit: cover; }

/* ---- Category Cards ---- */
.category-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 48px;
}
.category-card {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 24px 28px;
    background: var(--white);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-xl);
    text-decoration: none;
    color: var(--dark);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}
.category-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
    color: var(--dark);
}
.category-card-icon {
    width: 64px;
    height: 64px;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    flex-shrink: 0;
}
.category-card-content h3 {
    font-size: 17px;
    font-weight: 700;
    margin-bottom: 4px;
}
.category-card-content p {
    font-size: 13px;
    color: var(--gray);
    margin: 0;
}
.category-card .card-arrow {
    margin-left: auto;
    font-size: 20px;
    color: var(--gray-400);
    transition: var(--transition);
}
.category-card:hover .card-arrow { color: var(--primary); transform: translateX(4px); }

/* ---- Feature Badges Row ---- */
.features-bar {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 48px;
}
.feature-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    background: var(--lighter-gray);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
}
.feature-icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--primary-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}
.feature-text strong { display: block; font-size: 13px; color: var(--dark); }
.feature-text span { font-size: 12px; color: var(--gray); }

/* ---- Product Card ---- */
.product-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    transition: var(--transition);
    overflow: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
}
.product-card:hover {
    border-color: transparent;
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}

.product-card .product-img {
    width: 100%;
    height: 200px;
    object-fit: contain;
    background: var(--lighter-gray);
    padding: 16px;
    transition: var(--transition);
    flex-shrink: 0;
}
.product-card:hover .product-img { transform: scale(1.03); }

.product-card .product-info { padding: 16px; flex: 1; display: flex; flex-direction: column; }
.product-card .product-category {
    font-size: 11px;
    color: var(--primary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}
.product-card .product-name {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 8px;
    color: var(--dark);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.4;
    height: 2.8em;
}
.product-card .product-price {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: auto;
}
.product-card .price-current { font-size: 18px; font-weight: 700; color: var(--dark); }
.product-card .price-mrp { font-size: 13px; color: var(--gray-400); text-decoration: line-through; }
.product-card .price-discount {
    font-size: 11px;
    color: var(--secondary);
    font-weight: 700;
    background: var(--secondary-light);
    padding: 2px 8px;
    border-radius: 4px;
}
.product-card .product-actions { padding: 0 16px 16px; flex-shrink: 0; }

/* Carousel items need explicit height */
.product-carousel-item .product-card { height: 100%; }

/* ---- Product Grid ---- */
.product-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}
/* In shop sidebar layout, fit 4 per row */
.shop-content .product-grid {
    grid-template-columns: repeat(4, 1fr);
}

/* ---- Section ---- */
.section { margin-bottom: 48px; }
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}
.section-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--dark);
    letter-spacing: -0.3px;
}
.section-subtitle { font-size: 14px; color: var(--gray); margin-top: 4px; }

/* ---- Promo Banner ---- */
.promo-banner {
    background: linear-gradient(135deg, #059669 0%, #10b981 100%);
    border-radius: var(--radius-xl);
    padding: 40px 48px;
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 48px;
    position: relative;
    overflow: hidden;
}
.promo-banner::before {
    content: '';
    position: absolute;
    right: 10%;
    top: -50%;
    width: 200px;
    height: 200px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
}
.promo-content { position: relative; z-index: 1; }
.promo-content h3 { font-size: 24px; font-weight: 700; margin-bottom: 8px; }
.promo-content p { font-size: 15px; opacity: 0.9; margin-bottom: 16px; }

/* ---- Subscription CTA ---- */
.subscription-cta {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 50%, #a855f7 100%);
    border-radius: var(--radius-xl);
    padding: 48px;
    color: var(--white);
    text-align: center;
    position: relative;
    overflow: hidden;
}
.subscription-cta::before {
    content: '';
    position: absolute;
    top: -100px;
    right: -100px;
    width: 300px;
    height: 300px;
    background: rgba(255,255,255,0.06);
    border-radius: 50%;
}
.subscription-cta h2 { font-size: 30px; font-weight: 800; margin-bottom: 12px; letter-spacing: -0.5px; }
.subscription-cta p { font-size: 16px; opacity: 0.9; margin-bottom: 24px; max-width: 600px; margin-left: auto; margin-right: auto; }
.subscription-features {
    display: flex;
    justify-content: center;
    gap: 32px;
    margin-bottom: 28px;
    flex-wrap: wrap;
}
.subscription-features span {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 500;
}

/* ---- Forms ---- */
.form-group { margin-bottom: 16px; }
.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--gray-700);
    font-size: 13px;
}
.form-control {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    font-size: 14px;
    transition: var(--transition);
    outline: none;
    color: var(--dark);
    background: var(--white);
}
.form-control:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37,99,235,0.1); }

select.form-control { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M6 8L1 3h10z' fill='%236b7280'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 36px; }

textarea.form-control { resize: vertical; min-height: 80px; }

.form-row { display: flex; gap: 16px; }
.form-row .form-group { flex: 1; }

/* ---- Alerts ---- */
.alert {
    padding: 14px 18px;
    border-radius: var(--radius);
    margin-bottom: 16px;
    font-weight: 500;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.alert-success { background: #ecfdf5; color: #065f46; border: 1px solid #a7f3d0; }
.alert-error { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
.alert-warning { background: #fffbeb; color: #92400e; border: 1px solid #fde68a; }
.alert-info { background: #eff6ff; color: #1e40af; border: 1px solid #bfdbfe; }

/* ---- Tables ---- */
.table-responsive { overflow-x: auto; }
table.table {
    width: 100%;
    border-collapse: collapse;
}
table.table th, table.table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}
table.table th {
    background: var(--lighter-gray);
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    color: var(--gray);
    letter-spacing: 0.5px;
}
table.table tr:hover { background: var(--lighter-gray); }

/* ---- Badges ---- */
.badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}
.badge-success { background: #ecfdf5; color: #065f46; }
.badge-danger { background: #fef2f2; color: #991b1b; }
.badge-warning { background: #fffbeb; color: #92400e; }
.badge-info { background: #eff6ff; color: #1e40af; }
.badge-secondary { background: var(--light-gray); color: var(--gray); }

/* ---- Stats Cards ---- */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-bottom: 24px; }
.stat-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 20px;
    border: 1px solid var(--border);
    transition: var(--transition);
}
.stat-card:hover { box-shadow: var(--shadow-md); }
.stat-card .stat-label { font-size: 12px; color: var(--gray); text-transform: uppercase; font-weight: 600; letter-spacing: 0.5px; }
.stat-card .stat-value { font-size: 28px; font-weight: 700; color: var(--dark); margin: 4px 0; }
.stat-card .stat-info { font-size: 12px; color: var(--gray); }

/* ---- Pagination ---- */
.pagination { display: flex; gap: 4px; justify-content: center; margin: 32px 0; }
.pagination a, .pagination span {
    padding: 8px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 14px;
    color: var(--gray-700);
    font-weight: 500;
    transition: var(--transition);
}
.pagination a:hover { background: var(--primary); color: var(--white); border-color: var(--primary); }
.pagination .active { background: var(--primary); color: var(--white); border-color: var(--primary); }

/* ---- Dashboard Layout ---- */
.dashboard-wrapper { display: flex; min-height: calc(100vh - 60px); }
.sidebar {
    width: 260px;
    background: var(--white);
    border-right: 1px solid var(--border);
    padding: 20px 0;
    flex-shrink: 0;
}
.sidebar-menu { list-style: none; }
.sidebar-menu li a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 24px;
    color: var(--gray-700);
    font-weight: 500;
    transition: var(--transition);
    font-size: 14px;
}
.sidebar-menu li a:hover { background: var(--primary-light); color: var(--primary); }
.sidebar-menu li a.active { background: var(--primary-light); color: var(--primary); border-right: 3px solid var(--primary); font-weight: 600; }
.sidebar-divider { border-top: 1px solid var(--border); margin: 10px 0; }

.main-content { flex: 1; padding: 24px; background: var(--lighter-gray); }

/* ---- Cart ---- */
.cart-item {
    display: flex;
    gap: 16px;
    padding: 16px;
    border-bottom: 1px solid var(--border);
    align-items: center;
}
.cart-item img { width: 80px; height: 80px; object-fit: cover; border-radius: var(--radius); }
.cart-item-info { flex: 1; }
.cart-quantity { display: flex; align-items: center; gap: 8px; }
.cart-quantity input { width: 50px; text-align: center; padding: 6px; border: 1.5px solid var(--border); border-radius: var(--radius); }
.cart-quantity button { width: 30px; height: 30px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--white); cursor: pointer; }

/* ---- Footer ---- */
.footer {
    background: var(--gray-900);
    color: var(--gray-400);
    padding: 48px 0 24px;
    margin-top: 48px;
}
.footer h4 { color: var(--white); margin-bottom: 16px; font-size: 15px; font-weight: 600; }
.footer ul { list-style: none; }
.footer ul li { margin-bottom: 10px; }
.footer ul li a { color: var(--gray-400); font-size: 13px; transition: var(--transition); }
.footer ul li a:hover { color: var(--white); }
.footer p { font-size: 13px; line-height: 1.7; }
.footer-bottom {
    border-top: 1px solid #374151;
    padding-top: 20px;
    margin-top: 32px;
    text-align: center;
    font-size: 13px;
    color: var(--gray);
}

/* ---- Wallet Card ---- */
.wallet-card {
    background: linear-gradient(135deg, var(--primary), #7c3aed);
    color: var(--white);
    border-radius: var(--radius-xl);
    padding: 28px;
    box-shadow: var(--shadow-lg);
}
.wallet-balance { font-size: 36px; font-weight: 700; }
.wallet-label { font-size: 14px; opacity: 0.8; }

/* ---- Order Status ---- */
.order-timeline { padding: 16px 0; }
.timeline-item {
    display: flex;
    gap: 16px;
    padding: 12px 0;
    position: relative;
}
.timeline-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--primary);
    margin-top: 4px;
    flex-shrink: 0;
}
.timeline-dot.inactive { background: var(--border); }

/* ---- Referral Card ---- */
.referral-code-card {
    background: linear-gradient(135deg, var(--secondary), #059669);
    color: var(--white);
    border-radius: var(--radius-xl);
    padding: 28px;
    text-align: center;
    box-shadow: var(--shadow-lg);
}
.referral-code {
    font-size: 28px;
    font-weight: 700;
    letter-spacing: 4px;
    margin: 12px 0;
    background: rgba(255,255,255,0.2);
    padding: 8px 20px;
    border-radius: var(--radius);
    display: inline-block;
}

/* ---- Mobile Toggle ---- */
.mobile-toggle { display: none; background: none; border: none; font-size: 24px; cursor: pointer; color: var(--dark); }

/* ---- Dashboard Layout (New) ---- */
.dash-layout { display: flex; gap: 0; margin: -16px -16px 0; min-height: calc(100vh - 180px); }

.dash-sidebar {
    width: 270px;
    background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
    flex-shrink: 0;
    padding: 0;
    border-radius: 0 16px 16px 0;
    color: #fff;
}

.dash-sidebar-profile {
    padding: 28px 24px 20px;
    text-align: center;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}
.dash-avatar {
    width: 60px; height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #2563eb, #7c3aed);
    display: flex; align-items: center; justify-content: center;
    font-size: 24px; font-weight: 700; color: #fff;
    margin: 0 auto 10px;
    box-shadow: 0 4px 12px rgba(37,99,235,0.4);
}
.dash-user-name { font-weight: 600; font-size: 15px; margin-bottom: 4px; }
.dash-badge-premium {
    display: inline-block;
    font-size: 10px; font-weight: 700;
    padding: 3px 10px; border-radius: 20px;
    background: linear-gradient(135deg, #f59e0b, #eab308);
    color: #1e293b; text-transform: uppercase; letter-spacing: 0.5px;
}
.dash-badge-free {
    display: inline-block;
    font-size: 10px; font-weight: 600;
    padding: 3px 10px; border-radius: 20px;
    background: rgba(255,255,255,0.1);
    color: #94a3b8; text-transform: uppercase;
}

.dash-nav { padding: 12px 0; }
.dash-nav-section {
    font-size: 10px; font-weight: 700; text-transform: uppercase;
    letter-spacing: 1.2px; color: #475569;
    padding: 12px 24px 6px;
}
.dash-nav-item {
    display: flex; align-items: center; gap: 12px;
    padding: 10px 24px;
    color: #94a3b8; font-size: 13px; font-weight: 500;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
    text-decoration: none;
}
.dash-nav-item:hover { color: #fff; background: rgba(255,255,255,0.05); border-left-color: rgba(255,255,255,0.2); }
.dash-nav-item.active { color: #fff; background: rgba(37,99,235,0.15); border-left-color: #2563eb; font-weight: 600; }
.dash-nav-item svg { flex-shrink: 0; }
.dash-nav-logout { color: #ef4444; margin-top: 4px; }
.dash-nav-logout:hover { color: #f87171; background: rgba(239,68,68,0.1); }

.dash-main { flex: 1; padding: 24px 28px; background: #f8fafc; min-width: 0; }

/* Welcome Banner */
.dash-welcome {
    display: flex; align-items: center; justify-content: space-between;
    background: linear-gradient(135deg, #2563eb 0%, #7c3aed 50%, #db2777 100%);
    color: #fff; padding: 24px 28px;
    border-radius: 16px; margin-bottom: 24px;
    box-shadow: 0 4px 20px rgba(37,99,235,0.25);
}
.dash-welcome-title { font-size: 22px; font-weight: 700; margin-bottom: 4px; }
.dash-welcome-sub { font-size: 13px; opacity: 0.85; }
.dash-welcome .btn { background: rgba(255,255,255,0.2); color: #fff; border: 1px solid rgba(255,255,255,0.3); backdrop-filter: blur(4px); }
.dash-welcome .btn:hover { background: rgba(255,255,255,0.3); }

/* Stat Cards */
.dash-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 24px; }
.dash-stat-card {
    border-radius: 14px; padding: 20px;
    display: flex; flex-direction: column; gap: 12px;
    position: relative; overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.dash-stat-card:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,0.12); }
.dash-stat-card::before {
    content: ''; position: absolute; top: -20px; right: -20px;
    width: 80px; height: 80px; border-radius: 50%;
    background: rgba(255,255,255,0.15);
}
.dash-stat-icon {
    width: 42px; height: 42px; border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    background: rgba(255,255,255,0.2); color: #fff;
}
.dash-stat-label { font-size: 12px; font-weight: 600; opacity: 0.85; text-transform: uppercase; letter-spacing: 0.3px; }
.dash-stat-value { font-size: 24px; font-weight: 800; }
.dash-stat-link {
    font-size: 12px; font-weight: 600; opacity: 0.8;
    text-decoration: none; transition: opacity 0.2s;
}
.dash-stat-link:hover { opacity: 1; }

.dash-stat-wallet { background: linear-gradient(135deg, #2563eb, #3b82f6); color: #fff; }
.dash-stat-wallet .dash-stat-link { color: #fff; }
.dash-stat-cashback { background: linear-gradient(135deg, #16a34a, #22c55e); color: #fff; }
.dash-stat-cashback .dash-stat-link { color: #fff; }
.dash-stat-commission { background: linear-gradient(135deg, #7c3aed, #a855f7); color: #fff; }
.dash-stat-commission .dash-stat-link { color: #fff; }
.dash-stat-orders { background: linear-gradient(135deg, #ea580c, #f97316); color: #fff; }
.dash-stat-orders .dash-stat-link { color: #fff; }

/* Dashboard Grid */
.dash-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }

/* Dashboard Cards */
.dash-card {
    background: #fff; border-radius: 14px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    overflow: hidden;
}
.dash-card-header {
    display: flex; align-items: center; gap: 10px;
    padding: 16px 20px; border-bottom: 1px solid #e2e8f0;
    font-weight: 600; font-size: 14px; color: #1e293b;
}
.dash-card-header svg { color: var(--primary); }
.dash-card-body { padding: 20px; }

/* Referral Card */
.dash-referral-card {
    background: linear-gradient(135deg, #059669 0%, #10b981 50%, #34d399 100%);
    color: #fff; border-radius: 16px;
    padding: 28px; text-align: center;
    box-shadow: 0 4px 20px rgba(5,150,105,0.3);
    position: relative; overflow: hidden;
}
.dash-referral-card::before {
    content: ''; position: absolute; top: -30px; left: -30px;
    width: 120px; height: 120px; border-radius: 50%;
    background: rgba(255,255,255,0.08);
}
.dash-referral-card::after {
    content: ''; position: absolute; bottom: -40px; right: -20px;
    width: 100px; height: 100px; border-radius: 50%;
    background: rgba(255,255,255,0.06);
}
.dash-referral-icon { margin-bottom: 8px; }
.dash-referral-label { font-size: 12px; font-weight: 600; opacity: 0.85; text-transform: uppercase; letter-spacing: 1px; }
.dash-referral-code {
    font-size: 28px; font-weight: 800; letter-spacing: 5px;
    margin: 10px 0; padding: 8px 24px;
    background: rgba(255,255,255,0.2); border-radius: 10px;
    display: inline-block; backdrop-filter: blur(4px);
}
.dash-referral-hint { font-size: 12px; opacity: 0.8; margin-bottom: 16px; }
.dash-referral-actions { display: flex; gap: 10px; justify-content: center; position: relative; z-index: 1; }
.dash-referral-btn {
    background: rgba(255,255,255,0.2) !important;
    color: #fff !important; border: 1px solid rgba(255,255,255,0.25) !important;
    display: flex; align-items: center; gap: 6px;
    backdrop-filter: blur(4px);
}
.dash-referral-btn:hover { background: rgba(255,255,255,0.3) !important; }

/* Team Levels */
.dash-team-levels { display: flex; flex-direction: column; gap: 10px; }
.dash-team-level { display: flex; align-items: center; justify-content: space-between; }
.dash-team-level-bar { display: flex; align-items: center; gap: 10px; }
.dash-team-level-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.dash-team-level-name { font-size: 13px; color: #475569; font-weight: 500; }
.dash-team-level-count { font-size: 18px; font-weight: 700; }
.dash-team-total {
    display: flex; justify-content: space-between; align-items: center;
    padding-top: 12px; margin-top: 12px;
    border-top: 1px solid #e2e8f0;
    font-size: 13px; color: #64748b;
}

/* Membership Status */
.dash-membership-active {
    display: flex; align-items: center; gap: 16px;
    padding: 12px; background: #f0fdf4; border-radius: 12px;
}
.dash-membership-badge { flex-shrink: 0; }

/* Order List */
.dash-order-list { display: flex; flex-direction: column; gap: 8px; }
.dash-order-item {
    display: flex; align-items: center; gap: 12px;
    padding: 10px 12px; border-radius: 10px;
    border: 1px solid #f1f5f9;
    text-decoration: none; color: inherit;
    transition: all 0.2s ease;
}
.dash-order-item:hover { background: #f8fafc; border-color: #e2e8f0; color: inherit; }
.dash-order-icon {
    width: 42px; height: 42px; border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 11px; font-weight: 700; flex-shrink: 0;
}
.dash-order-info { flex: 1; min-width: 0; }
.dash-order-number { font-size: 13px; font-weight: 600; color: #1e293b; }
.dash-order-date { font-size: 11px; color: #94a3b8; }
.dash-order-right { text-align: right; flex-shrink: 0; }
.dash-order-amount { font-size: 14px; font-weight: 700; color: #1e293b; }
.dash-order-status { display: inline-block; font-size: 10px; font-weight: 600; padding: 2px 8px; border-radius: 6px; margin-top: 2px; }

/* Empty State */
.dash-empty-state { text-align: center; padding: 24px 0; }
.dash-empty-state p { color: #94a3b8; margin: 12px 0; font-size: 14px; }

/* Quick Actions Grid */
.dash-quick-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.dash-quick-item {
    display: flex; flex-direction: column; align-items: center; gap: 8px;
    padding: 16px 8px; border-radius: 12px;
    background: color-mix(in srgb, var(--qc) 6%, transparent);
    color: var(--qc); text-decoration: none;
    transition: all 0.2s ease; font-size: 12px; font-weight: 600;
}
.dash-quick-item:hover { background: color-mix(in srgb, var(--qc) 12%, transparent); transform: translateY(-2px); color: var(--qc); }

/* Dashboard Mobile Toggle */
.dash-mobile-toggle { display: none; }

/* ---- Responsive ---- */
@media (max-width: 1024px) {
    .features-bar { grid-template-columns: repeat(2, 1fr); }
    .category-grid { grid-template-columns: 1fr; }
    .nav-search-wrapper { max-width: 280px; margin: 0 12px; }
    .shop-content .product-grid { grid-template-columns: repeat(3, 1fr); }
    .shop-sidebar { width: 230px; }
    .dash-stats { grid-template-columns: repeat(2, 1fr); }
    .dash-grid-2 { grid-template-columns: 1fr; }
    .dash-sidebar { width: 240px; }
    .hero-slide-visual { width: 320px; height: 260px; margin-right: 24px; }
    .hero-slide-content { max-width: 440px; padding: 0 32px; }
}

@media (max-width: 768px) {
    .row { flex-direction: column; }
    .col-3, .col-4, .col-6, .col-8, .col-9 { width: 100%; }
    .navbar-menu { display: none; flex-direction: column; position: absolute; top: 64px; left: 0; right: 0; background: var(--white); border-bottom: 1px solid var(--border); padding: 16px; box-shadow: var(--shadow-lg); gap: 4px; }
    .navbar-menu.show { display: flex; }
    .mobile-toggle { display: block; }
    .nav-search-wrapper { display: none; }
    .product-grid, .shop-content .product-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .sidebar { display: none; }
    .main-content { padding: 16px; }
    .dash-sidebar { display: none; }
    .dash-layout { margin: -16px -8px 0; }
    .dash-main { padding: 16px; }
    .dash-stats { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .dash-welcome { flex-direction: column; text-align: center; gap: 12px; padding: 20px; }
    .dash-quick-grid { grid-template-columns: repeat(3, 1fr); }
    .form-row { flex-direction: column; gap: 0; }
    .hero-section { padding: 36px 24px; }
    .hero-title { font-size: 28px; }
    .hero-carousel-track { height: auto; min-height: 400px; }
    .hero-carousel-slide { flex-direction: column; padding: 30px 0 60px; }
    .hero-slide-content { padding: 0 24px; max-width: 100%; text-align: center; }
    .hero-slide-content .hero-title { font-size: 24px; }
    .hero-slide-content .hero-buttons { justify-content: center; }
    .hero-slide-visual { width: 260px; height: 180px; margin: 20px auto 0; transform: rotate(0deg); border-radius: 16px; }
    .hero-nav { width: 36px; height: 36px; font-size: 14px; }
    .product-carousel-item { min-width: 200px; max-width: 200px; }
    .carousel-nav-group .btn { display: none; }
    .features-bar { grid-template-columns: 1fr; }
    .promo-banner { flex-direction: column; text-align: center; padding: 32px 24px; }
    .subscription-features { flex-direction: column; align-items: center; gap: 12px; }
    .filter-tags { margin-bottom: 12px; }
}

@media (max-width: 480px) {
    .product-grid, .shop-content .product-grid { grid-template-columns: 1fr; }
    .stats-grid { grid-template-columns: 1fr; }
    .hero-buttons { flex-direction: column; }
    .dash-stats { grid-template-columns: 1fr; }
    .dash-quick-grid { grid-template-columns: repeat(2, 1fr); }
    .dash-referral-code { font-size: 22px; letter-spacing: 3px; }
}

/* ---- Hierarchical Tree (User) ---- */
.htree { padding: 0; }
.htree-node { position: relative; }
.htree-root > .htree-node-card { margin-bottom: 0; }

.htree-node-card {
    display: flex; align-items: center; gap: 12px;
    padding: 10px 14px; border-radius: 12px;
    background: #fff; border: 1.5px solid #e2e8f0;
    transition: all 0.2s ease; cursor: default;
    position: relative;
}
.htree-has-children > .htree-node-card { cursor: pointer; }
.htree-has-children > .htree-node-card:hover { border-color: var(--nc, #e2e8f0); box-shadow: 0 2px 8px rgba(0,0,0,0.06); }

.htree-root-card {
    background: linear-gradient(135deg, #1e293b, #334155);
    color: #fff; border-color: transparent;
    padding: 14px 18px; border-radius: 14px;
    box-shadow: 0 4px 16px rgba(30,41,59,0.25);
}
.htree-root-card .htree-name { color: #fff; font-size: 15px; }
.htree-root-card .htree-meta { color: #94a3b8; }

.htree-avatar {
    width: 38px; height: 38px; border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 15px; font-weight: 700; flex-shrink: 0;
}
.htree-info { flex: 1; min-width: 0; }
.htree-name { font-size: 13px; font-weight: 600; color: #1e293b; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.htree-meta { font-size: 11px; color: #94a3b8; }

.htree-right { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }

.htree-level-tag {
    display: inline-block; padding: 2px 8px; border-radius: 6px;
    font-size: 10px; font-weight: 700; text-transform: uppercase;
}

.htree-badge {
    display: inline-flex; align-items: center; justify-content: center;
    width: 22px; height: 22px; border-radius: 6px;
    font-size: 10px; font-weight: 700;
}
.htree-badge-premium { background: linear-gradient(135deg, #f59e0b, #eab308); color: #1e293b; }
.htree-badge-free { background: #f1f5f9; color: #94a3b8; }

.htree-toggle {
    display: flex; align-items: center; justify-content: center;
    width: 22px; height: 22px; border-radius: 6px;
    background: #f1f5f9; color: #64748b;
    transition: transform 0.2s ease;
}
.htree-collapsed > .htree-node-card .htree-toggle { transform: rotate(-90deg); }

/* Tree connector lines */
.htree-children {
    padding-left: 28px; margin-left: 19px;
    border-left: 2px solid #e2e8f0;
    display: flex; flex-direction: column; gap: 6px;
    padding-top: 6px;
}
.htree-children > .htree-node { position: relative; }
.htree-children > .htree-node::before {
    content: '';
    position: absolute; top: 20px; left: -28px;
    width: 26px; height: 2px;
    background: #e2e8f0;
}

/* Collapse animation */
.htree-collapsed > .htree-children { display: none; }

/* Responsive */
@media (max-width: 768px) {
    .htree-children { padding-left: 16px; margin-left: 12px; }
    .htree-children > .htree-node::before { left: -16px; width: 14px; }
    .htree-node-card { padding: 8px 10px; gap: 8px; }
    .htree-avatar { width: 32px; height: 32px; font-size: 13px; }
    .htree-name { font-size: 12px; }
}

/* ---- Utility ---- */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-muted { color: var(--gray); }
.text-success { color: var(--secondary); }
.text-danger { color: var(--danger); }
.text-primary { color: var(--primary); }
.fw-bold { font-weight: 700; }
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.p-2 { padding: 16px; }
.p-3 { padding: 24px; }
.d-flex { display: flex; }
.gap-2 { gap: 16px; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.hidden { display: none; }
