/*
Theme Name: Dakens Pro
Theme URI: https://dakens.co
Author: Dakens Team
Author URI: https://dakens.co
Description: قالب راست‌چین فروشگاه شلوار جین زنانه داکنز - با صفحه تنظیمات عکس‌ها
Version: 1.2.0
Text Domain: dakens-pro
Requires at least: 5.8
Tested up to: 6.6
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Tags: rtl-language-support, e-commerce, custom-menu, featured-images, translation-ready
*/

/* ========================================
   داکنز - قالب وردپرس راست‌چین
   ======================================== */

:root {
  --primary: #1a365d;
  --primary-dark: #0f2744;
  --accent: #c9a227;
  --text: #2d3748;
  --text-light: #718096;
  --bg: #f7fafc;
  --white: #ffffff;
  --border: #e2e8f0;
  --radius: 12px;
  --shadow: 0 4px 20px rgba(0,0,0,0.08);
  --transition: all 0.3s ease;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Vazirmatn', Tahoma, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  direction: rtl;
  text-align: right;
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
}

ul {
  list-style: none;
}

img {
  max-width: 100%;
  display: block;
  height: auto;
}

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

/* ========== HEADER ========== */
.site-header {
  background: var(--white);
  box-shadow: 0 2px 15px rgba(0,0,0,0.06);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.top-bar {
  background: var(--primary);
  color: #fff;
  font-size: 13px;
  padding: 8px 0;
}

.top-bar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.top-bar a {
  color: rgba(255,255,255,0.9);
  margin-left: 18px;
}

.top-bar a:hover {
  color: var(--accent);
}

.top-bar i {
  margin-left: 6px;
}

.main-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 20px;
  flex-wrap: wrap;
  gap: 15px;
}

.logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1.2;
}

.logo-text {
  font-size: 28px;
  font-weight: 700;
  color: var(--primary);
}

.logo-sub {
  font-size: 12px;
  letter-spacing: 3px;
  color: var(--accent);
  font-weight: 500;
}

.main-nav ul {
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
}

.main-nav a {
  font-weight: 500;
  font-size: 15px;
  position: relative;
  padding-bottom: 4px;
}

.main-nav a:hover,
.main-nav a.active {
  color: var(--primary);
}

.main-nav a.active::after,
.main-nav a:hover::after {
  content: '';
  position: absolute;
  bottom: 0;
  right: 0;
  width: 100%;
  height: 2px;
  background: var(--accent);
}

.header-left {
  display: flex;
  align-items: center;
  gap: 18px;
}

.icon-btn {
  font-size: 18px;
  color: var(--text);
  position: relative;
}

.icon-btn:hover {
  color: var(--primary);
}

