/* WooCommerce Premium Showcase - Exact Reference Design */
.wc-premium-showcase-container {
  max-width: 100%;
  margin: 0 auto;
  padding: 30px 20px;
  background: #fff;
  clear: both;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* Grid Layout - 5 Columns for Desktop */
.wc-premium-showcase-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 20px;
  padding: 0;
  margin: 0;
  align-items: center;
  justify-content: center;
}

.wc-premium-product-card {
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  border: 1px solid #f0f0f0;
  display: flex;
  flex-direction: column;
  cursor: pointer;
   
}

.wc-premium-product-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.15);
}

.product-image-wrapper {
  position: relative;
  width: 100%;
  height: 200px;
  background: #f8f9fa;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 16px 16px 0 0;
}

.product-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.wc-premium-product-card:hover .product-image {
  transform: scale(1.08);
}

/* Make entire card clickable */
.product-card-link {
  text-decoration: none;
  color: inherit;
  display: block;
  position: relative;
  z-index: 1;
}

.product-card-link:hover {
  text-decoration: none;
  color: inherit;
}

/* Quick View Eye Icon - Always Visible */
.quick-view-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(0, 0, 0, 0.8);
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  z-index: 20;
  opacity: 1;
}

.quick-view-btn:hover {
  background: rgba(0, 0, 0, 0.9);
  transform: scale(1.1);
}

.quick-view-btn svg {
  width: 20px;
  height: 20px;
  color: white;
}

.product-info {
  padding: 20px 16px;
  text-align: left;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.product-title {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.4;
  color: #1f2937;
  min-height: auto;
  display: flex;
  align-items: center;
  text-align: center;
  justify-content: center;
}

.product-title a {
  text-decoration: none;
  color: inherit;
  transition: color 0.3s ease;
}

.product-title a:hover {
  color: #059669;
}

.product-actions {
  margin-top: auto;
  position: relative;
  z-index: 10;
}

.click-to-order-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: #10b981;
  color: white;
  text-decoration: none;
  padding: 12px 20px;
  border-radius: 25px;
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
  width: 100%;
  position: relative;
  overflow: hidden;
  z-index: 15;
}

.click-to-order-btn:hover {
  background: #059669;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(16, 185, 129, 0.4);
  color: white;
  text-decoration: none;
}

.click-to-order-btn .cart-icon {
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  transform: translateX(0);
}

.click-to-order-btn:hover .cart-icon {
  animation: cartSlideLeft 0.4s ease forwards;
}

.click-to-order-btn:not(:hover) .cart-icon {
  animation: cartSlideRight 0.4s ease forwards;
}

@keyframes cartSlideLeft {
  0% {
    transform: translateX(0);
  }
  50% {
    transform: translateX(-20px);
    opacity: 0.5;
  }
  100% {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes cartSlideRight {
  0% {
    transform: translateX(0);
  }
  50% {
    transform: translateX(20px);
    opacity: 0.5;
  }
  100% {
    transform: translateX(0);
    opacity: 1;
  }
}

.cart-icon svg {
  width: 16px;
  height: 16px;
}

/* Modal Styles - Clean Design */
.wc-premium-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 999999;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(8px);
  animation: modalFadeIn 0.3s ease;
}

.modal-container {
  position: relative;
  width: 90%;
  max-width: 1000px;
  max-height: 90vh;
  margin: 5vh auto;
  background: white;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.3);
  animation: modalSlideIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 30px;
  background: #faf7f2;
  border-bottom: 1px solid #e5e7eb;
}

.modal-title {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  color: #1f2937;
}

.modal-close {
  background: none;
  border: none;
  color: #6b7280;
  cursor: pointer;
  padding: 8px;
  border-radius: 50%;
  transition: all 0.3s ease;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-close:hover {
  background: #f3f4f6;
  color: #1f2937;
  transform: scale(1.1);
}

.modal-content {
  max-height: calc(90vh - 100px);
  overflow-y: auto;
}

.modal-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 30px;
  color: #10b981;
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid #f3f4f6;
  border-top: 4px solid #10b981;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 20px;
}

.modal-product-details {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  padding: 40px;
}

.modal-product-image {
  text-align: center;
}

.modal-main-image {
  width: 100%;
  max-width: 400px;
  height: auto;
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  margin-bottom: 20px;
}

