/* ==========================================================================
   WooCommerce Base Styles Fallback
   Ensures plugin works independently with any theme (no theme dependency)
   ========================================================================== */

/* Reviews Container */
#reviews.woocommerce-Reviews {
  margin-top: 40px;
}

/* Reviews Title */
.woocommerce-Reviews-title {
  font-size: 24px !important;
  font-weight: 600 !important;
  color: #1e1e1e;
  margin: 0 0 24px !important;
  padding: 0;
  line-height: 1.3;
  display: block !important;
  width: 100% !important;
  float: none !important;
  clear: both !important;
}

/* No Reviews Message */
p.woocommerce-noreviews {
  text-align: center;
  padding: 40px;
  color: #666;
  font-size: 15px;
  background: #f9f9f9;
  border-radius: 8px;
  margin: 0;
}

/* Clear float for legacy compatibility */
#reviews .clear {
  clear: both;
}

/* WooCommerce Star Rating - Base fallback styles */
#reviews .star-rating {
  display: inline-block;
  font-size: 14px;
  height: 1.2em;
  line-height: 1;
  overflow: hidden;
  position: relative;
  width: 5.4em;
  font-family: inherit;
}

#reviews .star-rating::before {
  content: "★★★★★";
  color: #ddd;
  float: left;
  top: 0;
  left: 0;
  position: absolute;
  letter-spacing: 0.1em;
}

#reviews .star-rating span {
  overflow: hidden;
  float: left;
  top: 0;
  left: 0;
  position: absolute;
  padding-top: 1.5em;
}

#reviews .star-rating span::before {
  content: "★★★★★";
  color: #ffc107;
  position: absolute;
  top: 0;
  left: 0;
  letter-spacing: 0.1em;
}

/* ==========================================================================
   Upload Form Styles
   ========================================================================== */

.wootimize-review-upload {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.wootimize-review-upload__button {
  appearance: none;
  border: 1px solid #1e1e1e;
  background: #1e1e1e;
  color: #fff;
  padding: 10px 18px;
  border-radius: 6px;
  font-size: 14px;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease, opacity 0.12s ease;
}

.wootimize-review-upload__button:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.12);
}

.wootimize-review-upload__input {
  display: none;
}

.wootimize-review-upload__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
  gap: 10px;
}

.wootimize-review-upload__list li {
  position: relative;
  border: 1px solid #e6e6e6;
  border-radius: 8px;
  padding: 6px;
  background: #fff;
  cursor: grab;
}

.wootimize-review-upload__list .ui-sortable-placeholder {
  border: 1px dashed #c4c4c4;
  background: #fafafa;
  visibility: visible !important;
}

.wootimize-review-upload__list img {
  width: 100%;
  height: 70px;
  object-fit: cover;
  border-radius: 6px;
  display: block;
}

.wootimize-review-upload__remove {
  position: absolute;
  top: -8px;
  right: -8px;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  border: none;
  background: #111;
  color: #fff;
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
}

