:root {
  --cs-primary: #155ed8;
  --cs-primary-dark: #0d3e9f;
  --cs-accent: #20b9f5;
  --cs-text: #15254a;
  --cs-muted: #66769b;
  --cs-line: #d9e8ff;
  --cs-surface: #ffffff;
  --cs-soft: #f6faff;
  --cs-danger: #e8384f;
  --cs-shadow: 0 18px 55px rgba(31, 82, 158, 0.12);
}


/* ---------------- Footer ---------------- */
.cs-footer {
  direction: rtl;
  margin-top: 60px;
  padding: 0 0 24px;
  color: var(--cs-text);
  background: #f8fbff;
}

.cs-footer-shell {
  position: relative;
  border: 1px solid var(--cs-line);
  border-radius: 28px;
  background:
    radial-gradient(
      circle at 50% 120%,
      rgba(32, 185, 245, 0.11),
      transparent 36%
    ),
    linear-gradient(145deg, #ffffff, #f7fbff);
  box-shadow: var(--cs-shadow);
  overflow: hidden;
}

.cs-footer-shell::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 150px;
  pointer-events: none;
  opacity: 0.4;
  background-image:
    linear-gradient(rgba(21, 94, 216, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(21, 94, 216, 0.08) 1px, transparent 1px);
  background-size: 30px 30px;
  -webkit-mask-image: linear-gradient(to top, #000, transparent);
  mask-image: linear-gradient(to top, #000, transparent);
}

.cs-footer-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: stretch;
}

.cs-footer-section {
  display: flex;
  flex-direction: column;
  padding: 32px;
  min-width: 0;
  border-left: 1px solid #e2edfb;
}

.cs-footer-section:last-child {
  border-left: 0;
}

.cs-footer-section h3 {
  color: var(--cs-primary-dark);
  height: 42px;
  margin-bottom: 22px;

  display: flex;
  align-items: center;
  justify-content: center;

  font-size: 1.08rem;
}

.cs-footer-section h3 i {
  color: var(--cs-primary);
  font-size: 1.22rem;
}

.cs-contact-list,
.cs-important-phones {
  display: grid;
  gap: 10px;
}

.cs-contact-row,
.cs-important-phones a {
  min-height: 60px;
  padding: 14px 15px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  border: 1px solid #edf3fc;
  border-radius: 16px;
  color: var(--cs-text);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 8px 18px rgba(40, 87, 154, 0.06);
  text-decoration: none;
  transition: 0.2s ease;
}

.cs-contact-row:hover,
.cs-important-phones a:hover {
  border-color: #b8d7ff;
  transform: translateY(-2px);
}

.cs-contact-row i,
.cs-important-phones a i {
  color: var(--cs-primary);
}

.cs-contact-row span,
.cs-important-phones a span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.8rem;
}

.cs-contact-row b,
.cs-important-phones a b {
  color: var(--cs-primary-dark);
  font-size: 0.95rem;
  font-weight: 900;
}

.cs-important-phones a {
  grid-template-columns: minmax(0, 1fr) auto auto;
}

.cs-location-card img {
  width: 100%;
  height: 416px;
  border-radius: 18px;
  object-fit: cover;
}

.cs-location-card p {
  flex: 1;

  margin: 18px 0;

  font-size: 0.9rem;

  line-height: 2;

  color: #5f6d8a;

  display: flex;

  align-items: flex-start;
}

.cs-location-phone {
  margin-top: 10px;

  display: flex;

  justify-content: center;

  align-items: center;

  gap: 8px;

  font-weight: 700;
}

.cs-location-phone i,
.cs-location-phone b {
  color: var(--cs-primary);
}

.cs-enamad-card {
  min-height: 245px;
  padding: 17px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 1px solid #dceafb;
  border-radius: 20px;
  color: var(--cs-muted);
  background: #fff;
  text-decoration: none;
  box-shadow: 0 10px 24px rgba(31, 82, 158, 0.08);
}

.cs-enamad-card img {
  width: 120px;
  max-height: 135px;
  object-fit: contain;
}

/* 🧑‍🏫 نقشهٔ گوگل با width/height ثابت (اینلاین) تو HTML اومده؛ روی
   گوشی‌های باریک‌تر از ۳۰۰px همین باعث سرریز افقی و به‌هم‌ریختن
   فوتر می‌شد. اینجا مجبورش می‌کنیم از عرض واقعی ستونش پیروی کنه. */
.cs-trust-section iframe {
  width: 100%;
  max-width: 100%;
  height: 220px;
}

.cs-enamad-card span {
  font-size: 0.77rem;
  font-weight: 800;
}

.cs-footer-bottom {
  position: relative;
  z-index: 1;
  min-height: 125px;
  padding: 23px 28px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 28px;
  border-top: 1px solid #dceafa;
}

.cs-developer {
  display: flex;

  flex-direction: column;

  align-items: flex-start;

  gap: 6px;

  margin-right: 45px;
}

.cs-developer img {
  width: 170px;
  max-height: 118px;
  object-fit: contain;
  border-radius: 90px;
}

.cs-social-wrap {
  text-align: center;
}

.cs-social-wrap > span {
  display: block;
  margin-bottom: 11px;
  color: var(--cs-muted);
  font-size: 1rem;
}

.cs-social-icons {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
}

.cs-social-icons a {
  width: 43px;
  height: 43px;
  display: grid;
  place-items: center;
  border: 1px solid #dce9fa;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 8px 18px rgba(40, 87, 154, 0.08);
  transition: 0.2s ease;
}

.cs-social-icons a:hover {
  transform: translateY(-3px) scale(1.03);
}

.cs-social-icons img {
  width: 50px;
  height: 50px;
  object-fit: contain;
}

.cs-copyright {
  justify-self: end;
  margin: 0;
  color: var(--cs-muted);
  font-size: 1rem;
  line-height: 1.9;
}

.cs-copyright span {
  color: var(--cs-primary-dark);
  font-weight: 900;
}

/* ---------------- Responsive ---------------- */
@media (max-width: 1199.98px) {
  .cs-header-row {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 16px;
  }

  .cs-brand {
    justify-self: center;
  }

  .cs-actions {
    justify-self: end;
  }

  .cs-search {
    grid-column: 1 / -1;
    margin-top: 12px;
  }

  .cs-brand-logo {
    width: 72px;
    height: 72px;
  }

  .cs-brand-copy {
    display: none;
  }

  .cs-footer-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .cs-footer-section {
    border: none;

    background: white;

    border-radius: 22px;

    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);

    margin: 16px;
  }

  .cs-footer-section:nth-child(3n) {
    border-left: 0;
  }

  .cs-trust-section {
    grid-column: span 1;
  }
}

