/*
  Global responsive stability layer.
  Purpose: preserve existing design/content while improving cross-device rendering.
*/

:root {
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
}

html,
body {
  max-width: 100%;
  overflow-x: hidden;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

img {
  max-width: 100%;
  height: auto;
}

video,
canvas,
svg,
iframe {
  max-width: 100%;
}

input,
select,
textarea,
button {
  font: inherit;
  max-width: 100%;
}

table {
  width: 100%;
  max-width: 100%;
  border-collapse: collapse;
}

pre,
code,
p,
h1,
h2,
h3,
h4,
h5,
h6,
li,
a,
button,
label {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.container,
[class*="container"] {
  max-width: 100%;
}

@media (max-width: 1200px) {
  .container {
    padding-left: clamp(12px, 2.2vw, 20px) !important;
    padding-right: clamp(12px, 2.2vw, 20px) !important;
  }
}

@media (max-width: 992px) {
  .hero,
  .hero-slider,
  .hero-slide {
    min-height: clamp(300px, 52vh, 520px) !important;
  }

  .section-header h2 {
    font-size: clamp(24px, 5.4vw, 34px) !important;
  }
}

@media (max-width: 768px) {
  .products-grid,
  .categories-grid,
  .services-grid,
  .stats-grid,
  .features-grid,
  .brands-slider,
  .gallery-grid {
    gap: clamp(10px, 2.6vw, 16px) !important;
  }

  .btn,
  .btn-primary,
  .btn-secondary,
  .btn-large {
    max-width: 100%;
    white-space: normal;
  }

  .modal-content,
  .modal-container,
  .quick-view-modal .modal-container {
    width: min(94vw, 900px) !important;
  }

  .newsletter-form {
    min-width: 0 !important;
    width: 100% !important;
  }
}

@media (max-width: 480px) {
  body {
    font-size: 14px;
  }

  .hero-content,
  .product-info,
  .service-card,
  .faq-question,
  .faq-answer p {
    padding-left: clamp(10px, 3.2vw, 14px) !important;
    padding-right: clamp(10px, 3.2vw, 14px) !important;
  }

  .top-bar,
  .header,
  .main-nav {
    padding-top: max(0px, var(--safe-top));
  }
}



/* ── Feature cards — universal layout (flexbox base + grid enhancement) ── */
.features {
  padding: 36px 0 !important;
}

/* Flexbox fallback: works on every browser including IE 10+ */
.features-grid {
  display: -webkit-box !important;
  display: -ms-flexbox !important;
  display: flex !important;
  -ms-flex-wrap: wrap !important;
  flex-wrap: wrap !important;
  gap: 16px !important;
  -webkit-box-sizing: border-box !important;
  box-sizing: border-box !important;
}

.feature-item {
  -webkit-box-flex: 1 !important;
  -ms-flex: 1 1 180px !important;
  flex: 1 1 180px !important;
  max-width: calc(25% - 16px) !important;
  padding: 20px 16px !important;
  border-radius: 14px !important;
  -webkit-box-sizing: border-box !important;
  box-sizing: border-box !important;
}

/* Progressive enhancement: use grid when supported */
@supports (display: grid) {
  .features-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)) !important;
  }

  .feature-item {
    max-width: none !important;
    -webkit-box-flex: unset !important;
    -ms-flex: unset !important;
    flex: unset !important;
  }
}

.feature-item i {
  font-size: 34px !important;
  margin-bottom: 10px !important;
}

.feature-item h3 {
  font-size: 15px !important;
  margin-bottom: 5px !important;
}

.feature-item p {
  font-size: 12px !important;
}

/* Mobile: always 2×2 */
@media (max-width: 480px) {
  .features-grid {
    gap: 10px !important;
  }

  .feature-item {
    -webkit-box-flex: 1 !important;
    -ms-flex: 1 1 calc(50% - 10px) !important;
    flex: 1 1 calc(50% - 10px) !important;
    max-width: calc(50% - 10px) !important;
    padding: 14px 10px !important;
  }

  @supports (display: grid) {
    .features-grid {
      grid-template-columns: repeat(2, 1fr) !important;
    }

    .feature-item {
      max-width: none !important;
      -webkit-box-flex: unset !important;
      -ms-flex: unset !important;
      flex: unset !important;
    }
  }

  .feature-item i {
    font-size: 26px !important;
    margin-bottom: 7px !important;
  }

  .feature-item h3 {
    font-size: 13px !important;
  }

  .feature-item p {
    font-size: 11px !important;
  }
}

