@import "price-anchoring.css";
@import "social-proof.css";
@import "amazon-template.css";
/* Accessibility improvements */
.screen-reader-text {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.wc-curated-grid {
  display: grid;
  grid-template-columns: repeat(var(--columns, 3), 1fr);
  grid-auto-flow: dense;
  grid-auto-rows: minmax(100px, auto);
  gap: 20px;
  padding: 20px;
  background: #f9f9f9;
  font-size: 13px;
}

.wc-curated-grid a {
  text-decoration: none !important;
}

.curated-item {
  position: relative;
  background: #fff;
  border-radius: 4px;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  border: 1px solid #ddd;
}

.curated-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.curated-item.is-pinned {
  order: -1;
  cursor: default;
}

/* Image wrapper styles */
.image-wrapper {
  position: relative;
  width: 100%;
  padding-top: 100%; /* 1:1 aspect ratio by default */
  overflow: hidden;
}

.image-wrapper img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: auto;
  object-fit: cover;
  transition: opacity 0.3s ease;
}

/* Video styles for frontend */
.video-preview {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.video-preview video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  top: 0;
  left: 0;
}

/* Optional: Add hover effect to show video controls */
.video-preview:hover video {
  opacity: 0.8;
}

/* Badge and Countdown styles for frontend */
.product-badge {
  position: absolute;
  z-index: 10;
  padding: 4px 8px;
  font-size: 12px;
  font-weight: bold;
  border-radius: 4px;
  color: white;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.product-countdown {
  position: absolute;
  bottom: 8px;
  left: 8px;
  right: 8px;
  background: rgba(0, 0, 0, 0.8);
  color: #fff;
  padding: 6px 10px;
  border-radius: 4px;
  font-size: 11px;
  text-align: center;
  z-index: 10;
}

.product-countdown .countdown-text {
  font-weight: 600;
  margin-bottom: 2px;
  display: block;
}

.product-countdown .countdown-timer {
  font-family: monospace;
  font-size: 12px;
}

.curated-item.product .product-countdown {
  bottom: 85px !important;
}

/* Countdown Display Styles */
.countdown-display {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  flex-wrap: wrap;
}

.countdown-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  min-width: 40px;
}

.countdown-number {
  font-size: 14px;
  font-weight: bold;
  line-height: 1;
  margin-bottom: 2px;
}

.countdown-label {
  font-size: 8px;
  font-weight: 600;
  text-transform: uppercase;
  line-height: 1;
  opacity: 0.9;
}

.countdown-separator {
  font-size: 14px;
  font-weight: bold;
  margin: 0 4px;
  align-self: flex-start;
  margin-top: 2px;
}

/* Badge positions */
.product-badge[style*="top: 8px; left: 8px;"] {
  top: 8px;
  left: 8px;
}

.product-badge[style*="top: 8px; right: 8px;"] {
  top: 8px;
  right: 8px;
}

.product-badge[style*="bottom: 8px; left: 8px;"] {
  bottom: 8px;
  left: 8px;
}

.product-badge[style*="bottom: 8px; right: 8px;"] {
  bottom: 8px;
  right: 8px;
}

/* Responsive adjustments for badges and countdowns */
@media (max-width: 768px) {
  .product-badge {
    font-size: 10px;
    padding: 3px 6px;
  }

  .product-countdown {
    padding: 4px 8px;
    font-size: 10px;
  }

  .product-countdown .countdown-text {
    font-size: 9px;
  }

  .product-countdown .countdown-timer {
    font-size: 10px;
  }

  .countdown-display {
    gap: 6px;
  }

  .countdown-item {
    min-width: 35px;
  }

  .countdown-number {
    font-size: 12px;
  }

  .countdown-label {
    font-size: 7px;
  }

  .countdown-separator {
    font-size: 12px;
    margin: 0 3px;
  }
}

