/**
 * JigjigaSale Master UI & CSS Redesign (Seller Center & My Account)
 */

:root {
    --js-primary: #2563eb;
    --js-primary-hover: #1d4ed8;
    --js-dark-sidebar: #0f172a;
    --js-dark-header: #020617;
    --js-body-bg: #f8fafc;
    --js-card-bg: #ffffff;
    --js-border: #e2e8f0;
    --js-text-dark: #0f172a;
    --js-text-muted: #64748b;
    --js-success: #16a34a;
    --js-warning: #d97706;
    --js-danger: #dc2626;
    --js-radius: 12px;
    --js-shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
}

/* Base Reset & Wrappers */
.seller-wrapper,
.woocommerce-account .woocommerce {
    box-sizing: border-box !important;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif !important;
}

/* ==========================================================================
   1. SELLER CENTER PORTAL STYLING
   ========================================================================== */

.seller-layout {
    display: flex;
    min-height: 85vh;
    background: var(--js-body-bg);
    border-radius: var(--js-radius);
    overflow: hidden;
    box-shadow: var(--js-shadow);
    margin: 20px 0;
}

.seller-sidebar {
    width: 260px;
    background: var(--js-dark-sidebar);
    color: #94a3b8;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}

.seller-sidebar-header {
    padding: 24px 20px;
    background: var(--js-dark-header);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.seller-sidebar-header h2,
.seller-logo h2 {
    color: #ffffff !important;
    font-size: 18px !important;
    font-weight: 800 !important;
    margin: 0 !important;
}

.seller-menu {
    list-style: none !important;
    padding: 15px 0 !important;
    margin: 0 !important;
    flex-grow: 1;
}

.seller-menu li a {
    display: flex !important;
    align-items: center !important;
    padding: 12px 20px !important;
    color: #94a3b8 !important;
    text-decoration: none !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    transition: all 0.2s ease !important;
    border-left: 3px solid transparent !important;
}

.seller-menu li a:hover,
.seller-menu li a.is-active,
.seller-menu li.active a {
    color: #ffffff !important;
    background: rgba(255, 255, 255, 0.05) !important;
    border-left-color: var(--js-primary) !important;
}

.seller-content,
.seller-main-content {
    flex-grow: 1;
    padding: 30px !important;
    background: var(--js-card-bg);
    overflow-x: auto;
}

/* Stat Grid Cards */
.seller-card-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)) !important;
    gap: 20px !important;
    margin-bottom: 30px !important;
}

.seller-card,
.seller-stat-card {
    background: #f8fafc !important;
    border: 1px solid var(--js-border) !important;
    border-radius: var(--js-radius) !important;
    padding: 20px !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.02) !important;
}

.card-number,
.seller-stat-card span {
    font-size: 26px !important;
    font-weight: 800 !important;
    color: var(--js-text-dark) !important;
}

.card-label,
.seller-stat-card h4 {
    color: var(--js-text-muted) !important;
    font-size: 12px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
}

/* Modern Tables */
.seller-orders,
.seller-products,
.staff-table {
    width: 100% !important;
    border-collapse: collapse !important;
    margin-top: 15px !important;
}

.seller-orders th, .seller-orders td,
.seller-products th, .seller-products td,
.staff-table th, .staff-table td {
    padding: 14px 16px !important;
    text-align: left !important;
    border-bottom: 1px solid var(--js-border) !important;
    font-size: 14px !important;
}

.seller-orders th, .seller-products th, .staff-table th {
    background: #f8fafc !important;
    color: var(--js-text-muted) !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    font-size: 12px !important;
}

/* Forms & Inputs */
.seller-form label {
    display: block !important;
    font-weight: 600 !important;
    margin: 15px 0 6px !important;
    color: var(--js-text-dark) !important;
    font-size: 14px !important;
}

.seller-form input[type="text"],
.seller-form input[type="number"],
.seller-form input[type="email"],
.seller-form input[type="file"],
.seller-form textarea,
.seller-form select {
    width: 100% !important;
    padding: 10px 14px !important;
    border: 1px solid var(--js-border) !important;
    border-radius: 8px !important;
    font-size: 14px !important;
    background: #ffffff !important;
}

.seller-button,
.seller-form button.seller-button {
    background: var(--js-primary) !important;
    color: #ffffff !important;
    padding: 12px 24px !important;
    border-radius: 8px !important;
    font-weight: 700 !important;
    border: none !important;
    cursor: pointer !important;
    text-decoration: none !important;
    display: inline-block !important;
}

.seller-button:hover {
    background: var(--js-primary-hover) !important;
}