/* ── Nav Social Media Icons ──────────────────────────────── */
/* Override nav-content so social icons sit exactly in the center */
.nav-content {
  display: -webkit-box !important;
  display: -ms-flexbox !important;
  display: flex !important;
  -webkit-box-align: center !important;
  -ms-flex-align: center !important;
  align-items: center !important;
  -webkit-box-pack: justify !important;
  -ms-flex-pack: justify !important;
  justify-content: space-between !important;
}

/* Logo and nav-icons stay fixed; social block gets margin:auto to center itself */
.nav-social {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  gap: 6px;
  -ms-flex-negative: 0;
  flex-shrink: 0;
  margin: 0 auto;
}

.nav-social-link {
  display: -webkit-inline-box;
  display: -ms-inline-flexbox;
  display: inline-flex;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  font-size: 13px;
  color: #fff !important;
  text-decoration: none !important;
  -webkit-transition: -webkit-transform 0.2s ease, box-shadow 0.2s ease;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.nav-social-link:hover {
  -webkit-transform: translateY(-2px) scale(1.15);
  transform: translateY(-2px) scale(1.15);
  -webkit-box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

#nav-fb { background: #1877f2; }
#nav-tt { background: #010101; }
#nav-ig { background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285aeb 90%); }
#nav-yt { background: #ff0000; }
#nav-tg { background: #26a5e4; }

/* Social icons always visible — keep on all screen sizes */
@media (max-width: 768px) {
  .nav-social {
    gap: 5px;
  }
  .nav-social-link {
    width: 26px;
    height: 26px;
    font-size: 11px;
  }
}

  /* ══════════════════════════════════════════════════════════
     NAV MENU — Always visible on ALL devices (all pages)
     Overrides styles.min.css which hides it at ≤1024px
     ══════════════════════════════════════════════════════════ */

  .nav-menu {
    display: -webkit-box !important;
    display: -ms-flexbox !important;
    display: flex !important;
    list-style: none !important;
    margin: 0 !important;
  }

  /* Let hamburger appear on smaller screens near cart */

  /* ≤1024px: slightly smaller text, tighter gap */
  @media (max-width: 1024px) {
    .nav-menu {
      gap: 14px !important;
      -ms-flex-wrap: nowrap !important;
      flex-wrap: nowrap !important;
    }

    .nav-menu > li > a {
      font-size: 13px !important;
      padding: 8px 0 !important;
    }
  }

  /* ≤768px: move nav below logo as its own row */
  @media (max-width: 768px) {
    .nav-content {
      -ms-flex-wrap: wrap !important;
      flex-wrap: wrap !important;
      gap: 6px !important;
    }
    .nav-menu {
      -webkit-box-ordinal-group: 4 !important;
      -ms-flex-order: 3 !important;
      order: 3 !important;
      width: 100% !important;
      gap: 10px !important;
      -webkit-box-pack: center !important;
      -ms-flex-pack: center !important;
      justify-content: center !important;
      padding: 5px 0 7px !important;
      border-top: 1px solid rgba(0,0,0,0.08) !important;
    }
    .nav-menu > li > a {
      font-size: 12px !important;
    }
  }

  /* ≤480px: smallest screens */
  @media (max-width: 480px) {
    .nav-menu {
      gap: 6px !important;
    }
    .nav-menu > li > a {
      font-size: 11px !important;
    }
    .nav-social {
      gap: 4px !important;
    }
    .nav-social-link {
      width: 24px !important;
      height: 24px !important;
      font-size: 10px !important;
    }
  }

  /* ══════════════════════════════════════════════════════════
     FOOTER — Always fully visible (grid → stacked on small screens)
     ══════════════════════════════════════════════════════════ */
  @media (max-width: 768px) {
    .footer-content {
      grid-template-columns: repeat(2, 1fr) !important;
    }
  }
  @media (max-width: 480px) {
    .footer-content {
      grid-template-columns: 1fr !important;
    }
  }

  /* ══════════════════════════════════════════════════════════
     LOGO — Scales down gracefully on small screens
     ══════════════════════════════════════════════════════════ */
  @media (max-width: 768px) {
    .logo h1 {
      font-size: clamp(26px, 6vw, 40px) !important;
    }
    .logo .tagline {
      font-size: clamp(11px, 2.5vw, 14px) !important;
    }
  }

  /* ══════════════════════════════════════════════════════════
     TOP-BAR — Always visible, wraps on very small screens
     ══════════════════════════════════════════════════════════ */
  @media (max-width: 640px) {
    .top-bar .container {
      -ms-flex-wrap: wrap !important;
      flex-wrap: wrap !important;
      gap: 4px !important;
      padding-top: 4px !important;
      padding-bottom: 4px !important;
    }
    .top-bar-left,
    .top-bar-right {
      -webkit-box-flex: 1 !important;
      -ms-flex: 1 1 100% !important;
      flex: 1 1 100% !important;
      font-size: 11px !important;
      text-align: center !important;
      justify-content: center !important;
    }
  }

/* Services section: always 3 cards per row on all devices */
.extra-services .services-grid {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
}

.extra-services .service-card {
  min-width: 0 !important;
  width: auto !important;
}

@media (max-width: 1024px) {
  .extra-services .services-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 768px) {
  .extra-services .services-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 480px) {
  .extra-services .services-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }
}

/* Shop-by-category strict lock: always 4 cards per row across all screens */
#home-categories .categories-grid {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
}

