/* Center the header content */
.section-header-modern {
  display: flex;
  justify-content: center;  /* center horizontally */
  align-items: center;      /* vertical alignment in center */
  flex-direction: column;   /* stack subtitle, title, description */
  margin-bottom: 4rem;
  position: relative;
  padding-bottom: 2rem;
  border-bottom: 1px solid rgba(226, 232, 240, 0.3);
  text-align: center;       /* ensures all text inside is centered */
}

.header-content-modern {
  max-width: 700px;
  width: 100%;
     /* center all inner items */
}

/* Subtitle */
.subtitle-container {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.section-subtitle-modern {
  font-size: 0.875rem;
  font-weight: 700;
  color: #3b82f6;
  text-transform: uppercase;
  letter-spacing: 2px;
  position: relative;
  padding: 0.25rem 0.75rem;
  background: rgba(59, 130, 246, 0.1);
  border-radius: 20px;
  border: 1px solid rgba(59, 130, 246, 0.2);
  backdrop-filter: blur(5px);
}

.subtitle-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, 
    rgba(59, 130, 246, 0.3), 
    rgba(59, 130, 246, 0.1));
}

/* Main Title */
.section-title-modern {
  font-size: clamp(2.5rem, 4vw, 3.5rem);
  font-weight: 800;
  line-height: 1.1;
  margin: 0 0 1rem 0;
  position: relative;
}

.title-text-modern {
  color: #1e293b;
  display: block;
}

.title-accent-modern {
  display: inline-block;
  position: relative;
  background: linear-gradient(135deg, 
    #3b82f6 0%, 
    #8b5cf6 50%, 
    #06b6d4 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-size: 200% auto;
  animation: gradientFlow 3s ease-in-out infinite;
  padding-right: 1rem;
}

@keyframes gradientFlow {
  0%, 100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

.accent-highlight {
  position: absolute;
  bottom: 8px;
  left: 0;
  width: 100%;
  height: 8px;
  background: linear-gradient(90deg, 
    rgba(59, 130, 246, 0.2), 
    rgba(139, 92, 246, 0.2),
    rgba(6, 182, 212, 0.2));
  border-radius: 4px;
  z-index: -1;
  transform: scaleX(0);
  transform-origin: left;
  animation: expandHighlight 1s ease 0.5s forwards;
}

@keyframes expandHighlight {
  to {
    transform: scaleX(1);
  }
}

/* Title Decoration */
.title-decoration {
  display: flex;
  gap: 0.5rem;
  position: absolute;
  right: -40px;
  top: 50%;
  transform: translateY(-50%);
}

.decoration-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #3b82f6;
  opacity: 0.5;
  animation: pulseDots 2s infinite ease-in-out;
}

.dot-1 { animation-delay: 0s; }
.dot-2 { 
  background: #8b5cf6;
  animation-delay: 0.2s; 
}
.dot-3 { 
  background: #06b6d4;
  animation-delay: 0.4s; 
}

@keyframes pulseDots {
  0%, 100% {
    transform: translateY(0);
    opacity: 0.5;
  }
  50% {
    transform: translateY(-5px);
    opacity: 1;
  }
}

/* Description */
.section-description-modern {
  font-size: 1.1rem;
  color: #64748b;
  line-height: 1.6;
  margin: 1.5rem 0 0 0;
  max-width: 500px;
  position: relative;
  padding-left: 1.5rem;
}

.section-description-modern::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.5rem;
  width: 4px;
  height: calc(100% - 1rem);
  background: linear-gradient(to bottom, 
    rgba(59, 130, 246, 0.3), 
    rgba(139, 92, 246, 0.3),
    rgba(6, 182, 212, 0.3));
  border-radius: 2px;
}

