/*
Theme Name: AliExpress Trends
Theme URI: https://aliexpresstrends.com
Author: AliExpressTrends.com
Author URI: https://aliexpresstrends.com
Description: قالب تسويق بالعمولة لـ AliExpress مع تعدد لغات (إنجليزي افتراضي + عربي/إسباني/إيطالي) واكتشاف تلقائي للغة الزائر من ترويسة المتصفح. Affiliate marketing theme for AliExpress with EN/AR/ES/IT language auto-detection.
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: axtrends
Tags: affiliate, aliexpress, ecommerce, rtl, multilingual, arabic, spanish, italian
*/

/* ============ المتغيرات العامة / Global Variables ============ */
:root{
  --ax-red:#e62e04;
  --ax-dark:#191919;
  --ax-orange:#ff6a00;
  --ax-bg:#f5f6f7;
  --ax-text:#222;
  --ax-muted:#777;
  --ax-card:#fff;
  --ax-radius:12px;
  --ax-shadow:0 2px 12px rgba(0,0,0,.08);
  --ax-container:1200px;
  --ax-font:'Segoe UI',system-ui,-apple-system,Arial,sans-serif;
}

*{box-sizing:border-box;margin:0;padding:0}
html{scroll-behavior:smooth}
body{
  font-family:var(--ax-font);
  background:var(--ax-bg);
  color:var(--ax-text);
  line-height:1.7;
  font-size:16px;
}
img{max-width:100%;height:auto;display:block}
a{color:var(--ax-red);text-decoration:none}
a:hover{text-decoration:underline}

.ax-container{max-width:var(--ax-container);margin:0 auto;padding:0 20px}