/* ==========================================================================
   2. MY ACCOUNT PORTAL STYLING
   ========================================================================== */

.woocommerce-account .woocommerce {
    background: var(--js-body-bg);
    padding: 20px;
    border-radius: 16px;
}

.js-account-hero-card {
    background: linear-gradient(135deg, #0f172a, #1e293b);
    color: #ffffff;
    padding: 25px 30px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 25px;
    box-shadow: var(--js-shadow);
}

.js-account-avatar {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    border: 3px solid #3b82f6;
    background-size: cover;
    background-position: center;
    background-color: #ffffff;
}

.js-account-nav-grid {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 25px;
}

.woocommerce-MyAccount-navigation ul {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
    background: #ffffff;
    border: 1px solid var(--js-border);
    border-radius: 12px;
    overflow: hidden;
}

.woocommerce-MyAccount-navigation li a {
    display: block !important;
    padding: 14px 20px !important;
    color: var(--js-text-dark) !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    border-bottom: 1px solid var(--js-border) !important;
    transition: all 0.2s ease !important;
}

.woocommerce-MyAccount-navigation li.is-active a {
    background: var(--js-primary) !important;
    color: #ffffff !important;
}

.woocommerce-MyAccount-content {
    background: #ffffff;
    border: 1px solid var(--js-border);
    border-radius: 12px;
    padding: 30px;
    box-shadow: var(--js-shadow);
}

/* Mobile Responsive Adjustments */
@media (max-width: 768px) {
    .seller-layout,
    .js-account-nav-grid {
        flex-direction: column !important;
        grid-template-columns: 1fr !important;
    }
    
    .seller-sidebar {
        width: 100% !important;
    }

    .woocommerce-MyAccount-navigation ul {
        display: flex !important;
        overflow-x: auto !important;
        white-space: nowrap !important;
    }

    .woocommerce-MyAccount-navigation li a {
        border-bottom: none !important;
        border-right: 1px solid var(--js-border) !important;
    }
}

/* ==========================================================================
   MOBILE 100% FULL-WIDTH OVERRIDES (My Account, Seller Center & Staff Center)
   ========================================================================== */
@media (max-width: 768px) {
    /* Edge-to-Edge Container Expansion */
    body.page-template-page-seller-center .container,
    body.page-template-page-staff-center .container,
    body.woocommerce-account .container,
    body.woocommerce-account #main,
    .js-seller-wrapper,
    .seller-wrapper,
    .seller-layout,
    .staff-dashboard-wrapper,
    .vendor-storefront-wrapper {
        width: 100% !important;
        max-width: 100% !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        border-radius: 0 !important;
    }

    /* Inner Main Panels 100% Full Width */
    .seller-content,
    .seller-main-content,
    .staff-main-content,
    .woocommerce-MyAccount-content,
    .seller-page {
        width: 100% !important;
        max-width: 100% !important;
        padding: 12px 10px !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        border: none !important;
    }

    /* Edge-to-Edge Hero Cards & Banners */
    .js-account-hero-card,
    .vendor-profile-card,
    .dash-card,
    .seller-card,
    .seller-stat-card {
        border-radius: 8px !important;
        padding: 15px !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        width: 100% !important;
    }

    /* Touch-Friendly Horizontal Scrolling Tables */
    .staff-table-wrapper,
    .seller-table-scroll {
        width: 100% !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch;
        margin-top: 10px !important;
    }

    /* Navigation Bar Full Width */
    .woocommerce-MyAccount-navigation {
        width: 100% !important;
        margin-bottom: 15px !important;
    }
}

/* ==========================================================================
   STRETCHED MOBILE LAYOUT WITH 6px - 7px EDGE PADDING
   ========================================================================== */
@media (max-width: 768px) {
    /* Stretched Body & Outer Containers */
    body.page-template-page-seller-center .container,
    body.page-template-page-staff-center .container,
    body.woocommerce-account .container,
    body.woocommerce-account #main,
    .js-seller-wrapper,
    .seller-wrapper,
    .seller-layout,
    .staff-dashboard-wrapper,
    .vendor-storefront-wrapper {
        width: 100% !important;
        max-width: 100% !important;
        padding-left: 6px !important;
        padding-right: 6px !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    /* Stretched Content Cards & Panels with 7px Padding */
    .seller-content,
    .seller-main-content,
    .staff-main-content,
    .woocommerce-MyAccount-content,
    .seller-page,
    .dash-card,
    .js-account-hero-card,
    .vendor-profile-card,
    .seller-card,
    .seller-stat-card {
        width: 100% !important;
        max-width: 100% !important;
        padding: 10px 7px !important;
        border-radius: 6px !important;
    }

    /* Stretched Tables & Input Controls */
    .staff-table-wrapper,
    .seller-table-scroll {
        width: 100% !important;
        padding-left: 6px !important;
        padding-right: 6px !important;
    }
}

/* Force Porto Parent Theme Outer Wrappers to 100% Wide */
body.page-template-page-seller-center #main,
body.page-template-page-staff-center #main,
body.page-template-page-our-stores #main,
body.woocommerce-account #main,
body.page-template-page-seller-center .main-content,
body.page-template-page-staff-center .main-content,
body.page-template-page-our-stores .main-content,
body.woocommerce-account .main-content {
    max-width: 100% !important;
    width: 100% !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

@media (max-width: 768px) {
    body.page-template-page-seller-center .container,
    body.page-template-page-staff-center .container,
    body.page-template-page-our-stores .container,
    body.woocommerce-account .container,
    body.page-template-page-seller-center #main .container,
    body.page-template-page-staff-center #main .container,
    body.page-template-page-our-stores #main .container,
    body.woocommerce-account #main .container {
        max-width: 100% !important;
        width: 100% !important;
        padding-left: 6px !important;
        padding-right: 6px !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
}

/* ==========================================================================
   MOBILE WALL-TO-WALL HERO BANNER (MY ACCOUNT - ZERO TOP GAP)
   ========================================================================== */
@media (max-width: 768px) {
    /* Remove top margin/padding between header and account body */
    body.woocommerce-account #main,
    body.woocommerce-account .main-content,
    body.woocommerce-account .container,
    body.woocommerce-account .woocommerce {
        padding-top: 0 !important;
        margin-top: 0 !important;
    }

    /* Full-Bleed Wall-to-Wall Hero Banner */
    .js-account-hero-card {
        width: 100vw !important;
        max-width: 100vw !important;
        margin-left: calc(-50vw + 50%) !important;
        margin-right: calc(-50vw + 50%) !important;
        margin-top: 0 !important;
        margin-bottom: 20px !important;
        border-radius: 0 !important; /* Flush edge-to-edge */
        padding: 20px 15px !important;
    }
}

/* ==========================================================================
   MOBILE EDGE-TO-EDGE FULL BLEED (MY ACCOUNT PARENT PADDING STRIPPER)
   ========================================================================== */
@media (max-width: 768px) {
    /* Strip outer parent padding & white background gaps on mobile */
    body.woocommerce-account,
    body.woocommerce-account #main,
    body.woocommerce-account .main-content,
    body.woocommerce-account .container,
    body.woocommerce-account .entry-content,
    body.woocommerce-account .woocommerce,
    body.woocommerce-account .page-content {
        padding: 0 !important;
        margin: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        background: transparent !important;
        box-shadow: none !important;
        border: none !important;
    }

    /* Edge-to-Edge Navigation Bar & Hero Banner */
    .woocommerce-MyAccount-navigation,
    .woocommerce-MyAccount-navigation ul,
    .js-account-hero-card {
        width: 100% !important;
        max-width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        margin-top: 0 !important;
        border-radius: 0 !important; /* Touches left & right phone edges */
        border: none !important;
        box-shadow: none !important;
    }

    .woocommerce-MyAccount-content {
        padding: 12px 8px !important;
        border-radius: 0 !important;
        width: 100% !important;
        box-shadow: none !important;
        border: none !important;
    }
}

/* ==========================================================================
   MOBILE HERO BANNER FLUSH ATTACHMENT (ZERO TOP GAP & 100% WALL-TO-WALL)
   ========================================================================== */
@media (max-width: 768px) {
    /* Strip top & side padding on the account content wrapper */
    .woocommerce-MyAccount-content {
        padding-top: 0 !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
        margin-top: 0 !important;
        background: transparent !important;
        border: none !important;
        box-shadow: none !important;
    }

    /* Attach Hero Card Flush with 0px Gap to My Account Navigation Bar */
    .js-account-hero-card {
        width: 100% !important;
        max-width: 100% !important;
        margin-top: 0 !important; /* 0px gap - attached directly to My Account bar */
        margin-left: 0 !important;
        margin-right: 0 !important;
        margin-bottom: 20px !important;
        border-radius: 0 !important; /* Touches left & right edges seamlessly */
        box-shadow: none !important;
        border: none !important;
    }
}

/* ==========================================================================
   100vw FULL-BLEED BREAKOUT & NEGATIVE GAP PULL (MY ACCOUNT HERO BANNER)
   ========================================================================== */
@media (max-width: 768px) {
    /* Force Parent Container Padding Removal on Mobile */
    .woocommerce-account .woocommerce,
    .woocommerce-account .woocommerce-MyAccount-content,
    .woocommerce-account .entry-content,
    .woocommerce-account .page-content,
    .woocommerce-account #main .container {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    /* 100vw Viewport Breakout - Stretches Wall-to-Wall & Pulls Up Flush */
    .js-account-hero-card {
        width: 100vw !important;
        max-width: 100vw !important;
        position: relative !important;
        left: 50% !important;
        right: 50% !important;
        margin-left: -50vw !important;
        margin-right: -50vw !important;
        margin-top: -30px !important; /* Pulls up flush to 0px gap with topbar */
        margin-bottom: 20px !important;
        border-radius: 0 !important; /* Touches phone screen edges */
        border: none !important;
        box-shadow: none !important;
    }
}

/* ==========================================================================
   100vw FULL-BLEED MOBILE TOPBARS (SELLER CENTER & STAFF CENTER)
   ========================================================================== */
@media (max-width: 768px) {
    .seller-mobile-topbar,
    .staff-sidebar-header {
        width: 100vw !important;
        max-width: 100vw !important;
        position: relative !important;
        left: 50% !important;
        right: 50% !important;
        margin-left: -50vw !important;
        margin-right: -50vw !important;
        margin-top: 0 !important;
        border-radius: 0 !important;
        padding: 15px !important;
    }

    .js-vendor-hero-card {
        width: 100vw !important;
        max-width: 100vw !important;
        position: relative !important;
        left: 50% !important;
        right: 50% !important;
        margin-left: -50vw !important;
        margin-right: -50vw !important;
        margin-top: -15px !important;
        border-radius: 0 !important;
    }
}

/* ==========================================================================
   FORCE MOBILE VENDOR MENU TOGGLE BUTTON DISPLAY (<= 992px)
   ========================================================================== */
@media (max-width: 992px) {
    #sellerMobileToggle,
    .seller-sidebar-header #sellerMobileToggle {
        display: inline-block !important;
        visibility: visible !important;
        opacity: 1 !important;
        background: #2563eb !important;
        color: #ffffff !important;
        border: none !important;
        padding: 8px 16px !important;
        border-radius: 6px !important;
        font-size: 13px !important;
        font-weight: 700 !important;
        cursor: pointer !important;
    }

    .seller-sidebar-header {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        width: 100% !important;
    }

    .seller-sidebar .seller-menu {
        display: none;
    }

    .seller-sidebar .seller-menu.is-open {
        display: block !important;
    }
}

/* ==========================================================================
   MY ACCOUNT ORDERS TABLE & MOBILE CART POPUP Z-INDEX FIX
   ========================================================================== */

/* My Account Orders Table */
.woocommerce-orders-table,
.woocommerce-MyAccount-orders {
    width: 100% !important;
    border-collapse: collapse !important;
    margin-top: 15px !important;
}

.woocommerce-orders-table th,
.woocommerce-orders-table td {
    padding: 12px 16px !important;
    text-align: left !important;
    border-bottom: 1px solid #e2e8f0 !important;
    font-size: 14px !important;
}

.woocommerce-orders-table th {
    background: #f8fafc !important;
    color: #475569 !important;
    font-weight: 700 !important;
    font-size: 12px !important;
    text-transform: uppercase !important;
}

.woocommerce-orders-table__cell-order-actions .button,
.woocommerce-orders-table__cell-order-actions a {
    background: #2563eb !important;
    color: #ffffff !important;
    padding: 6px 14px !important;
    border-radius: 6px !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    display: inline-block !important;
}

/* Mobile Cart Popup Z-Index Fix (Floats ABOVE Mobile Sticky Footer) */
.header-cart .dropdown-menu,
.mini-cart,
.widget_shopping_cart_content,
.cart-dropdown,
#header .cart-popup {
    z-index: 999999 !important;
    bottom: auto !important;
    box-shadow: 0 12px 36px rgba(0,0,0,0.25) !important;
}

@media (max-width: 768px) {
    .woocommerce-orders-table {
        display: block !important;
        overflow-x: auto !important;
        white-space: nowrap !important;
        -webkit-overflow-scrolling: touch;
    }
}

/* ==========================================================================
   DESKTOP SINGLE PRODUCT GALLERY IMAGE ZOOM CONSTRAINT
   ========================================================================== */
@media (min-width: 992px) {
    .single-product .woocommerce-product-gallery {
        max-width: 520px !important;
        margin: 0 auto !important;
    }

    .single-product .woocommerce-product-gallery__image img,
    .single-product .woocommerce-product-gallery__image a img,
    .single-product .product-images img {
        max-height: 480px !important;
        width: auto !important;
        max-width: 100% !important;
        object-fit: contain !important;
        margin: 0 auto !important;
        display: block !important;
    }
}

/* ==========================================================================
   JIGJIGASALE SINGLE PRODUCT 2-COLUMN GRID & VARIABLE SWATCHES
   ========================================================================== */
.jigji-product-main {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 40px !important;
    align-items: start !important;
    margin-bottom: 40px !important;
}

.jigji-product-gallery {
    width: 100% !important;
    max-width: 520px !important;
    margin: 0 auto !important;
}

.jigji-product-gallery img {
    max-height: 480px !important;
    width: auto !important;
    max-width: 100% !important;
    object-fit: contain !important;
    border-radius: 12px !important;
    margin: 0 auto !important;
    display: block !important;
}

.jigji-product-summary {
    width: 100% !important;
}

.jigji-product-summary .product_title {
    font-size: 28px !important;
    font-weight: 800 !important;
    color: #ffffff !important;
    margin-bottom: 10px !important;
}

.jigji-product-summary .price {
    font-size: 24px !important;
    font-weight: 800 !important;
    color: #16a34a !important;
    margin-bottom: 15px !important;
}

/* Styled Text Swatches for Variable Options */
.single-product .variations select {
    background: #1e293b !important;
    color: #ffffff !important;
    border: 1px solid #334155 !important;
    padding: 10px 14px !important;
    border-radius: 8px !important;
    font-weight: 600 !important;
    font-size: 14px !important;
}

@media (max-width: 768px) {
    .jigji-product-main {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
    }
}

/* ==========================================================================
   SMALL MOBILE PRODUCT PAGE OVERFLOW FIX (<= 540px)
   ========================================================================== */
@media (max-width: 540px) {
    .jigji-product-page,
    .jigji-product-main,
    .jigji-product-gallery,
    .jigji-product-summary {
        width: 100% !important;
        max-width: 100% !important;
        overflow-x: hidden !important;
        box-sizing: border-radius !important;
    }
    
    .single-product form.cart {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 10px !important;
    }
    
    .single-product form.cart .button {
        width: 100% !important;
    }
}

/* ==========================================================================
   HIGH-CONTRAST DARK MODE CHECKOUT FORM CONTROLS
   ========================================================================== */

/* Hide Ship to Different Address & Extra Notes */
.woocommerce-shipping-fields,
#ship-to-different-address,
.woocommerce-additional-fields {
    display: none !important;
}

/* High Contrast Input Labels */
.woocommerce-checkout label,
.woocommerce-billing-fields label {
    color: #f1f5f9 !important;
    font-weight: 600 !important;
    font-size: 14px !important;
    margin-bottom: 6px !important;
    display: block !important;
}

/* Input Fields */
.woocommerce-checkout input[type="text"],
.woocommerce-checkout input[type="email"],
.woocommerce-checkout input[type="tel"],
.woocommerce-checkout textarea,
.woocommerce-checkout select {
    background: #0f172a !important;
    color: #ffffff !important;
    border: 1px solid #475569 !important;
    border-radius: 8px !important;
    padding: 12px !important;
    font-size: 14px !important;
}

/* Payment Gateway Box */
#payment {
    background: #0f172a !important;
    border: 1px solid #334155 !important;
    border-radius: 12px !important;
    padding: 20px !important;
}