/* CTA Button */
.section-cta-modern {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  color: white;
  font-weight: 600;
  text-decoration: none;
  padding: 1rem 1.75rem;
  border-radius: 12px;
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  box-shadow: 
    0 4px 20px rgba(37, 99, 235, 0.25),
    0 1px 3px rgba(0, 0, 0, 0.1),
    inset 0 1px 1px rgba(255, 255, 255, 0.1);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
  overflow: hidden;
}

.cta-icon {
  display: flex;
  align-items: center;
  position: relative;
  transition: transform 0.3s ease;
}

.icon-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 30px;
  height: 30px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.3), transparent 70%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.cta-underline {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, 
    transparent, 
    rgba(255, 255, 255, 0.8), 
    transparent);
  transform: translateX(-100%);
  transition: transform 0.6s ease;
}

/* Hover Effects */
.section-cta-modern:hover {
  transform: translateY(-3px);
  box-shadow: 
    0 12px 40px rgba(37, 99, 235, 0.35),
    0 4px 20px rgba(0, 0, 0, 0.1),
    inset 0 1px 1px rgba(255, 255, 255, 0.2);
}

.section-cta-modern:hover .cta-icon {
  transform: translateX(5px);
}

.section-cta-modern:hover .icon-glow {
  opacity: 1;
}

.section-cta-modern:hover .cta-underline {
  transform: translateX(100%);
}

.section-cta-modern::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, 
    transparent, 
    rgba(255, 255, 255, 0.15), 
    transparent);
  transition: left 0.7s ease;
}

.section-cta-modern:hover::before {
  left: 100%;
}

/* Alternative: With gradient border */
.section-cta-modern.gradient-border {
  background: white;
  color: #3b82f6;
  background-clip: padding-box;
  border: 2px solid transparent;
  position: relative;
}

