/*
Theme Name: JambooBag
Theme URI: https://jamboobag.ir
Author: JambooBag
Author URI: https://jamboobag.ir
Description: قالب اختصاصی و سئو شده جعبوبگ (جامبوبگ نو و دست دوم با ضمانت) — با تصاویر واقعی، کاتالوگ محصولات، جدول مشخصات فنی، واتس‌اپ و محتوای آماده. رنگ سرمه‌ای و کهربایی.
Version: 3.0.0
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: jamboobag
Tags: blog, e-commerce, one-column, custom-colors, custom-logo, responsive-layout, rtl-language-support
*/

:root {
  --navy: #1a3c5e;
  --navy-dark: #122b44;
  --navy-light: #2a5680;
  --amber: #f0a500;
  --amber-dark: #d18f00;
  --light: #f7f9fb;
  --white: #ffffff;
  --text: #2b2b2b;
  --muted: #6b7280;
  --border: #e5e7eb;
  --radius: 12px;
  --shadow: 0 4px 16px rgba(0,0,0,.06);
  --shadow-hover: 0 12px 28px rgba(0,0,0,.12);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: 'Vazirmatn', 'Segoe UI', Tahoma, 'Iranian Sans', sans-serif;
  background: var(--light);
  color: var(--text);
  line-height: 1.8;
  font-size: 16px;
}

a { color: var(--navy); text-decoration: none; transition: color .2s; }
a:hover { color: var(--amber-dark); }
img { max-width: 100%; height: auto; }
h1, h2, h3, h4 { line-height: 1.4; color: var(--navy); }

.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* ====== هدر ====== */
.site-header {
  background: var(--navy);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 12px rgba(0,0,0,.12);
}
.topbar {
  background: var(--navy-dark);
  font-size: 14px;
  padding: 8px 0;
}
.topbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.topbar a { color: #fff; }
.topbar .phone { color: var(--amber); font-weight: 700; font-size: 15px; }
.topbar .dot { margin: 0 8px; opacity: .5; }

.header-main { padding: 16px 0; }
.header-main .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand .logo-text { font-size: 26px; font-weight: 800; color: #fff; }
.brand .logo-text span { color: var(--amber); }
.brand .tagline { font-size: 13px; color: #cbd5e1; margin-top: 2px; }

.nav { display: flex; gap: 4px; flex-wrap: wrap; }
.nav a {
  color: #e2e8f0;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 500;
}
.nav a:hover,
.nav a.current-menu-item,
.nav li.current-menu-item > a {
  background: rgba(255,255,255,.12);
  color: var(--amber);
}
.nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; }

/* ====== اسلایدر ====== */
.slider { position: relative; overflow: hidden; background: var(--navy-dark); }
.slider-track { display: flex; transition: transform .5s ease; }
.slide { min-width: 100%; position: relative; }
.slide img { width: 100%; height: 480px; object-fit: cover; display: block; }
.slide-content {
  position: absolute;
  bottom: 0;
  right: 0;
  left: 0;
  padding: 60px 40px 40px;
  color: #fff;
  background: linear-gradient(to top, rgba(18,43,68,.85), transparent);
}
.slide-content h2 { color: var(--amber); font-size: 32px; margin: 0 0 8px; }
.slide-content p { font-size: 18px; margin: 0 0 20px; max-width: 600px; }
.slider-prev, .slider-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0,0,0,.4);
  color: #fff;
  border: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 24px;
  cursor: pointer;
  z-index: 10;
}
.slider-prev { right: 16px; }
.slider-next { left: 16px; }
.slider-prev:hover, .slider-next:hover { background: var(--amber); color: var(--navy-dark); }

