/*
Theme Name: Website4Sell
Theme URI: https://website4sell.com
Author: Website4Sell
Author URI: https://website4sell.com
Description: A high-performance, SEO-optimized premium digital marketplace theme for WooCommerce.
Version: 3.0
Text Domain: website4sell
*/

/* ============================
   CSS CUSTOM PROPERTIES
   ============================ */
:root {
    --nx-bg:           #f5f6fa;
    --nx-card:         #ffffff;
    --nx-card-alt:     #f0f1f5;
    --nx-text:         #0f172a;
    --nx-text-sec:     #334155;
    --nx-muted:        #64748b;
    --nx-border:       #e2e4eb;
    --nx-accent:       #4f46e5;
    --nx-accent-hover: #4338ca;
    --nx-accent-dim:   rgba(79,70,229,0.10);
    --nx-accent-glow:  rgba(79,70,229,0.18);
    --nx-green:        #059669;
    --nx-red:          #dc2626;
    --nx-input-bg:     #eef0f5;
    --nx-shadow-card:  0 2px 16px rgba(0,0,0,0.07);
    --nx-shadow-accent:0 4px 24px rgba(79,70,229,0.22);
    --nx-glass:        rgba(255,255,255,0.94);
    --nx-star:         #f59e0b;
    --nx-search:       #e11d48;
    /* Semantic action colours */
    --nx-cart:         #f97316;
    --nx-cart-hover:   #ea6a0a;
    --nx-cart-text:    #ffffff;
    --nx-cart-glow:    rgba(249,115,22,0.30);
    --nx-account:      #8b5cf6;
    --nx-account-hover:#7c3aed;
    --nx-account-glow: rgba(139,92,246,0.25);
    --nx-cta:          #059669;
    --nx-cta-hover:    #047857;
    --nx-cta-glow:     rgba(5,150,105,0.25);
}

[data-theme="dark"] {
    --nx-bg:           #050508;
    --nx-card:         #0d0d14;
    --nx-card-alt:     #13131d;
    --nx-text:         #f0f0f8;
    --nx-text-sec:     #e2e8f0;
    --nx-muted:        #6b7280;
    --nx-border:       #1e1e2e;
    --nx-accent:       #818cf8;
    --nx-accent-hover: #a5b4fc;
    --nx-accent-dim:   rgba(129,140,248,0.13);
    --nx-accent-glow:  rgba(129,140,248,0.28);
    --nx-green:        #10b981;
    --nx-red:          #f87171;
    --nx-input-bg:     #111119;
    --nx-shadow-card:  0 2px 20px rgba(0,0,0,0.55);
    --nx-shadow-accent:0 4px 24px rgba(129,140,248,0.32);
    --nx-glass:        rgba(13,13,20,0.93);
    --nx-star:         #fbbf24;
    --nx-search:       #f43f5e;
    /* Semantic action colours */
    --nx-cart:         #fb923c;
    --nx-cart-hover:   #f97316;
    --nx-cart-text:    #0a0a0a;
    --nx-cart-glow:    rgba(251,146,60,0.30);
    --nx-account:      #c084fc;
    --nx-account-hover:#a855f7;
    --nx-account-glow: rgba(192,132,252,0.28);
    --nx-cta:          #34d399;
    --nx-cta-hover:    #10b981;
    --nx-cta-glow:     rgba(52,211,153,0.28);
}

/* ============================
   BASE
   ============================ */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    -webkit-tap-highlight-color: transparent;
    /* System font stack — instant render, no external HTTP request */
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    background: var(--nx-bg);
    color: var(--nx-text);
    margin: 0;
    transition: background 0.2s ease, color 0.2s ease;
}

.no-scrollbar::-webkit-scrollbar { display: none; }
.no-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }

.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

#mobile-sidebar { transition: transform 0.28s cubic-bezier(0.4,0,0.2,1); }
#sidebar-overlay { transition: opacity 0.28s ease; }

