/* ========== Start Header ============*/
header {
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  position: sticky;
  margin-bottom: 10px !important;
  z-index: 10 !important;
}
header .offers-link {
  color: #1d1f1f !important;
}

.s-cart-summary-total {
  display: none;
}

/* Hide top navbar */
.top-navbar {
  display: none !important;
}

/* Main navigation adjustments */
#mainnav .inner > .container > div > div:nth-child(2) {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0;
}

/* Custom right actions container */
.custom-nav-right-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  /* Prevent layout shift during initialization */
  min-height: 40px;
}

/* Reserve space for custom actions before JS loads */
#mainnav .inner > .container > div > div:nth-child(2):empty {
  min-width: 300px;
  min-height: 40px;
}
/*========= Custom Search Bar Styling ============*/
.custom-header-search {
  position: relative;
  height: 40px;
  transition: all 0.3s ease;
}

.custom-header-search .s-search-container {
  height: 40px;
}

.custom-header-search .s-search-input-wrapper {
  width: 40px;
  height: 40px;
  background: transparent;
  border-radius: 20px;
  transition: all 0.3s ease;
  position: relative;
}

.custom-header-search .s-search-input {
  width: 100%;
  height: 40px !important;
  background: transparent;
  border: 1.8px solid transparent;
  padding: 0 3rem 0 1rem;
  font-size: 14px;
  color: #333;
  border-radius: 20px !important;
  transition: all 0.3s ease;
  cursor: pointer;
  text-align: center;
}

/* Pill appears on focus */
.custom-header-search:focus-within .s-search-input-wrapper {
  background: #ddeaff;
}

.custom-header-search:focus-within .s-search-input {
  border-color: #c8c9ca;
}

.custom-header-search .s-search-input::placeholder {
  color: #6b7280;
  font-size: 14px;
  opacity: 0;
  transition: opacity 0.3s ease;
  text-align: right;
}

/* Icon styling - centered when collapsed, pinned left when expanded */
.custom-header-search .s-search-icon-wrap {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 2;
  transition:
    left 0.3s ease,
    transform 0.3s ease;
}

.custom-header-search:focus-within .s-search-icon-wrap {
  left: 1rem;
  transform: translateY(-50%);
}

.custom-header-search .s-search-icon svg {
  display: none;
}

.custom-header-search .s-search-icon {
  display: block;
  width: 24px;
  height: 24px;
  background-image: url("data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='11' cy='11' r='7' stroke='%231A1A1A' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M16.5 16.5L21 21' stroke='%231A1A1A' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
}

/* Expanded state - expands to RIGHT */
.custom-header-search .s-search-input:focus,
.custom-header-search .s-search-input:active,
.custom-header-search:hover .s-search-input {
  cursor: text;
}

.custom-header-search:focus-within .s-search-input-wrapper,
.custom-header-search .s-search-input-wrapper:focus-within {
  width: 280px;
}

.custom-header-search:focus-within .s-search-input::placeholder,
.custom-header-search .s-search-input:focus::placeholder {
  opacity: 1;
}

.custom-header-search:focus-within .s-search-input,
.custom-header-search .s-search-input:focus {
  padding: 0 1.5rem 0 3rem;
  text-align: right;
}

.s-search-inline {
  min-width: 50px;
}

.custom-header-search .s-search-results {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  left: auto;
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  max-height: 400px;
  overflow-y: auto;
  z-index: 10002;
  width: 280px;
}

nav#mobile-menu {
  padding-top: 10px !important;
}

/* ========== User Menu — Icon Only ========== */
.custom-nav-right-actions salla-user-menu {
  display: flex;
  align-items: center;
  padding: 0;
  align-self: center;
  justify-content: center;
}

.custom-nav-right-actions .s-user-menu-wrapper {
  display: flex;
  align-items: center;
}

.custom-nav-right-actions .s-user-menu-trigger-slot {
  display: flex;
  align-items: center;
}

/* Collapse trigger to a single icon button */
.custom-nav-right-actions .s-user-menu-trigger {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 45px;
  height: 45px;
  cursor: pointer;
  position: relative;
  border-radius: 8px;
  transition: background 0.3s ease;
}

.custom-nav-right-actions .s-user-menu-trigger:hover {
  background: #f3f4f6;
}

/* Hide avatar, greeting, name, chevron */
.custom-nav-right-actions .s-user-menu-avatar-wrap,
.custom-nav-right-actions .s-user-menu-trigger-content,
.custom-nav-right-actions .s-user-menu-trigger-icon {
  display: none !important;
}

/* Person outline icon via ::before on the trigger */
.custom-nav-right-actions .s-user-menu-trigger::before {
  content: "";
  display: block;
  width: 24px;
  height: 24px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%231A1A1A' stroke-width='1.5' stroke-miterlimit='10' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2'/%3E%3Ccircle cx='12' cy='8' r='4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
}

/* ========== Cart Icon Customization ========== */
.custom-nav-right-actions salla-cart-summary {
  margin: 0;
  display: flex;
  justify-content: center;
  /* align-items: center; */
}

.custom-nav-right-actions .s-cart-summary-wrapper {
  display: flex;
  border-radius: 20px;
  background: transparent !important;
  transition: all 0.3s ease;
  text-decoration: none;
  height: 26px;
}

.custom-nav-right-actions .s-cart-summary-wrapper:hover {
  background: #f3f4f6;
  margin: 0;
}

/* Replace bag icon with cart icon */

.custom-nav-right-actions #s-cart-icon {
  position: relative;
  width: 24px;
  height: 24px;
}

