:root {
    --dash-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --card-bg: #ffffff;
    --text-main: #2d3436;
    --text-sub: #636e72;
    --radius: 16px;
    --success: #2ecc71;
    --warning: #f39c12;
    --danger: #e74c3c;
}

/* --- 1. Layout & Containers --- */
.woocommerce-account .site-content, 
.woocommerce-account .container, 
.woocommerce-account .content-area {
    max-width: 100% !important;
    width: 100% !important;
    padding: 10px !important;
    margin: 0 auto !important;
}

.woocommerce-MyAccount-content {
    width: 100% !important;
    float: none !important;
}

/* --- 2. Welcome Banner --- */
.dash-welcome-banner {
    background: var(--dash-gradient);
    border-radius: var(--radius);
    padding: 40px;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    box-shadow: 0 10px 20px rgba(118, 75, 162, 0.2);
}

.welcome-text h2 { color: white !important; margin: 0; font-size: 2rem; }
.user-role-badge { 
    background: rgba(255,255,255,0.15); 
    padding: 5px 12px; 
    border-radius: 20px; 
    font-size: 0.85rem; 
    display: inline-block;
    margin-top: 10px;
}

.stat-item {
    background: rgba(255, 255, 255, 0.2);
    padding: 15px 25px;
    border-radius: 12px;
    text-align: center;
    backdrop-filter: blur(5px);
}

/* --- 3. Grid & Cards --- */
.creative-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.c-card {
    background: var(--card-bg);
    border: 1px solid #edf2f7;
    padding: 25px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    text-decoration: none !important;
    transition: all 0.3s ease;
}

.c-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.05);
}

.c-icon { font-size: 30px; margin-right: 20px; }

/* --- 4. Approval Status UI (NEW) --- */
.approval-notice-box {
    background: #fff3cd;
    color: #856404;
    padding: 20px;
    border-radius: var(--radius);
    margin-bottom: 25px;
    border-left: 5px solid var(--warning);
}

.status-tag {
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: bold;
    text-transform: uppercase;
}