.star-fill  { color: var(--nx-star); }
.star-empty { color: #374151; }

/* Comment form */
.wc-comment-form input,
.wc-comment-form textarea {
    background: var(--nx-input-bg);
    border: 1px solid var(--nx-border);
    color: var(--nx-text);
    border-radius: 10px;
    padding: 12px 16px;
    width: 100%;
    font-size: 0.9rem;
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
}
.wc-comment-form input:focus,
.wc-comment-form textarea:focus {
    border-color: var(--nx-accent);
    box-shadow: 0 0 0 3px var(--nx-accent-dim);
}
.wc-comment-form textarea { resize: vertical; min-height: 110px; }

/* Star rating widget */
.rating-stars input { display: none; }
.rating-stars label { cursor: pointer; font-size: 1.4rem; color: #374151; transition: color 0.15s; }
.rating-stars input:checked ~ label,
.rating-stars label:hover,
.rating-stars label:hover ~ label { color: var(--nx-star); }
.rating-stars { display: flex; flex-direction: row-reverse; gap: 4px; }

/* WooCommerce notices */
.woocommerce-message, .woocommerce-info, .woocommerce-error {
    background: var(--nx-card);
    border: 1px solid var(--nx-border);
    border-left: 4px solid var(--nx-green);
    border-radius: 10px;
    padding: 14px 18px;
    margin-bottom: 18px;
    color: var(--nx-text-sec);
    font-size: 0.9rem;
}
.woocommerce-info { border-left-color: var(--nx-search); }
.woocommerce-error { border-left-color: var(--nx-red); }

/* ============================
   THEME TOGGLE — Sticky Left Banner
   ============================ */
.nx-theme-toggle {
    position: fixed;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    z-index: 999;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    background: var(--nx-card);
    border: 1px solid var(--nx-border);
    border-left: none;
    border-radius: 0 12px 12px 0;
    padding: 10px 7px;
    cursor: pointer;
    box-shadow: var(--nx-shadow-card);
    transition: all 0.3s ease;
}
.nx-theme-toggle:hover {
    padding-right: 11px;
    box-shadow: var(--nx-shadow-accent);
    border-color: var(--nx-accent);
}
.nx-theme-toggle .toggle-icon {
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: var(--nx-accent-dim);
    color: var(--nx-accent);
    font-size: 14px;
    transition: all 0.3s ease;
}
.nx-theme-toggle:hover .toggle-icon {
    background: var(--nx-accent);
    color: #0a0a0a;
}
.nx-theme-toggle .toggle-label {
    writing-mode: vertical-rl;
    text-orientation: mixed;
    font-size: 8px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--nx-muted);
    margin-top: 4px;
    transition: color 0.3s;
}
.nx-theme-toggle:hover .toggle-label {
    color: var(--nx-accent);
}

/* ============================
   MOBILE COMPACT BUTTONS
   ============================ */
@media (max-width: 640px) {
    /* Header search */
    #header-search { height: 38px !important; font-size: 0.8rem !important; padding: 0 10px !important; }
    header button[type="submit"], header a[style*="background"] {
        height: 38px !important; padding: 0 12px !important; font-size: 0.8rem !important;
    }
    /* Product card add-to-cart circles */
    .add_to_cart_button.w-8, .add_to_cart_button.w-9 {
        width: 30px !important; height: 30px !important; min-width: 30px;
    }
    /* Category chips */
    .whitespace-nowrap.px-4 { padding-left: 10px !important; padding-right: 10px !important; font-size: 0.7rem !important; }
    /* Mobile nav bar */
    nav[aria-label="Mobile navigation"] { height: 54px; }
    nav[aria-label="Mobile navigation"] .h-\[60px\] { height: 54px; }
    nav[aria-label="Mobile navigation"] span { font-size: 9px; }
    nav[aria-label="Mobile navigation"] i { font-size: 1.1rem; }
    /* General buttons on mobile */
    .btn-mobile-compact { padding: 9px 16px !important; font-size: 0.82rem !important; }
}