#payment ul.payment_methods li {
    color: #ffffff !important;
    font-weight: 600 !important;
}

#payment div.payment_box {
    background: #1e293b !important;
    color: #cbd5e1 !important;
    border: 1px solid #334155 !important;
    border-radius: 8px !important;
    padding: 12px !important;
}

/* Place Order Button */
#place_order {
    background: #dc2626 !important;
    color: #ffffff !important;
    width: 100% !important;
    padding: 16px !important;
    font-size: 16px !important;
    font-weight: 800 !important;
    border-radius: 8px !important;
    border: none !important;
    margin-top: 20px !important;
    cursor: pointer !important;
    box-shadow: 0 4px 14px rgba(220, 38, 38, 0.4) !important;
}

#place_order:hover {
    background: #b91c1c !important;
}

/* ==========================================================================
   HIGH-CONTRAST ORDER SUMMARY & PAYMENT COLUMN STYLING
   ========================================================================== */

/* Wider Layout Balance */
.jigji-checkout-grid {
    grid-template-columns: 1fr 1.1fr !important;
    gap: 30px !important;
}

/* High Contrast Order Review Table */
.woocommerce-checkout-review-order-table,
.woocommerce-checkout-review-order-table table {
    width: 100% !important;
    border-collapse: collapse !important;
    color: #ffffff !important;
}

