/* Qamar Theme - Stylesheet */

/* ===== Base Styles ===== */
.loading {
  opacity: 0.6;
  pointer-events: none;
}

.active {
  color: var(--color-secondary);
}

.removing {
  transform: translateX(-100%);
  opacity: 0;
  transition: all 0.3s ease;
}

/* ===== Line Clamp ===== */
.line-clamp-1 {
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.line-clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ===== Button Styles ===== */
.btn-primary {
  background-color: var(--color-primary);
  color: #fff;
  padding: 0.625rem 1.5rem;
  border-radius: 0.5rem;
  font-weight: 500;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.btn-primary:hover {
  background-color: var(--color-primary-dark);
}

.btn-secondary {
  background-color: transparent;
  color: var(--color-primary);
  border: 1.5px solid var(--color-primary);
  padding: 0.625rem 1.5rem;
  border-radius: 0.5rem;
  font-weight: 500;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.btn-secondary:hover {
  background-color: var(--color-primary);
  color: #fff;
}

/* ===== Scrollbar ===== */
.custom-scrollbar::-webkit-scrollbar {
  width: 4px;
}

.custom-scrollbar::-webkit-scrollbar-track {
  background: transparent;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
  background: var(--color-border);
  border-radius: 2px;
}

/* Hide scrollbar but keep scroll */
.scrollbar-hide {
  -ms-overflow-style: none;
  scrollbar-width: none;
}
.scrollbar-hide::-webkit-scrollbar {
  display: none;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
  background: var(--color-text-secondary);
}

/* ===== Swiper Custom Styles ===== */
.swiper-pagination-bullet {
  background: var(--color-primary) !important;
  opacity: 0.4;
}

.swiper-pagination-bullet-active {
  opacity: 1 !important;
}

.swiper-button-next,
.swiper-button-prev {
  color: var(--color-primary) !important;
  background: rgba(255, 255, 255, 0.9);
  width: 40px !important;
  height: 40px !important;
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

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

/* Swiper equal-height slides */
.swiper-outside-pagination .swiper-wrapper {
  align-items: stretch;
}
.swiper-outside-pagination .swiper-slide {
  height: auto;
}

/* Pagination outside slides (for product sliders) */
.swiper-outside-pagination {
  overflow-x: clip;
  overflow-y: visible;
}

.swiper-outside-pagination > .swiper-pagination {
  position: relative !important;
  bottom: auto !important;
  margin-top: 1.5rem;
}

/* ===== Toast Notifications ===== */
.toast {
  padding: 0.75rem 1.25rem;
  border-radius: 0.5rem;
  color: #fff;
  font-size: 0.875rem;
  font-weight: 500;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  pointer-events: auto;
  animation: toastIn 0.3s ease;
}

.toast-success { background-color: #10b981; }
.toast-error { background-color: #ef4444; }
.toast-warning { background-color: #f59e0b; }
.toast-info { background-color: var(--color-primary); }

@keyframes toastIn {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ===== Overlay ===== */
.overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 40;
  backdrop-filter: blur(2px);
}

/* ===== Drawer ===== */
.drawer {
  position: fixed;
  top: 0;
  bottom: 0;
  width: 100%;
  max-width: 400px;
  background: #fff;
  z-index: 50;
  overflow-y: auto;
  transition: transform 0.3s ease;
}

html[dir="rtl"] .drawer-start {
  right: 0;
  transform: translateX(100%);
}

html[dir="ltr"] .drawer-start {
  left: 0;
  transform: translateX(-100%);
}

html[dir="rtl"] .drawer-end {
  left: 0;
  transform: translateX(-100%);
}

html[dir="ltr"] .drawer-end {
  right: 0;
  transform: translateX(100%);
}

.drawer.open {
  transform: translateX(0) !important;
}

/* ===== Animations ===== */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.animate-fade-in { animation: fadeIn 0.3s ease; }
.animate-slide-up { animation: slideUp 0.4s ease; }

/* ===== Product Card ===== */
.product-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
  transition: box-shadow 0.3s ease;
}

.product-card:hover {
  box-shadow: 0 6px 20px rgba(0,0,0,0.1);
}

/* Image hover zoom (only when .hover-zoom is present) */
.product-card.hover-zoom .card-img img {
  transition: transform 0.45s ease;
}
.product-card.hover-zoom:hover .card-img img {
  transform: scale(1.06);
}

/* Wishlist button on card */
.product-card .wishlist-btn {
  opacity: 0;
  transition: opacity 0.2s ease;
}
.product-card:hover .wishlist-btn {
  opacity: 1;
}
@media (max-width: 768px) {
  .product-card .wishlist-btn {
    opacity: 1;
  }
}


/* ===== Section Header ===== */
.section-header {
  text-align: center;
  margin-bottom: 2rem;
}

.section-header h2 {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 0.5rem;
}

.section-header p {
  color: var(--color-text-secondary);
  font-size: 1rem;
}

/* ===== Loading & Success Animations ===== */
@keyframes spin {
  to { transform: rotate(360deg); }
}

.animate-spin {
  animation: spin 0.8s linear infinite;
}

@keyframes checkPop {
  0% { transform: scale(0); opacity: 0; }
  50% { transform: scale(1.3); }
  100% { transform: scale(1); opacity: 1; }
}

.animate-check {
  animation: checkPop 0.4s ease;
}

/* ===== Cart Item Enter ===== */
@keyframes cartItemEnter {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.cart-item-enter {
  animation: cartItemEnter 0.3s ease-out;
}

/* ===== Rating Stars ===== */
.stars {
  display: inline-flex;
  gap: 2px;
}

.stars .star-filled { color: #fbbf24; }
.stars .star-empty { color: var(--color-border); }

/* ===== Price Range Slider ===== */
.price-slider {
  position: relative;
  height: 28px;
  display: flex;
  align-items: center;
}

.price-slider .slider-track {
  position: absolute;
  width: 100%;
  height: 5px;
  background: var(--color-border);
  border-radius: 9999px;
}

.price-slider .slider-range {
  position: absolute;
  height: 5px;
  background: var(--color-primary);
  border-radius: 9999px;
}

.price-slider input[type="range"] {
  position: absolute;
  width: 100%;
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
  pointer-events: none;
  margin: 0;
  padding: 0;
  height: 5px;
  outline: none;
}

.price-slider input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  pointer-events: auto;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: white;
  border: 2.5px solid var(--color-primary);
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.12);
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.price-slider input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.15);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.18);
}

.price-slider input[type="range"]::-webkit-slider-thumb:active {
  transform: scale(1.2);
}

.price-slider input[type="range"]::-moz-range-thumb {
  pointer-events: auto;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: white;
  border: 2.5px solid var(--color-primary);
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.12);
  cursor: pointer;
}

.price-slider input[type="range"]::-moz-range-track {
  background: transparent;
  border: none;
}
