/*
Theme Name: Abayati Luxury
Theme URI: https://abayati.ma
Author: Abayati
Description: ثيم مخصص لمتجر عبايتي - مطابق 100% للتصميم الأصلي (React) مع تحكم كامل عبر WordPress/WooCommerce/ACF. كل المحتوى (الصفحات، المنتجات، الفيديوهات) قابل للتعديل من لوحة التحكم بدون أي كود.
Version: 1.0.0
Requires PHP: 7.4
Text Domain: abayati
*/

/* ══════════════════════════════════════
   ABAYATI — Design System (ported 1:1)
   ══════════════════════════════════════ */

:root {
  --primary: #1A1A1A;
  --secondary: #C4A44A;
  --background: #FAFAF7;
  --surface: #F5F0E8;
  --accent: #8B7355;
  --text: #111111;
  --muted: #7A7A7A;
  --gold-light: #D4B86A;
  --whatsapp: #25D366;
  --font-ar: 'Tajawal', sans-serif;
  --font-en: 'Plus Jakarta Sans', sans-serif;
  --ease: cubic-bezier(0.4, 0, 0.2, 1);

  --px: 16px;
  --section-y: 48px;
  --max-w: 1200px;
}
@media (min-width: 640px) { :root { --px: 24px; --section-y: 64px; } }
@media (min-width: 1024px) { :root { --px: 32px; --section-y: 80px; } }
@media (min-width: 1280px) { :root { --px: 48px; } }

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; scrollbar-width: none; }
html::-webkit-scrollbar { display: none; }
body {
  font-family: var(--font-ar);
  background: var(--background);
  color: var(--text);
  line-height: 1.8;
  overflow-x: hidden;
  direction: rtl;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-size: 15px;
}
body.abayati-en { direction: ltr; font-family: var(--font-en); }
@media (min-width: 768px) { body { font-size: 16px; } }
.font-en { font-family: var(--font-en); }
img, video { display: block; max-width: 100%; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
button { font-family: inherit; }

.text-display { font-size: clamp(32px, 7vw, 64px); font-weight: 700; line-height: 1.15; letter-spacing: 0.01em; }
.text-h1 { font-size: clamp(26px, 4.5vw, 42px); font-weight: 700; line-height: 1.2; }
.text-h2 { font-size: clamp(22px, 3.5vw, 30px); font-weight: 700; line-height: 1.3; }
.text-h3 { font-size: clamp(17px, 2.5vw, 21px); font-weight: 600; line-height: 1.4; }

.container-x { padding-left: var(--px); padding-right: var(--px); margin-left: auto; margin-right: auto; max-width: var(--max-w); }
.section-padding { padding: var(--section-y) var(--px); }
.section-header { text-align: center; margin-bottom: clamp(28px, 5vw, 48px); }
.section-header h2 { margin-bottom: 10px; }
.section-header p { color: var(--muted); max-width: 560px; margin: 0 auto; font-size: 14px; }
@media (min-width: 768px) { .section-header p { font-size: 15px; } }

.gold-rule { height: 1px; background: linear-gradient(90deg, transparent, var(--secondary), transparent); margin: var(--section-y) auto; max-width: 500px; opacity: .5; width: calc(100% - var(--px) * 2); }

.bg-surface {
  background-color: var(--surface);
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.015'/%3E%3C/svg%3E");
}

.grid-products { display: grid; grid-template-columns: 1fr; gap: 16px; }
@media (min-width: 540px) { .grid-products { grid-template-columns: repeat(2, 1fr); gap: 20px; } }
@media (min-width: 1024px) { .grid-products { grid-template-columns: repeat(3, 1fr); gap: 24px; } }

.grid-categories { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (min-width: 640px) { .grid-categories { gap: 16px; } }
@media (min-width: 768px) { .grid-categories { grid-template-columns: repeat(3, 1fr); gap: 18px; } }
@media (min-width: 1024px) { .grid-categories { grid-template-columns: repeat(4, 1fr); gap: 20px; } }

.card { background: white; border-radius: 14px; border: 1px solid rgba(196,164,74,.15); overflow: hidden; transition: border-color .3s, box-shadow .3s, transform .3s; }
.card:hover { border-color: rgba(196,164,74,.35); }
.card-dark { background: var(--primary); border-color: rgba(196,164,74,.15); }
.hover-lift { transition: transform .3s var(--ease), box-shadow .3s; }
.hover-lift:hover { transform: translateY(-4px); box-shadow: 0 12px 36px rgba(26,26,26,.1); }

.badge { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 9999px; font-size: 12px; font-weight: 500; backdrop-filter: blur(8px); }
.badge-dark { background: rgba(26,26,26,.8); color: rgba(255,255,255,.9); }
.badge-light { background: rgba(255,255,255,.92); color: var(--primary); }
.badge-gold { background: rgba(196,164,74,.12); color: var(--secondary); border: 1px solid rgba(196,164,74,.25); }

.tag { display: inline-flex; align-items: center; gap: 4px; padding: 5px 10px; border-radius: 8px; font-size: 11px; background: var(--surface); color: var(--accent); border: 1px solid rgba(196,164,74,.12); }
@media (min-width: 768px) { .tag { font-size: 12px; padding: 6px 12px; } }

.btn-primary { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 24px; background: var(--secondary); color: white; font-weight: 600; border-radius: 10px; border: none; cursor: pointer; transition: all .3s var(--ease); font-size: 14px; }
.btn-primary:hover { background: var(--gold-light); transform: translateY(-2px); box-shadow: 0 6px 20px rgba(196,164,74,.3); }
.btn-secondary { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 24px; background: transparent; color: white; font-weight: 500; border-radius: 10px; border: 1px solid rgba(255,255,255,.3); cursor: pointer; transition: all .3s; backdrop-filter: blur(8px); font-size: 14px; }
.btn-secondary:hover { background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.5); }
.btn-dark { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 24px; background: var(--primary); color: white; font-weight: 600; border-radius: 10px; border: none; cursor: pointer; transition: all .3s; font-size: 14px; }
.btn-dark:hover { background: var(--secondary); transform: translateY(-2px); box-shadow: 0 6px 20px rgba(196,164,74,.3); }
.btn-whatsapp { display: inline-flex; align-items: center; justify-content: center; gap: 10px; padding: 14px 28px; background: var(--whatsapp); color: white; font-weight: 600; border-radius: 10px; border: none; cursor: pointer; transition: all .3s; font-size: 14px; }
.btn-whatsapp:hover { background: #1fb855; transform: translateY(-2px); box-shadow: 0 6px 20px rgba(37,211,102,.35); }
.btn-glow:hover { box-shadow: 0 0 25px rgba(196,164,74,.4); }

@media (max-width: 640px) {
  .btn-primary, .btn-secondary, .btn-dark, .btn-whatsapp { padding: 11px 18px; font-size: 13px; }
}

.form-input { width: 100%; padding: 12px 16px; border-radius: 10px; border: 1px solid rgba(196,164,74,.18); background: var(--background); font-family: var(--font-ar); font-size: 14px; color: var(--text); transition: border-color .25s, box-shadow .25s; }
.form-input:focus { outline: none; border-color: var(--secondary); box-shadow: 0 0 0 3px rgba(196,164,74,.1); }
.form-input::placeholder { color: var(--muted); }
.form-label { display: block; font-size: 13px; font-weight: 500; color: var(--text); margin-bottom: 6px; }

.accordion-content { max-height: 0; overflow: hidden; transition: max-height .4s var(--ease); }
.accordion-content.open { max-height: 500px; }
.accordion-icon { width: 26px; height: 26px; display: flex; align-items: center; justify-content: center; border-radius: 50%; background: rgba(196,164,74,.1); color: var(--secondary); font-size: 16px; transition: all .3s; flex-shrink: 0; }
.accordion-icon.open { background: var(--secondary); color: white; transform: rotate(45deg); }

/* Scroll Progress */
#scroll-progress-track { position: fixed; top: 0; left: 0; right: 0; height: 3px; background: rgba(196,164,74,.12); z-index: 9999; }
#scroll-progress { height: 100%; width: 0%; background: linear-gradient(90deg, var(--secondary), var(--gold-light)); }

/* Sidebar */
.sidebar-transition { transition: all 320ms var(--ease); }
.sidebar-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.3); backdrop-filter: blur(3px); z-index: 44; opacity: 0; visibility: hidden; transition: all .3s; }
.sidebar-overlay.active { opacity: 1; visibility: visible; }