.status-active { background: #e6fffa; color: #234e52; }
.status-pending { background: #fffaf0; color: #7b341e; }

/* --- 5. Navigation Menu (Horizontal Bubbles) --- */
/* --- Optimized Navigation --- */
.woocommerce-MyAccount-navigation ul {
    list-style: none;
    padding: 0;
    margin: 0 0 25px 0;
    display: flex;
    flex-wrap: wrap; /* Allows items to wrap on desktop instead of scrolling */
    gap: 10px;
    border-bottom: none; /* Removed the dark border for a cleaner look */
}

@media (max-width: 768px) {
    .woocommerce-MyAccount-navigation ul {
        flex-wrap: nowrap; /* Keep scrolling only on mobile */
        overflow-x: auto;
        padding-bottom: 10px;
        -webkit-overflow-scrolling: touch;
    }
    .woocommerce-MyAccount-navigation ul::-webkit-scrollbar {
        display: none; /* Keep scrollbar hidden on mobile */
    }
}

.woocommerce-MyAccount-navigation li {
    margin: 0; /* Managed by gap now */
}

.woocommerce-MyAccount-navigation li a {
    white-space: nowrap;
    display: inline-block;
}
.woocommerce-MyAccount-navigation ul::-webkit-scrollbar { display: none; }

.woocommerce-MyAccount-navigation li a {
    color: #636e72;
    background: #f1f2f6;
    padding: 10px 20px;
    border-radius: 30px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: 0.3s;
    display: block;
    width: 180px;
    text-decoration: none !important;
}

.woocommerce-MyAccount-navigation li.is-active a, .woocommerce-MyAccount-navigation li a:hover {
    background: var(--dash-gradient);
    color: white;
}

/* --- 6. Custom Header Wrapper --- */
.account-header-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 25px;
}

.header-left { display: flex; align-items: center; gap: 15px; }

.back-to-dash-btn, .logout-dash-btn {
    width: 45px;
    height: 45px;
    background: #f1f2f6;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-main);
    transition: 0.3s;
}

.back-to-dash-btn:hover { background: #6e5ce6; color: white; }
.logout-dash-btn:hover { background: var(--danger); color: white; }

/* --- Responsive --- */
@media (max-width: 768px) {
    .dash-welcome-banner {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }
    .welcome-text h2 { font-size: 1.5rem; }
}


/* Force the Role and Code to show */
.user-meta-info {
    display: block !important;
    visibility: visible !important;
    margin-top: 8px !important;
    font-size: 0.9rem !important;
    color: rgba(255, 255, 255, 0.9) !important;
}

.user-meta-info strong {
    color: #ffffff !important;
    font-weight: 700;
}

/* Fix for the "Recent Orders" text appearing above the banner in image 3 */
.woocommerce-MyAccount-content > p:first-of-type {
    display: none; /* This hides the default WC "From your account dashboard..." text */
}

/* --- 1. Fix Layout Overlaps --- */
/* Hide the redundant default WooCommerce welcome text seen in image 1 */
.woocommerce-MyAccount-content > p:first-of-type,
.woocommerce-MyAccount-content > div > p:first-child {
    display: none !important;
}

/* Force My Account area to ignore theme sidebars and go full width */
.woocommerce-account .site-content, 
.woocommerce-account .container, 
.woocommerce-account .content-area {
    max-width: 100% !important;
    width: 100% !important;
    padding: 10px !important;
}

/* --- 2. Fix the Menu (Image 2 Fix) --- */
/* Stop the menu from stacking vertically */
.woocommerce-MyAccount-navigation {
    width: 100% !important;
    float: none !important;
    margin-bottom: 30px !important;
}

.woocommerce-MyAccount-navigation ul {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap;
    gap: 12px;
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

.woocommerce-MyAccount-navigation li {
    margin: 0 !important;
}

.woocommerce-MyAccount-navigation li a {
    padding: 10px 20px !important;
    background: #f1f2f6;
    color: #2d3436;
    border-radius: 30px;
    text-decoration: none !important;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    display: inline-block;
}

.woocommerce-MyAccount-navigation li.is-active a {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff !important;
    box-shadow: 0 4px 12px rgba(118, 75, 162, 0.3);
}

/* --- 3. Welcome Banner Styling (Image 1 Fix) --- */
.dash-welcome-banner {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    padding: 40px !important;
    border-radius: 16px !important;
    color: #ffffff !important;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.welcome-text h2 {
    color: #ffffff !important;
    font-size: 28px !important;
    margin: 0 0 5px 0 !important;
    font-weight: 700 !important;
}

/* This styles the Role and Distributor Code we added in PHP */
.user-meta-info {
    font-size: 15px !important;
    color: rgba(255, 255, 255, 0.9) !important;
    margin: 5px 0 15px 0 !important;
    display: block !important;
}

.logout-link {
    color: #ffffff !important;
    text-decoration: underline !important;
    font-size: 14px;
    opacity: 0.8;
}

.logout-link:hover { opacity: 1; }

/* Stats box on the right */
.welcome-stats {
    background: rgba(255, 255, 255, 0.2);
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    min-width: 120px;
}

.stat-num { font-size: 32px; font-weight: 800; display: block; }
.stat-label { font-size: 11px; text-transform: uppercase; letter-spacing: 1px; }

/* --- 4. Mobile Adjustments --- */
@media (max-width: 768px) {
    .woocommerce-MyAccount-navigation ul {
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 10px;
        -webkit-overflow-scrolling: touch;
    }
    .dash-welcome-banner {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }
}



/* 1. THE GRID CONTAINER */
.woocommerce ul.products {
    display: grid !important;
    /* This creates a fluid grid that fits as many 280px columns as possible */
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)) !important;
    gap: 30px !important;
    padding: 20px !important;
    margin: 0 auto !important;
    max-width: 1200px;
}

/* 2. THE PRODUCT CARD */
.woocommerce ul.products li.product {
    width: 100% !important; /* Grid handles width now */
    background: #1a1a1a !important;
    border: 1px solid #333 !important;
    border-radius: 20px !important;
    padding: 20px !important;
    margin: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-sizing: border-box !important;
}

/* 3. RESPONSIVE TEXT & IMAGES */
.woocommerce ul.products li.product img {
    border-radius: 15px !important;
    margin-bottom: 15px !important;
    width: 100% !important;
    height: auto !important;
}

.woocommerce ul.products li.product .woocommerce-loop-product__title {
    color: #ffffff !important;
    font-size: 1.1rem !important;
    margin: 10px 0 !important;
    min-height: 2.5em; /* Keeps titles aligned even if lengths differ */
}

.woocommerce ul.products li.product .price {
    color: #a29bfe !important;
    font-size: 1.2rem !important;
    margin-bottom: 20px !important;
}

/* 4. BUTTONS (Stacked & Uniform) */
.woocommerce ul.products li.product .button, 
.woocommerce ul.products li.product a.added_to_cart {
    width: 100% !important;
    height: 48px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin: 5px 0 !important;
    border-radius: 10px !important;
    font-weight: 600 !important;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 12px !important;
    transition: 0.3s ease;
}

/* Add to Cart - Primary */
.woocommerce ul.products li.product .button {
    background-color: #6c5ce7 !important;
    color: #fff !important;
}

/* View Cart - Secondary */
.woocommerce ul.products li.product a.added_to_cart {
    border: 1px solid #6c5ce7 !important;
    color: #6c5ce7 !important;
    background: transparent !important;
}

/* 5. HOVER EFFECTS (Desktop Only) */
@media (min-width: 1024px) {
    .woocommerce ul.products li.product:hover {
        transform: translateY(-10px);
        box-shadow: 0 20px 40px rgba(0,0,0,0.6);
        border-color: #6c5ce7 !important;
    }
}

/* 6. MOBILE SPECIFIC TWEAKS */
@media (max-width: 480px) {
    .woocommerce ul.products {
        /* On very small phones, we use 1 column but reduce padding */
        grid-template-columns: 1fr !important;
        padding: 10px !important;
        gap: 20px !important;
    }
    
    .woocommerce ul.products li.product {
        padding: 15px !important;
    }
}

/* Hide checkmark icon after adding to cart */
.woocommerce li.product .added_to_cart.wc-forward::after,
.woocommerce-button.added::after {
    display: none !important;
}


/* Apply only to Shop Archive and Category Pages */
.post-type-archive-product .woocommerce ul.products,
.tax-product_cat .woocommerce ul.products {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)) !important;
    gap: 30px !important;
    padding: 20px !important;
    margin: 0 auto !important;
    max-width: 1200px;
    list-style: none !important;
}