.wootimize-review-images {
  list-style: none;
  margin: 10px 0 0;
  padding: 0;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.wootimize-review-lightbox-trigger {
  border: none;
  background: none;
  padding: 0;
  cursor: pointer;
}

.wootimize-review-lightbox-trigger img {
  display: block;
  width: 70px;
  height: 70px;
  object-fit: cover;
  border-radius: 6px;
}

.wootimize-review-lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.wootimize-review-lightbox.is-open {
  display: flex;
}

.wootimize-review-lightbox__content {
  position: relative;
  max-width: min(90vw, 960px);
  max-height: 90vh;
}

.wootimize-review-lightbox__image {
  max-width: 90vw;
  max-height: 90vh;
  display: block;
  border-radius: 8px;
}

.wootimize-review-lightbox__close {
  position: absolute;
  top: -12px;
  right: -12px;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  border: none;
  background: #fff;
  color: #111;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
}

/* Rating Summary Section */
.wootimize-rating-summary {
  background: #fff;
  border: 1px solid #e6e6e6;
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 30px;
  display: grid !important;
  grid-template-columns: 200px 1fr !important;
  gap: 32px;
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  float: none !important;
  clear: both !important;
}

@media (max-width: 768px) {
  .wootimize-rating-summary {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}

.wootimize-rating-summary__overview {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
}

/* Write Review Button inside Rating Summary */
.wootimize-rating-summary__overview .wootimize-write-review-btn {
  width: 100%;
  margin-top: 0;
  padding: 12px 20px;
  font-size: 14px;
}

.wootimize-rating-summary__score {
  text-align: center;
}

.wootimize-rating-summary__average {
  display: block;
  font-size: 48px;
  font-weight: 700;
  color: #1e1e1e;
  line-height: 1;
  margin-bottom: 8px;
}

.wootimize-rating-summary__stars {
  margin-bottom: 8px;
}

.wootimize-rating-summary__stars .star-rating {
  margin: 0 auto;
  font-size: 18px;
}

.wootimize-rating-summary__label {
  font-size: 11px;
  font-weight: 600;
  color: #666;
  letter-spacing: 0.5px;
  margin: 0;
}

.wootimize-rating-summary__breakdown {
  display: flex;
  flex-direction: column;
  gap: 8px;
  justify-content: center;
}

.wootimize-rating-summary__row {
  display: grid;
  grid-template-columns: 40px 1fr 50px 100px;
  gap: 12px;
  align-items: center;
  font-size: 14px;
}

@media (max-width: 480px) {
  .wootimize-rating-summary__row {
    grid-template-columns: 35px 1fr 45px;
    gap: 8px;
  }

  .wootimize-rating-summary__count {
    display: none;
  }
}

.wootimize-rating-summary__star-label {
  font-weight: 500;
  color: #1e1e1e;
}

.wootimize-rating-summary__bar {
  height: 8px !important;
  background: #f0f0f0 !important;
  border-radius: 999px !important;
  overflow: hidden !important;
  display: block !important;
  width: 100% !important;
  min-width: 100px !important;
  position: relative !important;
}

.wootimize-rating-summary__bar-fill {
  height: 100% !important;
  background: #ffa500 !important;
  border-radius: 999px !important;
  transition: width 0.3s ease;
  display: block !important;
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
}

.wootimize-rating-summary__percentage {
  font-weight: 600;
  color: #1e1e1e;
  text-align: right;
}

.wootimize-rating-summary__count {
  color: #666;
  font-size: 13px;
}

/* Customer Images Gallery Section */
.wootimize-customer-images {
  margin-top: 30px;
  margin-bottom: 30px;
}

.wootimize-customer-images__title {
  font-size: 20px;
  font-weight: 600;
  color: #1e1e1e;
  margin: 0 0 20px;
}

.wootimize-customer-images__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(var(--photo-size, 100px), 1fr));
  gap: 12px;
}

@media (max-width: 480px) {
  .wootimize-customer-images__grid {
    grid-template-columns: repeat(auto-fill, minmax(calc(var(--photo-size, 100px) * 0.8), 1fr));
    gap: 8px;
  }
}