.section-cta-modern.gradient-border::after {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: linear-gradient(135deg, #3b82f6, #8b5cf6, #06b6d4);
  border-radius: 14px;
  z-index: -1;
  opacity: 0.5;
  transition: opacity 0.3s ease;
}

.section-cta-modern.gradient-border:hover::after {
  opacity: 1;
}

.section-cta-modern.gradient-border:hover {
  background: white;
  color: #3b82f6;
  box-shadow: 0 10px 30px rgba(59, 130, 246, 0.2);
}

/* Responsive Design */
@media (max-width: 1024px) {
  .section-header-modern {
    flex-direction: column;
    align-items: flex-start;
    gap: 2rem;
  }
  
  .title-decoration {
    position: relative;
    right: 0;
    top: 0;
    transform: none;
    margin-top: 1rem;
  }
}

@media (max-width: 768px) {
  .section-title-modern {
    font-size: 2.5rem;
  }
  
  .section-cta-modern {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .section-title-modern {
    font-size: 2rem;
  }
  
  .subtitle-container {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
  
  .subtitle-line {
    width: 100px;
  }
  
  .section-description-modern {
    padding-left: 1rem;
  }
  
  .section-description-modern::before {
    width: 3px;
  }
}

/* Glassmorphism Alternative */
.section-header-modern.glass {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(10px);
  border-radius: 20px;
  padding: 2rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 
    0 8px 32px rgba(0, 0, 0, 0.05),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.section-header-modern.glass .section-subtitle-modern {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(10px);
}

.title-accent {
  background: linear-gradient(135deg, #3b82f6, #8b5cf6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-size: 200% auto;
  animation: gradientShift 3s ease infinite;
}

.section-description {
  font-size: 1.1rem;
  color: #64748b;
  line-height: 1.6;
  margin: 0;
  max-width: 500px;
}

.section-view-all {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: #3b82f6;
  font-weight: 600;
  text-decoration: none;
  padding: 0.75rem 1.5rem;
  border-radius: 10px;
  background: white;
  border: 2px solid #e2e8f0;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.section-view-all::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(59, 130, 246, 0.1), transparent);
  transition: left 0.6s ease;
}

.section-view-all:hover::before {
  left: 100%;
}

.section-view-all:hover {
  color: #2563eb;
  border-color: #3b82f6;
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(59, 130, 246, 0.15);
}

.section-view-all svg {
  transition: transform 0.3s ease;
}

.section-view-all:hover svg {
  transform: translateX(4px);
}

/* Products Grid */
/* Product Grid Layout */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

/* Modern Product Card */
.modern-product-card {
  position: relative;
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
  border: 1px solid rgba(226, 232, 240, 0.8);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 0.6s ease forwards;
}

.modern-product-card:nth-child(1) { animation-delay: 0.1s; }
.modern-product-card:nth-child(2) { animation-delay: 0.2s; }
.modern-product-card:nth-child(3) { animation-delay: 0.3s; }
.modern-product-card:nth-child(4) { animation-delay: 0.4s; }
.modern-product-card:nth-child(5) { animation-delay: 0.5s; }
.modern-product-card:nth-child(6) { animation-delay: 0.6s; }

.modern-product-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
  border-color: #cbd5e1;
}

/* Product Image */
.product-image-container-home {
  position: relative;
  height: 240px;
  overflow: hidden;
  background: #f8fafc;
}

.product-main-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 1.5rem;
  transition: transform 0.6s ease;
}

.modern-product-card:hover .product-main-image {
  transform: scale(1.08);
}

.image-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(to bottom, transparent 60%, rgba(0, 0, 0, 0.1));
  opacity: 0;
  transition: opacity 0.3s ease;
}

.modern-product-card:hover .image-overlay {
  opacity: 1;
}

/* Product Info (Always Visible) */
.product-info {
  padding: 1.25rem;
  background: white;
}

.product-name-link {
  text-decoration: none;
}

.product-name {
  font-size: 1.1rem;
  font-weight: 600;
  color: #1e293b;
  margin: 0 0 0.5rem 0;
  line-height: 1.4;
  transition: color 0.2s ease;
}

.product-name-link:hover .product-name {
  color: #3b82f6;
}

.price-container {
  margin-top: 0.5rem;
}

.price-amount {
  font-size: 1.3rem;
  font-weight: 700;
  color: #10b981;
}

/* ===== FIX FOR QUICK VIEW BUTTON CLICKABILITY ===== */

/* Hover Actions - FIXED VERSION */
.hover-actions {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  padding: 1.5rem;
  z-index: 10;
  /* REMOVE pointer-events: none from here */
}

.modern-product-card:hover .hover-actions {
  opacity: 1;
  visibility: visible;
  /* REMOVE pointer-events: auto from here */
}

/* Action Button - FIXED VERSION */
.action-btn {
  position: relative;
  height: 50px;
  border-radius: 14px;
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.3px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: none;
  cursor: pointer;
  text-decoration: none;
  box-shadow: 0 10px 30px rgba(0,0,0,0.15);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  width: 100%;
  z-index: 20; /* Ensure button is above overlay */
  /* REMOVE pointer-events: auto !important from here */
}

/* Button content - fix positioning */
.action-btn .btn-text,
.action-btn .btn-icon {
  position: absolute;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

/* Remove conflicting pointer-events rules at the bottom of your CSS */

.actions-wrapper {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  width: 100%;
  max-width: 200px;
}

.action-btn {
  position: relative;
  height: 50px;
  border-radius: 14px;
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.3px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: none;
  cursor: pointer;
  text-decoration: none;
  box-shadow: 0 10px 30px rgba(0,0,0,0.15);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

/* Hover lift */
.action-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 40px rgba(0,0,0,0.25);
}

/* Text & Icon positioning */
.btn-text,
.btn-icon {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

/* Initial states */
.btn-text {
  opacity: 1;
}

.btn-icon {
  opacity: 0;
  transform: scale(0.7);
}

/* Hover swap */
.action-btn:hover .btn-text {
  opacity: 0;
  transform: scale(0.9);
}

.action-btn:hover .btn-icon {
  opacity: 1;
  transform: scale(1);
}

/* Light shine animation */
.action-btn::after {
  content: "";
  position: absolute;
  top: 0;
  left: -120%;
  width: 120%;
  height: 100%;
  background: linear-gradient(
    120deg,
    transparent,
    rgba(255,255,255,0.4),
    transparent
  );
  transition: left 0.6s ease;
}

.action-btn:hover::after {
  left: 120%;
}

/* Quick View Modal - Centered & Consistent */
/* Quick View Modal - Fixed and Centered */
.quick-view-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 110%;
  z-index: 9999; /* High z-index to appear above everything */
  display: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  overflow-y: auto;
  padding: 20px;
}

.quick-view-modal.active {
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
  visibility: visible;
}

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  z-index: 9998;
}

.modal-content-wrapper {
  position: relative;
  width: 90%;
  max-width: 900px;
  max-height: 85vh;
  background: white;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  z-index: 10000;
  animation: modalSlideIn 0.3s ease-out;
}

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

.modal-content {
  padding: 2rem;
  max-height: calc(85vh - 4rem);
  overflow-y: auto;
}

/* Close Button */
.modal-close-btn {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 40px;
  height: 40px;
  background: white;
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10001;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  transition: all 0.3s ease;
}

.modal-close-btn:hover {
  transform: rotate(90deg);
  background: #ef4444;
  color: white;
}

/* Modal Grid Layout */
.modal-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: start;
}

/* Modal Images */
.modal-images {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.main-image-container {
  position: relative;
  width: 100%;
  height: 320px;
  background: #f8fafc;
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  border: 1px solid #e2e8f0;
}

.main-modal-image {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  transition: opacity 0.3s ease;
}

.image-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  background: white;
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  transition: all 0.3s ease;
  z-index: 10;
}

.image-nav-btn:hover {
  background: #3b82f6;
  color: white;
}

.prev-btn {
  left: 1rem;
}

.next-btn {
  right: 1rem;
}

.image-dots {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
}

.image-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: none;
  background: #cbd5e1;
  cursor: pointer;
  transition: all 0.3s ease;
}