/* Scoped Product Card */
.post-type-archive-product ul.products li.product,
.tax-product_cat ul.products li.product {
    width: 100% !important;
    background: #1a1a1a !important;
    border: 1px solid #333 !important;
    border-radius: 20px !important;
    padding: 20px !important;
    margin: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-sizing: border-box !important;
    position: relative;
}

/* Scoped Images */
.post-type-archive-product ul.products li.product img,
.tax-product_cat ul.products li.product img {
    border-radius: 15px !important;
    margin-bottom: 15px !important;
    width: 100% !important;
    height: auto !important;
}

/* Scoped Titles & Price */
.post-type-archive-product ul.products li.product .woocommerce-loop-product__title,
.tax-product_cat ul.products li.product .woocommerce-loop-product__title {
    color: #ffffff !important;
    font-size: 1.1rem !important;
    margin: 10px 0 !important;
    min-height: 2.5em; 
}

.post-type-archive-product ul.products li.product .price,
.tax-product_cat ul.products li.product .price {
    color: #a29bfe !important;
    font-size: 1.2rem !important;
    margin-bottom: 20px !important;
}

/* Scoped Buttons */
.post-type-archive-product ul.products li.product .button, 
.post-type-archive-product ul.products li.product a.added_to_cart,
.tax-product_cat ul.products li.product .button, 
.tax-product_cat ul.products li.product a.added_to_cart {
    width: 100% !important;
    height: 48px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin: 5px 0 !important;
    border-radius: 10px !important;
    font-weight: 600 !important;
    text-transform: uppercase;
    font-size: 12px !important;
    text-decoration: none !important;
}

/* Add to Cart Button Color */
.post-type-archive-product ul.products li.product .button,
.tax-product_cat ul.products li.product .button {
    background-color: #6c5ce7 !important;
    color: #fff !important;
}

/* View Cart Button Style */
.post-type-archive-product ul.products li.product a.added_to_cart,
.tax-product_cat ul.products li.product a.added_to_cart {
    border: 1px solid #6c5ce7 !important;
    color: #6c5ce7 !important;
    background: transparent !important;
}

/* Responsive Grid Adjustments */
@media (max-width: 480px) {
    .post-type-archive-product .woocommerce ul.products,
    .tax-product_cat .woocommerce ul.products {
        grid-template-columns: 1fr !important;
        padding: 10px !important;
    }
}

/* Remove checkmark icon globally but within shop context */
.post-type-archive-product .added::after, 
.tax-product_cat .added::after {
    display: none !important;
}



