/* --- Design System & Global Variables --- */
:root {
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    --glass: rgba(255, 255, 255, 0.8);
    --dark: #1A1A1A;
    --light: #FFFFFF;
    --text: #333333;
}

/* Theme 1: Sunset (Warm & Vibrant) */
[data-theme="sunset"] {
    --primary: #FFB399;
    --secondary: #FF9A86;
    --accent: #FFF0BE;
    --gray: #F5F5F5;
    --primary-glow: rgba(255, 179, 153, 0.4);
}

/* Theme 2: Emerald (Fresh & Professional) */
[data-theme="emerald"] {
    --primary: #1F6F5F;
    --secondary: #2FA084;
    --accent: #6FCF97;
    --gray: #EEEEEE;
    --primary-glow: rgba(31, 111, 95, 0.4);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
}

body {
    background-color: var(--light);
    color: var(--text);
    overflow-x: hidden;
    line-height: 1.6;
}

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

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* --- Header --- */
header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--glass);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    transition: var(--transition);
}

.header-main {
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -1px;
}

.desktop-nav {
    display: flex;
    gap: 2.5rem;
    height: 100%;
    align-items: center;
}

.nav-item {
    position: relative;
    font-weight: 500;
    cursor: pointer;
    padding: 1rem 0;
    transition: var(--transition);
}

.nav-item:hover {
    color: var(--secondary);
}

.nav-item::after {
    content: '';
    position: absolute;
    bottom: 5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: var(--transition);
}

.nav-item:hover::after {
    width: 100%;
}

/* Mega Menu */
.mega-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    width: 90vw;
    max-width: 1000px;
    background: white;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    padding: 2.5rem;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 1001;
}

.nav-item:hover .mega-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.mega-col h4 {
    margin-bottom: 1rem;
    font-size: 1.1rem;
    color: var(--secondary);
}

.mega-col li {
    margin-bottom: 0.5rem;
    color: #666;
    transition: var(--transition);
}

.mega-col li:hover {
    color: var(--primary);
    padding-left: 5px;
}

.header-actions {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.action-icon {
    position: relative;
    cursor: pointer;
    transition: var(--transition);
}

.action-icon:hover {
    color: var(--primary);
    transform: scale(1.1);
}

.badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--secondary);
    color: white;
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 10px;
    font-weight: 700;
}

/* Mobile Toggle */
.mobile-toggle {
    display: none;
    cursor: pointer;
}

/* --- Drawer --- */
.drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.drawer {
    position: fixed;
    top: 0;
    left: -300px;
    width: 300px;
    height: 100%;
    background: white;
    z-index: 10001;
    transition: var(--transition);
    padding: 2rem;
    display: flex;
    flex-direction: column;
}

.drawer.active {
    left: 0;
}

.drawer-overlay.active {
    opacity: 1;
    visibility: visible;
}

.drawer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.drawer-nav li {
    margin-bottom: 1.5rem;
    font-size: 1.2rem;
    font-weight: 500;
}

/* --- Hero Section --- */
.hero-section {
    padding: 2rem 0;
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 2rem;
}

.categories-sidebar {
    background: white;
    border-radius: 16px;
    box-shadow: var(--shadow);
    padding: 1.5rem;
    border: 1px solid rgba(0, 0, 0, 0.03);
}

.category-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--dark);
}

.category-list li {
    padding: 0.8rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 500;
    color: #555;
}

.category-list li:hover {
    background: var(--accent);
    color: var(--dark);
}

.slider-container {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    height: 500px;
    box-shadow: var(--shadow);
}

