.home-page {
  background:
    radial-gradient(circle at top left, rgba(0, 120, 212, 0.08), transparent 32%),
    linear-gradient(180deg, #f7fafc 0%, #ffffff 32%);
}

/* ---------- Header ---------- */

.home-header {
  padding: 0;
  background: rgba(25, 31, 42, 0.96);
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 30px rgba(15, 23, 42, 0.22);
}

.home-header-top,
.home-header-nav {
  width: min(1280px, calc(100% - 40px));
  margin: 0 auto;
}

.home-header-top {
  display: grid;
  grid-template-columns: minmax(200px, 240px) minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 16px 0 14px;
}

.home-brand {
  min-width: 0;
}

.home-logo-link {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: #fff;
  text-decoration: none;
}

.home-logo-mark {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 800;
}

.home-logo-copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.home-logo-title {
  font-size: 15px;
  font-weight: 700;
  color: #fff;
}

.home-logo-subtitle {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.72);
}

.home-header-search {
  display: flex;
  align-items: stretch;
  min-width: 0;
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(15, 23, 42, 0.1);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.14);
}

.home-header-search input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  padding: 14px 16px;
  font-size: 15px;
  color: #1f2937;
  background: transparent;
}

.home-header-search button {
  width: 54px;
  border: 0;
  background: linear-gradient(135deg, #0a84ff, #2563eb);
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.home-header-search button .icon {
  stroke: white;
}

.home-header-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: nowrap;
  flex-shrink: 0;
}

.portal-lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.portal-lang-btn {
  min-width: 34px;
  height: 28px;
  padding: 0 8px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: rgba(255, 255, 255, 0.88);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.portal-lang-btn.is-active {
  background: rgba(255, 255, 255, 0.92);
  color: #1f5f9f;
}

.portal-lang-btn:hover {
  color: #fff;
}

.header-action-link,
.header-cart-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
}

.header-action-link:hover,
.header-cart-button:hover {
  color: #fff;
}

.header-cart-label {
  font-size: 14px;
  font-weight: 600;
}

.home-header .logout-button {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 10px;
  padding: 9px 14px;
  height: auto;
}

.home-header-nav {
  padding-bottom: 14px;
}

.home-primary-nav {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.primary-nav-link {
  appearance: none;
  border: 0;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
  padding: 10px 14px;
  border-radius: 999px;
  transition: 0.2s ease;
}

.primary-nav-link:hover,
.primary-nav-link.is-active {
  background: #fff;
  color: #111827;
}

.browse-panel {
  margin-top: 12px;
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.18);
  border: 1px solid rgba(15, 23, 42, 0.08);
}

.browse-panel-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 16px;
}

.browse-chip {
  text-decoration: none;
  color: #1f2937;
  font-size: 14px;
  font-weight: 700;
  padding: 10px 14px;
  border-radius: 999px;
  background: #f3f6fb;
  border: 1px solid #e5ebf5;
  transition: 0.2s ease;
}

.browse-chip:hover {
  background: #eaf2ff;
  border-color: #bfd6ff;
  color: #0f4db8;
}

/* ---------- Main layout ---------- */

.home-main {
  width: min(1280px, calc(100% - 40px));
  margin: 28px auto 56px;
  padding: 0;
  background: transparent;
}

.home-section {
  margin-top: 34px;
}

.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
}

.section-kicker,
.eyebrow {
  display: inline-block;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #2563eb;
  margin-bottom: 6px;
}

.section-heading h2 {
  margin: 0;
  font-size: 26px;
  line-height: 1.1;
  color: #0f172a;
}

.section-link {
  text-decoration: none;
  font-weight: 700;
  font-size: 14px;
  color: #2563eb;
}

/* ---------- Hero ---------- */

.home-hero-card {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(260px, 0.75fr);
  gap: 24px;
  padding: 34px;
  background: linear-gradient(145deg, #ffffff, #f8fbff);
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 28px;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.08);
}

.home-hero-copy h1 {
  margin: 0 0 12px;
  font-size: clamp(26px, 2vw, 30px);
  line-height: 1.2;
  font-weight: 700;
  color: #0f172a;
}

.home-hero-copy p {
  margin: 0;
  max-width: 600px;
  font-size: 15px;
  line-height: 1.65;
  color: #4b5563;
}

.hero-search-form {
  display: flex;
  align-items: stretch;
  gap: 12px;
  margin-top: 24px;
  flex-wrap: wrap;
}