/* ====== هیرو ====== */
.hero {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%);
  color: #fff;
  padding: 70px 0;
  text-align: center;
}
.hero h1 { font-size: 38px; margin: 0 0 16px; color: #fff; }
.hero h1 span { color: var(--amber); }
.hero p { font-size: 18px; color: #cbd5e1; max-width: 700px; margin: 0 auto 28px; }

.btn {
  display: inline-block;
  background: var(--amber);
  color: var(--navy-dark);
  font-weight: 700;
  padding: 14px 32px;
  border-radius: 8px;
  font-size: 16px;
  border: none;
  cursor: pointer;
}
.btn:hover { background: var(--amber-dark); color: #fff; }
.btn-whatsapp { background: #25d366; color: #fff; }
.btn-whatsapp:hover { background: #1eb954; color: #fff; }

/* ====== بخش اصلی ====== */
.site-main { padding: 48px 0; }
.section-title {
  text-align: center;
  font-size: 28px;
  margin-bottom: 8px;
  color: var(--navy);
}
.section-sub { text-align: center; color: var(--muted); margin-bottom: 36px; }
section { margin-bottom: 48px; }

.grid { display: grid; gap: 24px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 1000px) { .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 900px) { .grid-3, .grid-2 { grid-template-columns: 1fr; } }
@media (max-width: 600px) { .grid-4 { grid-template-columns: 1fr; } }

.card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform .25s, box-shadow .25s;
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow-hover); }
.card-thumb img { width: 100%; height: 220px; object-fit: cover; display: block; }
.card-body { padding: 20px; flex: 1; display: flex; flex-direction: column; }
.card-body h3 { margin: 0 0 8px; font-size: 19px; }
.card-body h3 a { color: var(--navy); }
.card-body h3 a:hover { color: var(--amber-dark); }
.meta { color: var(--muted); font-size: 13px; margin-bottom: 10px; }
.excerpt { color: var(--text); margin: 0 0 16px; }
.read-more { color: var(--amber-dark); font-weight: 700; font-size: 14px; margin-top: auto; }

/* ====== ویژگی‌ها ====== */
.feature { text-align: center; padding: 28px 20px; background: #fff; border-radius: var(--radius); border: 1px solid var(--border); }
.feature .icon { font-size: 40px; display: block; margin-bottom: 12px; }
.feature h3 { color: var(--navy); margin: 0 0 8px; font-size: 18px; }
.feature p { color: var(--muted); font-size: 14px; margin: 0; }

/* ====== محصولات ====== */
.product-card .card-thumb img { height: 260px; }
.product-price-small { color: var(--amber-dark); font-weight: 700; margin: 4px 0 8px; font-size: 15px; }
.product-meta { color: var(--muted); font-size: 13px; margin-bottom: 6px; }
.cat-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-bottom: 32px;
}
.cat-chip {
  background: #fff;
  border: 1px solid var(--border);
  padding: 8px 18px;
  border-radius: 30px;
  font-size: 14px;
  color: var(--navy);
}
.cat-chip:hover, .cat-chip.active { background: var(--amber); color: var(--navy-dark); border-color: var(--amber); }

/* ====== صفحه تک محصول ====== */
.product-single-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  margin-bottom: 40px;
}
@media (max-width: 800px) { .product-single-layout { grid-template-columns: 1fr; } }
.product-gallery img { width: 100%; border-radius: var(--radius); }
.product-title { font-size: 28px; margin: 0 0 12px; }
.product-price .price-value { color: var(--amber-dark); font-size: 24px; font-weight: 800; }
.product-excerpt { color: var(--muted); margin: 12px 0; }

.specs-table { width: 100%; border-collapse: collapse; margin: 20px 0; background: #fff; border-radius: var(--radius); overflow: hidden; }
.specs-table th, .specs-table td { padding: 12px 16px; border-bottom: 1px solid var(--border); text-align: right; }
.specs-table th { background: var(--navy); color: #fff; width: 40%; font-weight: 500; }
.specs-table tr:last-child th, .specs-table tr:last-child td { border-bottom: none; }

.product-cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 16px; }
.product-content { margin-top: 24px; }

/* ====== فرم تماس ====== */
.contact-form { background: #fff; padding: 24px; border-radius: var(--radius); border: 1px solid var(--border); }
.form-row { margin-bottom: 16px; }
.form-row label { display: block; font-weight: 500; margin-bottom: 6px; color: var(--navy); }
.form-row input, .form-row textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-family: inherit;
  font-size: 15px;
}
.form-row input:focus, .form-row textarea:focus { outline: none; border-color: var(--amber); }
.form-success { background: #e6f7ee; color: #1a7d46; padding: 16px; border-radius: 8px; font-weight: 600; }
.form-error { background: #fdecec; color: #c0392b; padding: 12px; border-radius: 8px; margin-bottom: 12px; }
.contact-info-card { background: #fff; padding: 24px; border-radius: var(--radius); border: 1px solid var(--border); }
.contact-info-card p { margin: 8px 0; font-size: 17px; }

/* ====== سی‌تی‌ای ====== */
.cta {
  background: var(--amber);
  color: var(--navy-dark);
  padding: 48px 0;
  text-align: center;
}
.cta h2 { margin: 0 0 10px; font-size: 26px; color: var(--navy-dark); }
.cta p { margin: 0 0 20px; font-size: 16px; }
.cta .phone { font-size: 26px; font-weight: 800; letter-spacing: 1px; color: var(--navy-dark); }

/* ====== محتوای نوشته ====== */
.entry-content { max-width: 800px; margin: 0 auto; }
.post-header { text-align: center; margin-bottom: 32px; }
.post-header h1 { color: var(--navy); font-size: 32px; }
.post-thumb { border-radius: var(--radius); overflow: hidden; margin-bottom: 32px; }
.entry-content h2, .entry-content h3 { color: var(--navy); margin-top: 36px; }
.entry-content blockquote {
  border-right: 4px solid var(--amber);
  background: #fff;
  padding: 16px 20px;
  border-radius: 8px;
  margin: 20px 0;
}
.entry-content ul, .entry-content ol { padding-right: 24px; }
.entry-content table { width: 100%; border-collapse: collapse; margin: 20px 0; }
.entry-content table th, .entry-content table td { border: 1px solid var(--border); padding: 10px 14px; text-align: right; }
.entry-content table th { background: var(--navy); color: #fff; }

/* ====== فوتر ====== */
.site-footer {
  background: var(--navy-dark);
  color: #cbd5e1;
  padding: 48px 0 24px;
  margin-top: 48px;
}
.site-footer .grid { gap: 32px; }
.footer-title { color: var(--amber); font-size: 18px; margin-bottom: 16px; }
.site-footer a { color: #cbd5e1; }
.site-footer a:hover { color: var(--amber); }
.footer-contact li { list-style: none; margin-bottom: 8px; }
.footer-contact .phone { color: var(--amber); font-weight: 700; font-size: 18px; }
.site-footer ul { list-style: none; padding: 0; }
.site-footer ul li { margin-bottom: 8px; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.1);
  margin-top: 32px;
  padding-top: 20px;
  text-align: center;
  font-size: 14px;
  color: #94a3b8;
}

/* ====== ووکامرس ====== */
.woocommerce ul.products li.product { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; padding: 0; }
.woocommerce .button { background: var(--amber) !important; color: var(--navy-dark) !important; font-weight: 700; }
.woocommerce span.onsale { background: var(--amber) !important; }

/* ====== فرم جستجو ====== */
.searchform { display: flex; gap: 8px; }
.searchform input[type="text"] {
  flex: 1;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-family: inherit;
}
.searchform button {
  background: var(--amber);
  color: var(--navy-dark);
  border: none;
  padding: 10px 18px;
  border-radius: 8px;
  font-weight: 700;
  cursor: pointer;
}

/* ====== ویدجت‌ها ====== */
.widget { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; margin-bottom: 24px; }
.widget-title { color: var(--navy); border-bottom: 2px solid var(--amber); padding-bottom: 8px; margin-bottom: 16px; }
.widget ul { list-style: none; padding: 0; margin: 0; }
.widget ul li { padding: 6px 0; border-bottom: 1px dashed var(--border); }

/* ====== صفحه‌بندی ====== */
.pagination .nav-links { display: flex; gap: 8px; justify-content: center; }
.pagination .page-numbers { background: #fff; border: 1px solid var(--border); padding: 8px 14px; border-radius: 8px; }
.pagination .page-numbers.current { background: var(--amber); color: var(--navy-dark); border-color: var(--amber); font-weight: 700; }

/* ====== دکمه بازگشت به بالا ====== */
#back-top {
  position: fixed;
  bottom: 24px;
  left: 24px;
  background: var(--amber);
  color: var(--navy-dark);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  cursor: pointer;
  z-index: 999;
  box-shadow: 0 4px 12px rgba(0,0,0,.2);
  border: none;
}


/* ====== واتس‌اپ شناور ====== */
.wa-float {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: #25d366;
  color: #fff;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
  box-shadow: 0 4px 16px rgba(37,211,102,.4);
  transition: transform .25s;
}
.wa-float:hover { transform: scale(1.1); color: #fff; }
.wa-link { color: #25d366 !important; font-weight: 700; }
.wa-link:hover { color: #1eb954 !important; }

/* ====== واکنش‌گرا ====== */
@media (max-width: 600px) {
  .hero h1 { font-size: 28px; }
  .section-title { font-size: 24px; }
  .header-main .container { flex-direction: column; }
  .nav { justify-content: center; }
  .slide img { height: 300px; }
  .slide-content h2 { font-size: 22px; }
}