.custom-nav-right-actions #s-cart-icon::before {
  content: "";
  position: absolute;
  width: 24px;
  height: 24px;
  background-image: url("data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M2 2H3.74C4.82 2 5.67 2.93 5.58 4L4.75 13.96C4.61 15.59 5.9 16.99 7.54 16.99H18.19C19.63 16.99 20.89 15.81 21 14.38L21.54 6.88C21.66 5.22 20.4 3.87 18.73 3.87H5.82' stroke='%231A1A1A' stroke-width='1.5' stroke-miterlimit='10' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M16.25 22C16.94 22 17.5 21.44 17.5 20.75C17.5 20.06 16.94 19.5 16.25 19.5C15.56 19.5 15 20.06 15 20.75C15 21.44 15.56 22 16.25 22Z' stroke='%231A1A1A' stroke-width='1.5' stroke-miterlimit='10' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M8.25 22C8.94 22 9.5 21.44 9.5 20.75C9.5 20.06 8.94 19.5 8.25 19.5C7.56 19.5 7 20.06 7 20.75C7 21.44 7.56 22 8.25 22Z' stroke='%231A1A1A' stroke-width='1.5' stroke-miterlimit='10' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M9 8H21' stroke='%231A1A1A' stroke-width='1.5' stroke-miterlimit='10' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  display: none;
}

.custom-nav-right-actions .s-cart-summary-count {
  position: absolute;
  top: 1px;
  right: -10px;
  background: #ef4444;
  color: white;
  font-size: 11px;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  padding: 2px;
  border: 2px solid white;
}

.custom-nav-right-actions .s-cart-summary-content {
  display: none;
}

/* Show cart total on hover */
.custom-nav-right-actions
  .s-cart-summary-wrapper:hover
  .s-cart-summary-content {
  display: block;
  font-size: 13px;
  color: #dcb387;
  font-weight: 600;
}

.custom-nav-right-actions a {
  justify-self: center;
}
.custom-nav-right-actions {
  display: flex;
  align-items: center;
  grid-template-columns: 1fr 1fr 1fr;
  justify-content: center;
  flex-direction: row-reverse;
  gap: 7px !important;
  min-height: 40px;
  padding: 0;
}

.s-user-menu-dropdown li a svg {
  color: #dcb387 !important;
}

/*  Header Responsive  */
@media (max-width: 1024px) {
  .custom-header-search {
    display: none !important;
  }
  .custom-header-search {
    width: 220px;
  }

  .main-menu > li > a[href*="offer"] {
    color: #222 !important;
  }
  .custom-nav-right-actions .s-cart-summary-count {
    top: 0px;
    right: -9px;
    min-height: 18px;
  }
}

@media (max-width: 768px) {
  .custom-nav-right-actions {
    gap: 0.75rem;
    grid-template-columns: 1fr 1fr;
  }

  /* Hide search on mobile */
  .custom-header-search {
    display: none !important;
  }

  .custom-nav-right-actions .s-cart-summary-wrapper {
    padding: 0.375rem 0.5rem;
    height: 36px;
  }

  .custom-nav-right-actions #s-cart-icon {
    width: 20px;
    height: 20px;
  }

  .custom-nav-right-actions #s-cart-icon::before {
    width: 20px;
    height: 20px;
  }

  .custom-nav-right-actions salla-user-menu {
    justify-content: end;
  }

  .custom-nav-right-actions .s-cart-summary-icon,
  .custom-nav-right-actions .header-btn__icon {
    display: inline-flex !important;
  }

  .custom-nav-right-actions #s-cart-icon::before {
    display: none !important;
  }
  .custom-nav-right-actions .s-cart-summary-count {
    top: 0px;
    right: -1px;
  }

  .custom-nav-right-actions .s-cart-summary-wrapper {
    height: 23px;
  }
}

@media (max-width: 480px) {
  .custom-nav-right-actions {
    gap: 0.5rem;
  }

  salla-cart-summary {
    margin-right: 3rem;
  }
}

.custom-nav-right-actions #s-cart-icon::before {
  display: none !important;
}

.header-btn {
  display: flex;
  justify-content: center;
}
/* ================== End Header ===================== */

/* ================== Start Global Style ===================== */

.s-product-card-content-main {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: start;
  margin-top: 1rem;
  margin-bottom: 0.6rem;
}

.s-product-card-content-sub {
  justify-content: flex-end;
  display: inline-flex;
  max-width: 80px;
}

.s-product-card-entry {
  height: 100% !important;
}

.s-product-card-content-sub {
  text-align: right;
  width: 100%;
  display: flex;
  justify-content: space-between;
}

.s-product-card-promotion-title {
  padding-bottom: 0.3rem !important;
  padding-top: 0.3rem !important;
}

salla-add-product-button .s-button-element {
  background: #56969e;
  color: #fff !important;
  border-radius: 20px;
}

.s-product-card-vertical .s-product-card-wishlist-btn button {
  border: 1.6px solid #02616e !important;
  color: #02616e;
  font-size: 19px;
  justify-content: center;
  align-items: center;
}

.s-product-card-promotion-title {
  background: #47999c;
  color: #fff;
}

.s-products-slider-card {
  transition: all 0.3s ease;
}

.s-products-slider-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transform: translateY(-5px);
}

.s-products-slider-card.swiper-slide {
  max-height: 445px !important;
}

.carousel-slider .swiper-wrapper {
  padding: 0 !important;
  gap: 20px;
}

.carousel-slider .swiper-wrapper > div {
  padding-left: 0.625rem;
  padding-right: 0.625rem;
  padding: 0 !important;
  border-radius: 21px;
}

/* ================== End Global Style ===================== */