.hero-search-form input {
  flex: 1;
  min-width: 260px;
  padding: 16px 18px;
  font-size: 16px;
  border-radius: 16px;
  border: 1px solid #dbe3ee;
  background: #fff;
  outline: 0;
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.03);
}

.hero-search-form button {
  border: 0;
  padding: 16px 22px;
  border-radius: 16px;
  font-size: 15px;
  font-weight: 800;
  color: #fff;
  cursor: pointer;
  background: linear-gradient(135deg, #0a84ff, #2563eb);
  box-shadow: 0 14px 28px rgba(37, 99, 235, 0.25);
}

.hero-quick-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.hero-quick-links a {
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
  color: #1d4ed8;
  padding: 8px 12px;
  border-radius: 999px;
  background: #eff6ff;
}

.home-hero-side {
  display: flex;
  flex-direction: column;
  gap: 16px;
  justify-content: center;
}

.hero-stat-card {
  padding: 18px 18px 20px;
  border-radius: 22px;
  background: linear-gradient(135deg, #0f172a, #1e3a8a);
  color: #fff;
  box-shadow: 0 18px 36px rgba(15, 23, 42, 0.24);
}

.hero-stat-card.muted {
  background: linear-gradient(135deg, #ffffff, #f1f5f9);
  color: #0f172a;
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: none;
}

.hero-stat-label {
  display: block;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 8px;
  opacity: 0.8;
}

.hero-stat-card strong {
  display: block;
  font-size: 18px;
  line-height: 1.5;
}

.hero-action-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 18px 20px;
  border-radius: 20px;
  background: #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.08);
  text-decoration: none;
  color: #0f172a;
  transition: all 0.2s ease;
}

.hero-action-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.12);
}

.hero-action-card.primary {
  background: linear-gradient(135deg, #0a84ff, #2563eb);
  color: #ffffff;
  border: none;
}

.hero-action-card.primary .hero-card-label {
  color: rgba(255, 255, 255, 0.85);
}

.hero-action-card.primary strong {
  color: #ffffff;
}

.hero-action-card.primary .hero-card-cta {
  color: #ffffff;
}

.hero-card-label {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.8;
  margin-bottom: 6px;
}

.hero-action-card strong {
  font-size: 18px;
  line-height: 1.4;
}

.hero-card-cta {
  margin-top: 14px;
  font-size: 14px;
  font-weight: 700;
}

/* ---------- Promo cards ---------- */

.promo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.promo-card {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  padding: 24px;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
  display: flex;
  flex-direction: column;
}

.promo-card::after {
  content: "";
  position: absolute;
  top: -30px;
  right: -30px;
  width: 120px;
  height: 120px;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.06);
}

.promo-card-top {
  position: relative;
  z-index: 1;
  margin-bottom: 22px;
}

.promo-vendor {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 14px;
  border-radius: 999px;
  background: #e0e7ff;
  color: #2563eb;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.promo-card h3 {
  position: relative;
  z-index: 1;
  margin: 0 0 24px;
  color: #0f172a;
  font-size: 2rem;
  line-height: 1.08;
  font-weight: 800;
}

.promo-meta {
  position: relative;
  z-index: 1;
  margin-top: auto;

  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;

  padding-top: 18px;
  border-top: 1px solid #e5e7eb;
}

.promo-expiry {
  color: #475569;
  font-size: 1rem;
  font-weight: 500;
}

.promo-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;

  color: #2563eb;
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
}

.promo-link:hover {
  text-decoration: underline;
}

.promo-vendor-pet {
  background: #f3e8ff;
  color: #7c3aed;
}

.promo-vendor-agri {
  background: #dcfce7;
  color: #15803d;
}

.promo-vendor-vet,
.promo-vendor-vet-equipment {
  background: #dbeafe;
  color: #2563eb;
}

/* ---------- Product cards ---------- */

.product-row,
.product-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.product-card {
  background: #fff;
  border: 1px solid #e6edf5;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
  display: flex;
  flex-direction: column;
}

.product-media {
  aspect-ratio: 1 / 1;
  background: #ffffff;
  border-bottom: 1px solid #eef2f7;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.product-card-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.product-body {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.product-brand {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #64748b;
}

.product-title {
  margin: 0;
  font-size: 15px;
  line-height: 1.25;
  color: #0f172a;
  min-height: 3.75em;
}

.product-subtitle {
  font-size: 13px;
  color: #4b5563;
  min-height: 32px;
}

