.xcodee-random-products-wrapper {
  width: 100%;
  margin: 40px 0;
}

.xcodee-products-top-row {
  display: grid;
  grid-template-columns: 1fr 435px;
  gap: 20px;
  margin-bottom: 20px;
}

.xcodee-products-grid {
  display: grid;
  gap: 20px;
}

.xcodee-products-top {
  /* Already set via inline style */
}

.xcodee-products-bottom {
  grid-template-columns: repeat(5, 1fr);
}

.xcodee-product-card {
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  position: relative;
}

.xcodee-product-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.xcodee-product-card a {
  text-decoration: none !important;
}

.xcodee-product-link {
  display: block;
  text-decoration: none;
  color: inherit;
  height: 100%;
  position: relative;
}

.xcodee-product-badge {
  position: absolute;
  top: 0;
  left: 0;
  background: #ff4444;
  color: #fff;
  padding: 5px 12px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  z-index: 2;
  letter-spacing: 0.5px;
  animation: glowPulse 2s ease-in-out infinite;
}

@keyframes glowPulse {
  0%,
  100% {
    box-shadow: 0 2px 8px rgba(255, 68, 68, 0.4);
  }
  50% {
    box-shadow: 0 2px 8px rgba(255, 68, 68, 0.4),
      0 0 20px rgba(255, 68, 68, 0.6), 0 0 30px rgba(255, 68, 68, 0.4);
  }
}

/* Dark overlay on hover */
.xcodee-product-image::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.1);
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 1;
  pointer-events: none;
}

.xcodee-product-card:hover .xcodee-product-image::before {
  opacity: 1;
}

.xcodee-product-actions a {
  pointer-events: auto;
  z-index: 10;
}

.xcodee-product-actions .added_to_cart.wc-forward {
  display: none;
}

.xcodee-product-image {
  width: 100%;
  height: 200px;
  overflow: hidden;

  display: flex;
  align-items: center;
  justify-content: center;
}

/* Action Buttons Overlay */
.xcodee-product-actions {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  gap: 10px;
  opacity: 0;
  transition: all 0.3s ease;
  z-index: 3;
}

.xcodee-product-card:hover .xcodee-product-actions {
  opacity: 1;
}

.xcodee-product-image img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  transition: transform 0.3s ease;
  position: relative;
  z-index: 0;
}

.xcodee-product-card:hover .xcodee-product-image img {
  transform: scale(1.05);
}

.xcodee-product-info {
  padding: 15px;
}

.xcodee-product-title {
  margin: 0 0 10px 0;
  font-size: 14px;
  font-weight: 500;
  color: #333;
  line-height: 1.4;
  min-height: 40px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.xcodee-product-title a {
  text-decoration: none !important;
  color: #333;
}

.xcodee-action-btn {
  width: 44px;
  height: 44px;
  background: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #333;
  text-decoration: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
}

.xcodee-action-btn:hover {
  background: #0071bd;
  color: #fff;
  transform: scale(1.1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  text-decoration: none;
}

.xcodee-action-btn svg {
  width: 20px;
  height: 20px;
}

.xcodee-product-rating {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.xcodee-stars {
  display: flex;
  gap: 2px;
  color: #ffc107;
  font-size: 14px;
  line-height: 1;
}

.xcodee-stars .star {
  display: inline-block;
}

.xcodee-stars .star-full {
  color: #ffc107;
}

.xcodee-stars .star-half {
  color: #ffc107;
  opacity: 0.5;
}

.xcodee-stars .star-empty {
  color: #ddd;
}

.xcodee-rating-value {
  font-size: 12px;
  color: #666;
}

.xcodee-product-price {
  font-size: 16px;
  font-weight: 600;
  color: #333;
}

.xcodee-product-price del {
  color: #999;
  font-size: 14px;
  margin-right: 8px;
}

.xcodee-product-price ins {
  text-decoration: none;
  color: #ff4444;
}

/* Promotion Banner */
.xcodee-promotion-banner {
  border-radius: 8px;
  padding: 40px 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  min-height: 100%;
  background-color: #0071bd;
}

.xcodee-promotion-banner::before {
  content: "";
  position: absolute;
  top: -50%;
  right: -20%;
  width: 300px;
  height: 300px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  z-index: 0;
}

.xcodee-promotion-banner::after {
  content: "";
  position: absolute;
  bottom: -30%;
  left: -10%;
  width: 200px;
  height: 200px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  z-index: 0;
}

.xcodee-promotion-content {
  position: relative;
  z-index: 1;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  text-align: right;
}

.xcodee-promotion-image {
  position: absolute;
  left: -15%;
  top: 35%;
  transform: translateY(-50%);
  width: 300px;
  height: 300px;
  opacity: 0.3;
  z-index: 0;
}

.xcodee-promotion-text {
  width: 100%;
  display: inline-flex;
  flex-direction: column;
  gap: 20px;
  align-items: flex-end;
}

.xcodee-promotion-text a {
  text-decoration: none !important;
}

.xcodee-promotion-title {
  margin: 0 0 10px 0;
  font-size: 28px;
  font-weight: 700;
  color: #fff;
  line-height: 1.2;
}

.xcodee-promotion-description {
  margin: 0 0 20px 0;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.5;
}

.xcodee-promotion-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  color: #333;
  padding: 12px 24px;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  z-index: 1;
}

.xcodee-promotion-button:hover {
  background: var(--e-global-color-5b522ed);
  transform: translateX(-3px);
  text-decoration: none;
  color: #fff;
}

.xcodee-button-arrow {
  font-size: 18px;
  transition: transform 0.3s ease;
}

.xcodee-promotion-button:hover .xcodee-button-arrow {
  transform: translateX(3px);
}

/* Responsive */
@media (max-width: 1024px) {
  .xcodee-products-top-row {
    grid-template-columns: 1fr;
  }

  .xcodee-products-bottom {
    grid-template-columns: repeat(3, 1fr);
  }

  .xcodee-promotion-banner {
    min-height: 300px;
  }
}

@media (max-width: 768px) {
  .xcodee-products-top {
    grid-template-columns: repeat(2, 1fr) !important;
  }

  .xcodee-products-bottom {
    grid-template-columns: repeat(2, 1fr);
  }

  .xcodee-promotion-title {
    font-size: 24px;
  }
}

@media (max-width: 480px) {
  .xcodee-products-top,
  .xcodee-products-bottom {
    grid-template-columns: 1fr !important;
  }

  .xcodee-promotion-title {
    font-size: 20px;
  }

  .xcodee-promotion-description {
    font-size: 12px;
  }
}

/* Loading Spinner */
.xcodee-action-btn.loading {
  pointer-events: none;
  cursor: not-allowed;
}

.xcodee-action-btn .spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(51, 51, 51, 0.3);
  border-top-color: #333;
  border-radius: 50%;
  animation: xcodee-spin 0.6s linear infinite;
}

.xcodee-action-btn.loading .spinner {
  width: 16px;
  height: 16px;
}

/* Spinner Animation */
@keyframes xcodee-spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Alternative: If you want a more visible spinner */
.xcodee-action-btn.loading .spinner {
  width: 18px;
  height: 18px;
  border-width: 2.5px;
}

/* Ensure spinner is centered in button */
.xcodee-action-btn.loading {
  display: flex;
  align-items: center;
  justify-content: center;
}