.cart-count {
  position: absolute;
  top: -8px;
  left: -8px;
  background: var(--accent);
  color: #fff;
  font-size: 11px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-login {
  background: var(--primary);
  color: #fff;
  padding: 8px 18px;
  border-radius: 30px;
  font-size: 14px;
  font-weight: 500;
}

.btn-login:hover {
  background: var(--primary-dark);
  color: #fff;
}

/* ========== HERO ========== */
.hero {
  background: linear-gradient(135deg, #1a365d 0%, #2c5282 100%);
  color: #fff;
  padding: 60px 0;
  overflow: hidden;
}

.hero-slide {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  gap: 40px;
}

.hero-content h1 {
  font-size: 56px;
  font-weight: 700;
  margin-bottom: 10px;
}

.hero-content p {
  font-size: 22px;
  opacity: 0.9;
  margin-bottom: 30px;
}

.btn-primary {
  display: inline-block;
  background: var(--accent);
  color: #1a365d;
  padding: 12px 32px;
  border-radius: 30px;
  font-weight: 600;
  font-size: 15px;
}

.btn-primary:hover {
  background: #e0b83a;
  transform: translateY(-2px);
  color: #1a365d;
}

.hero-image {
  flex: 1;
  max-width: 450px;
}

.hero-image img {
  width: 100%;
  height: 420px;
  object-fit: cover;
  border-radius: 16px;
}

.hero-placeholder,
.img-placeholder {
  background: rgba(255,255,255,0.1);
  border: 2px dashed rgba(255,255,255,0.3);
  border-radius: 16px;
  height: 420px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.7);
  font-size: 14px;
}

.hero-placeholder i,
.img-placeholder i {
  font-size: 48px;
  margin-bottom: 12px;
}

/* ========== SECTION TITLE ========== */
.section-title {
  text-align: center;
  margin-bottom: 40px;
}

.section-title h2 {
  font-size: 26px;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 12px;
}

.title-line {
  width: 80px;
  height: 3px;
  background: var(--accent);
  margin: 0 auto;
  border-radius: 2px;
}

/* ========== CATEGORY ========== */
.category-section {
  padding: 60px 0;
  background: var(--white);
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 16px;
}

.category-item {
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
}

.category-item:hover {
  transform: translateY(-6px);
}

.cat-img {
  background: #f0f4f8;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 10px;
  aspect-ratio: 3/4;
}

.cat-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cat-img .img-placeholder {
  height: 100%;
  background: #edf2f7;
  border: none;
  color: #a0aec0;
  font-size: 28px;
  border-radius: 12px;
}

.category-item h4 {
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
}

/* ========== PRODUCTS ========== */
.products-section {
  padding: 60px 0;
}

.products-section.bestseller {
  background: var(--white);
}

.products-grid.four-col {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.product-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.product-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 30px rgba(0,0,0,0.12);
}

.product-img {
  position: relative;
  aspect-ratio: 3/4;
  background: #edf2f7;
  overflow: hidden;
}

.product-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-img .img-placeholder.tall {
  height: 100%;
  background: #edf2f7;
  border: none;
  color: #a0aec0;
  font-size: 40px;
  border-radius: 0;
}

.product-code {
  position: absolute;
  bottom: 10px;
  right: 10px;
  background: rgba(26,54,93,0.85);
  color: #fff;
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 20px;
}

.product-info {
  padding: 16px;
  text-align: center;
}

.product-info h3 {
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 12px;
  color: var(--text);
  line-height: 1.5;
  min-height: 42px;
}

.btn-outline {
  display: inline-block;
  border: 1.5px solid var(--primary);
  color: var(--primary);
  padding: 8px 16px;
  border-radius: 25px;
  font-size: 13px;
  font-weight: 500;
}

.btn-outline:hover {
  background: var(--primary);
  color: #fff;
}

/* ========== ABOUT + INSTAGRAM ========== */
.about-instagram {
  padding: 70px 0;
  background: linear-gradient(to bottom, #f7fafc, #edf2f7);
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
  align-items: center;
}

.about-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 15px;
}

.logo-icon {
  font-size: 28px;
  color: var(--accent);
}

.about-logo h2 {
  font-size: 32px;
  color: var(--primary);
}

.about-text h3 {
  font-size: 20px;
  color: var(--primary);
  margin-bottom: 15px;
}

.about-text p {
  color: var(--text-light);
  margin-bottom: 12px;
  font-size: 15px;
}

.about-text .small {
  font-size: 14px;
  margin-bottom: 20px;
}

.btn-instagram {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
  color: #fff;
  padding: 10px 22px;
  border-radius: 30px;
  font-weight: 500;
  font-size: 14px;
}

.btn-instagram:hover {
  opacity: 0.9;
  transform: translateY(-2px);
  color: #fff;
}

.phone-frame {
  width: 280px;
  margin: 0 auto;
  background: #1a1a1a;
  border-radius: 36px;
  padding: 12px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.25);
}

.phone-screen {
  background: #fff;
  border-radius: 26px;
  overflow: hidden;
  aspect-ratio: 9/16;
}

.phone-screen img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.phone-screen .img-placeholder.phone {
  height: 100%;
  background: linear-gradient(135deg, #f09433, #bc1888);
  border: none;
  color: #fff;
  font-size: 14px;
  border-radius: 26px;
}

.phone-screen .img-placeholder.phone i {
  font-size: 48px;
  margin-bottom: 10px;
}

/* ========== DESCRIPTION + FEATURES ========== */
.description-section {
  padding: 70px 0;
  background: var(--white);
}

.desc-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 40px;
  align-items: start;
  margin-bottom: 50px;
}

.desc-text h2 {
  font-size: 22px;
  color: var(--primary);
  margin-bottom: 18px;
  line-height: 1.5;
}

.desc-text p {
  color: var(--text-light);
  font-size: 15px;
  margin-bottom: 14px;
  text-align: justify;
}

.desc-image img {
  width: 100%;
  height: 320px;
  object-fit: cover;
  border-radius: var(--radius);
}

.desc-image .img-placeholder.side {
  height: 320px;
  background: #edf2f7;
  border: none;
  border-radius: var(--radius);
  color: #a0aec0;
  font-size: 14px;
}

.desc-image .img-placeholder.side i {
  font-size: 42px;
  margin-bottom: 10px;
}