.slider {
    display: flex;
    height: 100%;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.slide {
    min-width: 100%;
    height: 100%;
    position: relative;
}

.slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.slide-content {
    position: absolute;
    top: 50%;
    left: 10%;
    transform: translateY(-50%);
    color: white;
    max-width: 500px;
    z-index: 2;
}

.slide-content h2 {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    line-height: 1.1;
    text-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.slide-content p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.btn {
    display: inline-block;
    padding: 1rem 2.5rem;
    border-radius: 50px;
    font-weight: 600;
    transition: var(--transition);
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: var(--primary);
    color: white;
    box-shadow: 0 10px 20px var(--primary-glow);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 30px var(--primary-glow);
}

.slider-dots {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 3;
}

.dot {
    width: 10px;
    height: 10px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    cursor: pointer;
    transition: var(--transition);
}

.dot.active {
    background: white;
    width: 30px;
    border-radius: 10px;
}

/* --- Product Sections --- */
section {
    padding: 4rem 0;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2.5rem;
}

.section-title h2 {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--dark);
}

.section-title p {
    color: #888;
}

.products-scroll {
    display: flex;
    gap: 1.5rem;
    overflow-x: auto;
    padding-bottom: 2rem;
    scroll-behavior: smooth;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.products-scroll::-webkit-scrollbar {
    display: none;
}

.product-card {
    min-width: calc((100% - 6rem) / 5);
    background: white;
    border-radius: 16px;
    padding: 1rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.02);
    transition: var(--transition);
    border: 1px solid rgba(0, 0, 0, 0.03);
    position: relative;
}

.product-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow);
    border-color: var(--primary);
}

.product-img {
    width: 100%;
    aspect-ratio: 1;
    border-radius: 12px;
    overflow: hidden;
    background: var(--gray);
    margin-bottom: 1rem;
}

.product-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.product-card:hover .product-img img {
    transform: scale(1.1);
}

.product-info h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.product-price {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.price {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--secondary);
}

.add-to-cart {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--accent);
    display: flex;
    font-size: 30px;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
}

.add-to-cart:hover {
    background: var(--primary);
    color: white;
}

/* --- Special Offers --- */
.offers-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.offer-banner {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    height: 350px;
    display: flex;
    align-items: center;
    padding: 3rem;
    box-shadow: var(--shadow);
}

.offer-banner.one {
    background: linear-gradient(rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.3)), url('https://images.unsplash.com/photo-1607082348824-0a96f2a4b9da?q=80&w=2070&auto=format&fit=crop');
    background-size: cover;
    background-position: center;
}

.offer-banner.two {
    background: linear-gradient(rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.3)), url('https://images.unsplash.com/photo-1441986300917-64674bd600d8?q=80&w=2070&auto=format&fit=crop');
    background-size: cover;
    background-position: center;
}

.offer-content {
    color: white;
    z-index: 2;
}

.offer-content h3 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    font-weight: 800;
}

/* --- Reviews --- */
.reviews-scroll {
    display: flex;
    gap: 2rem;
    overflow-x: auto;
    padding: 2rem 0;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.reviews-scroll::-webkit-scrollbar {
    display: none;
}

.review-card {
    min-width: 400px;
    background: white;
    padding: 2.5rem;
    border-radius: 20px;
    box-shadow: var(--shadow);
    border: 1px solid rgba(0, 0, 0, 0.03);
}

.user-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.user-meta img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
}

.user-name h4 {
    font-weight: 700;
}

.stars {
    color: #FFC107;
    margin-bottom: 1rem;
    display: flex;
    gap: 2px;
}

/* --- Footer --- */
footer {
    background: #111;
    color: white;
    padding: 5rem 0 2rem;
    margin-top: 4rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 4rem;
    margin-bottom: 4rem;
}

.footer-about h3 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.footer-links h4 {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    position: relative;
}

.footer-links h4::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 40px;
    height: 2px;
    background: var(--primary);
}

.footer-links li {
    margin-bottom: 1rem;
    opacity: 0.7;
    transition: var(--transition);
    cursor: pointer;
}

.footer-links li:hover {
    opacity: 1;
    color: var(--primary);
    padding-left: 5px;
}

.newsletter p {
    opacity: 0.7;
    margin-bottom: 1.5rem;
}

.input-group {
    display: flex;
    background: rgba(255, 255, 255, 0.1);
    padding: 5px;
    border-radius: 50px;
}