.wootimize-customer-images__item {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 8px;
  border: none;
  padding: 0;
  background: #f5f5f5;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.wootimize-customer-images__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* "View more" card with background image */
.wootimize-customer-images__more {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.wootimize-customer-images__more-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  transition: background 0.2s ease;
}

.wootimize-customer-images__more:hover .wootimize-customer-images__more-overlay {
  background: rgba(0, 0, 0, 0.7);
}

.wootimize-customer-images__more-text {
  position: relative;
  z-index: 1;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  text-align: center;
  padding: 12px;
  line-height: 1.4;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

@media (max-width: 480px) {
  .wootimize-customer-images__more-text {
    font-size: 12px;
    padding: 8px;
  }
}

/* Customer Videos Gallery Section (separate from photos) */
.wootimize-customer-videos {
  margin-top: 24px;
  margin-bottom: 30px;
}

.wootimize-customer-videos__title {
  font-size: 20px;
  font-weight: 600;
  color: #1e1e1e;
  margin: 0 0 16px;
}

.wootimize-customer-videos__grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.wootimize-customer-videos__item {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  background: #000;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.wootimize-customer-videos__item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.wootimize-customer-videos__item video {
  display: block;
}

.wootimize-customer-videos__more {
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(30, 30, 30, 0.85) !important;
  color: #fff !important;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s ease;
}

.wootimize-customer-videos__more:hover {
  background: rgba(30, 30, 30, 0.95) !important;
}

@media (max-width: 480px) {
  .wootimize-customer-videos__grid {
    gap: 8px;
  }
}

/* Gallery Trigger Button */
.wootimize-gallery-trigger {
  border: none;
  padding: 0;
  cursor: pointer;
  display: block;
}

.wootimize-gallery-trigger img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Gallery Modal - Base styles (Mobile first: white background) */
.wootimize-gallery-modal {
  position: fixed;
  inset: 0;
  background: #fff;
  z-index: 10000;
  display: none;
  flex-direction: column;
}

.wootimize-gallery-modal.is-open {
  display: flex;
}

/* Gallery Modal Header - sticky close button */
.wootimize-gallery-modal__header {
  position: sticky;
  top: 0;
  padding: 12px 16px;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  background: #fff;
  border-bottom: 1px solid #eee;
  z-index: 10;
}

/* Close button */
.wootimize-gallery-modal__close {
  width: 40px;
  height: 40px;
  border: none;
  background: none;
  font-size: 24px;
  cursor: pointer;
  color: #333;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background 0.2s ease;
}

.wootimize-gallery-modal__close:hover {
  background: #f0f0f0;
}

/* Scrollable gallery container - Mobile */
.wootimize-gallery-modal__scroll {
  flex: 1;
  overflow-y: auto;
  scroll-snap-type: y mandatory;
  -webkit-overflow-scrolling: touch;
}

/* Each image item - Mobile: auto height, scroll snap */
.wootimize-gallery-modal__item {
  width: 100%;
  min-height: auto;
  scroll-snap-align: start;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  box-sizing: border-box;
}

.wootimize-gallery-modal__item img {
  max-width: 100%;
  max-height: 80vh;
  object-fit: contain;
  display: block;
}

/* Navigation arrows - hidden on mobile */
.wootimize-gallery-modal__nav {
  display: none;
}

/* Counter - hidden on mobile */
.wootimize-gallery-modal__counter {
  display: none;
}

/* Desktop styles (>= 768px) */
@media (min-width: 768px) {
  /* Dark overlay background */
  .wootimize-gallery-modal {
    background: rgba(0, 0, 0, 0.92);
  }

  /* Header - absolute position, transparent */
  .wootimize-gallery-modal__header {
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    background: transparent;
    border: none;
    padding: 16px 20px;
  }

  /* Close button - white color */
  .wootimize-gallery-modal__close {
    color: #fff;
  }

  .wootimize-gallery-modal__close:hover {
    background: rgba(255, 255, 255, 0.1);
  }

  /* Scroll container - center single image */
  .wootimize-gallery-modal__scroll {
    overflow: hidden;
    scroll-snap-type: none;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 80px;
  }

  /* Image items - hide all, show only active */
  .wootimize-gallery-modal__item {
    display: none;
    min-height: auto;
    padding: 0;
  }

  .wootimize-gallery-modal__item.is-active {
    display: flex;
  }

  .wootimize-gallery-modal__item img {
    max-height: 85vh;
    border-radius: 4px;
  }

  /* Navigation arrows - show on desktop */
  .wootimize-gallery-modal__nav {
    display: flex;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.95);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #333;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    z-index: 10;
  }

  .wootimize-gallery-modal__nav:hover {
    transform: translateY(-50%) scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  }

  .wootimize-gallery-modal__nav:disabled {
    opacity: 0.3;
    cursor: not-allowed;
  }

  .wootimize-gallery-modal__nav:disabled:hover {
    transform: translateY(-50%);
    box-shadow: none;
  }

  .wootimize-gallery-modal__prev {
    left: 20px;
  }

  .wootimize-gallery-modal__next {
    right: 20px;
  }

  /* Counter - show on desktop */
  .wootimize-gallery-modal__counter {
    display: block;
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: #fff;
    background: rgba(0, 0, 0, 0.6);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    z-index: 10;
  }
}

/* Lazy loading placeholder (Desktop only) */
.wootimize-gallery-modal__placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 200px;
  height: 200px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
}

.wootimize-gallery-modal__spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(255, 255, 255, 0.2);
  border-top-color: #fff;
  border-radius: 50%;
  animation: wootimize-spin 0.8s linear infinite;
}

@keyframes wootimize-spin {
  to {
    transform: rotate(360deg);
  }
}