.woocommerce-checkout-review-order-table th,
.woocommerce-checkout-review-order-table td,
.woocommerce-checkout-review-order-table tr th,
.woocommerce-checkout-review-order-table tr td {
    color: #ffffff !important;
    padding: 12px 0 !important;
    border-bottom: 1px solid #334155 !important;
    font-size: 14px !important;
}

/* Subtotal, Shipping & Total Labels */
.woocommerce-checkout-review-order-table .cart-subtotal th,
.woocommerce-checkout-review-order-table .cart-subtotal td,
.woocommerce-checkout-review-order-table .shipping th,
.woocommerce-checkout-review-order-table .shipping td,
.woocommerce-checkout-review-order-table .order-total th,
.woocommerce-checkout-review-order-table .order-total td,
.woocommerce-checkout #payment h3,
#payment ul.payment_methods li {
    color: #ffffff !important;
    font-weight: 700 !important;
    font-size: 15px !important;
}

/* Total Price Highlight */
.woocommerce-checkout-review-order-table .order-total .amount,
.woocommerce-checkout-review-order-table .cart-subtotal .amount,
.woocommerce-checkout-review-order-table .amount {
    color: #16a34a !important;
    font-size: 18px !important;
    font-weight: 800 !important;
}

/* Product Item Row Names */
.woocommerce-checkout-review-order-table .cart_item .product-name {
    color: #ffffff !important;
    font-weight: 600 !important;
}