@media (max-width: 991.98px) {
  .cs-header {
    padding-bottom: 12px;
  }

  .cs-header-box {
    margin-top: 10px;
    padding: 17px;
    border-radius: 22px;
  }

  .cs-header-row {
    grid-template-columns: auto 1fr;
  }

  .cs-brand {
    grid-column: 1;
    grid-row: 1;
  }

  .cs-brand-logo {
    width: 72px;
    height: 72px;
  }

  .cs-header-actions {
    grid-column: 2;
    grid-row: 1;
    justify-content: flex-start;
  }

  .cs-header-search {
    grid-column: 1 / -1;
    grid-row: 2;
    height: 58px;
  }

  .cs-action-card {
    min-width: 74px;
    min-height: 68px;
    border-radius: 15px;
  }

  .cs-action-card i {
    font-size: 1.3rem;
  }

  .cs-footer-grid {
    gap: 24px;

    padding: 24px;
  }

  .cs-footer-section:nth-child(3n) {
    border-left: 1px solid #e2edfb;
  }

  .cs-footer-section:nth-child(2n) {
    border-left: 0;
  }

  .cs-trust-section {
    grid-column: 1 / -1;
  }

  .cs-enamad-card {
    min-height: 190px;
  }

  .cs-footer-bottom {
    grid-template-columns: 1fr 1fr;
  }

  .cs-social-wrap {
    grid-column: 1 / -1;
    grid-row: 1;
  }

  .cs-developer {
    grid-column: 1;
    grid-row: 2;
  }
  .cs-copyright {
    grid-column: 2;
    grid-row: 2;
  }
}

@media (max-width: 575.98px) {
  .cs-shipping-inner {
    min-height: 42px;
    font-size: 0.82rem;
  }

  .cs-header-box {
    padding: 14px;
  }

  .cs-header-row {
    grid-template-columns: 64px 1fr;
    gap: 10px;
  }

  .cs-brand-logo {
    width: 58px;
    height: 58px;
  }

  .cs-header-actions {
    gap: 6px;
  }

  .cs-action-card {
    min-width: 58px;
    min-height: 58px;
    padding: 7px;
  }

  .cs-action-card span:not(.cs-cart-count) {
    display: none;
  }

  .cs-header-search {
    height: 52px;
  }

  .cs-header-search input {
    padding-right: 18px;
    padding-left: 62px;
    font-size: 0.9rem;
  }

  .cs-header-search button {
    width: 42px;
    height: 42px;
  }

  .cs-footer {
    margin-top: 38px;
  }

  .cs-footer-shell {
    border-radius: 22px;
  }

  .cs-footer-grid {
    grid-template-columns: 1fr;
  }

  .cs-footer-section,
  .cs-footer-section:nth-child(2n),
  .cs-footer-section:nth-child(3n) {
    padding: 24px 18px;
    border-left: 0;
    border-bottom: 1px solid #e2edfb;
  }

  .cs-location-card p {
    min-height: 0;
  }

  .cs-footer-bottom {
    padding: 24px 18px;
    grid-template-columns: 1fr;
    text-align: center;
  }

  .cs-social-wrap,
  .cs-developer,
  .cs-copyright {
    grid-column: 1;
    justify-self: center;
  }

  .cs-social-wrap {
    grid-row: 1;
  }

  .cs-developer {
    grid-row: 2;
    flex-direction: column;
  }

  .cs-copyright {
    grid-row: 3;
    text-align: center;
  }

  .cs-social-icons {
    flex-wrap: wrap;
  }
}