.input-group input {
    background: transparent;
    border: none;
    padding: 0 1.5rem;
    color: white;
    flex: 1;
    outline: none;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    opacity: 0.6;
    font-size: 0.9rem;
}

/* --- Responsive --- */
@media (max-width: 1024px) {
    .desktop-nav {
        display: none;
    }

    .mobile-toggle {
        display: block;
    }

    .hero-section {
        grid-template-columns: 1fr;
    }

    .categories-sidebar {
        display: none;
    }

    .product-card {
        min-width: 250px;
    }

    .offers-grid {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 1.5rem;
    }

    .slide-content h2 {
        font-size: 2.5rem;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .review-card {
        min-width: 300px;
    }
}

/* --- Product Page Specific --- */
.product-details {
    padding: 3rem 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

.product-gallery {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.main-img {
    width: 100%;
    aspect-ratio: 1;
    border-radius: 24px;
    overflow: hidden;
    background: var(--gray);
    box-shadow: var(--shadow);
}

.main-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.thumb-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

.thumb {
    aspect-ratio: 1;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: var(--transition);
}

.thumb:hover,
.thumb.active {
    border-color: var(--primary);
}

.thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-meta h1 {
    font-size: 2.8rem;
    font-weight: 800;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.product-rating {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.product-price-large {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 2rem;
}

.product-options {
    margin-bottom: 2.5rem;
}

.option-group {
    margin-bottom: 1.5rem;
}

.option-group h4 {
    margin-bottom: 0.8rem;
    font-weight: 600;
}

.option-choices {
    display: flex;
    gap: 0.8rem;
}

.choice {
    padding: 0.8rem 1.5rem;
    border: 1px solid #ddd;
    border-radius: 10px;
    cursor: pointer;
    transition: var(--transition);
}

.choice:hover,
.choice.active {
    border-color: var(--primary);
    background: var(--gray);
}

.qty-input {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2.5rem;
}

.qty-btn {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    border: 1px solid #ddd;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.qty-val {
    font-weight: 700;
    font-size: 1.2rem;
}

.buy-actions {
    display: flex;
    gap: 1rem;
}

.product-tabs {
    margin-top: 5rem;
}

.tab-nav {
    display: flex;
    gap: 3rem;
    border-bottom: 1px solid #eee;
    margin-bottom: 2rem;
}

.tab-item {
    padding: 1rem 0;
    font-weight: 600;
    cursor: pointer;
    position: relative;
    opacity: 0.6;
}

.tab-item.active {
    opacity: 1;
    color: var(--primary);
}

.tab-item.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--primary);
}

.tab-content {
    display: none;
    line-height: 1.8;
}

.tab-content.active {
    display: block;
}

@media (max-width: 1024px) {
    .product-details {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .product-meta h1 {
        font-size: 2rem;
    }
}

/* --- Cart Page Specific --- */
.cart-layout {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 3rem;
    padding: 3rem 0;
}

.cart-items {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    box-shadow: var(--shadow);
}

.cart-header {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #eee;
    font-weight: 700;
    margin-bottom: 2rem;
    opacity: 0.7;
}

.cart-item {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    align-items: center;
    padding: 1.5rem 0;
    border-bottom: 1px solid #f9f9f9;
}

.cart-item-info {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.cart-item-img {
    width: 80px;
    height: 80px;
    border-radius: 12px;
    overflow: hidden;
    background: var(--gray);
}

.cart-item-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cart-item-name h4 {
    font-size: 1.1rem;
    margin-bottom: 5px;
}

.cart-item-name p {
    font-size: 0.8rem;
    opacity: 0.5;
}

.cart-summary {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    box-shadow: var(--shadow);
    height: fit-content;
}

.summary-title {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 2rem;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1.2rem;
}

.summary-total {
    border-top: 1px solid #eee;
    padding-top: 1.5rem;
    margin-top: 1.5rem;
    font-size: 1.3rem;
    font-weight: 800;
}

.coupon-section {
    margin-top: 2rem;
}

@media (max-width: 1024px) {
    .cart-layout {
        grid-template-columns: 1fr;
    }

    .cart-header {
        display: none;
    }

    .cart-item {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        text-align: center;
        border-bottom: 1px solid #eee;
        padding-bottom: 2rem;
    }

    .cart-item-info {
        flex-direction: column;
    }
}

/* --- Checkout Page Specific --- */
.checkout-layout {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 4rem;
    padding: 3rem 0;
}

.checkout-form {
    background: white;
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: var(--shadow);
}

.form-section {
    margin-bottom: 3rem;
}

.form-section h3 {
    font-size: 1.4rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--primary);
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-weight: 600;
    font-size: 0.9rem;
}

.form-group input,
.form-group select {
    padding: 1rem;
    border: 1px solid #ddd;
    border-radius: 10px;
    outline: none;
    transition: var(--transition);
}

.form-group input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

.payment-methods {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.payment-method {
    border: 1px solid #eee;
    padding: 1.5rem;
    border-radius: 15px;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    cursor: pointer;
    transition: var(--transition);
}

.payment-method:hover,
.payment-method.active {
    border-color: var(--primary);
    background: var(--gray);
}

.payment-method input {
    width: 20px;
    height: 20px;
}

.order-summary-box {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    box-shadow: var(--shadow);
    position: sticky;
    top: 100px;
}

.mini-item {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #f5f5f5;
}

.mini-item-img {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    overflow: hidden;
    background: var(--gray);
}

.mini-item-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

@media (max-width: 1024px) {
    .checkout-layout {
        grid-template-columns: 1fr;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }
}

/* --- Status Pages (Success, Failed, 404) --- */
.status-page {
    text-align: center;
    padding: 6rem 0;
    max-width: 600px;
    margin: 0 auto;
}

.status-icon {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 2rem;
    font-size: 3rem;
}

.status-success {
    background: #e8f5e9;
    color: #4caf50;
}

.status-failed {
    background: #ffebee;
    color: #f44336;
}

.status-404 {
    background: #f5f5f5;
    color: #666;
}

/* --- About & Contact --- */
.text-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 4rem 0;
    line-height: 2;
}

.contact-layout {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 4rem;
    padding: 4rem 0;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.info-card {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.info-icon {
    width: 50px;
    height: 50px;
    background: var(--gray);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
}

/* --- Category Page --- */
.category-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 3rem;
    padding: 3rem 0;
}

.filter-sidebar {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    box-shadow: var(--shadow);
    height: fit-content;
}

.filter-group {
    margin-bottom: 2.5rem;
}

.filter-group h4 {
    margin-bottom: 1.2rem;
    font-weight: 700;
    border-bottom: 2px solid var(--gray);
    padding-bottom: 10px;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 2rem;
}

@media (max-width: 768px) {

    .contact-layout,
    .category-layout {
        grid-template-columns: 1fr;
    }
}

/* --- Dashboard Specific --- */
.dashboard-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 3rem;
    padding: 3rem 0;
}

.dashboard-sidebar {
    background: white;
    border-radius: 20px;
    padding: 2rem 1.5rem;
    box-shadow: var(--shadow);
    height: fit-content;
}

.user-profile-brief {
    text-align: center;
    margin-bottom: 2.5rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--gray);
}

.user-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin-bottom: 1rem;
    border: 3px solid var(--accent);
}

.dash-nav {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.dash-nav-item {
    padding: 1rem 1.5rem;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 15px;
    font-weight: 600;
    color: #666;
    transition: var(--transition);
    cursor: pointer;
}

.dash-nav-item:hover,
.dash-nav-item.active {
    background: var(--primary);
    color: white;
}

.dash-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-bottom: 3rem;
}

.stat-card {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.stat-info h3 {
    font-size: 1.8rem;
    font-weight: 800;
}

.stat-info p {
    font-size: 0.9rem;
    opacity: 0.6;
}

.recent-orders {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    box-shadow: var(--shadow);
}

.dash-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1.5rem;
}

.dash-table th {
    text-align: left;
    padding: 1rem;
    opacity: 0.6;
    font-weight: 600;
    border-bottom: 1px solid #eee;
}

.dash-table td {
    padding: 1.5rem 1rem;
    border-bottom: 1px solid #f9f9f9;
}

.status-badge {
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
}

.status-shipped {
    background: #e3f2fd;
    color: #1e88e5;
}

.status-pending {
    background: #fff3e0;
    color: #fb8c00;
}

@media (max-width: 1024px) {
    .dashboard-layout {
        grid-template-columns: 1fr;
    }

    .dashboard-sidebar {
        position: fixed;
        left: -300px;
        top: 0;
        height: 100vh;
        width: 280px;
        z-index: 10001;
        border-radius: 0;
        transition: var(--transition);
        overflow-y: auto;
    }

    .dashboard-sidebar.active {
        left: 0;
    }

    .dash-toggle {
        display: inline-flex !important;
        align-items: center;
        gap: 10px;
        background: var(--gray);
        padding: 0.8rem 1.5rem;
        border-radius: 12px;
        margin-bottom: 2rem;
        cursor: pointer;
        font-weight: 700;
    }
}

.dash-toggle {
    display: none;
}

/* --- MLM Specific --- */
.mlm-section-title {
    margin: 2rem 0 1rem;
    padding-left: 1.5rem;
    font-size: 0.8rem;
    font-weight: 800;
    opacity: 0.4;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.referral-box {
    background: var(--gray);
    padding: 1.5rem;
    border-radius: 15px;
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.referral-url {
    flex: 1;
    font-family: monospace;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
}

.commission-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.commission-card {
    background: white;
    border-radius: 20px;
    padding: 1.5rem;
    box-shadow: var(--shadow);
    border-left: 5px solid var(--primary);
}

.commission-card h4 {
    font-size: 0.9rem;
    opacity: 0.6;
    margin-bottom: 0.5rem;
}

.commission-card .amount {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--dark);
}

.network-list {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    box-shadow: var(--shadow);
}

.member-item {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1.2rem 0;
    border-bottom: 1px solid #f9f9f9;
}

.member-level {
    padding: 4px 10px;
    background: var(--accent);
    border-radius: 5px;
    font-size: 0.75rem;
    font-weight: 700;
}

/* --- Genealogy Tree --- */
.tree-container {
    padding: 3rem 0;
    overflow-x: auto;
    text-align: center;
}

.tree ul {
    padding-top: 20px;
    position: relative;
    transition: all 0.5s;
    display: flex;
    justify-content: center;
}

.tree li {
    float: left;
    text-align: center;
    list-style-type: none;
    position: relative;
    padding: 20px 5px 0 5px;
    transition: all 0.5s;
}

/* Connecting Lines */
.tree li::before,
.tree li::after {
    content: '';
    position: absolute;
    top: 0;
    right: 50%;
    border-top: 2px solid #ddd;
    width: 50%;
    height: 20px;
}

.tree li::after {
    right: auto;
    left: 50%;
    border-left: 2px solid #ddd;
}

/* Remove connectors for single child */
.tree li:only-child::after,
.tree li:only-child::before {
    display: none;
}

.tree li:only-child {
    padding-top: 0;
}

.tree li:first-child::before,
.tree li:last-child::after {
    border: 0 none;
}

.tree li:last-child::before {
    border-right: 2px solid #ddd;
    border-radius: 0 5px 0 0;
}

.tree li:first-child::after {
    border-radius: 5px 0 0 0;
}

/* Vertical line from parent */
.tree ul ul::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    border-left: 2px solid #ddd;
    width: 0;
    height: 20px;
}

.tree-node {
    display: inline-block;
    padding: 1rem;
    background: white;
    border-radius: 12px;
    box-shadow: var(--shadow);
    border: 1px solid rgba(0, 0, 0, 0.05);
    position: relative;
    z-index: 2;
    min-width: 100px;
}

.node-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 3px solid var(--primary);
    margin: 0 auto 0.5rem;
    overflow: hidden;
}

.node-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.node-info h5 {
    font-size: 0.8rem;
    font-weight: 700;
}