/* Hide Quantity Spinners inside Order Summary rows */
.woocommerce-checkout-review-order-table .quantity input,
.woocommerce-checkout-review-order-table .qty-btn,
.woocommerce-checkout-review-order-table .quantity .minus,
.woocommerce-checkout-review-order-table .quantity .plus {
    display: none !important;
}

/* Completely Hide Redundant Top Coupon Toggle on Checkout */
.woocommerce-checkout .woocommerce-form-coupon-toggle,
.woocommerce-checkout form.checkout_coupon.woocommerce-form-coupon {
    display: none !important;
}

/* High-Contrast Empty Cart Text Color Fix */
.cart-empty,
.woocommerce-mini-cart__empty-message,
.cart-dropdown .empty,
.mini-cart .empty,
.cart-popup .empty,
.cart-popup h2,
.widget_shopping_cart p {
    color: #ffffff !important;
    font-weight: 700 !important;
}

/* ==========================================================================
   PORTO MINI-CART NUCLEAR WHITE TEXT FIX
   ========================================================================== */
#header .cart-popup,
#header .cart-popup *,
.header-cart .cart-popup,
.header-cart .cart-popup *,
.mini-cart .cart-popup,
.mini-cart .cart-popup *,
.cart-dropdown .cart-popup,
.cart-dropdown .cart-popup *,
.woocommerce-mini-cart__empty-message,
.cart-empty {
    color: #ffffff !important;
    fill: #ffffff !important;
}