@media (max-width: 480px) {
  .product-badge {
    font-size: 9px;
    padding: 2px 4px;
  }

  .product-countdown {
    padding: 3px 6px;
    font-size: 9px;
  }

  .product-countdown .countdown-text {
    font-size: 8px;
  }

  .product-countdown .countdown-timer {
    font-size: 9px;
  }

  .countdown-display {
    gap: 4px;
  }

  .countdown-item {
    min-width: 30px;
  }

  .countdown-number {
    font-size: 10px;
  }

  .countdown-label {
    font-size: 6px;
  }

  .countdown-separator {
    font-size: 10px;
    margin: 0 2px;
  }
}

.hover-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.hover-image img {
  width: 100%;
  height: auto !important;
  object-fit: cover;
}

.curated-item:hover .hover-image {
  opacity: 1;
}

/* Custom content styles */
.curated-item.custom-content {
  display: flex;
  flex-direction: column;
}

.curated-item.custom-content .image-wrapper {
  height: 100%;
  position: static;
}
.curated-item.custom-content .image-wrapper img {
  height: 100% !important;
}

.curated-item.custom-content .content-wrapper {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  /* padding: 20px; */
  display: flex;
  flex-direction: column;
  color: #fff;
  z-index: 1;
}
.curated-item.custom-content .content-wrapper-inner {
  padding: 20px;
}

/* Size variations */
.curated-item.size-1-1 {
  grid-column: auto;
  grid-row: auto;
}

.curated-item.size-2-1 {
  grid-column: span 2;
  grid-row: auto;
}
.curated-item.size-2-1 .image-wrapper {
  padding-top: 70%;
}

.curated-item.size-2-2 {
  grid-column: span 2;
  grid-row: span 2;
}

.curated-item.size-full {
  grid-column: 1 / -1;
  grid-row: auto;
}
.curated-item.size-full .image-wrapper {
  padding-top: 33%;
}

/* Alignment classes */
.content-wrapper.align-top {
  justify-content: flex-start;
}

.content-wrapper.align-center {
  justify-content: center;
}

.content-wrapper.align-bottom {
  justify-content: flex-end;
}

.content-wrapper.justify-left {
  align-items: flex-start;
  text-align: left;
}

.content-wrapper.justify-center {
  align-items: center;
  text-align: center;
}

.content-wrapper.justify-right {
  align-items: flex-end;
  text-align: right;
}

/* Product styles */
.curated-item.product .product-details {
  padding: 15px;
  text-align: center;
}