/* =====================================================
   Customer Photos Gallery - Configurable size via CSS variable
   ===================================================== */
.wootimize-media-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(var(--photo-size, 100px), 1fr));
  gap: 12px;
  margin-top: 16px;
}

.wootimize-media-gallery .gallery-item {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 8px;
  border: none;
  padding: 0;
  background: #f5f5f5;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.wootimize-media-gallery .gallery-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.wootimize-media-gallery .gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* "View more" card with background image */
.wootimize-media-gallery .gallery-item--more {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.wootimize-media-gallery .gallery-item--more .gallery-item__bg-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  transition: background 0.2s ease;
  border-radius: inherit;
}

.wootimize-media-gallery .gallery-item--more:hover .gallery-item__bg-overlay {
  background: rgba(0, 0, 0, 0.7);
}

.wootimize-media-gallery .gallery-item--more .gallery-item__overlay {
  position: relative;
  z-index: 1;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  text-align: center;
  padding: 12px;
  line-height: 1.4;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

@media (max-width: 480px) {
  .wootimize-media-gallery {
    grid-template-columns: repeat(auto-fill, minmax(calc(var(--photo-size, 100px) * 0.8), 1fr));
    gap: 8px;
  }

  .wootimize-media-gallery .gallery-item--more .gallery-item__overlay {
    font-size: 12px;
    padding: 8px;
  }
}

/* Traditional Renderer - Media Gallery */
.wootimize-media-gallery-traditional {
  margin-top: 20px;
}

.wootimize-media-gallery-traditional h3 {
  font-size: 18px;
  font-weight: 600;
  margin: 0 0 16px;
  color: #1e1e1e;
}

.wootimize-media-gallery-traditional .media-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(var(--photo-size, 100px), 1fr));
  gap: 12px;
}

.wootimize-media-gallery-traditional .media-item {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 8px;
  border: none;
  padding: 0;
  background: #f5f5f5;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.wootimize-media-gallery-traditional .media-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.wootimize-media-gallery-traditional .media-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* "View more" card with background image - Traditional */
.wootimize-media-gallery-traditional .media-item--more {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.wootimize-media-gallery-traditional .media-item--more .media-item__bg-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  transition: background 0.2s ease;
  border-radius: inherit;
}

.wootimize-media-gallery-traditional .media-item--more:hover .media-item__bg-overlay {
  background: rgba(0, 0, 0, 0.7);
}

.wootimize-media-gallery-traditional .media-item--more .media-item__overlay {
  position: relative;
  z-index: 1;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  text-align: center;
  padding: 12px;
  line-height: 1.4;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

@media (max-width: 480px) {
  .wootimize-media-gallery-traditional .media-list {
    grid-template-columns: repeat(auto-fill, minmax(calc(var(--photo-size, 100px) * 0.8), 1fr));
    gap: 8px;
  }

  .wootimize-media-gallery-traditional .media-item--more .media-item__overlay {
    font-size: 12px;
    padding: 8px;
  }
}

/* ==========================================================================
   Write Review Button
   ========================================================================== */

.wootimize-write-review-btn {
  display: block;
  width: 100%;
  padding: 16px 24px;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
  margin-top: 24px;
  box-sizing: border-box;
}

.wootimize-write-review-btn:hover {
  opacity: 0.85;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.wootimize-write-review-btn:active {
  transform: translateY(0);
}

/* ==========================================================================
   Review Modal
   ========================================================================== */

.wootimize-review-modal {
  position: fixed;
  inset: 0;
  z-index: 10001;
  display: none;
}

.wootimize-review-modal.is-open {
  display: flex;
  align-items: center;
  justify-content: center;
}

.wootimize-review-modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(2px);
}

.wootimize-review-modal__content {
  position: relative;
  background: #fff;
  width: 100%;
  max-width: 500px;
  max-height: 90vh;
  overflow-y: auto;
  border-radius: 16px;
  padding: 28px;
  margin: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
}

.wootimize-review-modal__close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  background: #f5f5f5;
  border: none;
  border-radius: 50%;
  font-size: 20px;
  cursor: pointer;
  color: #666;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, color 0.2s ease;
}

.wootimize-review-modal__close:hover {
  background: #e0e0e0;
  color: #333;
}

/* Modal Login Section */
.wootimize-review-modal__login {
  text-align: center;
}

.wootimize-review-modal__login h3 {
  font-size: 20px;
  font-weight: 600;
  color: #1e1e1e;
  margin: 0 0 24px 0;
}

.wootimize-review-modal__login #loginform {
  text-align: left;
}