#abayati-sidebar { position: fixed; top: 0; left: 0; z-index: 45; display: flex; flex-direction: column; align-items: flex-start; width: 56px; height: 100vh; background: transparent; transition: all 320ms var(--ease); }
#abayati-sidebar.expanded { width: 240px; background: rgba(26,26,26,0.93); backdrop-filter: blur(24px); border-right: 1px solid rgba(196,164,74,0.1); box-shadow: 12px 0 40px rgba(0,0,0,0.3); }
.sidebar-toggle { width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; margin: 20px auto 16px; border-radius: 8px; background: none; border: none; cursor: pointer; }
.sidebar-toggle i { color: rgba(255,255,255,.85); font-size: 17px; filter: drop-shadow(0 1px 6px rgba(0,0,0,.7)); }
#abayati-sidebar.expanded .sidebar-toggle i { color: #C4A44A; }
.sidebar-nav { flex: 1; width: 100%; display: flex; flex-direction: column; gap: 2px; padding: 0 8px; overflow-y: auto; }
.sidebar-link { position: relative; display: flex; align-items: center; height: 44px; border-radius: 12px; border-left: 3px solid transparent; justify-content: center; transition: all .2s; }
#abayati-sidebar.expanded .sidebar-link { justify-content: flex-start; padding: 0 14px; }
.sidebar-link.active { border-left: 3px solid #C4A44A; }
.sidebar-link i { font-size: 17px; color: rgba(255,255,255,.75); filter: drop-shadow(0 1px 6px rgba(0,0,0,.7)); width: auto; text-align: center; }
#abayati-sidebar.expanded .sidebar-link i { color: rgba(255,255,255,.6); width: 28px; filter: none; }
.sidebar-link.active i { color: #C4A44A !important; filter: drop-shadow(0 0 6px rgba(196,164,74,.6)) !important; }
.sidebar-link span { display: none; margin-right: 12px; font-size: 15px; color: rgba(255,255,255,.8); }
#abayati-sidebar.expanded .sidebar-link span { display: inline; }
.sidebar-link.active span { color: #C4A44A; font-weight: 600; }
.sidebar-tooltip { position: absolute; left: 100%; margin-left: 12px; padding: 8px 12px; border-radius: 8px; background: rgba(26,26,26,.92); backdrop-filter: blur(12px); border: 1px solid rgba(196,164,74,.15); box-shadow: 0 4px 20px rgba(0,0,0,.4); white-space: nowrap; opacity: 0; visibility: hidden; transition: all .2s; z-index: 60; font-size: 13px; color: rgba(255,255,255,.9); }
#abayati-sidebar:not(.expanded) .sidebar-link:hover .sidebar-tooltip { opacity: 1; visibility: visible; }
.sidebar-social { width: 100%; display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 12px 0 60px; }
#abayati-sidebar.expanded .sidebar-social { flex-direction: row; justify-content: center; gap: 20px; padding: 12px 16px 60px; border-top: 1px solid rgba(196,164,74,0.1); }
.sidebar-social a { font-size: 15px; color: rgba(255,255,255,.5); transition: color .2s, transform .2s; filter: drop-shadow(0 1px 6px rgba(0,0,0,.7)); }
.sidebar-social a:hover { transform: scale(1.25); }

/* Header / Logo */
.abayati-header { position: relative; height: 64px; }
.abayati-logo-fixed { position: fixed; top: 14px; left: 50%; transform: translateX(-50%); z-index: 30; text-align: center; pointer-events: none; }
.abayati-logo-fixed { position: fixed; top: 14px; left: 50%; transform: translateX(-50%); z-index: 31; text-align: center; pointer-events: none; }
.logo-ar { color: #C4A44A; font-family: var(--font-ar); font-size: 30px; font-weight: 700; line-height: 1.1; letter-spacing: .02em; text-shadow: 0 2px 12px rgba(0,0,0,.6), 0 0 4px rgba(0,0,0,.4); display: block; }
.logo-en { color: rgba(255,255,255,.85); font-family: var(--font-en); font-size: 12px; font-weight: 400; letter-spacing: .3em; margin-top: 2px; text-shadow: 0 1px 8px rgba(0,0,0,.6); display: block; }
.logo-footer-ar { color: #C4A44A; font-family: var(--font-ar); font-size: 18px; font-weight: 700; }
.logo-footer-en { color: rgba(255,255,255,.4); font-family: var(--font-en); font-size: 11px; font-weight: 300; letter-spacing: .15em; margin-right: 8px; }

/* تصحيح التداخل مع شريط الأدمن العلوي ديال ووردبريس (admin bar) */
body.admin-bar #scroll-progress-track { top: 32px; }
body.admin-bar #abayati-sidebar { top: 32px; height: calc(100vh - 32px); }
body.admin-bar .abayati-logo-fixed { top: 46px; }
@media (max-width: 782px) {
	body.admin-bar #scroll-progress-track { top: 46px; }
	body.admin-bar #abayati-sidebar { top: 46px; height: calc(100vh - 46px); }
	body.admin-bar .abayati-logo-fixed { top: 60px; }
}

/* Footer */
.abayati-footer { display: flex; align-items: center; justify-content: space-between; padding: 0 24px; min-height: 48px; background: linear-gradient(180deg, rgba(26,26,26,.95), rgba(26,26,26,1)); border-top: 1px solid rgba(196,164,74,.1); flex-wrap: wrap; gap: 8px; }
.abayati-footer-copy { color: rgba(255,255,255,.5); font-size: 12px; text-align: center; flex: 1; }
.abayati-footer-links { display: flex; align-items: center; gap: 12px; font-size: 12px; }
.abayati-footer-links a { color: rgba(255,255,255,.4); transition: color .2s; }
.abayati-footer-links a:hover { color: #C4A44A; }
@media (max-width: 640px) { .abayati-footer-copy { display: none; } }

/* WhatsApp Floating Button */
.wa-float { position: fixed; z-index: 1000; bottom: 28px; right: 24px; display: flex; align-items: center; justify-content: center; width: 57px; height: 57px; border-radius: 50%; background: #25D366; box-shadow: 0 4px 20px rgba(37,211,102,.4); transition: all .3s; overflow: hidden; }
.wa-float:hover { width: auto; border-radius: 9999px; padding: 0 24px; }
.wa-float i.fa-whatsapp { color: white; font-size: 24px; }
.wa-float span { display: none; color: white; font-weight: 500; margin-right: 12px; white-space: nowrap; }
.wa-float:hover span { display: inline; }

/* Animations */
@keyframes shimmer { 0% { background-position: -200% center; } 100% { background-position: 200% center; } }
.text-shimmer:hover { background: linear-gradient(90deg, var(--text) 0%, var(--secondary) 50%, var(--text) 100%); background-size: 200% auto; background-clip: text; -webkit-background-clip: text; -webkit-text-fill-color: transparent; animation: shimmer 2s linear infinite; }

@keyframes wa-pulse { 0% { box-shadow: 0 4px 16px rgba(37,211,102,.35), 0 0 0 0 rgba(37,211,102,.4); } 70% { box-shadow: 0 4px 16px rgba(37,211,102,.35), 0 0 0 14px rgba(37,211,102,0); } 100% { box-shadow: 0 4px 16px rgba(37,211,102,.35), 0 0 0 0 rgba(37,211,102,0); } }
.whatsapp-pulse { animation: wa-pulse 2s infinite; }

@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
.float-animation { animation: float 3s ease-in-out infinite; }

@keyframes fadeInUp { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: translateY(0); } }
.fade-in-up { animation: fadeInUp .5s ease forwards; }
.anim-s, .s-card { opacity: 0; transform: translateY(30px); transition: opacity .6s ease, transform .6s ease; }
.anim-s.is-visible, .s-card.is-visible { opacity: 1; transform: translateY(0); }

.price-reveal { opacity: 0; transform: translateY(8px); transition: all .3s var(--ease); }
.group:hover .price-reveal { opacity: 1; transform: translateY(0); }

::selection { background: rgba(196,164,74,.25); color: var(--text); }
:focus-visible { outline: 2px solid var(--secondary); outline-offset: 2px; }

video { background: var(--surface); }

.shadow-luxury { box-shadow: 0 4px 20px rgba(26,26,26,.07); }
.shadow-gold { box-shadow: 0 4px 16px rgba(196,164,74,.2); }

/* Hero / generic page hero */
.hero-section { position: relative; overflow: hidden; }
.hero-section video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-overlay { position: absolute; inset: 0; }
.hero-content { position: relative; z-index: 10; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 0 var(--px); }

/* Product card */
.product-card-inner { display: flex; flex-direction: column; height: 100%; }
.product-media { position: relative; aspect-ratio: 3/4; overflow: hidden; }
.product-media video, .product-media img { width: 100%; height: 100%; object-fit: cover; }

/* Category card */
.category-card { position: relative; border-radius: 14px; overflow: hidden; aspect-ratio: 1/1.1; display: block; }
.category-card video, .category-card img { width: 100%; height: 100%; object-fit: cover; }
.category-card .cat-overlay { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(26,26,26,.1), rgba(26,26,26,.75)); display: flex; flex-direction: column; align-items: center; justify-content: flex-end; padding: 16px; text-align: center; }

/* WooCommerce overrides */
.woocommerce ul.products { display: grid; grid-template-columns: 1fr; gap: 16px; list-style: none; }
@media (min-width: 540px) { .woocommerce ul.products { grid-template-columns: repeat(2,1fr); gap: 20px; } }
@media (min-width: 1024px) { .woocommerce ul.products { grid-template-columns: repeat(3,1fr); gap: 24px; } }
.woocommerce ul.products li.product { background: white; border-radius: 14px; border: 1px solid rgba(196,164,74,.15); overflow: hidden; padding: 0 !important; margin: 0 !important; width: 100% !important; }
.woocommerce span.price { color: var(--secondary); font-weight: 700; }
.woocommerce a.button, .woocommerce button.button { background: var(--secondary) !important; color: #fff !important; border-radius: 10px !important; }
.woocommerce a.button:hover, .woocommerce button.button:hover { background: var(--gold-light) !important; }

/* Simple table styling (shipping page) */
table.abayati-table { width: 100%; border-collapse: collapse; }
table.abayati-table th, table.abayati-table td { padding: 12px 16px; border-bottom: 1px solid rgba(196,164,74,.12); }
table.abayati-table th { background: var(--surface); }

@media (max-width: 1023px) { .container-x { max-width: 100%; } }