.image-dot.active {
  background: #3b82f6;
  transform: scale(1.2);
}

/* Modal Details */
.modal-details {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.product-title-modal {
  font-size: 1.5rem;
  font-weight: 700;
  color: #1e293b;
  margin: 0 0 0.75rem 0;
}

.price-sold-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.price-amount-modal {
  font-size: 1.75rem;
  font-weight: 800;
  color: #10b981;
}

.sold-count-container {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: #f8fafc;
  padding: 0.4rem 0.8rem;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
}

.sold-count {
  font-size: 1rem;
  font-weight: 700;
  color: #3b82f6;
}

.sold-text {
  font-size: 0.85rem;
  color: #64748b;
}

.stock-status {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  background: #f8fafc;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
}

.status-label {
  font-weight: 600;
  color: #475569;
}

.status-value {
  font-weight: 700;
  padding: 0.3rem 0.8rem;
  border-radius: 20px;
  font-size: 0.85rem;
}

.status-value.in-stock {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
}

.status-value.out-of-stock {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
}

.product-description-modal {
  padding: 1rem 0;
  border-top: 1px solid #e2e8f0;
  border-bottom: 1px solid #e2e8f0;
}

.product-description-modal p {
  color: #475569;
  line-height: 1.6;
  margin: 0;
  font-size: 0.95rem;
}

/* Quantity Selector */
.quantity-selector {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 1rem 0;
}

.qty-btn {
  width: 42px;
  height: 42px;
  border: 2px solid #e2e8f0;
  background: white;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.2rem;
  font-weight: 600;
  color: #1e293b;
  transition: all 0.2s ease;
}

.qty-btn:hover {
  border-color: #3b82f6;
  background: #3b82f6;
  color: white;
}

.qty-input {
  width: 70px;
  height: 42px;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  text-align: center;
  font-size: 1rem;
  font-weight: 700;
  color: #1e293b;
}

.max-stock {
  font-size: 0.85rem;
  color: #64748b;
  margin-left: 0.5rem;
}

/* Action Buttons */
/* Action Buttons - Compact & Animated */
.action-buttons-modal {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin: 0.75rem 0;
}

.btn-modal {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.625rem 1rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.85rem;
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: none;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  height: 40px;
  position: relative;
  overflow: hidden;
}

/* Add-to-Cart Button */
.add-to-cart-modal {
  background: #3b82f6;
  color: white;
  box-shadow: 0 2px 6px rgba(59, 130, 246, 0.2);
}

.add-to-cart-modal:hover {
  background: #2563eb;
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4);
}