/* --- 1. Main Container & Layout --- */
.single-product div.product {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    padding: 40px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

/* Image & Summary Widths */
.single-product div.product .woocommerce-product-gallery {
    flex: 1 1 500px !important;
    border-radius: 20px;
    overflow: hidden;
}

.single-product div.product .summary {
    flex: 1 1 400px !important;
    background: #1a1a1a;
    padding: 30px !important;
    border-radius: 20px;
    border: 1px solid #333;
}

/* --- 2. Typography & Price --- */
.single-product .product_title {
    color: #ffffff !important;
    font-size: 2.5rem !important;
    font-weight: 700 !important;
    margin-bottom: 10px !important;
}

.single-product .price {
    color: #a29bfe !important; /* Soft purple */
    font-size: 1.8rem !important;
    font-weight: 600 !important;
    margin-bottom: 25px !important;
}

.single-product .woocommerce-product-details__short-description {
    color: #cccccc;
    line-height: 1.8;
    margin-bottom: 30px;
}

/* --- 3. Quantity & Add to Cart Section --- */
.single-product form.cart {
    display: flex !important;
    align-items: center;
    gap: 15px;
    margin-top: 30px;
}

/* Quantity Input */
.single-product .quantity input {
    background: #2d3436 !important;
    border: 1px solid #444 !important;
    color: #fff !important;
    padding: 12px !important;
    border-radius: 8px !important;
    width: 60px !important;
    height: 50px !important;
}

/* Add to Cart Button */
.single-product button.single_add_to_cart_button {
    background-color: #6c5ce7 !important;
    color: #fff !important;
    padding: 0 40px !important;
    height: 50px !important;
    border-radius: 8px !important;
    font-weight: 700 !important;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease !important;
}

.single-product button.single_add_to_cart_button:hover {
    background-color: #5b4cc4 !important;
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(108, 92, 231, 0.3);
}

/* --- 4. Product Meta (Category/SKU) --- */
.single-product .product_meta {
    border-top: 1px solid #333;
    padding-top: 20px;
    margin-top: 30px;
    color: #888;
    font-size: 0.9rem;
}

.single-product .product_meta a {
    color: #a29bfe;
    text-decoration: none;
}

/* --- 5. Tabs (Reviews/Description) --- */
.woocommerce-tabs {
    width: 100% !important;
    margin-top: 50px !important;
}

.woocommerce-tabs ul.tabs {
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
}

.woocommerce-tabs ul.tabs li {
    background: #2d3436 !important;
    border: none !important;
    border-radius: 8px 8px 0 0 !important;
    margin-right: 5px !important;
}

.woocommerce-tabs ul.tabs li.active {
    background: #6c5ce7 !important;
}

.woocommerce-tabs ul.tabs li a {
    color: #fff !important;
    font-weight: 600 !important;
}

.woocommerce-tabs .panel {
    background: #1a1a1a !important;
    padding: 30px !important;
    border: 1px solid #333 !important;
    border-radius: 0 15px 15px 15px !important;
    color: #ccc;
}

/* --- 6. Responsive Design --- */
@media (max-width: 768px) {
    .single-product div.product {
        flex-direction: column;
        padding: 20px 10px;
    }
    
    .single-product div.product .woocommerce-product-gallery,
    .single-product div.product .summary {
        flex: 1 1 100% !important;
        width: 100% !important;
    }
    
    .single-product .product_title {
        font-size: 1.8rem !important;
    }
    
    .single-product form.cart {
        flex-direction: column;
        align-items: stretch;
    }
    
    .single-product .quantity input {
        width: 100% !important;
    }
}


.woocommerce ul.products::before {
    content: none !important;
}


.wc-block-components-form .wc-block-components-text-input label, .wc-block-components-text-input label {
    color: #9d9d9d;
  
}
.edit-post-visual-editor .wc-block-checkout__shipping-method-option.wc-block-checkout__shipping-method-option--selected, .wc-block-checkout__shipping-method-option.wc-block-checkout__shipping-method-option--selected {
    background: #000000;
    border: 2px solid;
}

.wc-block-components-address-card address .wc-block-components-address-card__address-section--secondary {
    color: hsl(0deg 0% 100% / 70%);
}
a.wc-block-components-button.wp-element-button.wc-block-cart__submit-button.contained {
    background: #1e73be;
    color: #fff;
    text-decoration: none;
}



/* Styling the container to look like your image */
.quantity {
    display: inline-flex;
    align-items: center;
    border: 1px solid #333;
    border-radius: 5px;
    background: #000;
    padding: 5px;
}

.quantity input.qty {
    background: transparent;
    color: #3b82f6; /* That blue/white glow in your image */
    border: none;
    width: 40px;
    text-align: center;
    font-weight: bold;
}

.quantity .plus, .quantity .minus {
    background: transparent;
    color: #666;
    border: none;
    cursor: pointer;
    font-size: 18px;
    padding: 0 10px;
}


.wc-block-components-order-summary .wc-block-components-order-summary-item__quantity{
    background: rgb(30 115 190);
}