/* ========== SMP Amatis Header Styles ========== */
:root {
  --smp-primary: #4e54c8;
  --smp-secondary: #8f94fb;
  --smp-white: #fff;
  --smp-black: #222;
  --smp-light-bg: #f3f4fa;
  --smp-shadow: rgba(78, 84, 200, 0.08);
  --smp-shadow-hover: rgba(78, 84, 200, 0.18);
  --smp-border-radius: 24px;
  --smp-transition: all 0.3s ease;
  --smp-tablet-logo-size: 200px;
  --smp-mobile-logo-size: 280px;
}

/* ===== Base Header ===== */
.smp_amatis-header {
  background: linear-gradient(90deg, var(--smp-primary), var(--smp-secondary));
  color: var(--smp-white);
  padding: 1.5rem 2rem;
  box-shadow: 0 2px 8px var(--smp-shadow);
  border-radius: 0 0 var(--smp-border-radius) var(--smp-border-radius);
  margin-bottom: 2rem;
  position: relative;
  z-index: 100;
}

/* ===== Logo ===== */
.smp_amatis-header #logo img {
  max-width: 260px;
  height: auto;
  border-radius: 12px;
  background: var(--smp-white);
  padding: 0.5rem 1rem;
  box-shadow: 0 4px 16px rgba(0,0,0,0.07);
  transition: var(--smp-transition);
}

.smp_amatis-header #logo img:hover {
  transform: scale(1.04) rotate(-2deg);
  box-shadow: 0 8px 24px var(--smp-shadow-hover);
}

/* ===== Layout ===== */
.smp_amatis-header .header-row {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.smp_amatis-header .header-col {
  display: flex;
  align-items: center;
  min-width: 0;
}

/* عرض دقیق هر ستون */
.smp_amatis-header .header-col.logo {
  flex: 0 0 auto;
  justify-content: flex-start;
}

.smp_amatis-header .header-col.search {
  flex: 1 1 320px;
  justify-content: center;
}

.smp_amatis-header .header-col.cart {
  flex: 0 0 140px;
  justify-content: flex-end;
}

.smp_amatis-header .header-col.account {
  flex: 0 0 160px;
  justify-content: center;
  padding-bottom: 0.25rem;
}

/* ===== Search ===== */
.smp_amatis-search {
  width: 100%;
  max-width: 360px;
  padding: 0 0.5rem;
}

/* ===== Cart Dropdown ===== */
.smp_amatis-cart {
  text-align: right;
}

.smp_amatis-cart .dropdown-menu {
  background: var(--smp-white);
  border-radius: 16px;
  box-shadow: 0 4px 16px var(--smp-shadow-hover);
  padding: 0.75rem;
  color: var(--smp-black);
  min-width: 220px;
  z-index: 100;
}

/* ===== Account Button ===== */
.smp_amatis-account .btn-account {
  background: transparent;
  border: 2px solid var(--smp-white);
  color: var(--smp-white);
  padding: 1rem 2rem;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 600;
  font-family: inherit;
  font-size: 1.6rem;
  line-height: 1.4;
  white-space: nowrap;
  transition: var(--smp-transition);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  user-select: none;
}

.smp_amatis-account .btn-account i {
  font-size: 1.3rem;
}

.smp_amatis-account .btn-account:hover,
.smp_amatis-account .btn-account:focus {
  background: var(--smp-white);
  color: var(--smp-primary);
  border-color: var(--smp-primary);
  outline: none;
}

/* ===== Account Dropdown Menu ===== */
.smp_amatis-account .dropdown-menu {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 0.6rem;
  background: var(--smp-white);
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(78,84,200,0.13);
  min-width: 180px;
  padding: 0.5rem 0;
  list-style: none;
  z-index: 200;
  display: none;
  flex-direction: column;
}

.smp_amatis-account .dropdown.show .dropdown-menu {
  display: flex;
}

.smp_amatis-account .dropdown-menu li {
  padding: 0;
  margin: 0;
}

.smp_amatis-account .dropdown-menu li a {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.2rem;
  color: var(--smp-black);
  font-weight: 500;
  font-size: 1.5rem;
  text-decoration: none;
  transition: background-color 0.2s ease, border-radius 0.2s ease;
  border-radius: 8px;
}

.smp_amatis-account .dropdown-menu li a:hover,
.smp_amatis-account .dropdown-menu li a:focus {
  background: var(--smp-light-bg);
  color: var(--smp-primary);
  border-radius: 12px;
  outline: none;
}

.smp_amatis-account .dropdown-menu .divider {
  height: 1px;
  margin: 0.5rem 0;
  background-color: #ddd;
  pointer-events: none;
}

/* ========== Tablet Styles (768px - 991px) ========== */
@media (min-width: 768px) and (max-width: 991px) {
  .smp_amatis-header {
    padding: 1rem 1rem;
    margin-bottom: 1.25rem;
  }

  /* لوگو کوچکتر */
  .smp_amatis-header #logo img {
    max-width: 160px;
    padding: 0.3rem 0.6rem;
  }

  .smp_amatis-header .header-row {
    flex-wrap: nowrap;
    gap: 0.8rem;
  }

  .smp_amatis-header .header-col {
    min-width: 0;
  }

  /* جستجو جمع‌وجورتر */
  .smp_amatis-header .header-col.search {
    flex: 1 1 200px;
  }

  .smp_amatis-search {
    max-width: 220px;
    padding: 0 0.25rem;
  }

  /* سبد خرید */
  .smp_amatis-header .header-col.cart {
    flex: 0 0 100px;
  }

  /* حساب کاربری */
  .smp_amatis-header .header-col.account {
    flex: 0 0 110px;
  }

  .smp_amatis-account .btn-account {
    font-size: 1.3rem;
    padding: 0.6rem 1.2rem;
  }
}

/* ========== Mobile Styles (max-width: 767px) ========== */
@media (max-width: 767px) {
  .smp_amatis-header {
    padding: 0.75rem 1rem;
    border-radius: 0 0 12px 12px;
    margin-bottom: 1rem;
  }

  .smp_amatis-header #logo img {
    max-width: var(--smp-mobile-logo-size);
    padding: 0.5rem 1rem;
  }

  .smp_amatis-header .header-row {
    flex-direction: column;
    gap: 1.25rem;
    align-items: center;
  }

  .smp_amatis-header .header-col {
    width: 100%;
    justify-content: center;
  }

  .smp_amatis-cart .dropdown-menu,
  .smp_amatis-account .dropdown-menu {
    left: 50% !important;
    transform: translateX(-50%) !important;
    min-width: 95vw !important;
    max-width: 98vw !important;
    right: auto !important;
    margin: 0 auto !important;
    border-radius: 16px !important;
    padding: 0.75rem 0.5rem !important;
    position: absolute;
    top: 100%;
    z-index: 300;
  }

  .smp_amatis-account .btn-account {
    margin-bottom: 0.75rem;
    font-size: 1.3rem;
    padding: 0.8rem 1.4rem;
  }

  .smp_amatis-header .header-col.account {
    justify-content: center;
    padding-bottom: 0;
  }
}