/* 🧑‍🏫 قبلاً .cs-contact-row سه ستون گرید داشت ولی فقط ۲ فرزند واقعی
   (آیکون+نام و شماره) توش بود؛ نتیجه: ستون نام هرچقدر می‌خواست عرض
   می‌گرفت و شماره رو توی فضای باقی‌مونده له می‌کرد. این‌جا تک‌ستونه‌ش
   می‌کنیم تا نام/سمت بالا و شماره زیرش، جدا و خوانا بیاد.
   🧑‍🏫 قبلاً این فیکس فقط زیر ۵۷۵px بود؛ تبلت (۵۷۶ تا ۹۹۱px) هنوز باگ
   قدیمی رو داشت — برای همین سقفش رو به ۹۹۱.۹۸px (همون بریک‌پوینت
   تبلت که .cs-footer-grid ازش استفاده می‌کنه) بردیم بالا. */
@media (max-width: 991.98px) {
  .cs-contact-row,
  .cs-important-phones a {
    grid-template-columns: 1fr;
    justify-items: start;
    gap: 4px;
    min-height: 0;
    padding: 12px 14px;
  }
  .cs-contact-row span,
  .cs-important-phones a span {
    white-space: normal;
    overflow: visible;
    text-overflow: unset;
  }
  .cs-contact-row b,
  .cs-important-phones a b {
    font-size: 1rem;
  }
}

/* ---------- Compatibility and functional fixes ---------- */
.cs-cart-action {
  width: auto;
  margin: 0;
}

.cart-badge.cs-cart-count {
  right: auto;
  left: -5px;
  width: auto;
  min-width: 25px;
  height: 25px;
  box-sizing: border-box;
  z-index: 2;
}

.cs-action-danger,
.cs-action-danger i {
  color: var(--cs-danger);
}

.cs-action-danger:hover {
  color: #b91c32;
  border-color: rgba(232, 56, 79, 0.35);
  background: #fff7f8;
}

.cs-mobile-search {
  width: 100%;
}

@media (min-width: 992px) and (max-width: 1199.98px) {
  .cs-header-row {
    grid-template-columns: 100px minmax(250px, 1fr) auto;
    gap: 14px;
  }

  .cs-brand-logo {
    width: 82px;
    height: 82px;
  }

  .cs-action-card {
    min-width: 72px;
    min-height: 72px;
    padding: 8px;
  }

  .cs-action-card span {
    font-size: 0.68rem;
  }
}

/* =========================================================
   Charger Store - Mobile Footer Fix
   فقط شماره‌ها و تصاویر موبایل
   ========================================================= */
@media (max-width: 768px) {
  .cs-contact-list {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
  }

  .cs-contact-row {
    min-width: 0 !important;
    width: 100% !important;
    min-height: 95px !important;
    padding: 10px 6px !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 4px !important;
    text-align: center !important;
    box-sizing: border-box !important;
  }

  .cs-contact-row i {
    width: 100% !important;
    text-align: center !important;
    line-height: 1.45 !important;
  }

  .cs-contact-row span {
    display: block !important;
    width: 100% !important;
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: unset !important;
    text-align: center !important;
    font-size: 0.72rem !important;
    line-height: 1.45 !important;
  }

  .cs-contact-row b {
    display: block !important;
    width: 100% !important;
    direction: ltr !important;
    text-align: center !important;
    font-size: 0.86rem !important;
    white-space: nowrap !important;
  }

  .cs-contact-row:last-child:nth-child(odd) {
    grid-column: 1 / -1 !important;
    width: calc(50% - 4px) !important;
    justify-self: center !important;
  }

  .cs-location-card img {
    width: 100% !important;
    height: 170px !important;
    object-fit: cover !important;
    border-radius: 14px !important;
  }
}