/* ============ الترويسة / Header ============ */
.ax-header{
  background:var(--ax-dark);
  color:#fff;
  position:sticky;top:0;z-index:100;
  box-shadow:0 2px 10px rgba(0,0,0,.15);
}
.ax-header-inner{
  max-width:var(--ax-container);margin:0 auto;padding:12px 20px;
  display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap;
}
.ax-logo{font-size:1.4rem;font-weight:800;color:#fff;display:flex;align-items:center;gap:8px}
.ax-logo:hover{text-decoration:none}
.ax-logo .ax-dot{color:var(--ax-red)}
.ax-logo small{display:block;font-size:.65rem;font-weight:400;color:#bbb;letter-spacing:2px}

.ax-nav{display:flex;gap:20px;list-style:none}
.ax-nav a{color:#ddd;font-weight:600;font-size:.95rem}
.ax-nav a:hover{color:#fff;text-decoration:none}

/* محوّل اللغة / Language Switcher */
.ax-lang-switch{position:relative}
.ax-lang-btn{
  background:rgba(255,255,255,.1);border:1px solid rgba(255,255,255,.25);
  color:#fff;padding:6px 14px;border-radius:20px;cursor:pointer;
  font-size:.85rem;display:flex;align-items:center;gap:6px;font-family:inherit;
}
.ax-lang-btn:hover{background:rgba(255,255,255,.2)}
.ax-lang-menu{
  position:absolute;top:110%;inset-inline-end:0;background:#fff;border-radius:10px;
  box-shadow:0 8px 24px rgba(0,0,0,.2);min-width:160px;overflow:hidden;
  display:none;list-style:none;
}
.ax-lang-switch:hover .ax-lang-menu{display:block}
.ax-lang-menu li a{
  display:flex;align-items:center;gap:10px;padding:10px 16px;color:var(--ax-text);
  font-size:.9rem;font-weight:600;
}
.ax-lang-menu li a:hover{background:var(--ax-bg);text-decoration:none}
.ax-lang-menu li.active a{color:var(--ax-red)}
.ax-flag{font-size:1.1rem}

/* بحث / Search */
.ax-search{display:flex;flex:1;max-width:480px}
.ax-search input{
  flex:1;padding:10px 16px;border:none;border-radius:24px 0 0 24px;
  font-size:.9rem;outline:none;
}
.ax-search button{
  background:var(--ax-red);color:#fff;border:none;padding:0 20px;
  border-radius:0 24px 24px 0;cursor:pointer;font-weight:700;font-family:inherit;
}

/* ============ Hero ============ */
.ax-hero{
  background:linear-gradient(135deg,var(--ax-red),var(--ax-orange));
  color:#fff;padding:70px 20px;text-align:center;
}
.ax-hero h1{font-size:2.4rem;margin-bottom:14px}
.ax-hero p{font-size:1.15rem;opacity:.95;max-width:640px;margin:0 auto 26px}
.ax-hero-cta{
  display:inline-block;background:#fff;color:var(--ax-red);
  padding:14px 36px;border-radius:30px;font-weight:800;font-size:1.05rem;
  box-shadow:0 6px 20px rgba(0,0,0,.2);transition:transform .2s;
}
.ax-hero-cta:hover{transform:translateY(-3px);text-decoration:none}

/* ============ شبكة المنتجات / Products Grid ============ */
.ax-section{padding:50px 0}
.ax-section-title{
  font-size:1.6rem;margin-bottom:6px;display:flex;align-items:center;gap:12px;
}
.ax-section-title::before{content:'';width:5px;height:28px;background:var(--ax-red);border-radius:3px}
.ax-section-sub{color:var(--ax-muted);margin-bottom:28px;font-size:.95rem}

.ax-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(250px,1fr));gap:24px}

.ax-card{
  background:var(--ax-card);border-radius:var(--ax-radius);overflow:hidden;
  box-shadow:var(--ax-shadow);display:flex;flex-direction:column;
  transition:transform .25s,box-shadow .25s;
}
.ax-card:hover{transform:translateY(-6px);box-shadow:0 12px 30px rgba(0,0,0,.14)}
.ax-card-img{position:relative;aspect-ratio:1;overflow:hidden;background:#eee}
.ax-card-img img{width:100%;height:100%;object-fit:cover;transition:transform .4s}
.ax-card:hover .ax-card-img img{transform:scale(1.06)}
.ax-badge{
  position:absolute;top:12px;inset-inline-start:12px;background:var(--ax-red);
  color:#fff;font-size:.7rem;font-weight:800;padding:4px 10px;border-radius:20px;
  text-transform:uppercase;
}
.ax-card-body{padding:16px;display:flex;flex-direction:column;gap:10px;flex:1}
.ax-card-cat{font-size:.72rem;color:var(--ax-muted);text-transform:uppercase;letter-spacing:1px}
.ax-card-title{font-size:.98rem;font-weight:700;line-height:1.4}
.ax-card-title a{color:var(--ax-text)}
.ax-card-title a:hover{color:var(--ax-red);text-decoration:none}
.ax-price-row{display:flex;align-items:baseline;gap:8px}
.ax-price{color:var(--ax-red);font-size:1.25rem;font-weight:800}
.ax-old-price{color:var(--ax-muted);text-decoration:line-through;font-size:.85rem}
.ax-discount{background:#ffe9e2;color:var(--ax-red);font-size:.72rem;font-weight:800;padding:2px 8px;border-radius:12px}
.ax-buy-btn{
  margin-top:auto;display:block;text-align:center;background:var(--ax-dark);
  color:#fff;padding:12px;border-radius:8px;font-weight:700;font-size:.9rem;
  transition:background .2s;
}
.ax-buy-btn:hover{background:var(--ax-red);text-decoration:none;color:#fff}

/* ============ Sidebar / Widgets ============ */
.ax-layout{display:grid;grid-template-columns:1fr 320px;gap:32px;padding:50px 0}
@media(max-width:900px){.ax-layout{grid-template-columns:1fr}}
.ax-widget{background:#fff;border-radius:var(--ax-radius);padding:22px;box-shadow:var(--ax-shadow);margin-bottom:24px}
.ax-widget-title{font-size:1.05rem;margin-bottom:14px;padding-bottom:10px;border-bottom:2px solid var(--ax-bg)}
.ax-widget ul{list-style:none}
.ax-widget ul li{padding:6px 0;border-bottom:1px dashed #eee}
.ax-widget ul li:last-child{border-bottom:none}

/* ============ المقالات / Content ============ */
.ax-content{background:#fff;border-radius:var(--ax-radius);padding:36px;box-shadow:var(--ax-shadow)}
.ax-content h1{font-size:1.9rem;margin-bottom:18px;line-height:1.35}
.ax-content h2{font-size:1.4rem;margin:28px 0 12px}
.ax-content p{margin-bottom:16px}
.ax-meta{color:var(--ax-muted);font-size:.85rem;margin-bottom:22px;display:flex;gap:16px}

.ax-deal-box{
  border:2px dashed var(--ax-red);border-radius:var(--ax-radius);
  padding:22px;margin:26px 0;text-align:center;background:#fff9f7;
}
.ax-deal-box .ax-price{font-size:1.8rem}
.ax-deal-btn{
  display:inline-block;margin-top:12px;background:var(--ax-red);color:#fff;
  padding:14px 40px;border-radius:30px;font-weight:800;
}

/* ============ الفوتر / Footer ============ */
.ax-footer{background:var(--ax-dark);color:#aaa;margin-top:60px;padding:50px 0 0}
.ax-footer-grid{
  max-width:var(--ax-container);margin:0 auto;padding:0 20px 40px;
  display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:36px;
}
.ax-footer h4{color:#fff;font-size:1rem;margin-bottom:16px}
.ax-footer ul{list-style:none}
.ax-footer ul li{margin-bottom:8px}
.ax-footer a{color:#aaa;font-size:.9rem}
.ax-footer a:hover{color:#fff}
.ax-disclaimer{
  font-size:.75rem;color:#666;max-width:var(--ax-container);margin:0 auto;
  padding:0 20px 30px;line-height:1.6;
}
.ax-copy{border-top:1px solid #333;text-align:center;padding:18px;font-size:.85rem}

/* ============ RTL (العربية) ============ */
[dir="rtl"] body{font-family:'Segoe UI',Tahoma,Arial,sans-serif}
[dir="rtl"] .ax-search input{border-radius:0 24px 24px 0}
[dir="rtl"] .ax-search button{border-radius:24px 0 0 24px}
[dir="rtl"] .ax-section-title::before{order:2}

/* ============ التجاوب / Responsive ============ */
@media(max-width:768px){
  .ax-header-inner{gap:10px}
  .ax-search{order:3;max-width:100%;flex-basis:100%}
  .ax-nav{display:none}
  .ax-hero h1{font-size:1.6rem}
  .ax-hero{padding:46px 16px}
  .ax-grid{grid-template-columns:repeat(auto-fill,minmax(160px,1fr));gap:14px}
  .ax-content{padding:22px}
}