.modal-gallery {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.gallery-thumb {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  border: 2px solid transparent;
}

.gallery-thumb:hover,
.gallery-thumb.active {
  border-color: #10b981;
  transform: scale(1.1);
}

.modal-product-info {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.modal-product-title {
  font-size: 28px;
  font-weight: 700;
  color: #1f2937;
  margin: 0;
  line-height: 1.3;
}

.modal-product-price {
  font-size: 24px;
  font-weight: 700;
  color: #1f2937;
}

.modal-product-rating {
  display: flex;
  align-items: center;
  gap: 10px;
}

.rating-count {
  color: #6b7280;
  font-size: 14px;
}

.modal-product-stock .in-stock {
  color: #059669;
  font-weight: 600;
  background: #d1fae5;
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 14px;
}

.modal-product-stock .out-of-stock {
  color: #dc2626;
  font-weight: 600;
  background: #fee2e2;
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 14px;
}

.modal-product-description {
  color: #4b5563;
  line-height: 1.6;
  font-size: 16px;
}

.modal-product-meta {
  background: #faf7f2;
  padding: 20px;
  border-radius: 12px;
  font-size: 14px;
  color: #6b7280;
}

.meta-item {
  margin-bottom: 8px;
}

.modal-actions {
  margin-top: 24px;
}

.go-to-product-btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: #10b981;
  color: white;
  text-decoration: none;
  padding: 16px 32px;
  border-radius: 25px;
  font-size: 16px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.go-to-product-btn:hover {
  background: #059669;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(16, 185, 129, 0.4);
  color: white;
  text-decoration: none;
}

.go-to-product-btn .cart-icon {
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.go-to-product-btn:hover .cart-icon {
  animation: cartSlideLeft 0.4s ease forwards;
}

/* Responsive Design */
@media (max-width: 1200px) {
  .wc-premium-showcase-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
  }
}

@media (max-width: 992px) {
  .wc-premium-showcase-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
  }
}

@media (max-width: 768px) {
  .wc-premium-showcase-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
  }

  .wc-premium-showcase-container {
    padding: 20px 15px;
  }

  .product-image-wrapper {
    height: 180px;
  }

  .product-info {
    padding: 16px 12px;
  }

  .product-title {
    font-size: 14px;
  }

  .click-to-order-btn {
    padding: 10px 16px;
    font-size: 12px;
  }

  .quick-view-btn {
    width: 36px;
    height: 36px;
    top: 10px;
    right: 10px;
  }

  .quick-view-btn svg {
    width: 18px;
    height: 18px;
  }

  /* Modal responsive */
  .modal-container {
    width: 95%;
    margin: 2.5vh auto;
  }

  .modal-product-details {
    grid-template-columns: 1fr;
    gap: 30px;
    padding: 30px 20px;
  }

  .modal-header {
    padding: 20px;
  }

  .modal-title {
    font-size: 18px;
  }

  .modal-product-title {
    font-size: 24px;
  }

  .modal-product-price {
    font-size: 20px;
  }
}

@media (max-width: 480px) {
  .wc-premium-showcase-grid {
    gap: 12px;
  }

  .product-info {
    padding: 14px 10px;
  }

  .product-title {
    font-size: 13px;
  }

  .click-to-order-btn {
    padding: 8px 14px;
    font-size: 11px;
  }

  .modal-product-details {
    padding: 20px 15px;
  }
}

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

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

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

.wc-premium-product-card {
  animation: fadeInUp 0.6s ease forwards;
}

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

/* Stagger animation for cards */
.wc-premium-product-card:nth-child(1) {
  animation-delay: 0.1s;
}
.wc-premium-product-card:nth-child(2) {
  animation-delay: 0.15s;
}
.wc-premium-product-card:nth-child(3) {
  animation-delay: 0.2s;
}
.wc-premium-product-card:nth-child(4) {
  animation-delay: 0.25s;
}
.wc-premium-product-card:nth-child(5) {
  animation-delay: 0.3s;
}

/* Ensure compatibility */
.wc-premium-showcase-container * {
  box-sizing: border-box;
}

.wc-premium-showcase-grid .wc-premium-product-card {
  float: none !important;
  width: auto !important;
  margin: 0 !important;
}

/* Remove any conflicting styles */
.wc-premium-showcase-container img {
  max-width: 100% !important;
  height: auto;
}

/* Additional CSS to force hide "From" text */
.wc-premium-showcase-container .woocommerce-price-range:before,
.wc-premium-showcase-container .price-range:before {
  content: "" !important;
}

/* Hide any element containing "From" text */
.wc-premium-showcase-container [class*="from"],
.wc-premium-showcase-container [id*="from"] {
  display: none !important;
}
