/*
Theme Name: Nabux
Theme URI: https://nabux.store
Author: Nabux
Description: Dark premium multi-vendor marketplace theme for WooCommerce — neon-lime + cyan accents, glassmorphism, heavy Inter/Estedad type. Built for the Nabux escrow marketplace. RTL + Persian ready.
Version: 0.3.1
Requires at least: 6.4
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: nabux
Tags: e-commerce, woocommerce, rtl-language-support, custom-menu, featured-images, translation-ready
*/

/* ============================================================
   TOKENS  (source of truth: nabux-store colors_and_type.css)
   ============================================================ */
:root {
  --bg:#070a12; --panel:#101521; --panel-soft:#151c2b;
  --text:#f8fafc; --muted:#9aa6b2; --line:rgba(255,255,255,.10);
  --brand:#b7ff3c; --brand-2:#00d4ff; --danger:#ff4d7d; --on-brand:#07100a;
  --surface-1:rgba(255,255,255,.06); --surface-2:rgba(255,255,255,.07);
  --surface-3:rgba(255,255,255,.08); --surface-4:rgba(255,255,255,.09); --surface-5:rgba(255,255,255,.12);
  --brand-tint:rgba(183,255,60,.12); --brand-border:rgba(183,255,60,.35);
  --danger-tint:rgba(255,77,125,.14); --danger-border:rgba(255,77,125,.35);
  --page-glow:radial-gradient(circle at 20% 0%, rgba(183,255,60,.18), transparent 28%),
              radial-gradient(circle at 80% 10%, rgba(0,212,255,.14), transparent 26%);
  --grad-brand:linear-gradient(135deg, var(--brand), var(--brand-2));
  --grad-art:linear-gradient(135deg, rgba(183,255,60,.28), rgba(0,212,255,.16)), #0b0f18;
  --grad-glass:linear-gradient(180deg, rgba(255,255,255,.12), rgba(255,255,255,.05));
  --font-sans:Inter, Estedad, Tajawal, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --r-md:14px; --r-lg:16px; --r-2xl:22px; --r-card:28px; --r-hero:34px; --r-pill:999px;
  --shadow-float:0 24px 80px rgba(0,0,0,.35);
  --page-pad-x:5vw;
}

/* ============================================================ BASE */
*,*::before,*::after{ box-sizing:border-box; }
html{ scroll-behavior:smooth; }
body{
  margin:0; background:var(--bg); background-image:var(--page-glow); background-attachment:fixed;
  color:var(--text); font-family:var(--font-sans); font-size:16px; line-height:1.6;
  -webkit-font-smoothing:antialiased; text-rendering:optimizeLegibility;
}
a{ color:var(--brand-2); text-decoration:none; }
a:hover{ color:var(--brand); }
img{ max-width:100%; height:auto; }
h1,h2,h3,h4{ letter-spacing:-.03em; line-height:1.1; }
.nx-container{ max-width:1240px; margin-inline:auto; padding-inline:var(--page-pad-x); }
.screen-reader-text{ position:absolute!important; width:1px; height:1px; overflow:hidden; clip:rect(1px,1px,1px,1px); }

/* ============================================================ BUTTONS */
.button, button, input[type="submit"], .wp-block-button__link,
.woocommerce a.button, .woocommerce button.button, .woocommerce input.button,
.woocommerce #respond input#submit, .woocommerce a.button.alt, .woocommerce button.button.alt{
  background:var(--grad-brand); color:var(--on-brand)!important; border:0; border-radius:var(--r-md);
  font-weight:750; padding:.7em 1.25em; cursor:pointer; transition:transform .12s ease, filter .12s ease;
  line-height:1.2;
}
.button:hover, .woocommerce a.button:hover, .woocommerce button.button:hover,
.woocommerce input.button:hover, .woocommerce a.button.alt:hover, .woocommerce button.button.alt:hover{
  filter:brightness(1.05); transform:translateY(-1px); color:var(--on-brand)!important;
}
.button--ghost, .woocommerce a.button.wc-backward{
  background:var(--surface-3); color:var(--text)!important; border:1px solid var(--line);
}

