/* Swiper / shop / PDP helpers only. Brand colors: use Tailwind (primary, secondary).
   These vars match tailwind.config.js DEFAULT — used where plain CSS cannot use @apply. */
:root {
  --primary: #af5026;
  --secondary: #351713;
}

/* Swiper Navigation Buttons */
.swiper-button-next,
.swiper-button-prev {
  color: var(--secondary);
  background: white;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  opacity: 0;
  transition:
    opacity 0.3s ease,
    background 0.3s ease,
    transform 0.3s ease;
  border: 2px solid var(--secondary);
}

/* Position buttons outside the slider */
.swiper-button-prev {
  left: -25px;
}

.swiper-button-next {
  right: -25px;
}

/* Show buttons on section hover */
.group:hover .swiper-button-next,
.group:hover .swiper-button-prev {
  opacity: 1;
}

.swiper-button-next:after,
.swiper-button-prev:after {
  font-size: 20px;
  font-weight: bold;
}

.swiper-button-next:hover,
.swiper-button-prev:hover {
  background: var(--secondary);
  color: white;
  transform: scale(1.1);
}

.swiper-button-disabled {
  opacity: 0.3 !important;
  cursor: not-allowed;
}

.group:hover .swiper-button-disabled {
  opacity: 0.3 !important;
}

/* Hero Slider Pagination */
.hero-swiper .swiper-pagination {
  bottom: 20px;
}

.hero-swiper .swiper-pagination-bullet {
  width: 12px;
  height: 12px;
  background: white;
  opacity: 0.5;
  transition: all 0.3s ease;
}

.hero-swiper .swiper-pagination-bullet-active {
  opacity: 1;
  background: var(--primary);
  width: 30px;
  border-radius: 6px;
}

/* Promotional banner: same pagination design as hero; sits further below slides */
.promotional-banner-swiper .swiper-pagination {
  position: relative;
  bottom: auto;
  margin-top: 1rem;
  padding-top: 0.25rem;
  line-height: 1;
  display: none;
}

.promotional-banner-swiper .swiper-pagination-bullet {
  width: 12px;
  height: 12px;
  background: var(--secondary);
  opacity: 0.5;
  transition: all 0.3s ease;
  display: none;
}

.promotional-banner-swiper .swiper-pagination-bullet-active {
  opacity: 1;
  background: var(--primary);
  width: 30px;
  border-radius: 6px;
  display: none;
}

/* Product Sliders - Proper Overflow Handling */
.swiper {
  overflow: hidden;
  padding: 10px 0;
  margin: -10px 0;
}

.swiper-wrapper {
  display: flex;
}

/* Allow shadows to be visible - overflow-y visible, overflow-x hidden */
.eid-collection-swiper,
.top-selling-swiper,
.sandal-swiper,
.tarsal-swiper,
.half-loafer-swiper,
.formal-shoes-swiper,
.casual-shoes-swiper {
  overflow-x: visible !important;
  overflow-y: visible !important;
  padding: 20px 0 !important;
  margin: -20px 0 !important;
}

/* Ensure containers don't overflow horizontally */
section {
  overflow-x: hidden;
}

/* Add padding to slides for shadow visibility */
.swiper-slide {
  box-sizing: border-box;
}

/* Product Card Hover Effects */
.product-card:hover .product-card-sizes,
.product-card:hover .product-card-colors,
.product-card:hover .product-card-button {
  opacity: 1;
  transform: translateY(0);
}

/* Catalog card: attribute chips (match product-card.js hover) */
.product-card .product-card-attr-btn {
  transition:
    border-color 0.15s ease,
    color 0.15s ease;
}
.product-card .product-card-sizes .product-card-attr-btn:hover,
.product-card .product-card-colors .product-card-attr-btn:hover {
  border-color: var(--primary);
}
.product-card .product-card-sizes .product-card-attr-btn:hover {
  color: var(--primary);
}