#header .cart-popup .empty,
.mini-cart .empty {
    color: #ffffff !important;
    font-weight: 700 !important;
    font-size: 16px !important;
}

/* Porto Theme Native Mini-Cart White Text Fix */
#mini-cart .widget_shopping_cart li.empty,
#mini-cart .widget_shopping_cart_content,
#mini-cart .cart-popup,
#mini-cart .cart-popup p,
#mini-cart .cart-popup h2,
#mini-cart .cart-popup h3,
#mini-cart .cart-popup span,
#mini-cart .cart-popup div,
.widget_shopping_cart li.empty,
.woocommerce-mini-cart__empty-message {
    color: #ffffff !important;
    font-weight: 700 !important;
}

/* ==========================================================================
   CENTERED MOBILE FOOTER ICON ALIGNMENT
   ========================================================================== */
.jigji-mobile-footer {
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100vw !important;
    height: 60px !important;
    background: #0f172a !important; /* Deep dark mode match */
    border-top: 1px solid #1e293b !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-around !important;
    z-index: 99999 !important;
    padding: 0 4px !important;
    box-shadow: 0 -4px 15px rgba(0, 0, 0, 0.25) !important;
}

.jigji-mobile-footer a {
    flex: 1 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    color: #94a3b8 !important;
    text-decoration: none !important;
    padding: 4px 0 !important;
    transition: color 0.2s ease !important;
}

.jigji-mobile-footer a:hover,
.jigji-mobile-footer a.active {
    color: #3b82f6 !important;
}