.product-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: auto;
}

.product-price {
  font-size: 18px;
  font-weight: 800;
  color: #0f172a;
}

.product-tag {
  display: inline-flex;
  align-items: center;
  padding: 5px 8px;
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 11px;
  font-weight: 800;
}

.product-actions-stacked {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.product-qty-row {
  display: flex;
  gap: 8px;
}

.product-qty-input {
  padding: 8px 4px;
  border: 1px solid #dbe3ee;
  border-radius: 10px;
  font-size: 13px;
}

.product-btn {
  text-align: center;
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 13px;
  font-weight: 800;
  border: 0;
  cursor: pointer;
  background: linear-gradient(135deg, #0a84ff, #2563eb);
  color: #fff;
}

.product-btn.product-btn-update {
  background: linear-gradient(135deg, #1f7a3f, #2f9e44);
}

.product-link {
  flex: 1;
  text-align: center;
  text-decoration: none;
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 13px;
  font-weight: 800;
  background: #eff6ff;
  color: #1d4ed8;
}

/* ---------- Vendor banners ---------- */

.brand-banner-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.brand-banner {
  min-height: 180px;
  border-radius: 26px;
  padding: 22px;
  color: #fff;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 18px 36px rgba(15, 23, 42, 0.12);
}

.brand-banner.vendor-1 {
  background: linear-gradient(135deg, #1d4ed8, #2563eb);
}

.brand-banner.vendor-2 {
  background: linear-gradient(135deg, #0f766e, #14b8a6);
}

.brand-banner.vendor-3 {
  background: linear-gradient(135deg, #7c3aed, #a855f7);
}

.brand-banner-label {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.86;
}

.brand-banner h3 {
  margin: 0;
  font-size: 28px;
  line-height: 1.05;
}

.brand-banner p {
  margin: 8px 0 0;
  max-width: 320px;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.92);
}

.brand-banner-cta {
  margin-top: 18px;
  font-size: 14px;
  font-weight: 800;
}

/* ---------- Brand logos ---------- */

.brand-logo-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 16px;
}

.brand-logo-card {
  background: #fff;
  border: 1px solid #e6edf5;
  border-radius: 20px;
  min-height: 110px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.04);
  text-decoration: none;
}

.brand-logo-card span {
  color: #0f172a;
  font-size: 18px;
  font-weight: 800;
  text-align: center;
}

/* ---------- Responsive ---------- */

@media (max-width: 1180px) and (min-width: 769px) {
  .home-header-top {
    grid-template-columns: 1fr;
  }

  .home-header-actions {
    justify-content: flex-start;
  }

  .home-hero-card {
    grid-template-columns: 1fr;
  }

  .promo-grid,
  .brand-banner-grid {
    grid-template-columns: 1fr;
  }

  .product-row,
  .product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .brand-logo-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .home-main,
  .home-header-top,
  .home-header-nav {
    width: min(100%, calc(100% - 24px));
  }

  .home-hero-card {
    grid-template-columns: 1fr;
    padding: 22px;
    border-radius: 22px;
  }

  .brand-banner-grid {
    grid-template-columns: 1fr;
  }

  .section-heading {
    flex-direction: column;
    align-items: flex-start;
  }

  .product-row,
  .product-grid,
  .brand-logo-grid {
    grid-template-columns: 1fr;
  }

  .hero-search-form {
    flex-direction: column;
  }

  .hero-search-form button {
    width: 100%;
  }

  .home-primary-nav {
    gap: 8px;
  }

  .primary-nav-link {
    width: 100%;
    text-align: left;
  }
}

.product-media {
  aspect-ratio: 1 / 1;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.product-media-link {
  text-decoration: none;
}

.product-card-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.product-title a {
  color: inherit;
  text-decoration: none;
}

.product-title a:hover {
  text-decoration: underline;
}

.product-actions-stacked {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.product-qty-row {
  display: flex;
  gap: 10px;
}

.product-qty-input {
  padding: 10px 4px;
  border: 1px solid #dbe3ee;
  border-radius: 12px;
  font-size: 14px;
}

.product-btn {
  text-align: center;
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 14px;
  font-weight: 800;
  border: 0;
  cursor: pointer;
  background: linear-gradient(135deg, #0a84ff, #2563eb);
  color: #fff;
}

.product-btn.product-btn-update {
  background: linear-gradient(135deg, #1f7a3f, #2f9e44);
}

.top-brand-logo {
  max-width: 100%;
  max-height: 56px;
  object-fit: contain;
  display: block;
  margin: 0 auto;
}

.brand-logo-card {
  text-align: center;
}




.product-stock-badge {
  display: inline-block;
  width: fit-content;
  margin: 8px 0 10px;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.15;
}

.product-stock-badge small {
  display: block;
  margin-top: 2px;
  font-size: 10px;
}

.product-stock-badge.in {
  background: #ecfdf3;
  color: #027a48;
}

.product-stock-badge.low {
  background: #fffaeb;
  color: #b54708;
}

.product-stock-badge.out {
  background: #fef3f2;
  color: #b42318;
}

/* =========================
   MOBILE HEADER REFRESH
========================= */
.mobile-menu-toggle,
.mobile-nav-only {
  display: none;
}

.account-gear-icon {
  width: 22px;
  height: 22px;
  stroke: currentColor;
}

@media (max-width: 768px) {
  .home-header {
    background: linear-gradient(135deg, #111827, #1f3b73);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.25);
  }

  .home-header-top {
    width: min(100%, calc(100% - 20px));
    display: grid;
    grid-template-columns: 44px 44px minmax(0, 1fr) 44px;
    gap: 8px;
    padding: 10px 0;
    align-items: center;
  }

  .home-brand {
    display: flex;
    align-items: center;
    min-width: 0;
  }

  .home-logo-copy {
    display: none;
  }

  .home-logo-link {
    gap: 0;
  }

  .home-logo-mark {
    width: 40px;
    height: 40px;
    object-fit: contain;
  }

  .mobile-menu-toggle {
    display: inline-flex;
    width: 44px;
    height: 44px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
    border: 1px solid rgba(255,255,255,0.22);
    border-radius: 14px;
    background: rgba(255,255,255,0.12);
    color: #fff;
    cursor: pointer;
  }

  .mobile-menu-toggle span {
    width: 20px;
    height: 2px;
    border-radius: 999px;
    background: currentColor;
    transition: transform 0.2s ease, opacity 0.2s ease;
  }

  .mobile-menu-toggle.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .mobile-menu-toggle.is-open span:nth-child(2) { opacity: 0; }
  .mobile-menu-toggle.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  .home-header-search {
    min-width: 0;
    border-radius: 15px;
    box-shadow: 0 8px 18px rgba(0,0,0,0.16);
  }

  .home-header-search input {
    padding: 0 12px;
    height: 44px;
    font-size: 14px;
  }

  .home-header-search input::placeholder { color: transparent; }

  .home-header-search button {
    width: 44px;
    background: linear-gradient(135deg, #16a34a, #0a84ff);
  }

  .home-header-actions {
    gap: 8px;
    flex-wrap: nowrap;
  }

  .home-header-actions .header-action-link { display: none; }

  .account-menu-button {
    width: 44px;
    height: 44px;
    justify-content: center;
    border: 1px solid rgba(255,255,255,0.22);
    border-radius: 14px;
    background: rgba(255,255,255,0.12);
    color: #fff;
    padding: 0;
  }

  .account-menu-label,
  .account-menu-caret { display: none; }

  .account-menu-dropdown {
    position: fixed;
    top: 62px;
    right: 10px;
    min-width: 190px;
    z-index: 1200;
  }

  .home-header-nav {
    width: min(100%, calc(100% - 20px));
    display: none;
    padding: 0 0 12px;
  }

  .home-header-nav.mobile-menu-open { display: block; }
  .mobile-nav-only { display: flex; }

  .home-primary-nav {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 10px;
    border-radius: 18px;
    background: rgba(255,255,255,0.10);
    border: 1px solid rgba(255,255,255,0.15);
  }

  .primary-nav-link {
    width: 100%;
    box-sizing: border-box;
    justify-content: flex-start;
    text-align: left;
    padding: 12px 14px;
    border-radius: 12px;
    background: rgba(255,255,255,0.12);
  }

  .browse-panel {
    margin-top: 10px;
    border-radius: 16px;
    max-height: 58vh;
    overflow-y: auto;
  }

  .browse-panel-inner {
    display: grid;
    grid-template-columns: 1fr;
    padding: 12px;
    justify-items: stretch;
    text-align: left;
  }

  .browse-chip {
    width: 100%;
    box-sizing: border-box;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    text-align: left;
  }
}


/* Desktop sticky header; mobile fixed header lives in styles.css */
@media (min-width: 769px) {
  .site-header.home-header {
    position: sticky;
    top: 0;
    z-index: 5000;
  }
}


/* ---------- Promotions carousel ---------- */
.promo-carousel {
  position: relative;
}

.promo-carousel .promo-grid {
  display: flex;
  grid-template-columns: none;
  gap: 20px;
  overflow-x: auto;
  overflow-y: visible;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  padding: 0 2px 4px;
}

.promo-carousel .promo-grid::-webkit-scrollbar {
  display: none;
}

.promo-carousel .promo-card {
  flex: 0 0 calc((100% - 40px) / 3);
  min-width: 280px;
  scroll-snap-align: start;
}

.promo-carousel-btn {
  position: absolute;
  top: 50%;
  z-index: 5;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 999px;
  background: #ffffff;
  color: #2563eb;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.18);
  font-size: 34px;
  line-height: 1;
  font-weight: 700;
  cursor: pointer;
  transform: translateY(-50%);
}

.promo-carousel-btn-prev {
  left: -22px;
}

.promo-carousel-btn-next {
  right: -22px;
}

.promo-carousel-btn:disabled {
  opacity: 0.35;
  cursor: default;
}

.promo-carousel-btn[hidden] {
  display: none;
}

@media (max-width: 900px) {
  .promo-carousel .promo-card {
    flex-basis: min(86vw, 360px);
  }

  .promo-carousel-btn-prev {
    left: -8px;
  }

  .promo-carousel-btn-next {
    right: -8px;
  }
}

/* ---------- Rep shop-on-behalf modal ---------- */
body.rep-shop-modal-open {
  overflow: hidden;
}

.rep-shop-modal {
  position: fixed;
  inset: 0;
  z-index: 11000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.rep-shop-modal[hidden] {
  display: none;
}

.rep-shop-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
}

.rep-shop-modal-dialog {
  position: relative;
  width: min(720px, 100%);
  max-height: min(88vh, 900px);
  overflow: auto;
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.22);
}

.rep-shop-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 20px 24px 0;
}

.rep-shop-modal-header h2 {
  margin: 0;
  font-size: 1.35rem;
  color: #111827;
}

.rep-shop-modal-close {
  border: 0;
  background: transparent;
  color: #64748b;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}

.rep-shop-modal-body {
  padding: 12px 24px 24px;
}

.rep-shop-search-row {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
}

.rep-shop-search-row input {
  flex: 1;
  min-width: 0;
  width: 100%;
  padding: 12px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  font-size: 16px;
  box-sizing: border-box;
}

.rep-shop-search-row .rep-shop-btn {
  flex-shrink: 0;
}

.rep-shop-btn {
  border: 0;
  border-radius: 10px;
  padding: 12px 18px;
  font-weight: 700;
  background: #00796b;
  color: #fff;
  cursor: pointer;
}

.rep-shop-btn.secondary {
  background: #e8eef7;
  color: #0f172a;
}

.rep-shop-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.rep-shop-list {
  list-style: none;
  padding: 0;
  margin: 16px 0 0;
}

.rep-shop-list li {
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 10px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}

.rep-shop-list li:hover {
  border-color: #00796b;
  background: #f0fdfa;
}

.rep-shop-muted {
  color: #64748b;
  font-size: 14px;
}

.rep-shop-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 16px 0;
  font-weight: 700;
  color: #111827;
}

.rep-shop-field select {
  padding: 12px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  font-weight: 400;
}

.rep-shop-actions {
  display: flex;
  gap: 10px;
  margin-top: 16px;
}

.rep-shop-message {
  padding: 10px 12px;
  border-radius: 10px;
  margin-bottom: 12px;
}

.rep-shop-message.error {
  background: #fef2f2;
  color: #b91c1c;
}

.rep-shop-message.success {
  background: #ecfdf5;
  color: #047857;
}

.rep-hidden {
  display: none;
}

@media (max-width: 640px) {
  .rep-shop-modal {
    padding: 10px;
    align-items: flex-end;
  }

  .rep-shop-modal-dialog {
    width: 100%;
    max-height: 92vh;
    border-radius: 18px 18px 0 0;
  }

  .rep-shop-modal-header {
    padding: 16px 16px 0;
  }

  .rep-shop-modal-body {
    padding: 12px 16px 20px;
  }

  .rep-shop-search-row {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  .rep-shop-search-row .rep-shop-btn {
    width: 100%;
  }
}
