/*
 * CafeDentist - Homepage Styles
 * فایل: /wp-content/themes/YOUR-CHILD-THEME/css/cafedentist-homepage.css
 * بارگذاری از: functions.php چیلد تیم
 */

/* ─── CSS VARIABLES ─── */
:root {
  --color-primary:        #4fc3e8;
  --color-primary-light:  #5ecfd3;
  --color-primary-dark:   #1a7f84;
  --color-secondary:      #7b68aa;
  --color-tertiary:       #7aaa5a;
  --color-accent:         #29adb2;
  --color-accent-soft:    #e8f8fb;
  --color-dark:           #1a2b35;
  --color-gray:           #5a7280;
  --color-gray-light:     #dce8ec;
  --color-bg:             #f5fbfc;
  --color-white:          #ffffff;
  --color-success:        #7aaa5a;
  --color-warning:        #f4a83a;
  --color-error:          #e05c5c;
  --radius:               12px;
  --radius-lg:            20px;
  --shadow-sm:            0 2px 8px rgba(41,173,178,0.10);
  --shadow-md:            0 6px 24px rgba(41,173,178,0.13);
  --shadow-lg:            0 16px 48px rgba(26,43,53,0.12);
}

/* ─── SCOPED RESET - فقط داخل المان‌های ما ─── */
.cd-hero, .cd-trust-bar, .cd-section, .cd-section-sm, .cd-stats-bar, .cd-brands-section,
.cd-hero *, .cd-trust-bar *, .cd-section *, .cd-section-sm *, .cd-stats-bar *, .cd-brands-section * {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* ─── HERO SLIDER ─── */
.cd-hero {
  position: relative;
  width: 100%;
  height: 520px;
  overflow: hidden;
  background: var(--color-dark);
}

.cd-hero-slides {
  display: flex;
  height: 100%;
  transition: transform 0.6s cubic-bezier(.4,0,.2,1);
}

.cd-hero-slide {
  min-width: 100%;
  height: 100%;
  position: relative;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.cd-slide-1 { background: linear-gradient(135deg, #0d2233 0%, #1a4a5a 50%, #1a7f84 100%); }
.cd-slide-2 { background: linear-gradient(135deg, #1a2b35 0%, #2d1f4a 55%, #7b68aa 100%); }
.cd-slide-3 { background: linear-gradient(135deg, #0d2a1a 0%, #1a4a2a 55%, #7aaa5a 100%); }

.cd-slide-bg-shape {
  position: absolute;
  left: -80px;
  top: -80px;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  opacity: 0.07;
}
.cd-slide-1 .cd-slide-bg-shape { background: var(--color-primary); }
.cd-slide-2 .cd-slide-bg-shape { background: var(--color-secondary); }
.cd-slide-3 .cd-slide-bg-shape { background: var(--color-tertiary); }

.cd-slide-inner {
  position: relative;
  z-index: 2;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  height: 100%;
}

.cd-slide-content { flex: 1; }

.cd-slide-eyebrow {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--color-primary-light);
  background: rgba(79,195,232,0.12);
  border: 1px solid rgba(79,195,232,0.25);
  border-radius: 100px;
  padding: 5px 16px;
  margin-bottom: 20px;
}
.cd-slide-2 .cd-slide-eyebrow { color: #b3a8d8; background: rgba(123,104,170,0.15); border-color: rgba(123,104,170,0.3); }
.cd-slide-3 .cd-slide-eyebrow { color: #b3d89a; background: rgba(122,170,90,0.15);  border-color: rgba(122,170,90,0.3); }

.cd-slide-title {
  font-size: 48px;
  font-weight: 800;
  color: #fff;
  line-height: 1.3;
  margin-bottom: 16px;
}
.cd-slide-title span { color: var(--color-primary); }
.cd-slide-2 .cd-slide-title span { color: #b3a8d8; }
.cd-slide-3 .cd-slide-title span { color: #b3d89a; }

.cd-slide-desc {
  font-size: 16px;
  color: rgba(255,255,255,0.65);
  line-height: 1.8;
  margin-bottom: 32px;
  max-width: 480px;
}

.cd-slide-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--color-primary);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  padding: 14px 32px;
  border-radius: 100px;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: all 0.3s;
  box-shadow: 0 6px 20px rgba(79,195,232,0.35);
}
.cd-slide-cta:hover { background: var(--color-accent); transform: translateY(-2px); box-shadow: 0 10px 28px rgba(79,195,232,0.45); }
.cd-slide-2 .cd-slide-cta { background: var(--color-secondary); box-shadow: 0 6px 20px rgba(123,104,170,0.4); }
.cd-slide-2 .cd-slide-cta:hover { background: #6a59aa; }
.cd-slide-3 .cd-slide-cta { background: var(--color-tertiary); box-shadow: 0 6px 20px rgba(122,170,90,0.4); }
.cd-slide-3 .cd-slide-cta:hover { background: #6a9a4a; }

.cd-slide-visual {
  flex: 0 0 340px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cd-slide-icon-wrap {
  width: 260px;
  height: 260px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.cd-slide-1 .cd-slide-icon-wrap { background: rgba(79,195,232,0.08);  border: 2px solid rgba(79,195,232,0.15); }
.cd-slide-2 .cd-slide-icon-wrap { background: rgba(123,104,170,0.08); border: 2px solid rgba(123,104,170,0.15); }
.cd-slide-3 .cd-slide-icon-wrap { background: rgba(122,170,90,0.08);  border: 2px solid rgba(122,170,90,0.15); }
.cd-slide-icon-wrap svg { width: 130px; height: 130px; opacity: 0.9; }

/* Dots */
.cd-hero-dots {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 10;
}
.cd-hero-dot {
  width: 8px; height: 8px;
  border-radius: 100px;
  background: rgba(255,255,255,0.3);
  cursor: pointer;
  transition: all 0.3s;
  border: none;
}
.cd-hero-dot.active { width: 28px; background: var(--color-primary); }

/* Arrows */
.cd-hero-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  color: #fff;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s;
  backdrop-filter: blur(8px);
}
.cd-hero-arrow:hover { background: rgba(255,255,255,0.2); }
.cd-hero-arrow.cd-prev { right: 20px; }
.cd-hero-arrow.cd-next { left: 20px; }

/* ─── SECTION WRAPPER ─── */
.cd-section    { padding: 64px 0; }
.cd-section-sm { padding: 40px 0; }
.cd-container  { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

.cd-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 36px;
}

.cd-section-title {
  font-size: 26px;
  font-weight: 800;
  color: var(--color-dark);
  display: flex;
  align-items: center;
  gap: 12px;
}
.cd-section-title::before {
  content: '';
  display: block;
  width: 5px;
  height: 28px;
  border-radius: 4px;
  background: linear-gradient(to bottom, var(--color-primary), var(--color-accent));
}

.cd-section-link {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-accent);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: gap 0.2s;
}
.cd-section-link:hover { gap: 10px; }

/* ─── TRUST BAR ─── */
.cd-trust-bar {
  background: var(--color-white);
  border-bottom: 1px solid var(--color-gray-light);
  border-top: 1px solid var(--color-gray-light);
}
.cd-trust-items {
  display: flex;
  align-items: stretch;
  justify-content: center;
}
.cd-trust-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 22px 40px;
  flex: 1;
  border-left: 1px solid var(--color-gray-light);
}
.cd-trust-item:last-child { border-left: none; }

.cd-trust-icon {
  width: 46px; height: 46px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.cd-trust-icon.blue   { background: rgba(79,195,232,0.12); }
.cd-trust-icon.teal   { background: rgba(41,173,178,0.12); }
.cd-trust-icon.green  { background: rgba(122,170,90,0.12); }
.cd-trust-icon.purple { background: rgba(123,104,170,0.12); }
.cd-trust-icon svg    { width: 22px; height: 22px; }

.cd-trust-text strong { display: block; font-size: 14px; font-weight: 700; color: var(--color-dark); }
.cd-trust-text span   { font-size: 12px; color: var(--color-gray); }

/* ─── CATEGORIES ─── */
.cd-categories-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 16px;
}
.cd-cat-card {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  padding: 24px 16px 20px;
  text-align: center;
  text-decoration: none;
  transition: all 0.3s;
  border: 1.5px solid transparent;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.cd-cat-card:hover { border-color: var(--color-primary); transform: translateY(-4px); box-shadow: var(--shadow-md); }

.cd-cat-icon {
  width: 64px; height: 64px;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s;
}
.cd-cat-card:hover .cd-cat-icon { transform: scale(1.08); }
.cd-cat-icon svg { width: 30px; height: 30px; }

.cd-cat-icon.c1 { background: linear-gradient(135deg, #e8f8fb, #c8eef8); }
.cd-cat-icon.c2 { background: linear-gradient(135deg, #ede8f8, #d8d0f0); }
.cd-cat-icon.c3 { background: linear-gradient(135deg, #edf8e8, #d0ecc8); }
.cd-cat-icon.c4 { background: linear-gradient(135deg, #fef4e8, #fce4c0); }
.cd-cat-icon.c5 { background: linear-gradient(135deg, #fde8e8, #f8c8c8); }
.cd-cat-icon.c6 { background: linear-gradient(135deg, #e8f4fb, #c8dff0); }

.cd-cat-name  { font-size: 13px; font-weight: 700; color: var(--color-dark); line-height: 1.4; }
.cd-cat-count { font-size: 11px; color: var(--color-gray); }

/* ─── PRODUCTS ─── */
.cd-products-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.cd-product-card {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1.5px solid transparent;
  transition: all 0.3s;
  display: flex;
  flex-direction: column;
}
.cd-product-card:hover { border-color: var(--color-primary); box-shadow: var(--shadow-md); transform: translateY(-4px); }

.cd-product-img {
  position: relative;
  background: var(--color-accent-soft);
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.cd-product-img svg { width: 90px; height: 90px; opacity: 0.45; color: var(--color-accent); }

.cd-product-badge {
  position: absolute;
  top: 12px; right: 12px;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 100px;
}
.cd-badge-sale   { background: #fef0f0; color: var(--color-error); }
.cd-badge-new    { background: #f0fef4; color: var(--color-success); }
.cd-badge-hot    { background: #fff4e8; color: var(--color-warning); }

.cd-product-fav {
  position: absolute;
  top: 12px; left: 12px;
  width: 32px; height: 32px;
  border-radius: 50%;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  border: none;
  color: #ccc;
  transition: color 0.2s;
}
.cd-product-fav:hover { color: var(--color-error); }

.cd-product-body { padding: 16px; flex: 1; display: flex; flex-direction: column; }
.cd-product-brand { font-size: 11px; font-weight: 600; color: var(--color-accent); text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 6px; }
.cd-product-name  { font-size: 14px; font-weight: 700; color: var(--color-dark); line-height: 1.5; margin-bottom: 10px; flex: 1; }

.cd-product-rating { display: flex; align-items: center; gap: 4px; margin-bottom: 12px; }
.cd-stars          { color: var(--color-warning); font-size: 12px; letter-spacing: 1px; }
.cd-rating-count   { font-size: 11px; color: var(--color-gray); }

.cd-product-price-row { display: flex; align-items: center; justify-content: space-between; }
.cd-price-wrap        { display: flex; flex-direction: column; gap: 2px; }
.cd-price-old         { font-size: 12px; color: var(--color-gray); text-decoration: line-through; }
.cd-price-new         { font-size: 18px; font-weight: 800; color: var(--color-dark); }
.cd-price-new span    { font-size: 12px; font-weight: 500; color: var(--color-gray); }

.cd-btn-cart {
  width: 40px; height: 40px;
  border-radius: 12px;
  background: var(--color-primary);
  border: none;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  flex-shrink: 0;
}
.cd-btn-cart:hover { background: var(--color-accent); transform: scale(1.05); }
.cd-btn-cart svg   { width: 18px; height: 18px; }

/* ─── OFFER BANNER ─── */
.cd-offer-banner {
  background: linear-gradient(135deg, var(--color-primary-dark) 0%, var(--color-accent) 50%, var(--color-primary) 100%);
  border-radius: var(--radius-lg);
  padding: 44px 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
}
.cd-offer-banner::before {
  content: '';
  position: absolute;
  right: -100px; top: -100px;
  width: 350px; height: 350px;
  border-radius: 50%;
  background: rgba(255,255,255,0.06);
}
.cd-offer-banner::after {
  content: '';
  position: absolute;
  left: 200px; bottom: -60px;
  width: 200px; height: 200px;
  border-radius: 50%;
  background: rgba(255,255,255,0.04);
}
.cd-offer-text    { position: relative; z-index: 2; }
.cd-offer-eyebrow { font-size: 13px; font-weight: 600; color: rgba(255,255,255,0.7); margin-bottom: 10px; }
.cd-offer-title   { font-size: 34px; font-weight: 800; color: #fff; line-height: 1.3; margin-bottom: 8px; }
.cd-offer-title em { font-style: normal; opacity: 0.75; }
.cd-offer-desc    { font-size: 15px; color: rgba(255,255,255,0.65); }

.cd-offer-actions { position: relative; z-index: 2; display: flex; flex-direction: column; align-items: flex-start; gap: 14px; }

.cd-countdown { display: flex; gap: 8px; }
.cd-countdown-unit {
  background: rgba(255,255,255,0.15);
  border-radius: 10px;
  padding: 10px 14px;
  text-align: center;
  backdrop-filter: blur(8px);
}
.cd-countdown-num   { display: block; font-size: 24px; font-weight: 800; color: #fff; line-height: 1; }
.cd-countdown-label { font-size: 10px; color: rgba(255,255,255,0.6); margin-top: 4px; }

.cd-btn-offer {
  background: #fff;
  color: var(--color-primary-dark);
  font-size: 15px;
  font-weight: 800;
  padding: 14px 32px;
  border-radius: 100px;
  border: none;
  cursor: pointer;
  transition: all 0.3s;
  box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}
.cd-btn-offer:hover { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(0,0,0,0.2); }

/* ─── TRUST BOXES ─── */
.cd-trust-boxes {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.cd-trust-box {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  padding: 32px 24px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 16px;
  border: 1.5px solid var(--color-gray-light);
  transition: all 0.3s;
}
.cd-trust-box:hover { border-color: var(--color-primary); box-shadow: var(--shadow-md); transform: translateY(-3px); }

.cd-trust-box-icon {
  width: 56px; height: 56px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.cd-trust-box-icon svg { width: 26px; height: 26px; }
.cd-tb1 .cd-trust-box-icon { background: linear-gradient(135deg, #e8f8fb, #c8eef8); }
.cd-tb2 .cd-trust-box-icon { background: linear-gradient(135deg, #edf8e8, #d0ecc8); }
.cd-tb3 .cd-trust-box-icon { background: linear-gradient(135deg, #ede8f8, #d8d0f0); }
.cd-tb4 .cd-trust-box-icon { background: linear-gradient(135deg, #fff4e8, #fce4c0); }

.cd-trust-box-title { font-size: 16px; font-weight: 800; color: var(--color-dark); }
.cd-trust-box-desc  { font-size: 13px; color: var(--color-gray); line-height: 1.8; }

/* ─── STATS ─── */
.cd-stats-bar {
  background: linear-gradient(135deg, var(--color-dark) 0%, #1a3a4a 100%);
  padding: 48px 0;
}
.cd-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}
.cd-stat-item {
  text-align: center;
  padding: 0 24px;
  border-left: 1px solid rgba(255,255,255,0.1);
}
.cd-stat-item:last-child { border-left: none; }
.cd-stat-num   { font-size: 44px; font-weight: 800; color: var(--color-primary); display: block; line-height: 1; margin-bottom: 8px; }
.cd-stat-label { font-size: 14px; color: rgba(255,255,255,0.55); }

/* ─── BRANDS ─── */
.cd-brands-section { background: var(--color-white); }
.cd-brands-grid    { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; }
.cd-brand-item {
  flex: 1;
  min-width: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px 24px;
  border-left: 1px solid var(--color-gray-light);
  color: var(--color-gray);
  font-size: 18px;
  font-weight: 800;
  opacity: 0.45;
  transition: opacity 0.3s;
  cursor: pointer;
}
.cd-brand-item:last-child { border-left: none; }
.cd-brand-item:hover { opacity: 1; }

/* ─── RESPONSIVE ─── */
@media (max-width: 1024px) {
  .cd-categories-grid { grid-template-columns: repeat(3, 1fr); }
  .cd-products-grid   { grid-template-columns: repeat(2, 1fr); }
  .cd-trust-items     { flex-wrap: wrap; }
  .cd-trust-item      { flex: 0 0 50%; border-bottom: 1px solid var(--color-gray-light); }
  .cd-trust-boxes     { grid-template-columns: repeat(2, 1fr); }
  .cd-stats-grid      { grid-template-columns: repeat(2, 1fr); gap: 32px; }
  .cd-stat-item       { border: none; }
  .cd-offer-banner    { flex-direction: column; gap: 32px; text-align: center; }
  .cd-slide-title     { font-size: 34px; }
  .cd-slide-visual    { display: none; }
}

@media (max-width: 640px) {
  .cd-hero              { height: 400px; }
  .cd-slide-title       { font-size: 26px; }
  .cd-categories-grid   { grid-template-columns: repeat(3, 1fr); gap: 10px; }
  .cd-products-grid     { grid-template-columns: 1fr; }
  .cd-trust-item        { flex: 0 0 100%; }
  .cd-trust-boxes       { grid-template-columns: 1fr; }
  .cd-stats-grid        { grid-template-columns: repeat(2, 1fr); }
  .cd-brand-item        { min-width: 100px; font-size: 14px; }
  .cd-slide-inner       { padding: 0 20px; }
  .cd-offer-banner      { padding: 28px 24px; }
}

/* ─── WOODMART COMPATIBILITY ─── */
/* جلوگیری از تداخل با فوتر و هدر Woodmart */
.cd-hero,
.cd-trust-bar,
.cd-section,
.cd-section-sm,
.cd-stats-bar,
.cd-brands-section {
  position: relative;
  z-index: 1;
  float: none;
  clear: both;
}