.jigji-mobile-footer .jigji-icon {
    font-size: 18px !important;
    line-height: 1 !important;
    margin-bottom: 3px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    height: 22px !important;
}

.jigji-mobile-footer small {
    font-size: 10px !important;
    line-height: 1 !important;
    display: block !important;
    font-weight: 600 !important;
}

.jigji-mobile-footer a.trend .jigji-icon {
    font-size: 19px !important;
}

/* Reset & Flatten Trends Icon Inline in Mobile Footer */
.jigji-mobile-footer a.trend,
.jigji-mobile-footer a.trend .jigji-icon,
.jigji-mobile-footer a.trend * {
    background: transparent !important;
    background-color: transparent !important;
    border-radius: 0 !important;
    margin-top: 0 !important;
    transform: none !important;
    box-shadow: none !important;
    border: none !important;
    top: 0 !important;
}

.jigji-mobile-footer a {
    height: 100% !important;
    margin: 0 !important;
    padding: 6px 0 !important;
}

/* ==========================================================================
   HIGH-CONTRAST MY ACCOUNT ORDER DETAILS TABLE STYLING
   ========================================================================== */
.woocommerce-table--order-details,
.woocommerce-table--order-details *,
.order_details,
.order_details * {
    color: #0f172a !important;
}

.woocommerce-table--order-details {
    width: 100% !important;
    border-collapse: collapse !important;
    margin-top: 15px !important;
    background: #ffffff !important;
    border-radius: 10px !important;
    border: 1px solid #cbd5e1 !important;
}

.woocommerce-table--order-details th,
.woocommerce-table--order-details td {
    padding: 12px 16px !important;
    border-bottom: 1px solid #e2e8f0 !important;
    font-size: 14px !important;
    font-weight: 600 !important;
}

.woocommerce-table--order-details thead th {
    background: #f8fafc !important;
    color: #475569 !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    font-size: 12px !important;
}

.woocommerce-table--order-details .amount {
    color: #16a34a !important;
    font-weight: 800 !important;
}

/* ==========================================================================
   MOBILE ORDER DETAILS SUMMARY FLEX ROWS FIX
   ========================================================================== */
@media (max-width: 768px) {
    .woocommerce-table--order-details tfoot,
    .woocommerce-table--order-details tfoot tr {
        display: block !important;
        width: 100% !important;
    }

    .woocommerce-table--order-details tfoot tr {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        padding: 10px 0 !important;
        border-bottom: 1px solid #e2e8f0 !important;
    }

    .woocommerce-table--order-details tfoot th,
    .woocommerce-table--order-details tfoot td {
        border: none !important;
        padding: 0 !important;
        font-size: 13px !important;
    }

    .woocommerce-table--order-details tfoot th {
        text-align: left !important;
    }

    .woocommerce-table--order-details tfoot td {
        text-align: right !important;
    }
}

/* ==========================================================================
   MOBILE MY ACCOUNT ORDERS TABLE RIGHT PADDING
   ========================================================================== */
@media (max-width: 768px) {
    .account-orders-table,
    .woocommerce-orders-table,
    .woocommerce-MyAccount-orders {
        padding-right: 10px !important;
        margin-right: 10px !important;
        box-sizing: border-box !important;
    }
}

/* ==========================================================================
   1. HIDE FLOATING BUBBLES ON MOBILE (MOVED INTO ACCOUNT POPUP)
   ========================================================================== */
@media (max-width: 768px) {
    #js_floating_chat_btn,
    .jigji-track-floating {
        display: none !important;
    }
}

/* ==========================================================================
   2. PILL-BUTTON SWATCHES FOR PRODUCT VARIATIONS (SIZES & COLORS)
   ========================================================================== */
.single-product .variations select {
    background: #0f172a !important;
    color: #ffffff !important;
    border: 2px solid #334155 !important;
    padding: 10px 20px !important;
    border-radius: 25px !important; /* Pill Shape */
    font-weight: 700 !important;
    font-size: 14px !important;
    cursor: pointer !important;
    outline: none !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15) !important;
    transition: all 0.2s ease !important;
}

.single-product .variations select:focus,
.single-product .variations select:hover {
    border-color: #2563eb !important;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.3) !important;
}

/* ==========================================================================
   HIDE OLD PORTO DUPLICATE VARIATION SWATCHES ON SINGLE PRODUCT PAGES
   ========================================================================== */
.single-product .variations .filter-item-list,
.single-product .variations .swatchinput,
.single-product .variations .wcvaswatchinput,
.single-product .variations_form .filter-item-list {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
}

/* ==========================================================================
   FORCE SINGLE PRODUCT GALLERY IMAGES TO FILL 100% CONTAINER WIDTH
   ========================================================================== */