#home-categories .categories-grid > * {
  min-width: 0 !important;
  min-height: 0 !important;
  width: auto !important;
  aspect-ratio: 1 / 1 !important;
  height: auto !important;
  position: relative !important;
  overflow: hidden !important;
}

#home-categories .category-card {
  min-width: 0 !important;
  min-height: 0 !important;
  width: auto !important;
  aspect-ratio: 1 / 1 !important;
  height: auto !important;
  position: relative !important;
  overflow: hidden !important;
}

/* Keep category background video stable inside cards (current + future dashboard cards). */
#home-categories .category-card video,
#home-categories .category-card .category-video,
#home-categories .category-card .category-bg-video {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  display: block !important;
  z-index: 0 !important;
  pointer-events: none !important;
}

#home-categories .categories-grid > * video,
#home-categories .categories-grid > * .category-video,
#home-categories .categories-grid > * .category-bg-video {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  display: block !important;
  z-index: 0 !important;
  pointer-events: none !important;
}

#home-categories .category-card .category-overlay {
  position: absolute !important;
  inset: 0 !important;
  z-index: 1 !important;
}

#home-categories .categories-grid > * .category-overlay {
  position: absolute !important;
  inset: 0 !important;
  z-index: 1 !important;
}

#home-categories .category-card .category-icon-wrapper,
#home-categories .category-card .category-content {
  position: relative !important;
  z-index: 2 !important;
}

#home-categories .categories-grid > * .category-icon-wrapper,
#home-categories .categories-grid > * .category-content {
  position: relative !important;
  z-index: 2 !important;
}

#home-categories .category-card,
#home-categories .categories-grid > * {
  padding: clamp(4px, 0.9vw, 10px) !important;
}

#home-categories .category-card .category-icon-wrapper,
#home-categories .categories-grid > * .category-icon-wrapper {
  width: clamp(30px, 4.4vw, 72px) !important;
  height: clamp(30px, 4.4vw, 72px) !important;
  margin-bottom: clamp(4px, 0.7vw, 10px) !important;
}

#home-categories .category-card .category-icon-wrapper i,
#home-categories .categories-grid > * .category-icon-wrapper i {
  font-size: clamp(14px, 2.1vw, 32px) !important;
}

#home-categories .category-card .category-content {
  padding: 0 clamp(2px, 0.5vw, 8px) clamp(2px, 0.6vw, 10px) !important;
}