/* ============================================================ HEADER */
.nx-topbar{
  position:sticky; top:0; z-index:50; backdrop-filter:blur(20px);
  background:rgba(7,10,18,.72); border-bottom:1px solid var(--line);
}
.nx-topbar__inner{ display:flex; align-items:center; gap:22px; height:70px; }
.nx-logo{ display:flex; align-items:center; gap:10px; font-weight:850; font-size:20px; color:var(--text); letter-spacing:-.04em; }
.nx-logo__mark{ width:30px; height:30px; border-radius:var(--r-md); background:var(--grad-brand); display:inline-block; }
.nx-logo:hover{ color:var(--text); }
.nx-nav{ margin-inline-start:auto; }
.nx-nav ul{ list-style:none; display:flex; gap:20px; margin:0; padding:0; }
.nx-nav a{ color:var(--text); font-weight:600; font-size:15px; }
.nx-nav a:hover{ color:var(--brand); }
.nx-header-actions{ display:flex; align-items:center; gap:14px; }
.nx-header-actions a{ color:var(--text); font-weight:700; }
.nx-cart-count{ background:var(--brand); color:var(--on-brand); border-radius:var(--r-pill); font-size:12px; font-weight:800; padding:1px 8px; margin-inline-start:4px; }

/* ============================================================ HERO / PAGE HEAD */
.nx-page-head{ padding:56px 0 28px; }
.nx-eyebrow{ color:var(--brand); text-transform:uppercase; letter-spacing:.12em; font-size:12px; font-weight:800; }
.nx-page-head h1{ font-size:clamp(36px,5vw,64px); letter-spacing:-.05em; margin:10px 0 8px; font-weight:800; }
.nx-page-head p{ color:var(--muted); max-width:720px; }

/* ============================================================ WOOCOMMERCE: SHOP GRID */
.woocommerce ul.products{ display:grid; grid-template-columns:repeat(auto-fill,minmax(240px,1fr)); gap:22px; margin:0; padding:0; }
.woocommerce ul.products li.product{ list-style:none; margin:0!important; width:auto!important; float:none!important;
  background:var(--surface-1); border:1px solid var(--line); border-radius:var(--r-card); padding:14px; transition:border-color .15s ease, transform .15s ease; }