.jigji-product-gallery,
.jigji-product-gallery .woocommerce-product-gallery__wrapper,
.single-product .product-images,
.single-product .woocommerce-product-gallery__image {
    width: 100% !important;
}

.jigji-product-gallery img,
.single-product .woocommerce-product-gallery__image img,
.single-product .product-images img,
.single-product .product-image-slider .img-thumbnail img {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    min-height: 380px !important;
    max-height: 520px !important;
    object-fit: cover !important;
    border-radius: 12px !important;
    display: block !important;
}

/* ==========================================================================
   RESET OWL-ITEM GALLERY THUMBNAILS BACK TO NORMAL PROPORTIONS
   ========================================================================== */
.single-product .product-thumbs-slider img,
.single-product .owl-item img,
.single-product .img-thumbnail img,
.single-product .flex-control-thumbs img,
.single-product .product-image-slider + .product-thumbs-slider img {
    min-height: unset !important;
    height: 80px !important;
    width: 80px !important;
    max-width: 80px !important;
    max-height: 80px !important;
    object-fit: cover !important;
    border-radius: 8px !important;
    display: block !important;
    margin: 0 auto !important;
}

/* Restrict min-height strictly to Main Featured Image */
.single-product .product-images > .product-image-slider img,
.single-product .woocommerce-product-gallery__image > img {
    width: 100% !important;
    min-height: 320px !important;
    max-height: 480px !important;
    object-fit: cover !important;
    border-radius: 12px !important;
}

/* ==========================================================================
   RECENT PRODUCTS GRID (4 COLS DESKTOP | 2 COLS MOBILE)
   ========================================================================== */
.jigji-recent-grid {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 20px !important;
}

@media (max-width: 768px) {
    .jigji-recent-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 12px !important;
    }
}

/* ==========================================================================
   PHASE 1.2: TOUCH-FRIENDLY VARIATION PILL BUTTONS / SWATCHES
   ========================================================================== */
.single-product .variations .label label {
    color: #ffffff !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
}

.single-product .variations select {
    appearance: none !important;
    -webkit-appearance: none !important;
    background: #1e293b url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23FFFFFF%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E") no-repeat right 16px center !important;
    background-size: 12px auto !important;
    color: #ffffff !important;
    border: 2px solid #334155 !important;
    padding: 10px 38px 10px 18px !important;
    border-radius: 25px !important; /* Touch-friendly Pill Shape */
    font-weight: 700 !important;
    font-size: 14px !important;
    cursor: pointer !important;
    outline: none !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15) !important;
    display: inline-block !important;
    min-width: 140px !important;
}

.single-product .variations select:focus,
.single-product .variations select:hover {
    border-color: #2563eb !important;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.3) !important;
}

/* ==========================================================================
   PHASE 1.3: UNIFIED DARK MODE WOOCOMMERCE NOTICES & ALERTS
   ========================================================================== */
.woocommerce-message,
.woocommerce-error,
.woocommerce-info,
.dokan-message,
.dokan-error,
.dokan-info,
.wc-block-components-notice-banner,
#yith-wcwl-popup-message {
    background: #1e293b !important;
    border: 1px solid #334155 !important;
    border-left: 4px solid #2563eb !important;
    color: #ffffff !important;
    border-radius: 12px !important;
    padding: 15px 20px !important;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25) !important;
    font-weight: 600 !important;
    font-size: 14px !important;
}

.woocommerce-message:before,
.woocommerce-info:before {
    color: #2563eb !important;
}

.woocommerce-error:before {
    color: #dc2626 !important;
}

.woocommerce-message a.button,
.woocommerce-info a.button,
.woocommerce-error a.button {
    background: #2563eb !important;
    color: #ffffff !important;
    padding: 6px 14px !important;
    border-radius: 6px !important;
    font-weight: 700 !important;
    text-decoration: none !important;
    float: right !important;
}

/* ==========================================================================
   SHEIN CATEGORIES MOBILE RECTANGULAR FULL-WIDTH IMAGE OVERRIDE
   ========================================================================== */
@media (max-width: 768px) {
    .shein-subcat-card {
        padding: 8px !important;
        border-radius: 10px !important;
    }

    .shein-subcat-img {
        width: 100% !important;
        max-width: 100% !important;
        height: 90px !important;
        border-radius: 8px !important; /* Clean rectangular shape */
        border: 1px solid #334155 !important; /* Thin clean border */
        object-fit: cover !important;
        margin: 0 0 8px 0 !important;
        background: #0f172a !important;
    }
}