#home-categories .category-card .category-content h3,
#home-categories .categories-grid > * .category-content h3 {
  font-size: clamp(10px, 1.15vw, 15px) !important;
  line-height: 1.25 !important;
  margin-bottom: clamp(2px, 0.6vw, 10px) !important;
}

#home-categories .category-card .category-count,
#home-categories .categories-grid > * .category-count {
  font-size: clamp(8px, 0.8vw, 11px) !important;
  margin-bottom: clamp(2px, 0.6vw, 10px) !important;
}

#home-categories .category-card .category-btn,
#home-categories .categories-grid > * .category-btn {
  gap: clamp(2px, 0.35vw, 6px) !important;
  padding: clamp(2px, 0.45vw, 6px) clamp(4px, 0.75vw, 10px) !important;
  font-size: clamp(8px, 0.9vw, 11px) !important;
}

#home-categories .category-card .category-btn i,
#home-categories .categories-grid > * .category-btn i {
  font-size: clamp(7px, 0.7vw, 10px) !important;
}

@media (max-width: 1024px) {
  #home-categories .categories-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 768px) {
  #home-categories .categories-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 520px) {
  #home-categories .categories-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }
}

/* Global brands gallery strict lock: always 4 cards per row across all screens */
.collection-gallery.brand-edition .gallery-grid,
#dashboard-brands-grid {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
}

.collection-gallery.brand-edition .brand-card,
.collection-gallery.brand-edition .gallery-item,
.collection-gallery.brand-edition .hot-offer-card,
.collection-gallery.brand-edition .gallery-item.large,
.collection-gallery.brand-edition .gallery-item.wide {
  min-height: 205px !important;
  height: auto !important;
}

.collection-gallery.brand-edition .gallery-overlay p,
.collection-gallery.brand-edition .hot-offer-overlay p {
  display: block !important;
  -webkit-line-clamp: unset !important;
  -webkit-box-orient: initial !important;
  overflow: visible !important;
}

@media (max-width: 1024px) {
  .collection-gallery.brand-edition .gallery-grid,
  #dashboard-brands-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 768px) {
  .collection-gallery.brand-edition .gallery-grid,
  #dashboard-brands-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 520px) {
  .collection-gallery.brand-edition .gallery-grid,
  #dashboard-brands-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  }
}

/* Home-only top bar + main-nav hard lock */
body:not(.home-page) .main-nav {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

body.home-page .main-nav {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  pointer-events: auto !important;
}

body:not(.home-page) .top-bar {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

body.home-page .top-bar {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  pointer-events: auto !important;
}

.trader-factory-strip {
  background: linear-gradient(180deg, #f9f2de 0%, #f6ecd2 100%);
  border-top: 1px solid #efe0b8;
  border-bottom: 1px solid #e8d5a7;
}

.trader-factory-strip-center {
  min-height: clamp(48px, 5vw, 58px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(6px, 1.2vw, 10px) 0;
}

.account-logo-pill {
  display: flex;
  align-items: center;
  justify-content: center;
  width: min(100%, 620px);
  gap: clamp(14px, 3vw, 28px);
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(191, 151, 75, 0.5);
  box-shadow: 0 4px 12px rgba(145, 114, 49, 0.12);
  border-radius: 999px;
  padding: clamp(6px, 1.2vw, 10px) clamp(12px, 2.4vw, 18px);
}

.account-logo-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  min-width: clamp(140px, 24vw, 190px);
  flex: 1 1 0;
  text-decoration: none;
  color: inherit;
  border: 1px solid rgba(191, 151, 75, 0.52);
  background: linear-gradient(180deg, #fffaf0 0%, #f9f0da 100%);
  border-radius: 999px;
  padding: 6px 14px;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.account-logo-btn:hover,
.account-logo-btn:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(173, 130, 47, 0.8);
  box-shadow: 0 4px 10px rgba(145, 114, 49, 0.18);
  outline: none;
}

.account-logo-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #7b6229;
  font-size: clamp(12px, 1.2vw, 14px);
  font-weight: 700;
  white-space: nowrap;
}

.account-logo-item i {
  color: #b8872f;
}

.account-logo-divider {
  width: 1px;
  height: clamp(24px, 3vw, 30px);
  background: rgba(191, 151, 75, 0.4);
}

body:not(.home-page) .trader-factory-strip {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

body.home-page .trader-factory-strip {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  pointer-events: auto !important;
}

@media (max-width: 768px) {
  .trader-factory-strip-center {
    min-height: 48px;
    padding: 6px 0;
  }

  .account-logo-pill {
    width: 100%;
    gap: 12px;
    padding: 6px 8px;
    border-radius: 18px;
  }

  .account-logo-btn {
    min-height: 36px;
    min-width: 0;
    padding: 5px 8px;
  }

  .account-logo-item {
    font-size: 12px;
    gap: 6px;
  }

  .account-logo-divider {
    height: 22px;
  }
}

@media (max-width: 440px) {
  .account-logo-pill {
    flex-direction: column;
    gap: 8px;
    border-radius: 14px;
  }

  .account-logo-divider {
    display: none;
  }

  .account-logo-btn {
    width: 100%;
    flex: 1 1 auto;
  }
}

#our-partners.partners-entry-active {
  position: relative;
  z-index: 1;
}

#our-partners.partners-entry-active .partners-shell {
  box-shadow: 0 0 0 3px rgba(214, 169, 79, 0.24), 0 20px 36px rgba(63, 42, 8, 0.2);
  border-radius: 18px;
  transition: box-shadow 0.24s ease;
}

#our-partners,
#our-partners-title {
  scroll-margin-top: 140px;
}

#our-factories-block,
#our-factories-title {
  scroll-margin-top: 140px;
}

