/*
Theme Name: صنايعية شرم
Theme URI: https://sanayea.byethost8.com/
Author: Muse
Author URI: https://muse.ai/
Description: قالب موقع خدمات الصنايعية والمهن الحرفية في شرم الشيخ — إعلانات صنايعية بكل المهن، تسجيل ونشر من الواجهة، واشتراك مدفوع لتفعيل الإعلان. إدارة كاملة من لوحة التحكم (نوع منشور "craftsman") مع بيانات تجريبية.
Version: 1.1.8
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: sanayea
Tags: rtl, craftsmen, directory, services
*/

/* ===== مبدّل اللغة (عربي / English / Русский) ===== */
.lang-switch{display:flex; gap:4px; align-items:center}
.lang-switch button{background:rgba(255,255,255,.15); color:#fff; border:1px solid rgba(255,255,255,.35); border-radius:8px; padding:6px 10px; font-size:13px; font-weight:700; font-family:inherit; cursor:pointer}
.lang-switch button.on{background:var(--accent); border-color:var(--accent)}
.lang-switch button:hover{background:rgba(255,255,255,.28)}

/* ===== الصورة الشخصية في البطاقة ===== */
.avatar img{width:100%; height:100%; object-fit:cover; border-radius:50%; display:block}
.card h3 a{color:inherit}
.card h3 a:hover{color:var(--primary); text-decoration:underline}

/* ===== صفحة الملف الشخصي (single-craftsman.php) ===== */
.profile{background:#fff; border:1px solid var(--line); border-radius:18px; padding:28px; margin-top:24px}
.profile-back{display:inline-block; color:var(--primary); font-weight:700; font-size:14px; margin-bottom:18px}
.profile-top{display:flex; gap:22px; align-items:flex-start; flex-wrap:wrap}
.profile-photo{width:150px; height:150px; border-radius:50%; object-fit:cover; border:4px solid #e6f4f6; flex:0 0 auto}
.profile-photo-initials{width:150px; height:150px; border-radius:50%; background:linear-gradient(135deg,var(--primary),#12808f); color:#fff; font-size:52px; font-weight:800; display:flex; align-items:center; justify-content:center; flex:0 0 auto}
.profile-info{flex:1; min-width:260px}
.profile-info h1{font-size:28px; line-height:1.35; margin-bottom:6px}
.profile-info .meta{margin-top:10px}
.profile-desc{font-size:16px; color:#374151; margin-top:16px; max-width:720px}
.profile-actions{display:flex; gap:10px; flex-wrap:wrap; margin-top:18px}
.profile-actions .btn{padding:12px 22px; font-size:15px}
.profile-gallery{display:grid; grid-template-columns:repeat(auto-fill,minmax(180px,1fr)); gap:12px; margin-top:14px}
.profile-gallery .thumb{width:100%; height:130px; border-radius:12px}

/* ===== تعديلات الاتجاه LTR (الإنجليزية / الروسية) ===== */
html[dir="ltr"] .plan ul{text-align:left}
html[dir="ltr"] .plan ul li::before{content:"✓ "}
html[dir="ltr"] .area-tag{margin-right:0; margin-left:4px}
html[dir="ltr"] .spinner{margin-left:0; margin-right:6px}

/* ===== ألوان وتصميم النموذج الأصلي (sanayea.html) ===== */
:root{
  --primary:#0b5e6b; --primary-dark:#08444f; --accent:#f59e0b; --accent-dark:#d97706;
  --bg:#f6f4ef; --card:#fff; --text:#1f2937; --muted:#6b7280; --line:#e5e7eb;
  --green:#16a34a; --green-bg:#dcfce7; --amber:#b45309; --amber-bg:#fef3c7; --red:#dc2626;
}
*{box-sizing:border-box; margin:0; padding:0}
body{font-family:"Segoe UI",Tahoma,Arial,sans-serif; background:var(--bg); color:var(--text); line-height:1.7}
a{text-decoration:none; color:inherit}
.wrap{max-width:1150px; margin:0 auto; padding:0 16px}
button{font-family:inherit; cursor:pointer}
input,select,textarea{font-family:inherit; font-size:15px}

/* ===== Header ===== */
.site-header{background:var(--primary); color:#fff; position:sticky; top:0; z-index:50; box-shadow:0 2px 10px rgba(0,0,0,.15)}
.topbar{display:flex; align-items:center; justify-content:space-between; gap:12px; padding:12px 16px; max-width:1150px; margin:0 auto; flex-wrap:wrap}
.logo{font-size:24px; font-weight:800; display:flex; align-items:center; gap:8px}
.logo span{color:var(--accent)}
.main-nav{display:flex; gap:4px; flex-wrap:wrap}
.main-nav a{padding:8px 12px; border-radius:8px; font-size:15px}
.main-nav a:hover{background:rgba(255,255,255,.15)}
.btn{display:inline-block; border:none; border-radius:10px; padding:11px 20px; font-size:15px; font-weight:700; transition:.15s}
.btn-accent{background:var(--accent); color:#fff}
.btn-accent:hover{background:var(--accent-dark)}
.btn-primary{background:var(--primary); color:#fff}
.btn-primary:hover{background:var(--primary-dark)}
.btn-ghost{background:#fff; color:var(--primary); border:2px solid var(--primary)}
.btn-ghost:hover{background:#eef7f8}
.btn-danger{background:#fee2e2; color:var(--red); border:1px solid #fecaca}
.btn-sm{padding:7px 12px; font-size:13px; border-radius:8px}

/* ===== Hero ===== */
.hero{background:linear-gradient(135deg,#0b5e6b 0%,#12808f 60%,#0ea5a5 100%); color:#fff; padding:44px 0 56px}
.hero h1{font-size:34px; line-height:1.4; margin-bottom:10px}
.hero p{font-size:17px; opacity:.92; margin-bottom:22px; max-width:640px}
.searchbar{background:#fff; border-radius:14px; padding:10px; display:flex; gap:8px; flex-wrap:wrap; box-shadow:0 8px 24px rgba(0,0,0,.18)}
.searchbar input,.searchbar select{flex:1; min-width:160px; border:1px solid var(--line); border-radius:9px; padding:11px 12px; color:var(--text)}
.searchbar .btn{flex:0 0 auto}
.stats{display:flex; gap:24px; margin-top:26px; flex-wrap:wrap}
.stat b{font-size:26px; display:block; line-height:1.2}
.stat span{font-size:14px; opacity:.85}

/* ===== Sections ===== */
section{padding:34px 0 8px}
h2{font-size:24px; margin-bottom:6px}
.sub{color:var(--muted); margin-bottom:18px; font-size:15px}
.page-section{padding:34px 0}
.page-content{font-size:16px}

/* ===== Trades grid ===== */
.trades{display:grid; grid-template-columns:repeat(auto-fill,minmax(150px,1fr)); gap:12px}
.trade{background:#fff; border:2px solid transparent; border-radius:14px; padding:18px 10px; text-align:center; cursor:pointer; transition:.15s}
.trade:hover{border-color:var(--primary); transform:translateY(-2px)}
.trade.selected{border-color:var(--primary); background:#e6f4f6}
.trade .ic{width:52px; height:52px; margin:0 auto 8px; border-radius:50%; background:#e6f4f6; color:var(--primary); display:flex; align-items:center; justify-content:center}
.trade .ic svg{width:26px; height:26px}
.trade b{font-size:15px; display:block}
.trade small{color:var(--muted); font-size:12px}

/* ===== Filter bar ===== */
.filters{background:#fff; border:1px solid var(--line); border-radius:14px; padding:12px; display:flex; gap:10px; flex-wrap:wrap; align-items:center; margin-bottom:18px}
.filters select,.filters input{border:1px solid var(--line); border-radius:9px; padding:9px 11px; min-width:150px; flex:1}
.filters label{display:flex; align-items:center; gap:6px; font-size:14px; white-space:nowrap}
.count{color:var(--muted); font-size:14px}

/* ===== Listings ===== */
.grid{display:grid; grid-template-columns:repeat(auto-fill,minmax(300px,1fr)); gap:16px}
.card{background:var(--card); border:1px solid var(--line); border-radius:16px; overflow:hidden; display:flex; flex-direction:column}
.card.pending{border:2px dashed var(--amber)}
.card-top{padding:16px 16px 0; display:flex; gap:12px}
.avatar{width:64px; height:64px; border-radius:50%; background:linear-gradient(135deg,var(--primary),#12808f); color:#fff; font-size:24px; font-weight:800; display:flex; align-items:center; justify-content:center; flex:0 0 auto}
.card-top h3{font-size:18px; line-height:1.4}
.trade-tag{display:inline-block; background:#e6f4f6; color:var(--primary); font-size:12px; font-weight:700; border-radius:20px; padding:2px 10px; margin-top:4px}
.area-tag{display:inline-block; background:#f3f4f6; color:#4b5563; font-size:12px; border-radius:20px; padding:2px 10px; margin-top:4px; margin-right:4px}
.badge{display:inline-block; font-size:12px; font-weight:700; border-radius:20px; padding:3px 10px; margin-top:6px}
.badge.on{background:var(--green-bg); color:var(--green)}
.badge.off{background:var(--amber-bg); color:var(--amber)}
.stars{color:var(--accent); font-size:15px; letter-spacing:1px}
.stars small{color:var(--muted); letter-spacing:0}
.card-body{padding:12px 16px; flex:1}
.card-body p{font-size:14px; color:#374151}
.meta{display:flex; gap:14px; flex-wrap:wrap; font-size:13px; color:var(--muted); margin-top:8px}
.price{font-size:17px; font-weight:800; color:var(--primary); margin-top:8px}
.thumbs{display:flex; gap:8px; margin-top:10px}
.thumb{width:74px; height:56px; border-radius:9px; display:flex; align-items:center; justify-content:center; color:#fff; font-size:11px; font-weight:700; cursor:pointer; overflow:hidden; background-size:cover; background-position:center}
.card-actions{display:flex; gap:8px; padding:0 16px 16px; flex-wrap:wrap}
.card-actions .btn{flex:1; text-align:center; padding:10px 6px; font-size:14px}
.btn-wa{background:#25d366; color:#fff}
.btn-wa:hover{background:#1da851}
.btn-call{background:#eef2ff; color:#3730a3; border:1px solid #c7d2fe}
.empty{grid-column:1/-1; text-align:center; color:var(--muted); padding:40px 0; background:#fff; border:1px dashed var(--line); border-radius:14px}

/* ===== Form ===== */
.form-card{background:#fff; border:1px solid var(--line); border-radius:16px; padding:22px; max-width:760px}
.form-row{display:grid; grid-template-columns:1fr 1fr; gap:12px}
.field{margin-bottom:14px}
.field label{display:block; font-weight:700; font-size:14px; margin-bottom:5px}
.field input,.field select,.field textarea{width:100%; border:1px solid var(--line); border-radius:9px; padding:11px 12px}
.field textarea{min-height:90px; resize:vertical}
.field small{color:var(--muted); font-size:12px}
.hint{background:#fffbeb; border:1px solid #fde68a; border-radius:10px; padding:12px 14px; font-size:14px; margin-bottom:16px}

/* ===== Plans ===== */
.plans{display:grid; grid-template-columns:repeat(auto-fit,minmax(240px,1fr)); gap:16px}
.plan{background:#fff; border:2px solid var(--line); border-radius:16px; padding:22px; text-align:center; position:relative}
.plan.best{border-color:var(--accent); box-shadow:0 6px 20px rgba(245,158,11,.25)}
.plan .tag{position:absolute; top:-12px; right:50%; transform:translateX(50%); background:var(--accent); color:#fff; font-size:12px; font-weight:700; padding:3px 14px; border-radius:20px; white-space:nowrap}
.plan h3{font-size:19px}
.plan .p{font-size:34px; font-weight:800; color:var(--primary); margin:8px 0}
.plan .p small{font-size:15px; color:var(--muted); font-weight:400}
.plan ul{list-style:none; text-align:right; font-size:14px; color:#374151; margin:12px 0 18px}
.plan ul li{padding:4px 0}
.plan ul li::before{content:"✓ "; color:var(--green); font-weight:800}
.plan.sel{border-color:var(--primary); background:#e6f4f6}

/* ===== Modal ===== */
.modal-bg{position:fixed; inset:0; background:rgba(0,0,0,.55); display:none; align-items:flex-start; justify-content:center; z-index:100; padding:20px; overflow-y:auto}
.modal-bg.open{display:flex}
.modal{background:#fff; border-radius:18px; max-width:640px; width:100%; padding:24px; margin-top:30px}
.modal h3{font-size:21px; margin-bottom:4px}
.modal .sub{margin-bottom:14px}
.modal-label{font-weight:700; font-size:14px}
.pay-methods{display:grid; grid-template-columns:repeat(auto-fill,minmax(120px,1fr)); gap:10px; margin:10px 0 18px}
.pay-m{border:2px solid var(--line); border-radius:10px; padding:12px 8px; text-align:center; cursor:pointer; font-size:14px; font-weight:700}
.pay-m.sel{border-color:var(--primary); background:#e6f4f6}
.pay-details{font-size:14px; background:#f9fafb; border:1px solid var(--line); border-radius:10px; padding:12px; margin-bottom:6px}
.modal .actions{display:flex; gap:10px; flex-wrap:wrap; margin-top:16px}
.spinner{display:inline-block; width:18px; height:18px; border:3px solid #fff; border-top-color:transparent; border-radius:50%; animation:spin .7s linear infinite; vertical-align:-4px; margin-left:6px}
@keyframes spin{to{transform:rotate(360deg)}}

/* ===== Toast / lightbox ===== */
#toast{position:fixed; bottom:20px; right:50%; transform:translateX(50%) translateY(80px); background:#111827; color:#fff; padding:13px 22px; border-radius:12px; font-size:15px; z-index:200; transition:.3s; opacity:0; pointer-events:none; max-width:90vw; text-align:center}
#toast.show{transform:translateX(50%) translateY(0); opacity:1}
#lightbox{position:fixed; inset:0; background:rgba(0,0,0,.85); display:none; align-items:center; justify-content:center; z-index:150; cursor:pointer; padding:20px}
#lightbox.open{display:flex}
#lightbox img{max-width:95%; max-height:90vh; border-radius:12px}

.site-footer{background:var(--primary-dark); color:#cbd5e1; margin-top:44px; padding:26px 0; font-size:14px; text-align:center}
.site-footer b{color:#fff}
.note{font-size:13px; color:var(--muted); margin-top:10px}
@media (max-width:640px){
  .hero h1{font-size:26px}
  .form-row{grid-template-columns:1fr}
  .logo{font-size:20px}
  .card-actions .btn{flex:1 1 45%}
}


/* ===== الأوردرات والتقييمات والعملاء (v1.1.0) ===== */
.profile-stats{display:flex; gap:14px; flex-wrap:wrap; margin:18px 0 4px}
.pstat{background:#eef7f8; border:1px solid #cfe8ec; border-radius:14px; padding:12px 20px; text-align:center; min-width:150px}
.pstat b{font-size:26px; color:var(--primary); display:block; line-height:1.2}
.pstat span{font-size:13px; color:var(--muted)}
.works-list{list-style:none; margin:10px 0 6px}
.works-list li{background:#f9fafb; border:1px solid var(--line); border-radius:10px; padding:10px 14px; margin-bottom:8px; font-size:14px}
.works-list li span{color:var(--muted); font-size:13px}
.review-item{background:#fff; border:1px solid var(--line); border-radius:12px; padding:12px 16px; margin-bottom:10px}
.review-item p{font-size:14px; color:#374151; margin:4px 0}
.review-item small{color:var(--muted); font-size:12px}
.review-form label{display:block; font-weight:700; font-size:13px; margin:8px 0 4px}
.review-form select,.review-form textarea{width:100%; border:1px solid var(--line); border-radius:9px; padding:9px 11px}
.review-form textarea{min-height:60px; resize:vertical}
.track-table{width:100%; border-collapse:collapse; background:#fff; font-size:14px}
.track-table th,.track-table td{border:1px solid var(--line); padding:9px 10px; text-align:right; vertical-align:top}
.track-table th{background:#eef7f8; color:var(--primary)}
html[dir="ltr"] .track-table th,html[dir="ltr"] .track-table td{text-align:left}
.track-rating{background:#eef7f8; border:1px solid #cfe8ec; border-radius:12px; padding:12px 16px; font-size:15px}
.steps{display:grid; grid-template-columns:repeat(auto-fit,minmax(240px,1fr)); gap:16px; margin:14px 0 8px}
.step{background:#fff; border:1px solid var(--line); border-radius:16px; padding:20px; text-align:center}
.step-num{width:46px; height:46px; border-radius:50%; background:var(--primary); color:#fff; font-size:22px; font-weight:800; display:flex; align-items:center; justify-content:center; margin:0 auto 10px}
.step h3{font-size:17px; margin-bottom:6px}
.step p{font-size:14px; color:#374151}
.sanayea-order-status{max-width:130px}

/* ===== الإحصائيات وأوائل الشهر (v1.1.5) ===== */
.stat-cards{display:grid; grid-template-columns:repeat(auto-fit,minmax(210px,1fr)); gap:14px; margin:16px 0 8px}
.stat-card{background:#fff; border:1px solid var(--line); border-radius:16px; padding:20px 14px; text-align:center}
.stat-card .stat-ic{font-size:28px; line-height:1; margin-bottom:6px}
.stat-card b{font-size:32px; color:var(--primary); display:block; line-height:1.2}
.stat-card span{font-size:14px; color:var(--muted)}
.stat-card small{display:block; font-size:13px; color:var(--muted); margin-top:2px}
.stat-card small b{font-size:15px; display:inline; color:var(--green)}
.stats-h3{margin-top:26px; font-size:20px}
.month-cards .stat-card b{font-size:28px}
.sanayea-chart{display:flex; gap:10px; background:#fff; border:1px solid var(--line); border-radius:16px; padding:22px 14px 10px; margin-top:12px}
.sanayea-chart-col{flex:1; display:flex; flex-direction:column; min-width:0}
.sanayea-chart-bars{display:flex; gap:5px; align-items:flex-end; justify-content:center; height:150px}
.sanayea-bar{width:26px; border-radius:6px 6px 0 0; position:relative; min-height:3px}
.sanayea-bar.total{background:#12808f}
.sanayea-bar.done{background:var(--accent)}
.sanayea-bar span{position:absolute; bottom:100%; left:50%; transform:translateX(-50%); font-size:12px; font-weight:700; color:var(--text); margin-bottom:2px; white-space:nowrap}
.sanayea-chart-label{text-align:center; font-size:12px; color:var(--muted); margin-top:8px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis}
.sanayea-chart-legend{font-size:13px; color:var(--muted); margin-top:8px}
.sanayea-chart-legend .lg{display:inline-block; width:14px; height:14px; border-radius:4px; vertical-align:-2px}
.sanayea-chart-legend .lg.total{background:#12808f}
.sanayea-chart-legend .lg.done{background:var(--accent)}
.tops{display:grid; grid-template-columns:repeat(auto-fit,minmax(280px,1fr)); gap:14px; margin-top:12px}
.top-list{background:#fff; border:1px solid var(--line); border-radius:16px; padding:18px}
.top-list h4{font-size:16px; margin-bottom:10px}
.top-list ol{list-style:none; counter-reset:top}
.top-list li{counter-increment:top; display:flex; justify-content:space-between; gap:10px; align-items:baseline; padding:8px 0; border-bottom:1px solid #f3f4f6; font-size:14px}
.top-list li:last-child{border-bottom:none}
.top-list li::before{content:counter(top) "."; font-weight:800; color:var(--primary); margin-left:4px; flex:0 0 auto}
.top-list li:first-child .top-name{font-weight:800}
.top-list .top-name{flex:1; min-width:0}
.top-list .top-val{color:var(--muted); font-size:13px; white-space:nowrap}
.top-empty{color:var(--muted); font-size:14px; text-align:center; padding:14px 0}
@media (max-width:640px){
  .sanayea-chart{padding:16px 6px 8px}
  .sanayea-bar{width:18px}
}
