/* WooCommerce Reels Feed Styles */
.wcrf-reels-widget {
  position: relative;
  width: 100%;
  margin: 0 auto;
  font-family: "Sen", sans-serif;
}

.wcrf-reels-container {
  position: relative;
  border: 1px solid #e9ecef;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  background: #ffffff;
}

/* Snap Scroll Mode */
.wcrf-snap-scroll {
  margin-top: 0px;
  position: relative;
  height: 100vh;
  overflow-y: auto;
  scroll-snap-type: y mandatory;
  -webkit-overflow-scrolling: touch;
  background: #000;
}

.wcrf-snap-scroll .wcrf-reel-item {
  scroll-snap-align: start;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  /* background: #000; */
}

/* Grid View Mode */
.wcrf-grid-view .wcrf-reel-item {
  margin-bottom: 2px;
}

.wcrf-grid-view .wcrf-reel-item:last-child {
  margin-bottom: 0;
}

/* Reel Item */
.wcrf-reel-item {
  position: relative;
  background: #ffffff;
}

/* Video Section */
.wcrf-video-section {
  position: relative;
  width: 100%;
  background: #f5f5f5;
  overflow: hidden;
}

.wcrf-video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
  cursor: pointer;
  display: block;
}

/* Video Controls */
.wcrf-video-controls {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  padding: 20px;
  /*     background: linear-gradient(transparent, rgba(0,0,0,0.7)); */
  display: flex;
  align-items: center;
  gap: 15px;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 10;
  justify-content: space-between;
}

.wcrf-video-section:hover .wcrf-video-controls {
  opacity: 1;
}

.wcrf-play-toggle,
.wcrf-mute-toggle,
.wcrf-video-title {
  background: rgba(0, 0, 0, 0.5);
  border: none;
  border-radius: 50%;
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.wcrf-play-toggle:hover,
.wcrf-mute-toggle:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.1);
}

.wcrf-play-toggle svg,
.wcrf-mute-toggle svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
}

.wcrf-progress-bar {
  flex: 1;
  height: 4px;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 2px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.wcrf-progress-fill {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  background: #fff;
  border-radius: 2px;
  width: 0%;
  transition: width 0.1s linear;
}

.wcrf-time-display {
  color: white;
  font-size: 14px;
  min-width: 100px;
  text-align: right;
  font-family: monospace;
  flex-shrink: 0;
}

/* Speaker Icon */
.wcrf-speaker-icon {
  position: absolute;
  bottom: 15px;
  right: 15px;
  background-color: rgba(255, 255, 255, 0.8);
  border-radius: 50%;
  padding: 10px;
  z-index: 5;
  cursor: pointer;
  transition: all 0.2s ease;
}

.wcrf-speaker-icon:hover {
  background-color: rgba(255, 255, 255, 1);
  transform: scale(1.1);
}

.wcrf-speaker-icon i {
  font-size: 24px;
  color: #333;
}

/* Product Details */
.wcrf-product-details {
  padding: 20px;
}

/* View Section */
.wcrf-view-section {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 0 20px 0 !important;
  margin-top: 10px;
  margin-bottom: 10px;
  /* border-bottom: 2px solid #e9ecef; */
}

.wcrf-view-title {
  font-size: 16px;
  font-weight: 500;
  color: #ffffff;
  padding: 7px 14px;
  background: rgba(0, 0, 0, 0.5);
  margin-left: 5px;
  border-radius: 50%;
}

.wcrf-view-link {
  font-size: 16px;
  font-weight: 500;
  color: #dd1b5f !important;
  text-decoration: none;
  transition: color 0.2s ease;
}

.wcrf-view-link:hover {
  text-decoration: underline;
}
.wcrf-faq-link {
  color: #dd1b5f !important;
  font-size: 16px !important;
}

/* Product Header */
.wcrf-product-header {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  padding: 0 20px 10px 20px;
}
.wcrf-turn-on-sound-btn {
  border-radius: 0 !important;
  width: auto !important;
  background: #dd1b5f !important;
}

.wcrf-product-title {
  margin: 10px 0 !important;
  font-size: 18px;
  margin: 0;
  color: #333;
  font-weight: 600;
  line-height: 1.4;
}

.wcrf-wishlist-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: #dd1b5f;
  font-size: 1.5rem;
  padding: 5px;
  transition: all 0.2s ease;
}

.wcrf-wishlist-btn:hover {
  color: #c21855;
  transform: scale(1.1);
}