.partners-subsection-separator {
  height: 2px;
  margin: 36px 0 26px;
  background: linear-gradient(90deg, transparent, rgba(59, 130, 246, 0.35), transparent);
}

#our-factories-block {
  margin-top: 22px;
  padding-top: 22px;
  border-top: 1px dashed rgba(148, 163, 184, 0.45);
}

#our-factories-block,
#our-factories-block .factory-feature-card,
#our-factories-block .factory-store-card,
#our-factories-block .factory-feature-card h3,
#our-factories-block .factory-feature-card p,
#our-factories-block .factory-store-card h3,
#our-factories-block .factory-store-card p,
#our-factories-block .factory-feature-card .btn,
#our-factories-block .factory-store-card .btn {
  direction: rtl !important;
  text-align: center !important;
  unicode-bidi: plaintext;
  font-family: Cairo, sans-serif !important;
  letter-spacing: 0 !important;
}

#our-factories-block .factories-shell {
  position: relative;
  z-index: 1;
  overflow-x: hidden;
}

#our-factories-block .factories-hero {
  text-align: center;
  margin-bottom: 24px;
}

#our-factories-block .factories-top-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(6px, 0.9vw, 12px);
}

#our-factories-block .factories-divider {
  height: 1px;
  margin: 24px 0 20px;
  background: linear-gradient(90deg, transparent, rgba(16, 185, 129, 0.35), transparent);
}

#our-factories-block .factories-bottom-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(5px, 0.8vw, 10px);
}

#our-factories-block .factory-feature-card,
#our-factories-block .factory-store-card {
  background: #ffffff;
  border: 1px solid #dbe7f5;
  border-radius: 18px;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.1);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
  min-width: 0;
}

#our-factories-block .factory-feature-card {
  padding: clamp(8px, 0.95vw, 14px) clamp(6px, 0.8vw, 12px);
  min-height: clamp(178px, 20vw, 220px);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

#our-factories-block .factory-service-icon {
  width: clamp(28px, 3.1vw, 46px);
  height: clamp(28px, 3.1vw, 46px);
  margin: 0 auto clamp(4px, 0.6vw, 8px);
  border-radius: 16px;
  background: linear-gradient(145deg, #10b981, #059669);
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

#our-factories-block .factory-service-icon i {
  font-size: clamp(11px, 1.35vw, 18px);
}