.wootimize-review-modal__login #loginform label {
  display: block;
  margin-bottom: 6px;
  font-weight: 500;
  color: #333;
}

.wootimize-review-modal__login #loginform input[type="text"],
.wootimize-review-modal__login #loginform input[type="password"] {
  width: 100%;
  padding: 12px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 14px;
  margin-bottom: 16px;
  box-sizing: border-box;
}

.wootimize-review-modal__login #loginform input[type="submit"] {
  width: 100%;
  padding: 14px;
  background: #4a90d9;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s ease;
}

.wootimize-review-modal__login #loginform input[type="submit"]:hover {
  background: #3a7bc8;
}

.wootimize-review-modal__login p {
  margin-top: 20px;
  font-size: 14px;
  color: #666;
}

.wootimize-review-modal__login p a {
  color: #4a90d9;
  text-decoration: none;
}

.wootimize-review-modal__login p a:hover {
  text-decoration: underline;
}

/* Modal Review Form */
.wootimize-review-modal__form h3 {
  font-size: 20px;
  font-weight: 600;
  color: #1e1e1e;
  margin: 0 0 24px 0;
  padding-right: 40px;
}

.wootimize-review-modal .form-field {
  margin-bottom: 20px;
}

.wootimize-review-modal .form-field label {
  display: block;
  margin-bottom: 10px;
  font-weight: 500;
  font-size: 14px;
  color: #333;
}

/* Star Rating Selector */
.wootimize-star-select {
  display: flex;
  gap: 6px;
}

.wootimize-star-select .star-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  transition: transform 0.15s ease;
}

.wootimize-star-select .star-btn:hover {
  transform: scale(1.15);
}

.wootimize-star-select .star {
  font-size: 32px;
  color: #ddd;
  transition: color 0.15s ease;
  display: block;
  line-height: 1;
}

.wootimize-star-select .star-btn.is-active .star {
  color: #ffc107;
}

.wootimize-star-select .star-btn.is-hover .star {
  color: #ffc107;
}

/* Form Inputs */
.wootimize-review-modal textarea {
  width: 100%;
  padding: 14px;
  border: 1px solid #ddd;
  border-radius: 10px;
  font-size: 14px;
  line-height: 1.5;
  resize: vertical;
  min-height: 100px;
  box-sizing: border-box;
  font-family: inherit;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.wootimize-review-modal textarea:focus {
  outline: none;
  border-color: #4a90d9;
  box-shadow: 0 0 0 3px rgba(74, 144, 217, 0.1);
}

.wootimize-review-modal input[type="text"],
.wootimize-review-modal input[type="tel"],
.wootimize-review-modal input[type="email"] {
  width: 100%;
  padding: 14px;
  border: 1px solid #ddd;
  border-radius: 10px;
  font-size: 14px;
  box-sizing: border-box;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.wootimize-review-modal input[type="text"]:focus,
.wootimize-review-modal input[type="tel"]:focus,
.wootimize-review-modal input[type="email"]:focus {
  outline: none;
  border-color: #4a90d9;
  box-shadow: 0 0 0 3px rgba(74, 144, 217, 0.1);
}

/* Form Field Row (Name + Phone) */
.wootimize-review-modal .form-field-row {
  display: flex;
  gap: 12px;
}

.wootimize-review-modal .form-field-row .form-field {
  flex: 1;
  margin-bottom: 0;
}

/* Add Images Button */
.wootimize-add-images-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 16px;
  background: #fafafa;
  border: 2px dashed #ddd;
  border-radius: 10px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  color: #666;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.wootimize-add-images-btn:hover {
  border-color: #bbb;
  background: #f5f5f5;
}

.wootimize-add-images-btn .icon {
  font-size: 20px;
}

.wootimize-add-images-btn .hint {
  color: #999;
  font-size: 12px;
  font-weight: 400;
}

/* Media Preview Grid (Images + Videos) */
.wootimize-modal-media-preview,
.wootimize-modal-images-preview {
  list-style: none;
  margin: 16px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  gap: 10px;
}

.wootimize-modal-media-preview li,
.wootimize-modal-images-preview li {
  position: relative;
  aspect-ratio: 1;
  border-radius: 10px;
  overflow: hidden;
  background: #f5f5f5;
}

.wootimize-modal-media-preview li img,
.wootimize-modal-media-preview li video,
.wootimize-modal-images-preview li img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Video indicator */
.wootimize-modal-media-preview li.is-video {
  background: #1a1a1a;
}

.wootimize-modal-media-preview li.is-video .video-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 32px;
  height: 32px;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: #1a1a1a;
  pointer-events: none;
}