.add-to-cart-modal::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 5px;
  height: 5px;
  background: rgba(255, 255, 255, 0.5);
  opacity: 0;
  border-radius: 100%;
  transform: scale(1, 1) translate(-50%);
  transform-origin: 50% 50%;
}

.add-to-cart-modal:focus:not(:active)::after {
  animation: ripple 1s ease-out;
}

/* Buy Now Button */
.buy-now-modal {
  background: #10b981;
  color: white;
  box-shadow: 0 2px 6px rgba(16, 185, 129, 0.2);
}

.buy-now-modal:hover {
  background: #059669;
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 4px 12px rgba(5, 150, 105, 0.4);
}

.buy-now-modal::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.7s ease;
}

.buy-now-modal:hover::before {
  left: 100%;
}

/* Disabled Button */
.btn-modal.disabled {
  background: #e2e8f0;
  color: #94a3b8;
  cursor: not-allowed;
  box-shadow: none;
}

.btn-modal.disabled:hover {
  transform: none;
  box-shadow: none;
}

/* Icon animation */
.btn-modal svg {
  transition: transform 0.3s ease;
}

.add-to-cart-modal:hover svg {
  animation: cartBounce 0.6s ease;
}

.buy-now-modal:hover svg {
  animation: arrowMove 0.6s ease;
}

@keyframes cartBounce {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-3px);
  }
}

@keyframes arrowMove {
  0%, 100% {
    transform: translateX(0);
  }
  50% {
    transform: translateX(3px);
  }
}

@keyframes ripple {
  0% {
    transform: scale(0, 0);
    opacity: 0.5;
  }
  100% {
    transform: scale(40, 40);
    opacity: 0;
  }
}

/* Button click animation */
.btn-modal:active {
  transform: translateY(0) scale(0.98);
  transition: transform 0.1s ease;
}

/* View Details Link - Smaller */
.view-details-container {
  text-align: center;
  margin-top: 0.75rem;
}

.view-details-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: #3b82f6;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.85rem;
  padding: 0.4rem 0.8rem;
  border-radius: 6px;
  background: rgba(59, 130, 246, 0.08);
  transition: all 0.3s ease;
}

.view-details-link:hover {
  color: #2563eb;
  background: rgba(59, 130, 246, 0.15);
  transform: translateX(3px);
}

.view-details-link svg {
  transition: transform 0.3s ease;
}

.view-details-link:hover svg {
  transform: translateX(3px);
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .btn-modal {
    padding: 0.5rem 0.875rem;
    font-size: 0.8rem;
    height: 36px;
  }
  
  .view-details-link {
    font-size: 0.8rem;
    padding: 0.3rem 0.6rem;
  }
}

/* Loading and Error States */
.modal-loading {
  text-align: center;
  padding: 3rem 2rem;
}

.loading-spinner {
  width: 50px;
  height: 50px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid #3b82f6;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 1rem;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.modal-error {
  text-align: center;
  padding: 2rem;
}