#our-factories-block .factory-card-phrase {
  display: inline-block;
  margin: 0 auto clamp(2px, 0.5vw, 6px);
  padding: clamp(1px, 0.3vw, 3px) clamp(4px, 0.6vw, 8px);
  border-radius: 999px;
  background: rgba(5, 150, 105, 0.12);
  color: #047857 !important;
  font-size: clamp(10px, 1vw, 13px) !important;
  font-weight: 800 !important;
}

#our-factories-block .factory-store-card {
  min-height: clamp(164px, 18vw, 196px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

#our-factories-block .factory-store-media {
  aspect-ratio: 16 / 8.8;
  width: 100%;
  overflow: hidden;
  background: #0b1220;
}

#our-factories-block .factory-store-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

#our-factories-block .factory-product-info {
  padding: clamp(5px, 0.6vw, 8px);
  background: linear-gradient(180deg, #ffffff 0%, #f5fffb 100%);
  text-align: right;
  flex: 1;
}

#our-factories-block .factory-store-phrase {
  display: inline-flex;
  align-items: center;
  margin-bottom: clamp(1px, 0.3vw, 4px);
  padding: clamp(1px, 0.22vw, 2px) clamp(4px, 0.55vw, 6px);
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.15);
  color: #047857 !important;
  font-size: clamp(9px, 0.9vw, 12px) !important;
  font-weight: 800 !important;
}

#our-factories-block .factory-product-desc {
  color: #475569;
  font-size: clamp(9px, 0.9vw, 12px);
  line-height: 1.38;
  margin-bottom: 0;
}

#our-factories-block .factory-store-action {
  margin-top: clamp(4px, 0.65vw, 10px) !important;
}

#our-factories-block.factories-entry-active {
  box-shadow: 0 0 0 3px rgba(214, 169, 79, 0.24), 0 20px 36px rgba(63, 42, 8, 0.2);
  border-radius: 18px;
  transition: box-shadow 0.24s ease;
}

#sellerCornerCard {
  position: relative;
}

#sellerCornerCard.seller-corner-focus {
  position: relative;
  z-index: 2;
  border-color: #c8952f !important;
  box-shadow: 0 0 0 3px rgba(214, 169, 79, 0.26), 0 14px 30px rgba(120, 86, 23, 0.25) !important;
  transform: translateY(-3px) scale(1.01);
  transition: transform 0.24s ease, box-shadow 0.24s ease, border-color 0.24s ease;
  animation: sellerCornerPulse 1.15s ease-in-out 4;
}

#sellerCornerCard.seller-corner-focus .service-icon {
  transform: scale(1.08);
  transition: transform 0.24s ease;
}

#sellerCornerCard .seller-corner-indicator {
  position: absolute;
  top: -8px;
  right: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 82px;
  padding: 7px 12px;
  border-radius: 10px;
  border: 1px solid rgba(214, 169, 79, 0.7);
  background: linear-gradient(180deg, #ffe9a9 0%, #f8cf5d 100%);
  color: #6a4a09;
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px) scale(0.98);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
  box-shadow: 0 8px 18px rgba(137, 97, 18, 0.24);
  z-index: 5;
}

#sellerCornerCard.seller-corner-focus .seller-corner-indicator {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
  animation: sellerCornerAttention 0.9s ease-in-out 6;
}

#sellerCornerCard.seller-corner-focus .service-icon i {
  animation: sellerCornerIconJump 0.75s ease-in-out infinite;
}

#sellerCornerRegisterBtn.seller-corner-cta-focus {
  position: relative;
  z-index: 3;
  transform: translateY(-1px) scale(1.03);
  box-shadow: 0 0 0 3px rgba(214, 169, 79, 0.28), 0 10px 20px rgba(120, 86, 23, 0.28) !important;
  animation: sellerCornerCtaPulse 1s ease-in-out 6;
}

#factoryCornerCard {
  position: relative;
}

#factoryCornerCard.factory-corner-focus {
  position: relative;
  z-index: 2;
  border-color: #c8952f !important;
  box-shadow: 0 0 0 3px rgba(214, 169, 79, 0.26), 0 14px 30px rgba(120, 86, 23, 0.25) !important;
  transform: translateY(-3px) scale(1.01);
  transition: transform 0.24s ease, box-shadow 0.24s ease, border-color 0.24s ease;
  animation: sellerCornerPulse 1.15s ease-in-out 4;
}

