html {
  overflow-anchor: none;
}

/* Custom Swiper pagination as horizontal lines */
.swiper-pagination-bullet {
  width: 32px;
  height: 6px;
  border-radius: 3px;
  background: #fff;
  opacity: 0.4;
  transition: opacity 0.3s, background 0.3s;
  margin: 0 6px !important;
}
.swiper-pagination-bullet-active {
  opacity: 1;
  background: #fff;
}

header {
  position: fixed !important;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  height: 100px !important;
}

@keyframes expandInput {
  from {
    transform: scaleX(0);
    opacity: 0;
  }
  to {
    transform: scaleX(1);
    opacity: 1;
  }
}
.input-animate-expand {
  animation: expandInput 0.3s cubic-bezier(0.4,0,0.2,1) forwards;
  width: 12rem !important;
  opacity: 1 !important;
  visibility: visible !important;
  position: absolute;
  right: 0;
  top: 0;
  z-index: 20;
  background: white;
  border-radius: 0.5rem;
  transition: width 0.3s cubic-bezier(0.4,0,0.2,1), opacity 0.3s, transform 0.3s cubic-bezier(0.4,0,0.2,1);
  transform-origin: right;
  transform: scaleX(1);
}

.search-anim {
  position: relative;
  width: 1rem;
  min-width: 6rem;
  max-width: 12rem;
  transition: width 0.3s cubic-bezier(0.4,0,0.2,1);
  transform-origin: right;
  z-index: 10;
}
.search-anim:hover,
.search-anim:focus {
  width: 12rem;
}

.search-anim:hover ~ #search-text,
.search-anim:focus ~ #search-text {
  display: none;
}

.expand-button:hover {
  background: #F01B23 !important;
  border-color: #F01B23 !important;
  color: white !important;
}

#search-group > .relative {
  width: 1rem;
  transition: width 0.3s cubic-bezier(0.4,0,0.2,1);
}
#search-group > .relative:hover .search-anim,
#search-group > .relative:focus-within .search-anim {
  width: 10rem;
}
#search-group > .relative:hover,
#search-group > .relative:focus-within {
  width: 10rem;
}

body {
  font-family: 'Inter', Arial, sans-serif;
}

.product-swiper-prev, .product-swiper-next {
  width: 36px;
  height: 36px;
  border: 2px solid rgba(0,0,0,0.18);
  border-radius: 50%;
  background: transparent !important;
  color: #252525;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(37,37,37,0.18);
}
.product-swiper-prev::after, .product-swiper-next::after {
  font-size: 22px;
  color: rgba(37,37,37,0.18);
  font-weight: bold;
}

#search-group:focus-within #search-label,
#search-group:hover #search-label {
  opacity: 0;
  transform: translateX(0.5rem);
  transition: all 0.3s;
}

/* Search results dropdown improvements */
#search-results {
  background: #fff;
  border: 1px solid #e5e7eb;
  box-shadow: 0 8px 32px rgba(0,0,0,0.12);
  border-radius: 1rem;
  padding: 0.5rem 0;
  min-width: 320px;
  max-width: 400px;
  max-height: 350px;
  overflow-y: auto;
  z-index: 1000;
}
#search-results .search-result-item {
  display: flex;
  gap: 1rem;
  align-items: center;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #f3f4f6;
  background: transparent;
  transition: background 0.2s;
  cursor: pointer;
}
#search-results .search-result-item:last-child {
  border-bottom: none;
}
#search-results .search-result-item:hover {
  background: #f3f4f6;
}
#search-results .search-result-img {
  width: 3.5rem;
  height: 3.5rem;
  object-fit: cover;
  border-radius: 0.5rem;
  flex-shrink: 0;
}
#search-results .search-result-name {
  font-weight: bold;
  color: #F01B23;
  font-size: 1.1rem;
  margin-bottom: 0.15rem;
}
#search-results .search-result-desc {
  color: #4b5563;
  font-size: 0.95rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 220px;
}

.search-anim.has-value {
  width: 12rem !important;
}

#search-group .search-anim.has-value ~ #search-label {
  opacity: 0;
  transform: translateX(0.5rem);
  transition: all 0.3s;
}

#search-label {
  transition: all 0.3s;
}
#search-label.hide-label {
  opacity: 0;
  transform: translateX(0.5rem);
}


.product-desc-overlay {
  transition: opacity 0.3s;
  will-change: opacity;
  box-shadow: 0 -2px 8px rgba(0,0,0,0.04);
}

#modal-prev, #modal-next {
  width: 48px;
  height: 48px;
  border: 2px solid #e5e7eb;
  border-radius: 50%;
  background: white !important;
  color: #4b5563;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(37,37,37,0.18);
  transition: all 0.3s ease;
}

#modal-prev:hover, #modal-next:hover {
  background: #F01B23 !important;
  border-color: #F01B23;
  color: white;
}

#modal-prev svg, #modal-next svg {
  width: 24px;
  height: 24px;
  pointer-events: none;
  transition: all 0.3s ease;
}

#modal-prev:hover svg, #modal-next:hover svg {
  color: white;
}

#product-modal {
  position: fixed;
  inset: 0;
  background-color: rgba(37, 37, 37, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 50;
  padding: 1rem;
}

#product-modal.hidden {
  display: none;
}

#product-modal > div {
  background: white;
  border-radius: 1rem;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  width: 100%;
  max-width: 56rem;
  max-height: 90vh;
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
  margin: 0;
}

@media (min-width: 768px) {
  #product-modal > div {
    flex-direction: row;
  }
}

/* Custom scrollbar styles */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb {
  background: #F01B23;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #d41820;
}

/* Firefox scrollbar */
* {
  scrollbar-width: thin;
  scrollbar-color: #F01B23 #f1f1f1;
}

/* Modal open styles */
body.modal-open {
  overflow: hidden;
  padding-right: 8px; /* Compensate for scrollbar width to prevent layout shift */
}