/* Mobile: Always show arrows and product details */
@media (max-width: 1023px) {
  .slider-prev,
  .slider-next {
    opacity: 1 !important;
  }

  .product-card-sizes,
  .product-card-colors,
  .product-card-button {
    opacity: 1 !important;
    transform: translateY(0) !important;
  }
}

.swiper-button-next,
.swiper-button-prev {
  display: none !important;
}

.product-slider .slider-prev,
.product-slider .slider-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  background: white;
  border-radius: 50%;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: 0.3s;
  z-index: 20;
}

.product-slider:hover .slider-prev,
.product-slider:hover .slider-next {
  opacity: 1;
}

.slider-prev {
  left: -15px;
}
.slider-next {
  right: -15px;
}

/* Shop Page - Custom Checkbox Styling */
.offer-checkbox {
  appearance: none;
  -webkit-appearance: none;
  width: 1.25rem;
  height: 1.25rem;
  border: 2px solid #d1d5db;
  border-radius: 0.25rem;
  cursor: pointer;
  position: relative;
  transition: all 0.2s;
}

.offer-checkbox:checked {
  background-color: var(--primary);
  border-color: var(--primary);
}

.offer-checkbox:checked::after {
  content: "✓";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  font-size: 14px;
  font-weight: bold;
}

.offer-checkbox:hover {
  border-color: var(--primary);
}

/* Shop Page - Price Range Slider Styling */
#price-range {
  -webkit-appearance: none;
  appearance: none;
  background: linear-gradient(
    to right,
    var(--primary) 0%,
    var(--primary) 50%,
    #e5e7eb 50%,
    #e5e7eb 100%
  );
  outline: none;
  height: 8px;
  border-radius: 5px;
}

#price-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  background: white;
  border: 3px solid var(--primary);
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

#price-range::-moz-range-thumb {
  width: 20px;
  height: 20px;
  background: white;
  border: 3px solid var(--primary);
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Product Details Page Styles */
.thumbnail-swiper {
  overflow: visible !important;
}

.thumbnail-swiper .swiper-slide {
  transition: transform 0.3s ease;
}

.thumbnail-swiper .swiper-slide:hover {
  transform: scale(1.05);
}

/* Quantity input - hide spinner */
#quantity-input::-webkit-outer-spin-button,
#quantity-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

#quantity-input[type="number"] {
  -moz-appearance: textfield;
}

/* Smooth transitions for interactive elements */
.size-btn,
.color-btn {
  transition: all 0.2s ease;
}

.size-btn:active,
.color-btn:active {
  transform: scale(0.95);
}

/* Product image zoom effect */
#main-image {
  transition: transform 0.3s ease;
}

/* Responsive adjustments */
@media (max-width: 640px) {
  .thumbnail-swiper .swiper-slide {
    padding: 2px;
  }

  #image-counter {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
  }
}

/* Animation for description toggle */
#description-content {
  transition: all 0.3s ease;
  overflow: hidden;
}

/* Hover effects for action buttons */
#share-btn:hover i,
#wishlist-btn:hover i {
  transform: scale(1.2);
  transition: transform 0.2s ease;
}

/* Related products responsive grid */
@media (max-width: 640px) {
  #related-products {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
  }
}

@media (min-width: 641px) and (max-width: 768px) {
  #related-products {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 769px) and (max-width: 1024px) {
  #related-products {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* Image Zoom Lens Effect */
#image-container {
  position: relative;
  cursor: crosshair;
}

#zoom-lens {
  position: absolute;
  border: 3px solid #003342;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.4);
  pointer-events: none;
  z-index: 100;
}

#zoom-result {
  position: absolute;
  border: 2px solid #003342;
  width: 300px;
  height: 300px;
  background-color: white;
  background-repeat: no-repeat;
  border-radius: 8px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  z-index: 200;
  top: 0;
  left: calc(100% + 20px);
}

@media (max-width: 1024px) {
  #zoom-lens,
  #zoom-result {
    display: none !important;
  }
}