.curated-item.product h3,
.curated-item.product .wc-title {
  margin: 0 0 8px;
  font-weight: var(--title-font-weight, 600);
  font-size: 14px;
  line-height: 1.4;
  font-style: var(--title-font-style, normal);
  text-decoration: var(--title-text-decoration, none);
  color: var(--title-color, #000000);
  text-transform: none;
  letter-spacing: normal;
}

.curated-item.product .price {
  color: var(--content-color, #666);
  font-size: 13px;
  font-style: var(--content-font-style, normal);
  font-weight: var(--content-font-weight, normal);
  text-decoration: var(--content-text-decoration, none);
}

.curated-item.product .button {
  display: inline-block;
  padding: 8px 16px;
  background: #333;
  color: #fff;
  text-decoration: none;
  border-radius: 4px;
  transition: background 0.2s ease;
}

.curated-item.product .button:hover {
  background: #444;
}

/* Typography */
.content-wrapper .h1,
.content-wrapper .h2,
.content-wrapper .h3,
.content-wrapper .h4,
.content-wrapper .h5,
.content-wrapper .h6 {
  margin: 0 0 10px;
  line-height: 1.4;
}

.content-wrapper .h1,
.curated-item.product .h1 {
  font-size: 2.5em;
  /* font-weight: 700; */
}

.content-wrapper .h2,
.curated-item .h2,
.curated-item.product .h2 {
  font-size: 2em;
  /* font-weight: 700; */
}

.content-wrapper .h3,
.curated-item .h3,
.curated-item.product .h3 {
  font-size: 1.75em;
  /* font-weight: 600; */
}

.content-wrapper .h4,
.curated-item .h4,
.curated-item.product .h4 {
  font-size: 1.5em;
  /* font-weight: 500; */
}

.content-wrapper .h5,
.curated-item .h5,
.curated-item.product .h5 {
  font-size: 1.25em;
  /* font-weight: 500; */
}

.content-wrapper .h6,
.curated-item .h6,
.curated-item.product .h6 {
  font-size: 1em;
  /* font-weight: 500; */
}

/* Content text sizes */
.content-wrapper .content.p {
  font-size: 1em;
  line-height: 1.6;
}

.content-wrapper .content.small {
  font-size: 0.875em;
}

.content-wrapper .content.large {
  font-size: 1.125em;
}

/* Button styles */
.content-wrapper .button {
  display: inline-block;
  padding: 8px 16px;
  background: #fff;
  color: #333;
  text-decoration: none;
  border-radius: 4px;
  transition: background 0.2s ease, color 0.2s ease;
}

.content-wrapper .button:hover {
  background: #333;
  color: #fff;
}

/* Pagination */
.wc-curated-pagination {
  margin-top: 30px;
  text-align: center;
}

.wc-curated-pagination .page-numbers {
  display: inline-block;
  padding: 8px 12px;
  margin: 0 4px;
  border: 1px solid #ddd;
  border-radius: 4px;
  text-decoration: none;
  color: #333;
  transition: background 0.2s ease, color 0.2s ease;
}

.wc-curated-pagination .page-numbers.current {
  background: #333;
  color: #fff;
  border-color: #333;
}

.wc-curated-pagination .page-numbers:hover:not(.current) {
  background: #f5f5f5;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .wc-curated-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .curated-item.size-2-1,
  .curated-item.size-2-2 {
    grid-column: span 2;
  }
}

@media (max-width: 480px) {
  .wc-curated-grid {
    grid-template-columns: 1fr;
  }

  .curated-item.size-2-1,
  .curated-item.size-2-2 {
    grid-column: span 1;
  }
}

/* Custom */
.curated-item a,
.curated-item .curated-item-inner {
  height: 100%;
}
.curated-item.is-video.size-2-2 .image-wrapper,
.curated-item.is-video.size-2-1 .image-wrapper,
.curated-item.is-video.size-1-1 .image-wrapper,
.curated-item.is-video.size-full .image-wrapper {
  position: static;
}
.curated-item.is-video.size-2-2 .image-wrapper video {
  object-fit: contain;
}

/* Modal Styles */
.wc-curated-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  backdrop-filter: blur(2px);
}

.wc-curated-modal {
  background: white;
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  max-width: 90%;
  max-height: 90%;
  width: 600px;
  overflow: hidden;
  animation: modalSlideIn 0.3s ease-out;
}

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

.wc-curated-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid #e5e5e5;
  background: #f8f9fa;
}

.wc-curated-modal-title {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 600;
  color: #333;
}

.wc-curated-modal-close {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: #666;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.wc-curated-modal-close:hover {
  background-color: #e5e5e5;
  color: #333;
}

.wc-curated-modal-content {
  padding: 24px;
  max-height: 60vh;
  overflow-y: auto;
  line-height: 1.6;
}

.wc-curated-modal-content h1,
.wc-curated-modal-content h2,
.wc-curated-modal-content h3,
.wc-curated-modal-content h4,
.wc-curated-modal-content h5,
.wc-curated-modal-content h6 {
  margin-top: 0;
  margin-bottom: 16px;
}

.wc-curated-modal-content p {
  margin-bottom: 16px;
}

.wc-curated-modal-content img {
  max-width: 100%;
  height: auto;
  border-radius: 4px;
}

.wc-curated-modal-content a {
  color: #0073aa;
  text-decoration: none;
}

.wc-curated-modal-content a:hover {
  text-decoration: underline;
}