#factoryCornerCard.factory-corner-focus .factory-service-icon {
  transform: scale(1.08);
  transition: transform 0.24s ease;
}

#factoryCornerCard .factory-corner-indicator {
  position: absolute;
  top: -8px;
  right: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 82px;
  padding: 7px 12px;
  border-radius: 10px;
  border: 1px solid rgba(214, 169, 79, 0.7);
  background: linear-gradient(180deg, #ffe9a9 0%, #f8cf5d 100%);
  color: #6a4a09;
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px) scale(0.98);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
  box-shadow: 0 8px 18px rgba(137, 97, 18, 0.24);
  z-index: 5;
}

#factoryCornerCard.factory-corner-focus .factory-corner-indicator {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
  animation: sellerCornerAttention 0.9s ease-in-out 6;
}

#factoryCornerCard.factory-corner-focus .factory-service-icon i {
  animation: sellerCornerIconJump 0.75s ease-in-out infinite;
}

#factoryCornerRegisterBtn.factory-corner-cta-focus {
  position: relative;
  z-index: 3;
  transform: translateY(-1px) scale(1.03);
  box-shadow: 0 0 0 3px rgba(214, 169, 79, 0.28), 0 10px 20px rgba(120, 86, 23, 0.28) !important;
  animation: sellerCornerCtaPulse 1s ease-in-out 6;
}

#factoryCornerRegisterBtn.factory-corner-cta-focus::after {
  content: "";
  position: absolute;
  inset: -8px;
  border-radius: 999px;
  border: 2px solid rgba(214, 169, 79, 0.72);
  pointer-events: none;
  animation: sellerCornerRingPulse 0.85s ease-out infinite;
}

#sellerCornerRegisterBtn.seller-corner-cta-focus::after {
  content: "";
  position: absolute;
  inset: -8px;
  border-radius: 999px;
  border: 2px solid rgba(214, 169, 79, 0.72);
  pointer-events: none;
  animation: sellerCornerRingPulse 0.85s ease-out infinite;
}

@keyframes sellerCornerPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(214, 169, 79, 0.38), 0 8px 22px rgba(120, 86, 23, 0.18);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(214, 169, 79, 0), 0 16px 30px rgba(120, 86, 23, 0.25);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(214, 169, 79, 0), 0 8px 22px rgba(120, 86, 23, 0.18);
  }
}

@keyframes sellerCornerCtaPulse {
  0% {
    transform: translateY(0) scale(1);
  }
  50% {
    transform: translateY(-2px) scale(1.04);
  }
  100% {
    transform: translateY(0) scale(1);
  }
}

@keyframes sellerCornerRingPulse {
  0% {
    opacity: 0.95;
    transform: scale(0.9);
  }
  100% {
    opacity: 0;
    transform: scale(1.2);
  }
}

@keyframes sellerCornerAttention {
  0% {
    transform: translateY(0) scale(1);
  }
  50% {
    transform: translateY(-2px) scale(1.03);
  }
  100% {
    transform: translateY(0) scale(1);
  }
}

@keyframes sellerCornerArrowWiggle {
  0%,
  100% {
    transform: translateX(0);
  }
  50% {
    transform: translateX(-4px);
  }
}

@keyframes sellerCornerIconJump {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-3px);
  }
}

@media (prefers-reduced-motion: reduce) {
  #sellerCornerCard.seller-corner-focus {
    animation: none;
    transform: none;
  }

  #sellerCornerCard.seller-corner-focus .service-icon i,
  #sellerCornerCard.seller-corner-focus .seller-corner-indicator,
  #sellerCornerCard.seller-corner-focus .seller-corner-indicator i,
  #sellerCornerRegisterBtn.seller-corner-cta-focus::after {
    animation: none;
  }

  #sellerCornerRegisterBtn.seller-corner-cta-focus {
    animation: none;
    transform: none;
  }
}