.woocommerce ul.products li.product:hover{ border-color:var(--brand-border); transform:translateY(-3px); }
.woocommerce ul.products li.product a img{ border-radius:var(--r-2xl); margin-bottom:12px; background:var(--grad-art); aspect-ratio:1/1; object-fit:cover; width:100%; }
.woocommerce ul.products li.product .woocommerce-loop-product__title{ font-size:16px; font-weight:700; padding:0 4px; color:var(--text); }
.woocommerce ul.products li.product .price{ color:var(--brand)!important; font-weight:900; font-size:18px; padding:6px 4px 10px; display:block; }
.woocommerce ul.products li.product .price del{ color:var(--muted)!important; font-weight:500; }
.woocommerce ul.products li.product .button{ width:100%; text-align:center; }
.woocommerce span.onsale{ background:var(--danger); color:#fff; border-radius:var(--r-pill); font-weight:800; min-height:auto; min-width:auto; padding:4px 12px; top:16px; inset-inline-start:16px; }

/* Results + ordering bar */
.woocommerce .woocommerce-result-count{ color:var(--muted); }
.woocommerce .woocommerce-ordering select, .nx select, .nx input[type="text"], .nx input[type="search"]{
  background:var(--surface-4); color:var(--text); border:1px solid var(--line); border-radius:var(--r-md); padding:.55em .8em; }

/* ============================================================ SINGLE PRODUCT */
.woocommerce div.product{ display:grid; grid-template-columns:1.05fr 1fr; gap:40px; }
.woocommerce div.product div.images img{ border-radius:var(--r-hero); background:var(--grad-art); }
.woocommerce div.product .product_title{ font-size:clamp(30px,4vw,48px); font-weight:800; letter-spacing:-.04em; }
.woocommerce div.product p.price, .woocommerce div.product span.price{ color:var(--brand); font-weight:900; font-size:30px; }
.woocommerce div.product .woocommerce-product-details__short-description{ color:var(--muted); }
.woocommerce .woocommerce-tabs ul.tabs{ background:transparent; }
.woocommerce div.product .woocommerce-tabs ul.tabs li{ background:var(--surface-2); border:1px solid var(--line); border-radius:var(--r-pill); }
.woocommerce-tabs .panel{ background:var(--surface-1); border:1px solid var(--line); border-radius:var(--r-lg); padding:20px; }
@media(max-width:820px){ .woocommerce div.product{ grid-template-columns:1fr; } }

/* Quantity + forms */
.woocommerce .quantity input.qty{ background:var(--surface-4); color:var(--text); border:1px solid var(--line); border-radius:var(--r-md); }
.woocommerce form .form-row input.input-text, .woocommerce form .form-row textarea, .select2-container--default .select2-selection--single{
  background:var(--surface-2)!important; color:var(--text)!important; border:1px solid var(--line)!important; border-radius:var(--r-md)!important; }

/* ============================================================ CARDS / TABLES (cart, account) */
.woocommerce table.shop_table{ background:var(--surface-1); border:1px solid var(--line); border-radius:var(--r-lg); border-collapse:separate; }
.woocommerce table.shop_table th, .woocommerce table.shop_table td{ border-top:1px solid var(--line); color:var(--text); }
.woocommerce .cart-collaterals .cart_totals, .woocommerce-checkout #order_review, .woocommerce .woocommerce-info,
.woocommerce-account .woocommerce-MyAccount-navigation ul{ background:var(--surface-1); border:1px solid var(--line); border-radius:var(--r-lg); }
.woocommerce .woocommerce-info, .woocommerce-message, .woocommerce .woocommerce-error{ border-top:3px solid var(--brand); color:var(--text); }
.woocommerce-account .woocommerce-MyAccount-navigation ul{ padding:8px; }
.woocommerce-account .woocommerce-MyAccount-navigation li a{ color:var(--text); }

/* ============================================================ FOOTER */
.nx-footer{ margin-top:64px; border-top:1px solid var(--line); background:var(--panel); }
.nx-footer__inner{ display:grid; grid-template-columns:1.4fr repeat(3,1fr); gap:32px; padding:48px 0; }
.nx-footer h4{ font-size:14px; text-transform:uppercase; letter-spacing:.1em; color:var(--muted); margin:0 0 14px; }
.nx-footer a{ color:var(--text); display:block; padding:5px 0; font-size:14px; }
.nx-footer a:hover{ color:var(--brand); }
.nx-footer__bottom{ border-top:1px solid var(--line); padding:18px 0; color:var(--muted); font-size:13px; text-align:center; }
@media(max-width:820px){ .nx-footer__inner{ grid-template-columns:1fr 1fr; } }

/* ============================================================ MISC */
.nx-main{ min-height:60vh; padding-bottom:40px; }
.nx-card{ background:var(--surface-1); border:1px solid var(--line); border-radius:var(--r-card); padding:24px; }
.entry-content a{ text-decoration:underline; }
.pagination, .woocommerce nav.woocommerce-pagination ul{ border:0; }
.woocommerce nav.woocommerce-pagination ul li{ border:0; }
.woocommerce nav.woocommerce-pagination ul li a, .woocommerce nav.woocommerce-pagination ul li span{
  background:var(--surface-3); color:var(--text); border-radius:var(--r-md); }
.woocommerce nav.woocommerce-pagination ul li span.current{ background:var(--brand); color:var(--on-brand); }

/* RTL */
html[dir="rtl"] .nx-nav{ margin-inline-start:auto; }

/* ============================================================ HOMEPAGE */
.nx-hero{ padding:70px 0 40px; }
.nx-hero__h1{ font-size:clamp(40px,6vw,78px); font-weight:800; letter-spacing:-.05em; line-height:.95; margin:12px 0 16px; }
.nx-hero__accent{ background:var(--grad-brand); -webkit-background-clip:text; background-clip:text; color:transparent; }
.nx-hero__cta{ display:flex; gap:12px; flex-wrap:wrap; margin:22px 0 26px; }
.nx-trust{ display:flex; gap:22px; flex-wrap:wrap; color:var(--muted); font-size:14px; }
.nx-trust__item{ display:flex; align-items:center; gap:8px; }
.nx-trust__dot{ width:8px; height:8px; border-radius:999px; background:var(--brand); box-shadow:0 0 12px var(--brand); }
.nx-trust--product{ margin:14px 0; gap:16px; }

.nx-section{ padding:34px 0; }
.nx-section__head{ margin-bottom:20px; }
.nx-section__head .nx-h2{ font-size:clamp(26px,3.4vw,38px); letter-spacing:-.04em; margin:6px 0 0; }
.nx-h2{ font-weight:800; }

.nx-cats{ display:grid; grid-template-columns:repeat(auto-fill,minmax(200px,1fr)); gap:16px; }
.nx-cat{ display:flex; flex-direction:column; gap:6px; padding:22px; border-radius:var(--r-2xl); background:var(--surface-1); border:1px solid var(--line); color:var(--text); transition:border-color .15s ease, transform .15s ease; }
.nx-cat:hover{ border-color:var(--brand-border); transform:translateY(-3px); color:var(--text); }
.nx-cat__name{ font-weight:800; font-size:18px; letter-spacing:-.02em; }
.nx-cat__count{ color:var(--brand-2); font-size:12px; text-transform:uppercase; letter-spacing:.1em; font-weight:800; }

.nx-vendors{ display:grid; grid-template-columns:repeat(auto-fill,minmax(280px,1fr)); gap:18px; }
.nx-vendor{ background:var(--surface-1); border:1px solid var(--line); border-radius:var(--r-card); padding:20px; }
.nx-vendor__top{ display:flex; align-items:center; justify-content:space-between; gap:10px; }
.nx-vendor__name{ font-weight:800; font-size:18px; }
.nx-vendor__level{ background:var(--brand-tint); color:var(--brand); border:1px solid var(--brand-border); border-radius:999px; font-size:11px; font-weight:800; padding:3px 10px; text-transform:uppercase; letter-spacing:.06em; }
.nx-vendor__note{ color:var(--muted); font-size:13px; margin:8px 0 14px; }
.nx-vendor__stats{ display:grid; grid-template-columns:repeat(2,1fr); gap:10px; margin-bottom:14px; }
.nx-vendor__stats div{ background:var(--surface-2); border-radius:12px; padding:10px 12px; }
.nx-vendor__stats span{ display:block; font-weight:900; color:var(--brand); font-size:16px; }
.nx-vendor__stats small{ color:var(--muted); font-size:11px; text-transform:uppercase; letter-spacing:.08em; }
.nx-vendor__methods{ display:flex; gap:6px; flex-wrap:wrap; }
.nx-chip{ background:var(--surface-3); border:1px solid var(--line); color:var(--text); border-radius:999px; font-size:12px; padding:4px 10px; }
@media(max-width:640px){ .nx-hero__h1{ font-size:40px; } .nx-vendor__stats{ grid-template-columns:1fr 1fr; } }

/* ============================================================ SINGLE PRODUCT (SPA-style) */
.nx-single{ padding-top:40px; }
.nx-product__grid{ display:grid; grid-template-columns:1fr 1.1fr; gap:40px; align-items:start; }
@media(max-width:900px){ .nx-product__grid{ grid-template-columns:1fr; gap:24px; } }
.nx-product__media .woocommerce-product-gallery{ margin:0; }
.nx-product__media img{ border-radius:var(--r-hero); background:var(--grad-art); width:100%; }
.nx-product__summary .nx-eyebrow{ display:inline-block; margin-bottom:8px; }
.nx-product__summary .product_title{ font-size:clamp(28px,4vw,46px); font-weight:800; letter-spacing:-.04em; margin:0 0 10px; }
.nx-product__summary .price{ color:var(--brand)!important; font-weight:900; font-size:26px; display:block; margin-bottom:12px; }
.nx-product__summary .price del{ color:var(--muted)!important; font-weight:500; font-size:18px; }
.nx-buy{ display:grid; grid-template-columns:1fr 1fr; gap:16px; margin-top:16px; }
@media(max-width:1100px){ .nx-buy{ grid-template-columns:1fr; } }
.nx-panel{ background:var(--surface-1); border:1px solid var(--line); border-radius:var(--r-3xl,22px); padding:18px; }
.nx-panel__title{ font-size:12px; text-transform:uppercase; letter-spacing:.1em; font-weight:800; color:var(--muted); margin-bottom:12px; }
.nx-plans{ list-style:none; margin:0; padding:0; }
.nx-plan{ display:flex; align-items:center; justify-content:space-between; gap:10px; padding:10px 0; border-bottom:1px dashed var(--line); }
.nx-plan:last-child{ border-bottom:0; }
.nx-plan__name{ display:block; font-weight:700; font-size:14px; }
.nx-plan__meta{ display:block; color:var(--muted); font-size:12px; }
.nx-plan__price{ color:var(--brand); font-weight:900; white-space:nowrap; }
.nx-buy__vendors .quantity{ margin-bottom:10px; }
.nx-buy__vendors .single_add_to_cart_button{ width:100%; text-align:center; margin-top:8px; }
.nx-product__tabs{ margin-top:36px; }