/* Responsive modal */
@media (max-width: 768px) {
  .wc-curated-modal {
    width: 95%;
    max-height: 95%;
  }

  .wc-curated-modal-header {
    padding: 16px 20px;
  }

  .wc-curated-modal-title {
    font-size: 1.1rem;
  }

  .wc-curated-modal-content {
    padding: 20px;
    max-height: 70vh;
  }
}

@media (max-width: 480px) {
  .wc-curated-modal {
    width: 98%;
    max-height: 98%;
  }

  .wc-curated-modal-header {
    padding: 12px 16px;
  }

  .wc-curated-modal-title {
    font-size: 1rem;
  }

  .wc-curated-modal-content {
    padding: 16px;
    max-height: 80vh;
  }
}

/* Toast Notification Styles */
.wc-curated-toast {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 9999;
  max-width: 350px;
  padding: 16px 20px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
  color: #fff;
  transform: translateX(400px);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  gap: 12px;
}

.wc-curated-toast.show {
  transform: translateX(0);
}

.wc-curated-toast.success {
  background: linear-gradient(135deg, #4caf50, #45a049);
  border-left: 4px solid #2e7d32;
}

.wc-curated-toast.error {
  background: linear-gradient(135deg, #f44336, #d32f2f);
  border-left: 4px solid #b71c1c;
}

.wc-curated-toast.info {
  background: linear-gradient(135deg, #2196f3, #1976d2);
  border-left: 4px solid #0d47a1;
}

.wc-curated-toast .toast-icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.wc-curated-toast .toast-icon svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.wc-curated-toast .toast-content {
  flex: 1;
  min-width: 0;
}

.wc-curated-toast .toast-title {
  font-weight: 600;
  margin-bottom: 2px;
}

.wc-curated-toast .toast-message {
  opacity: 0.9;
  font-size: 13px;
}

.wc-curated-toast .toast-close {
  flex-shrink: 0;
  background: none;
  border: none;
  color: inherit;
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  opacity: 0.7;
  transition: opacity 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.wc-curated-toast .toast-close:hover {
  opacity: 1;
}

.wc-curated-toast .toast-close svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
}

/* Toast animation for multiple toasts */
.wc-curated-toast + .wc-curated-toast {
  margin-top: 12px;
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
  .wc-curated-toast {
    top: 10px;
    right: 10px;
    left: 10px;
    max-width: none;
    transform: translateY(-100px);
  }

  .wc-curated-toast.show {
    transform: translateY(0);
  }
}

@media (max-width: 480px) {
  .wc-curated-toast {
    padding: 12px 16px;
    font-size: 13px;
  }

  .wc-curated-toast .toast-icon {
    width: 18px;
    height: 18px;
  }

  .wc-curated-toast .toast-icon svg {
    width: 14px;
    height: 14px;
  }
}


/* Button Loader Styles */
.button-loader {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  min-height: 18px;
}

.button-loader .spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top: 2px solid #ffffff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  display: block;
  box-sizing: border-box;
  background: transparent;
}

/* Make sure spinner is visible on any background */
.button-loader .spinner.light {
  border: 2px solid rgba(0, 0, 0, 0.2);
  border-top: 2px solid #000000;
  /* background: rgba(255, 255, 255, 0.8); */
  padding: 2px;
  border-radius: 50%;
}

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

/* Alternative spinner style for buttons with dark backgrounds */
.button-loader .spinner.dark {
  border: 2px solid rgba(0, 0, 0, 0.2);
  border-top: 2px solid #000000;
}

/* Alternative spinner style for buttons with light backgrounds */
.button-loader .spinner.light {
  border: 2px solid rgba(0, 0, 0, 0.1);
  border-top: 2px solid #333333;
}

/* Button states */
button:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

/* Max quantity reached state */
.max-quantity-reached {
  background-color: #ccc !important;
  color: #666 !important;
  cursor: not-allowed !important;
  opacity: 0.7;
}

.max-quantity-reached:hover {
  transform: none !important;
  box-shadow: none !important;
}

/* Ensure button text and loader are properly aligned */
.button-text,
.button-loader {
  display: inline-block;
  vertical-align: middle;
}