.wcrf-wishlist-btn.in-wishlist {
  color: #dd1b5f;
}

/* Price Section */
.wcrf-price-section {
  font-size: 18px !important;
  padding: 0 20px 20px 20px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.wcrf-original-price {
  text-decoration: line-through;
  color: #777;
  font-size: 18px !important;
  margin-right: 10px;
}

.wcrf-current-price {
  color: #dd1b5f;
  font-size: 18px !important;
  font-weight: 500;
}

.wcrf-features-section {
  margin: 20px 0 !important;
}

/* Features List */
.wcrf-features-list {
  list-style: none;
  padding: 0 20px 20px 20px;
  margin: 0;
}

.wcrf-feature-item {
  margin-bottom: 5px;
  /* display: flex; */
  /* align-items: flex-start; */
}

.wcrf-feature-item:last-child {
  margin-bottom: 0;
}

.wcrf-feature-icon {
  color: #dd1b5f;
  margin-right: 10px;
  font-size: 1.1rem;
  margin-top: 2px;
  flex-shrink: 0;
}

.wcrf-feature-text {
  color: #333;
  font-size: 0.95rem;
  line-height: 1.5;
}

/* Action Buttons */
.wcrf-action-buttons {
  /* display: flex; */
  /* gap: 15px; */
  /* padding: 20px; */
}

.wcrf-btn {
  flex: 1;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.3s ease;
  font-size: 16px;
  text-align: center;
  text-transform: capitalize;
}

.wcrf-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.wcrf-btn-share {
  color: #ffffff;
  background-color: #dd1b5f;
  /* background-color: #f8f9fa; */
  margin-bottom: 10px;
  border: 1px solid #dee2e6;
  /* color: #333; */
}

.wcrf-btn-share:hover {
  background-color: #e9ecef;
}

.wcrf-btn-design {
  border: 2px solid #dd1b5f !important;
  color: #dd1b5f;
  background: none !important;
}

.wcrf-btn-design:hover {
  background-color: #dd1b5f !important;
}

.wcrf-btn-cart {
  background-color: #28a745;
  color: white;
}

.wcrf-btn-cart:hover {
  background-color: #218838;
}

/* Load More */
.wcrf-load-more {
  text-align: center;
  padding: 40px 20px;
}

.wcrf-load-more-btn {
  background: #dd1b5f;
  color: white;
  border: none;
  padding: 15px 40px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 16px;
  font-weight: 600;
  transition: all 0.3s ease;
}

.wcrf-load-more-btn:hover {
  background: #c21855;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.wcrf-load-more-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.wcrf-loading-spinner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 20px;
  color: #666;
}

.wcrf-spinner {
  width: 20px;
  height: 20px;
  border: 2px solid #f3f3f3;
  border-top: 2px solid #dd1b5f;
  border-radius: 50%;
  animation: wcrf-spin 1s linear infinite;
}

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

/* No Products */
.wcrf-no-products {
  text-align: center;
  padding: 60px 20px;
  background: #f8f9fa;
  border-radius: 8px;
  color: #666;
}

.wcrf-no-products p {
  margin: 0;
  font-size: 16px;
  line-height: 1.6;
}

/* Mobile Optimizations */
@media (max-width: 768px) {
  .wcrf-reels-container {
    border-radius: 0;
    border: none;
    box-shadow: none;
    /* margin: 0; */
  }

  .wcrf-view-title,
  .wcrf-view-link {
    font-size: 18px;
  }

  .wcrf-product-title {
    font-size: 1.2rem;
  }

  .wcrf-current-price {
    font-size: 1.3rem;
  }

  .wcrf-original-price {
    font-size: 1rem;
  }

  .wcrf-feature-text {
    font-size: 0.9rem;
  }

  /* .wcrf-action-buttons {
        flex-direction: column;
    } */

  .wcrf-btn {
    width: 100%;
  }

  .wcrf-video-controls {
    padding: 15px;
    opacity: 1;
  }

  .wcrf-view-title {
    color: #ffffff;
    padding: 7px 14px;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
    border-radius: 50%;
  }

  .wcrf-play-toggle,
  .wcrf-mute-toggle {
    width: 40px;
    height: 40px;
  }

  .wcrf-play-toggle svg,
  .wcrf-mute-toggle svg {
    width: 20px;
    height: 20px;
  }

  .wcrf-time-display {
    min-width: 80px;
    font-size: 12px;
  }
}

/* Landscape Mode */
@media (orientation: landscape) and (max-height: 500px) {
  .wcrf-snap-scroll .wcrf-reel-item {
    min-height: 100vh;
  }

  .wcrf-video-section {
    height: 100vh;
  }

  .wcrf-video {
    object-fit: contain;
  }
}

/* Fullscreen Mode */
.wcrf-video-section:-webkit-full-screen {
  width: 100%;
  height: 100%;
  background: #000;
}

.wcrf-video-section:-webkit-full-screen .wcrf-video {
  object-fit: contain;
}

.wcrf-video-section:-moz-full-screen {
  width: 100%;
  height: 100%;
  background: #000;
}

.wcrf-video-section:-ms-fullscreen {
  width: 100%;
  height: 100%;
  background: #000;
}

.wcrf-video-section:fullscreen {
  width: 100%;
  height: 100%;
  background: #000;
}

.wcrf-video-section:fullscreen .wcrf-video {
  object-fit: contain;
}

/* Fullscreen styles */
/* Full view title clickable style */
.wcrf-view-title[data-fullscreen-trigger] {
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.wcrf-view-title[data-fullscreen-trigger]:hover {
  opacity: 0.7;
}

/* Fullscreen styles */
.wcrf-video-section:fullscreen {
  width: 100vw !important;
  height: 100vh !important;
  background: #000;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.wcrf-video-section:fullscreen .wcrf-video {
  max-width: 100% !important;
  max-height: 100% !important;
  object-fit: contain !important;
  width: auto !important;
  height: auto !important;
}

/* Hide other content when in fullscreen */
.wcrf-video-section:fullscreen ~ .wcrf-product-details {
  display: none !important;
}

/* Vendor prefixes for fullscreen */
.wcrf-video-section:-webkit-full-screen {
  width: 100vw !important;
  height: 100vh !important;
  background: #000;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.wcrf-video-section:-moz-full-screen {
  width: 100vw !important;
  height: 100vh !important;
  background: #000;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.wcrf-video-section:-ms-fullscreen {
  width: 100vw !important;
  height: 100vh !important;
  background: #000;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

/* Body class when in fullscreen */
body.wcrf-fullscreen-active {
  overflow: hidden;
}

/* Keyboard shortcut hint */
.wcrf-view-title[data-fullscreen-trigger]::after {
  font-size: 12px;
  opacity: 0.7;
  font-weight: normal;
}

@keyframes wcrf-notification-slide {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes wcrf-notification-slide-out {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(100%);
    opacity: 0;
  }
}

.wcrf-notification {
  position: fixed;
  top: 40px;
  right: 20px;
  padding: 15px 25px;
  background: #28a745;
  color: white;
  border-radius: 8px;
  z-index: 99999;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  animation: wcrf-notification-slide 0.3s ease;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 14px;
  max-width: 300px;
}

.wcrf-notification-error {
  background: #dc3545;
}

/* Share Modal Styles */
.wcrf-share-content h3 {
  margin: 0 0 15px 0;
  color: #333;
}

.wcrf-share-content p {
  margin: 0 0 10px 0;
  color: #666;
}

.wcrf-share-buttons {
  display: flex;
  gap: 10px;
  margin-top: 15px;
}

.wcrf-copy-btn,
.wcrf-close-share {
  padding: 10px 20px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-size: 14px;
  flex: 1;
}

.wcrf-copy-btn {
  background: #28a745;
  color: white;
}

.wcrf-close-share {
  background: #6c757d;
  color: white;
}

.wcrf-copy-btn:hover {
  background: #218838;
}

.wcrf-close-share:hover {
  background: #5a6268;
}

.wcrf-turn-on-sound-btn {
  /* Default styles without animation */
  transition: all 0.3s ease;
}

.wcrf-turn-on-sound-btn.pulse-animation {
  animation: pulseGlow 1.6s infinite ease-in-out;
}

@keyframes pulseGlow {
  0% {
    transform: scale(1);
    box-shadow: 0 0 6px rgba(0, 0, 0, 0.4);
  }
  50% {
    transform: scale(1.1);
    box-shadow: 0 0 18px rgba(0, 0, 0, 0.6);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 0 6px rgba(0, 0, 0, 0.4);
  }
}
.wcrf-product-title {
  margin: 0 0 0 0 !important;
}
.wcrf-product-details {
  padding: 5px;
}
/* .wcrf-feature-item {
  margin: 0 !important;
} */
.wcrf-features-section {
  margin: 0px 0 !important;
}
.wcrf-feature-text {
  font-size: 16px;
}
.wcrf-view-section {
  padding: 0 0 4px 0 !important;
}
.d-flex {
  display: flex !important;
}
button.wcrf-turn-on-sound-btn.wcrf-btn.wcrf-mute-toggle.pulse-animation {
  margin-top: 15px;
  margin-bottom: 15px;
}
.wcrf-mute-toggle {
  margin: 15px 0;
}

/* Grid layout for desktop */
@media (min-width: 769px) {
  .wcrf-reels-container.wcrf-grid-view {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    max-width: 1200px !important;
    margin: 0 auto;
    overflow: visible !important;
    height: auto !important;
    scroll-snap-type: none !important;
  }

  .wcrf-reels-container.wcrf-grid-view .wcrf-reel-item {
    width: 100%;
    height: auto;
    min-height: 500px;
    scroll-snap-align: none !important;
    margin-bottom: 0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
  }

  .wcrf-reels-container.wcrf-grid-view .wcrf-reel-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  }

  .wcrf-reels-container.wcrf-grid-view .wcrf-video-section {
    height: 250px;
    border-radius: 12px 12px 0 0;
    overflow: hidden;
  }

  .wcrf-reels-container.wcrf-grid-view .wcrf-product-details {
    padding: 15px;
    background: white;
  }

  /* Adjust video controls for grid */
  .wcrf-reels-container.wcrf-grid-view .wcrf-video-controls {
    top: 16px;
    left: 10px;
    right: auto;
    background: none;
    padding: 0;
  }

  .wcrf-reels-container.wcrf-grid-view .wcrf-play-toggle {
    width: 36px;
    height: 36px;
    background: rgba(0, 0, 0, 0.7);
  }

  /* Adjust mute button */
/*   .wcrf-reels-container.wcrf-grid-view .wcrf-turn-on-sound-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 12px;
    padding: 6px 10px;
  } */

  /* Adjust product title */
  .wcrf-reels-container.wcrf-grid-view .wcrf-product-title {
    font-size: 16px;
    line-height: 1.4;
    margin-bottom: 8px;
    height: 44px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
  }

  /* Adjust features */
  .wcrf-reels-container.wcrf-grid-view .wcrf-features-list {
    max-height: 120px;
    overflow-y: auto;
    padding-right: 5px;
  }

  .wcrf-reels-container.wcrf-grid-view .wcrf-feature-item {
    padding: 4px 0;
    font-size: 12px;
  }

  .wcrf-reels-container.wcrf-grid-view .wcrf-feature-icon {
    width: 14px;
    margin-right: 6px;
  }

  /* Adjust buttons */
  .wcrf-reels-container.wcrf-grid-view .wcrf-action-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }

  .wcrf-reels-container.wcrf-grid-view .wcrf-btn {
    flex: 1;
    min-width: 120px;
    padding: 8px 12px;
    font-size: 12px;
  }

  .wcrf-reels-container.wcrf-grid-view .wcrf-btn-share {
    order: 3;
  }

  .wcrf-reels-container.wcrf-grid-view .wcrf-btn-design {
    order: 1;
  }

  .wcrf-reels-container.wcrf-grid-view .wcrf-btn-cart {
    order: 2;
  }

  /* Adjust view section */
  .wcrf-reels-container.wcrf-grid-view .wcrf-view-section {
    display: flex;
    justify-content: space-between;
    margin: 10px 0;
    padding: 0;
    border: none;
  }

  .wcrf-reels-container.wcrf-grid-view .wcrf-view-link,
  .wcrf-reels-container.wcrf-grid-view .wcrf-faq-link {
    font-size: 12px;
  }

  /* Adjust price section */
  .wcrf-reels-container.wcrf-grid-view .wcrf-price-section {
    margin: 8px 0;
  }

  .wcrf-reels-container.wcrf-grid-view .wcrf-current-price {
    font-size: 18px;
  }

  .wcrf-reels-container.wcrf-grid-view .wcrf-original-price {
    font-size: 14px;
  }
}

/* Mobile styles remain the same */
@media (max-width: 768px) {
  .wcrf-reels-container.wcrf-snap-scroll {
    display: block;
    scroll-snap-type: y mandatory;
    overflow-y: auto;
    height: 100vh;
  }

  .wcrf-reels-container.wcrf-snap-scroll .wcrf-reel-item {
    height: 100vh;
    scroll-snap-align: start;
  }
}