.features-boxes {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.feature-box {
  background: var(--bg);
  border-radius: var(--radius);
  padding: 28px 20px;
  text-align: center;
  transition: var(--transition);
  border: 1px solid transparent;
}

.feature-box:hover {
  background: var(--white);
  border-color: var(--accent);
  box-shadow: var(--shadow);
  transform: translateY(-5px);
}

.feature-icon {
  width: 60px;
  height: 60px;
  background: var(--primary);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  font-size: 22px;
}

.feature-box h4 {
  font-size: 16px;
  color: var(--primary);
  margin-bottom: 6px;
}

.feature-box p {
  font-size: 13px;
  color: var(--text-light);
}

/* ========== FOOTER ========== */
.site-footer {
  background: var(--primary-dark);
  color: #e2e8f0;
  position: relative;
  padding-top: 80px;
  margin-top: 40px;
}

.footer-wave {
  position: absolute;
  top: -1px;
  left: 0;
  width: 100%;
  height: 60px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 60'%3E%3Cpath fill='%23f7fafc' d='M0,30 C240,60 480,0 720,30 C960,60 1200,0 1440,30 L1440,0 L0,0 Z'/%3E%3C/svg%3E") no-repeat;
  background-size: cover;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1.2fr 1.3fr;
  gap: 40px;
  padding-bottom: 40px;
}

.footer-col h3 {
  font-size: 18px;
  color: #fff;
  margin-bottom: 16px;
}

.footer-col h4 {
  font-size: 16px;
  color: var(--accent);
  margin-bottom: 16px;
}

.footer-col p {
  font-size: 14px;
  line-height: 1.8;
  opacity: 0.85;
}

.footer-col ul li {
  margin-bottom: 10px;
}

.footer-col ul a {
  font-size: 14px;
  opacity: 0.85;
}

.footer-col ul a:hover {
  color: var(--accent);
  opacity: 1;
}

.contact-list li {
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.contact-list i {
  color: var(--accent);
  width: 18px;
}

.map-buttons {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 16px;
}

.map-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  transition: var(--transition);
}

.map-btn.google {
  background: #4285f4;
  color: #fff;
}

.map-btn.google:hover {
  background: #3367d6;
  color: #fff;
}

.map-btn.neshan {
  background: #00a651;
  color: #fff;
}

.map-btn.neshan:hover {
  background: #008f45;
  color: #fff;
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding: 20px 0;
  text-align: center;
  font-size: 13px;
  opacity: 0.7;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 1024px) {
  .category-grid {
    grid-template-columns: repeat(4, 1fr);
  }
  .products-grid.four-col {
    grid-template-columns: repeat(2, 1fr);
  }
  .features-boxes {
    grid-template-columns: repeat(2, 1fr);
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .main-header .container {
    flex-wrap: wrap;
    gap: 15px;
  }
  .main-nav {
    order: 3;
    width: 100%;
  }
  .main-nav ul {
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
  }
  .hero-slide {
    flex-direction: column;
    text-align: center;
  }
  .hero-content h1 {
    font-size: 40px;
  }
  .category-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .about-grid,
  .desc-grid {
    grid-template-columns: 1fr;
  }
  .phone-frame {
    margin-top: 30px;
  }
  .features-boxes {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 480px) {
  .category-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .products-grid.four-col {
    grid-template-columns: 1fr;
  }
  .features-boxes {
    grid-template-columns: 1fr;
  }
  .footer-grid {
    grid-template-columns: 1fr;
  }
  .top-bar .container {
    flex-direction: column;
    gap: 6px;
  }
}


/* ========================================
   تنظیم خودکار اندازه همه عکس‌ها
   ======================================== */

/* هیرو */
.hero-image {
  width: 100%;
  max-width: 450px;
  height: 420px;
  overflow: hidden;
  border-radius: 16px;
}
.hero-image img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  object-position: center top !important;
  display: block !important;
}

/* دسته‌بندی شلوارها */
.cat-img {
  width: 100%;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: 12px;
}
.cat-img img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  object-position: center !important;
  display: block !important;
}

/* محصولات (جدیدترین و پرفروش) */
.product-img {
  width: 100%;
  aspect-ratio: 3 / 4;
  overflow: hidden;
}
.product-img img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  object-position: center top !important;
  display: block !important;
}

/* عکس داخل گوشی اینستاگرام */
.phone-screen {
  overflow: hidden;
}
.phone-screen img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  object-position: center !important;
  display: block !important;
}

/* عکس کنار توضیحات */
.desc-image {
  width: 100%;
  height: 320px;
  overflow: hidden;
  border-radius: 12px;
}
.desc-image img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  object-position: center !important;
  display: block !important;
}