@media (max-width: 768px) {
  #our-partners,
  #our-partners-title,
  #our-factories-block,
  #our-factories-title {
    scroll-margin-top: 120px;
  }

  #sellerCornerCard.seller-corner-focus {
    transform: none;
  }

  #sellerCornerRegisterBtn.seller-corner-cta-focus {
    transform: none;
  }

  #factoryCornerCard.factory-corner-focus {
    transform: none;
  }

  #factoryCornerRegisterBtn.factory-corner-cta-focus {
    transform: none;
  }

  #sellerCornerCard .seller-corner-indicator {
    top: -6px;
    right: 10px;
    min-width: 74px;
    padding: 6px 10px;
  }

  #factoryCornerCard .factory-corner-indicator {
    top: -6px;
    right: 10px;
    min-width: 74px;
    padding: 6px 10px;
  }
}

/* Global compact tuning: smaller rectangles + cleaner text rhythm */
body.home-page {
  --compact-card-radius: 14px;
  --compact-card-gap: clamp(10px, 1.1vw, 16px);
  --compact-text-line: 1.75;
}

body.home-page .products-grid,
body.home-page .categories-grid,
body.home-page .services-grid,
body.home-page .features-grid,
body.home-page .gallery-grid,
body.home-page .footer-content {
  gap: var(--compact-card-gap) !important;
}

body.home-page .category-card,
body.home-page .product-card,
body.home-page .feature-item,
body.home-page .service-card,
body.home-page .brand-card,
body.home-page .hot-offer-card,
body.home-page .factory-feature-card,
body.home-page .factory-store-card,
body.home-page .account-card,
body.home-page .registration-gate-card {
  border-radius: var(--compact-card-radius) !important;
}

body.home-page .category-card p,
body.home-page .product-card p,
body.home-page .feature-item p,
body.home-page .service-card p,
body.home-page .brand-card p,
body.home-page .hot-offer-card p,
body.home-page .factory-feature-card p,
body.home-page .factory-store-card p,
body.home-page .footer-col p,
body.home-page .footer-col li {
  line-height: var(--compact-text-line) !important;
}

body.home-page .footer .footer-content {
  display: grid !important;
  grid-template-columns: minmax(260px, 1.25fr) minmax(220px, 0.75fr) !important;
  align-items: start !important;
}

body.home-page .footer .footer-col {
  min-width: 0;
}

body.home-page .footer .footer-col p {
  margin-top: 8px;
  max-width: 68ch;
  text-align: right;
}

body.home-page .footer .contact-list li {
  padding-block: 4px;
}

/* Strict lock: keep footer information design only on homepage. */
body:not(.home-page) .footer {
  display: none !important;
}

@media (min-width: 1024px) {
  body.home-page .category-card,
  body.home-page .product-card,
  body.home-page .service-card,
  body.home-page .brand-card,
  body.home-page .hot-offer-card,
  body.home-page .feature-item,
  body.home-page .factory-feature-card,
  body.home-page .factory-store-card {
    padding: clamp(10px, 0.9vw, 14px) !important;
  }

  body.home-page .feature-item,
  body.home-page .service-card,
  body.home-page .factory-feature-card,
  body.home-page .factory-store-card {
    min-height: unset !important;
  }

  body.home-page .section-header h2,
  body.home-page .feature-item h3,
  body.home-page .service-card h3,
  body.home-page .category-card h3,
  body.home-page .product-card h3,
  body.home-page .footer h3,
  body.home-page .footer h4 {
    line-height: 1.35;
    margin-bottom: 8px;
  }
}

@media (max-width: 768px) {
  body.home-page .footer .footer-content {
    grid-template-columns: 1fr !important;
  }
}

/* === Performance: content-visibility for below-fold sections === */
.products,
.deals-section,
.partners-section,
.factories-section,
.categories-section,
.faq-section,
.newsletter-section,
.testimonials-section,
.mega-discounts-section {
  content-visibility: auto;
  contain-intrinsic-size: 0 600px;
}

/* === Remove any remaining backdrop-filter from hero (perf critical) === */
.hero .hero-content,
.hero .hero-badge {
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}