.wootimize-modal-media-preview .remove-media,
.wootimize-modal-images-preview .remove-img {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 24px;
  height: 24px;
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  border: none;
  border-radius: 50%;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  transition: background 0.2s ease;
  z-index: 2;
}

.wootimize-modal-media-preview .remove-media:hover,
.wootimize-modal-images-preview .remove-img:hover {
  background: rgba(0, 0, 0, 0.9);
}

/* Add Media Button */
.wootimize-add-media-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 16px;
  background: #fff;
  border: 2px dashed #ddd;
  border-radius: 10px;
  font-size: 14px;
  cursor: pointer;
  color: #666;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.wootimize-add-media-btn:hover {
  border-color: #bbb;
  background: #f5f5f5;
}

.wootimize-add-media-btn .hint {
  color: #999;
  font-size: 12px;
  font-weight: 400;
}

/* Submit Button */
.wootimize-review-modal .form-field--submit {
  margin-top: 20px;
}

.wootimize-submit-review-btn {
  width: 100%;
  padding: 16px;
  border: none;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.wootimize-submit-review-btn:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.wootimize-submit-review-btn:active {
  transform: translateY(0);
}

.wootimize-submit-review-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* Success/Error Messages */
.wootimize-review-modal .form-message {
  padding: 14px 16px;
  border-radius: 10px;
  font-size: 14px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.wootimize-review-modal .form-message--success {
  background: #e8f5e9;
  color: #2e7d32;
  border: 1px solid #c8e6c9;
}

.wootimize-review-modal .form-message--error {
  background: #ffebee;
  color: #c62828;
  border: 1px solid #ffcdd2;
}

/* ==========================================================================
   Review Modal - Responsive
   ========================================================================== */

@media screen and (max-width: 600px) {
  .wootimize-review-modal__content {
    margin: 0;
    max-height: 100vh;
    height: 100%;
    border-radius: 0;
    padding: 24px 20px;
  }

  .wootimize-review-modal__close {
    top: 12px;
    right: 12px;
  }

  .wootimize-review-modal__form h3,
  .wootimize-review-modal__login h3 {
    font-size: 18px;
    margin-bottom: 20px;
  }

  .wootimize-star-select .star {
    font-size: 28px;
  }

  .wootimize-review-modal .form-field-row {
    flex-direction: column;
    gap: 0;
  }

  .wootimize-review-modal .form-field-row .form-field {
    margin-bottom: 16px;
  }

  .wootimize-modal-media-preview,
  .wootimize-modal-images-preview {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media screen and (max-width: 380px) {
  .wootimize-review-modal__content {
    padding: 20px 16px;
  }

  .wootimize-star-select .star {
    font-size: 24px;
  }

  .wootimize-star-select {
    gap: 4px;
  }

  .wootimize-add-images-btn {
    flex-direction: column;
    gap: 6px;
    padding: 14px;
  }

  .wootimize-add-images-btn .hint {
    display: block;
  }
}

/* ==========================================================================
   Reviews Pagination
   ========================================================================== */

/* Review Item Styles (for AJAX loaded reviews) */
.wootimize-review-item {
  list-style: none;
  padding: 24px 0;
  border-bottom: 1px solid #eee;
}

.wootimize-review-item:last-child {
  border-bottom: none;
}

.wootimize-review-header {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 14px;
}

.wootimize-review-avatar {
  border-radius: 50%;
  flex-shrink: 0;
}

.wootimize-review-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.wootimize-review-author {
  font-size: 15px;
  font-weight: 600;
  color: #1e1e1e;
}

.wootimize-review-date {
  font-size: 13px;
  color: #666;
}

.wootimize-review-item .star-rating {
  font-size: 14px;
  margin: 2px 0;
}

.wootimize-review-item .comment-text {
  color: #333;
  line-height: 1.6;
}

.wootimize-review-item .description {
  font-size: 14px;
}

.wootimize-review-item .description p {
  margin: 0 0 12px;
}

.wootimize-review-item .description p:last-child {
  margin-bottom: 0;
}

/* Pagination Container */
.wootimize-pagination {
  margin-top: 30px;
  display: flex;
  justify-content: center;
}

/* Load More Button */
.wootimize-pagination--load-more {
  padding: 0;
}

.wootimize-load-more-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 200px;
  padding: 14px 28px;
  font-size: 14px;
  font-weight: 500;
  color: #1e1e1e;
  background: #fff;
  border: 1px solid #1e1e1e;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.wootimize-load-more-btn:hover:not(:disabled) {
  background: #1e1e1e;
  color: #fff;
  transform: translateY(-1px);
}

.wootimize-load-more-btn:active:not(:disabled) {
  transform: translateY(0);
}

.wootimize-load-more-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Page Numbers */
.wootimize-pagination--numbers {
  padding: 0;
}

.wootimize-page-numbers {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
  justify-content: center;
}

.wootimize-page-numbers li {
  margin: 0;
}

.wootimize-page-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  font-size: 14px;
  font-weight: 500;
  color: #666;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.wootimize-page-btn:hover:not(:disabled):not(.is-active) {
  border-color: #1e1e1e;
  color: #1e1e1e;
}

.wootimize-page-btn.is-active {
  background: #1e1e1e;
  border-color: #1e1e1e;
  color: #fff;
  cursor: default;
}

.wootimize-page-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Loading State Animation */
.wootimize-load-more-btn:disabled,
.wootimize-page-btn:disabled {
  position: relative;
}

/* Reviews List Animation for new items */
@keyframes wootimize-fade-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.wootimize-reviews-list .wootimize-review-item {
  animation: wootimize-fade-in 0.3s ease forwards;
}

/* Responsive Pagination */
@media screen and (max-width: 480px) {
  .wootimize-load-more-btn {
    width: 100%;
    min-width: auto;
  }

  .wootimize-page-numbers {
    gap: 6px;
  }

  .wootimize-page-btn {
    min-width: 36px;
    height: 36px;
    font-size: 13px;
    padding: 0 10px;
  }
}

/* ==========================================================================
   Video Support in Gallery Modal
   ========================================================================== */

/* Video in gallery modal - Mobile */
.wootimize-gallery-modal__item video {
  max-width: 100%;
  max-height: 80vh;
  object-fit: contain;
  display: block;
  background: #000;
}

/* Video in gallery modal - Desktop */
@media (min-width: 768px) {
  .wootimize-gallery-modal__item video {
    max-height: 85vh;
    border-radius: 4px;
  }
}

/* ==========================================================================
   Video Poster Mode (Auto Play OFF)
   ========================================================================== */

.wootimize-video-poster {
  position: relative;
  width: 100%;
  height: 100%;
  background: #1e1e1e;
  border-radius: 8px;
  overflow: hidden;
}

.wootimize-video-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.wootimize-video-poster__placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  background: #2a2a2a;
}

.wootimize-video-poster__placeholder .dashicons {
  font-size: 32px;
  width: 32px;
  height: 32px;
  color: #666;
}

.wootimize-video-poster__play-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0, 0, 0, 0.6);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, transform 0.2s ease;
}

.wootimize-video-poster__play-icon .dashicons {
  font-size: 20px;
  width: 20px;
  height: 20px;
  color: #fff;
  margin-left: 3px; /* Optical centering for play icon */
}

.wootimize-gallery-trigger:hover .wootimize-video-poster__play-icon {
  background: rgba(0, 0, 0, 0.8);
  transform: translate(-50%, -50%) scale(1.1);
}

/* Smaller play icon for smaller thumbnails */
.review-media-item .wootimize-video-poster__play-icon {
  width: 32px;
  height: 32px;
}

.review-media-item .wootimize-video-poster__play-icon .dashicons {
  font-size: 16px;
  width: 16px;
  height: 16px;
  margin-left: 2px;
}

/* Video button reset */
button.wootimize-gallery-trigger[data-type="video"] {
  background: transparent;
}