.error-icon {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.error-close-btn {
  background: #3b82f6;
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
}

/* Body scroll lock */
body.modal-open {
  overflow: hidden;
}

/* Responsive Design */
@media (max-width: 992px) {
  .modal-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .main-image-container {
    height: 280px;
  }
}

@media (max-width: 768px) {
  .modal-content-wrapper {
    width: 95%;
    max-height: 90vh;
  }
  
  .modal-content {
    padding: 1.5rem;
  }
  
  .product-title-modal {
    font-size: 1.3rem;
  }
  
  .price-amount-modal {
    font-size: 1.5rem;
  }
  
  .btn-modal {
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
  }
}

@media (max-width: 480px) {
  .quick-view-modal {
    padding: 10px;
  }
  
  .price-sold-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
  
  .quantity-selector {
    flex-wrap: wrap;
  }
  
  .main-image-container {
    height: 220px;
  }
}

/* Sold Out Button */
.action-btn.sold-out-btn {
  background: #e74c3c;   /* Red color */
  color: #fff;
  cursor: not-allowed;
  border: none;
  position: relative;
  overflow: hidden;
}

/* Hover effect for Sold Out */
.action-btn.sold-out-btn:hover {
  background: #c0392b;
  box-shadow: 0 4px 12px rgba(231, 76, 60, 0.3);
}

/* Keep text/icon transition same as other buttons */
.action-btn.sold-out-btn .btn-text {
  display: inline-block;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.action-btn.sold-out-btn .btn-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  opacity: 0;
  transition: all 0.3s ease;
}

.action-btn.sold-out-btn:hover .btn-text {
  transform: translateY(-50%);
  opacity: 0;
}

.action-btn.sold-out-btn:hover .btn-icon {
  opacity: 1;
  position: static;
}

.product-name-link {
  text-decoration: none;
  color: #111;
  transition: color 0.3s ease;
}

.product-name-link:hover .product-name-card {
  color: #0070f3; /* accent color on hover */
}

.product-name-card {
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.product-title-text {
  display: inline-block;
  transition: transform 0.3s ease;
}

.modern-product-card:hover .product-title-text {
  transform: translateY(-2px);
}

/* Center H2 content */
.section-title-modern {
  text-align: center;       /* Centers the text inside */
  display: inline-block;    /* shrink-wrap the h2 width */
  width: 100%;              /* make full width */
}

/* Title text */
.title-text-modern {
  display: block;           /* ensures it is on its own line */
  font-size: clamp(2.5rem, 4vw, 3.5rem);
  font-weight: 800;
  color: #1e293b;
  margin-bottom: 0.5rem;
}

/* Accent title with brand highlight */
.title-accent-modern {
  display: inline-block;
  position: relative;
  font-weight: 800;
  background: linear-gradient(135deg, #3b82f6, #8b5cf6, #06b6d4);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-size: clamp(2.5rem, 4vw, 3.5rem);
}

.brand-highlight {
  position: absolute;
  bottom: 5px;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, transparent, #3b82f6, transparent);
  opacity: 0.5;
  transform: scaleX(0);
  transform-origin: center;
  animation: expandLine 1s ease 1s forwards;
}


@keyframes expandLine {
  to {
    transform: scaleX(1);
  }
}

/********* product responsive *******/
.mobile-actions {
  display: none;
}


@media (hover: none), (max-width: 768px) {

  /* Disable hover overlay */
  .hover-actions {
    display: none !important;
  }

  /* Show mobile actions */
  .mobile-actions {
    display: flex;
    gap: 0.75rem;
    padding: 1rem;
    background: #ffffff;
    border-top: 1px solid #e2e8f0;
  }

  .mobile-btn {
    flex: 1;
    height: 44px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.9rem;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    text-decoration: none;
    transition: all 0.2s ease;
  }

  .mobile-btn.quick-view-btn {
    background: #f1f5f9;
    color: #1e293b;
    border: 1px solid #e2e8f0;
  }

  .mobile-btn.add-cart {
    background: #3b82f6;
    color: #ffffff;
  }

  .mobile-btn.disabled {
    background: #e2e8f0;
    color: #94a3b8;
    cursor: not-allowed;
  }

  .mobile-btn:active {
    transform: scale(0.97);
  }
}




