/* EuroFlora Advanced Search Styles - Matching Website Theme */

/* CSS Variables matching the website theme */
:root {
  --euroflora-verde: #039a46;
  --euroflora-rosso: #d81b24;
  --euroflora-verdino: #dde5da;
  --euroflora-nero: #000000;
  --euroflora-boxhomeverdino: rgba(3, 154, 70, 0.04);
  --euroflora-boxshadow: rgba(216, 27, 36, 0.04);
}

/* Search Input Box */
.euroflora-search-box-container {
  position: relative;
  max-width: 500px;
  margin: 0 auto;
}
.rg-news-item h3 a {
  white-space: normal;
}
.euroflora-search-box {
  position: relative;
  display: flex;
  align-items: center;
  background: #fff;
  border: 2px solid #e1e5e9;
  border-radius: 35px;
  overflow: hidden;
  transition: all 0.3s ease;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.euroflora-search-box:hover {
  border-color: var(--euroflora-verde);
  box-shadow: 0 4px 20px var(--euroflora-boxhomeverdino);
}

.euroflora-search-input {
  flex: 1;
  padding: 15px 20px;
  border: none;
  outline: none;
  font-size: 16px;
  background: transparent;
  cursor: pointer;
  font-family: inherit;
}

.euroflora-search-input::placeholder {
  color: #666;
}

.euroflora-search-trigger {
  padding: 15px 20px;
  /* background: var(--euroflora-verde); */
  background: transparent;
  border: none;
  color: white;
  cursor: pointer;
  transition: background-color 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 500;
  border-radius: 100px;
  margin: 5px;
}

.euroflora-search-trigger:hover {
  background: var(--euroflora-rosso);
}
.euroflora-search-trigger:hover > svg {
  color: #fff;
}

/* Search Modal */
.euroflora-search-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  z-index: 999999999;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 20px;
  overflow-y: auto;
  margin-block-start: 0 !important;
}

.euroflora-search-modal-content {
  background: white;
  border-radius: 12px;
  width: 100%;
  max-width: 1400px;
  max-height: 90vh;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  margin-top: 50px;
  animation: modalSlideIn 0.3s ease-out;
}

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

.euroflora-search-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 25px;
  border-bottom: 1px solid #e1e5e9;
  background: var(--euroflora-verdino);
}

.euroflora-search-modal-header h3 {
  margin: 0;
  color: var(--euroflora-nero);
  font-size: 20px;
  font-weight: 600;
  font-family: inherit;
}

.euroflora-search-modal-close {
  font-size: 28px;
  color: #666;
  cursor: pointer;
  line-height: 1;
  transition: color 0.3s ease;
}

.euroflora-search-modal-close:hover {
  color: var(--euroflora-rosso);
}

.euroflora-search-modal-body {
  padding: 25px;
  border-bottom: 1px solid #e1e5e9;
}

/* Search Form */
.euroflora-search-input-group {
  display: flex;
  margin-bottom: 20px;
  gap: 10px;
}

#euroflora-search-query {
  flex: 1;
  padding: 12px 16px;
  border: 2px solid #e1e5e9;
  border-radius: 35px;
  font-size: 16px;
  outline: none;
  transition: border-color 0.3s ease;
  font-family: inherit;
}

#euroflora-search-query:focus {
  border-color: var(--euroflora-verde);
  box-shadow: 0 0 0 3px var(--euroflora-boxhomeverdino);
}

.euroflora-search-btn {
  padding: 12px 24px;
  background: var(--euroflora-verde);
  color: white;
  border: none;
  border-radius: 35px;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.3s ease;
  font-family: inherit;
}

.euroflora-search-btn:hover {
  background: var(--euroflora-rosso);
}

/* Search Filters */
.euroflora-search-filters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 15px;
  margin-bottom: 20px;
}

.euroflora-filter-group {
  display: flex;
  flex-direction: column;
}

.euroflora-filter-group label {
  font-weight: 500;
  margin-bottom: 5px;
  color: var(--euroflora-nero);
  font-size: 14px;
  font-family: inherit;
}

.euroflora-filter-group select,
.euroflora-filter-group input {
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 14px;
  outline: none;
  transition: border-color 0.3s ease;
  font-family: inherit;
}

.euroflora-filter-group select:focus,
.euroflora-filter-group input:focus {
  border-color: var(--euroflora-verde);
}

/* Search Suggestions - Updated for popular queries */
.euroflora-search-suggestions {
  margin-top: 10px;
  /* Remove absolute positioning - suggestions now appear inline */
}

/* Remove old dropdown styles - we now use tag cloud */
.euroflora-suggestions-dropdown {
  display: none; /* Hide old dropdown style */
}

.euroflora-suggestion-item {
  display: none; /* Hide old suggestion items */
}

/* Loading Spinner */
.euroflora-search-loading {
  text-align: center;
  padding: 40px 20px;
}

.euroflora-spinner {
  display: inline-block;
  width: 40px;
  height: 40px;
  border: 3px solid var(--euroflora-verdino);
  border-top: 3px solid var(--euroflora-verde);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

/* Search Results */
.euroflora-search-results-container {
  max-height: 60vh;
  overflow-y: auto;
  padding: 20px 25px;
  scroll-behavior: smooth;
  /* FIXED: Ensure load more buttons are clickable inside modal */
  position: relative;
  z-index: 1;
}

.euroflora-search-results-container .euroflora-load-more-section {
  /* Ensure load more section is above other content */
  position: relative;
  z-index: 100;
  background: white;
  /* Add slight border to separate from content above */
  border-top: 2px solid #f0f0f0;
  margin-top: 15px;
}

.euroflora-search-section {
  margin-bottom: 15px;
  padding-bottom: 10px;
}

/* Categories section - more compact */
.euroflora-search-section:has(.euroflora-search-categories) {
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid #eee;
}

.euroflora-search-section-title {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 8px;
  color: #666;
  border-bottom: none;
  padding-bottom: 0;
  font-family: inherit;
}

/* Products section title - keep it prominent */
.euroflora-search-section:has(.euroflora-search-products) .euroflora-search-section-title {
  font-size: 16px;
  color: var(--euroflora-nero);
  margin-bottom: 12px;
}

.euroflora-search-products {
  display: flex;
  flex-direction: row;
  gap: 15px;
  flex-wrap: wrap;
}

.euroflora-search-categories {
  display: flex;
  flex-direction: row;
  gap: 8px;
  flex-wrap: wrap;
  padding: 5px 0;
}

.euroflora-search-result-card {
  background: white;
  border: 1px solid #e1e5e9;
  border-radius: 8px;
  padding: 15px;
  transition: all 0.3s ease;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  display: flex;
  align-items: flex-start;
  gap: 15px;
  width: calc(33% - 8px);
  flex-direction: row;
  position: relative;
}

.euroflora-result-image {
  flex-shrink: 0;
  width: 80px;
  height: 80px;
  border-radius: 6px;
  overflow: hidden;
  background: #f5f5f5;
  position: relative;
}

.euroflora-result-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Badges and icons container - positioned on card */
.euroflora-card-badges {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
  z-index: 5;
}

.euroflora-card-badges > * {
  pointer-events: auto;
}

/* Sottocosto badge - top left of card */
.euroflora-badge-sottocosto {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 10;
  background: #d81b24;
  color: white;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: bold;
  text-transform: uppercase;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

/* Promotion badges - top right of card */
.euroflora-badge-promo {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 10;
  padding: 4px 12px;
  border-radius: 999px;
  font-weight: bold;
  font-size: 11px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.euroflora-badge-promo.promo-multi-conf-pill {
  top: 42px;
}

/* Wishlist heart - top right, below badges */
.euroflora-card-badges .ef-wishlist-heart {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 11;
  background: rgba(255, 255, 255, 0.95);
  border: none;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  padding: 0;
  transition: all 0.3s ease;
}

.euroflora-card-badges .ef-wishlist-heart:hover {
  background: rgba(255, 255, 255, 1);
  transform: scale(1.1);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.euroflora-card-badges .ef-wishlist-heart.in-wishlist {
  background: #d81b24;
  color: white;
}

.euroflora-card-badges .ef-wishlist-heart .heart-icon {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  fill: none;
}

.euroflora-card-badges .ef-wishlist-heart.in-wishlist .heart-icon {
  fill: currentColor;
}

/* Adjust wishlist position if badges are present */
/* .euroflora-card-badges:has(.promo-evidenza-pill) .ef-wishlist-heart,
.euroflora-card-badges:has(.promo-multi-conf-pill) .ef-wishlist-heart {
  top: 76px;
} */

/* Cart quantity indicator - bottom left of card */
.euroflora-card-badges .ef-cart-qty-indicator {
  position: absolute;
  bottom: 8px;
  left: 8px;
  z-index: 8;
  display: flex;
  align-items: center;
  gap: 4px;
  background: #039a47;
  color: #fff;
  padding: 2px 8px;
  border-radius: 16px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
  font-size: 12px;
  border: 1px solid #fff;
  font-weight: bold;
}

.euroflora-card-badges .ef-cart-qty-indicator img {
  width: 14px;
  height: 14px;
  filter: invert(1);
}

.euroflora-result-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

/* Compact category pills - inline tag style */
.euroflora-category-pill {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  font-size: 13px;
  border-radius: 20px;
  background: white;
  border: 1px solid var(--euroflora-verde);
  color: var(--euroflora-verde);
  font-weight: 500;
  transition: all 0.2s ease;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
}

.euroflora-category-pill:hover {
  background: var(--euroflora-verde);
  color: white;
  text-decoration: none;
  transform: translateY(-1px);
}

.euroflora-category-pill:visited {
  color: var(--euroflora-verde);
}

.euroflora-category-pill:hover:visited {
  color: white;
}

.euroflora-category-pill mark {
  background: transparent;
  color: inherit;
  font-weight: 700;
}

/* Legacy category card styles - hidden */
.euroflora-category-card {
  display: none !important;
}
.euroflora-product-shop,
.euroflora-product-reparto,
.euroflora-product-categoria,
.euroflora-product-score,
.euroflora-product-clicks {
  display: none !important;
}

.euroflora-search-result-card:hover {
  border-color: var(--euroflora-verde);
  box-shadow: 0 4px 15px var(--euroflora-boxhomeverdino);
  transform: translateY(-2px);
}

.euroflora-result-image {
  width: 80px;
  height: 80px;
  border-radius: 6px;
  overflow: hidden;
  background: #f8f9fa;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.euroflora-result-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.euroflora-result-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.euroflora-result-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--euroflora-nero);
  line-height: 1.4;
  font-family: inherit;
}

.euroflora-result-title mark {
  background: var(--euroflora-boxhomeverdino);
  color: var(--euroflora-verde);
  padding: 2px 4px;
  border-radius: 3px;
}

.euroflora-result-meta {
  font-size: 14px;
  color: #666;
  margin-bottom: 10px;
}

.euroflora-result-meta span {
  display: block;
  margin-bottom: 4px;
  font-size: 13px;
  color: #666;
}

.euroflora-product-code,
.euroflora-product-availability,
.euroflora-product-price {
  display: block;
  margin-bottom: 4px;
}

.euroflora-product-code {
  color: #666;
  font-size: 12px;
}

.euroflora-product-availability {
  color: #333;
  font-size: 13px;
}

.euroflora-product-availability strong {
  color: var(--euroflora-verde);
  font-weight: 600;
}

.euroflora-product-price {
  color: #333;
  font-size: 13px;
  margin-top: 4px;
  display: inline-block;
}

.euroflora-product-price strong {
  color: var(--euroflora-verde);
  font-weight: 600;
  font-size: 14px;
}

/* Make price display inline with availability on same line */
.euroflora-result-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.euroflora-product-info-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: baseline;
}

.euroflora-product-availability {
  display: inline-block;
}

.euroflora-product-price {
  display: inline-block;
}

.euroflora-product-price .prezzo-originale {
  color: #999;
  text-decoration: line-through;
  font-size: 12px;
  margin-left: 6px;
}

/* Inline price display */
.euroflora-price-inline {
  display: inline-block;
  white-space: nowrap;
}

/* Wishlist heart in search results */
.euroflora-result-image .ef-wishlist-heart {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(255, 255, 255, 0.95);
  border: none;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 11;
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  padding: 0;
}

.euroflora-result-image .ef-wishlist-heart:hover {
  background: rgba(255, 255, 255, 1);
  transform: scale(1.1);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.euroflora-result-image .ef-wishlist-heart.in-wishlist {
  background: var(--euroflora-rosso, #d81b24);
  color: white;
}

.euroflora-result-image .ef-wishlist-heart .heart-icon {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  fill: none;
}

.euroflora-result-image .ef-wishlist-heart.in-wishlist .heart-icon {
  fill: currentColor;
}

/* Adjust badge positioning when wishlist is present */
.euroflora-result-image .promo-evidenza-pill {
  top: 8px;
  right: 8px;
}

.euroflora-result-image .promo-multi-conf-pill {
  top: 42px;
  right: 8px;
}

/* Cart quantity indicator */
.euroflora-result-image .ef-cart-qty-indicator {
  display: flex !important;
  position: absolute;
  bottom: 8px;
  left: 8px;
  z-index: 8;
  align-items: center;
  gap: 4px;
  background: #039a47;
  color: #fff;
  padding: 2px 8px;
  border-radius: 16px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
  font-size: 12px;
  border: 1px solid #fff;
  font-weight: bold;
}

.euroflora-result-image .ef-cart-qty-indicator img {
  width: 14px;
  height: 14px;
  filter: invert(1);
}

.euroflora-category-description {
  font-size: 14px;
  color: #666;
  line-height: 1.4;
  margin-bottom: 10px;
}

.euroflora-result-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* Ensure buttons fit well in product cards */
.euroflora-result-actions .euroflora-btn {
  flex: 1;
  min-width: 120px;
  text-align: center;
}

.euroflora-btn {
  padding: 8px 16px;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: inherit;
  color: inherit;
}

.euroflora-btn:hover {
  text-decoration: none;
}

.euroflora-btn:focus {
  outline: 2px solid var(--euroflora-verde);
  outline-offset: 2px;
  text-decoration: none;
}

.euroflora-btn-primary {
  background: var(--euroflora-verde);
  color: white;
}

.euroflora-btn-primary:hover {
  background: var(--euroflora-rosso);
  color: white;
}

.euroflora-btn-primary:visited {
  color: white;
}

.euroflora-btn-secondary {
  background: #f8f9fa;
  color: var(--euroflora-nero);
  border: 1px solid #e1e5e9;
}

.euroflora-btn-secondary:hover {
  background: var(--euroflora-verdino);
  border-color: var(--euroflora-verde);
  color: var(--euroflora-nero);
}

.euroflora-btn-secondary:visited {
  color: var(--euroflora-nero);
}

.euroflora-search-suggestions-list {
  margin-top: 20px;
  text-align: center;
}

.euroflora-suggestion-btn {
  display: inline-block;
  margin: 5px;
  padding: 8px 16px;
  background: var(--euroflora-verdino);
  color: var(--euroflora-verde);
  border: 1px solid var(--euroflora-verde);
  border-radius: 20px;
  text-decoration: none;
  font-size: 14px;
  transition: all 0.3s ease;
  cursor: pointer;
  font-family: inherit;
}

.euroflora-suggestion-btn:hover {
  background: var(--euroflora-verde);
  color: white;
}

/* No Results */
.euroflora-no-results {
  text-align: center;
  padding: 40px 20px;
}

.euroflora-no-results p {
  color: #666;
  font-size: 16px;
  margin-bottom: 20px;
}

/* Error States */
.euroflora-search-error {
  background: #f8d7da;
  color: #721c24;
  padding: 15px;
  border-radius: 8px;
  margin: 20px 0;
  border: 1px solid #f5c6cb;
}

/* Responsive Design */
@media (max-width: 768px) {
  .euroflora-search-section {
    margin-bottom: 0;
    padding-bottom: 0;
  }
  .euroflora-search-suggestions-list {
    display: flex;
    overflow: scroll;
    white-space: nowrap;
    padding-bottom: 10px;
    flex-direction: row;
    gap: 5px;
    padding-left: 15px !important;
  }
  .euroflora-suggestion-btn,
  .euroflora-popular-query-tag {
    margin: 0;
    padding: 6px 12px;
  }
  .euroflora-suggestions-section {
    position: relative;
    padding: 6px 0 !important;
    flex-direction: row;
    flex-wrap: wrap;
  }
  
  .euroflora-suggestions-section .euroflora-search-section-title {
    width: 100%;
    margin-bottom: 6px;
  }
  
  .euroflora-search-categories {
    gap: 6px;
  }
  
  .euroflora-category-pill {
    padding: 5px 10px;
    font-size: 12px;
  }
  .euroflora-popular-queries {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    overflow: scroll;
    white-space: nowrap;
    gap: 5px;
    position: relative;
    padding-top: 25px !important;
    padding-bottom: 10px !important;
  }
  span.euroflora-popular-label,
  .euroflora-suggestions-section h4 {
    position: absolute;
    top: 0px;
    left: 5px;
    font-size: 12px !important;
    margin: 0;
  }
  .promo-multi-conf-pill {
    font-size: 10px !important;
  }
  .rg-cat-item.js-prodotto.js-prodotto-multi-conf {
    width: calc(50% - 5px) !important;
  }
  .euroflora-card-badges:has(.rg-prod-scont) .ef-wishlist-heart {
    top: 30px !important;
  }
  .euroflora-card-badges:not(:has(.rg-prod-scont)) .ef-wishlist-heart {
    top: 8px !important;
  }
  .euroflora-card-badges .ef-cart-qty-indicator {
    bottom: -5px !important;
    left: -5px !important;
  }
  .euroflora-search-result-card {
    padding-bottom: 30px !important;
  }
  .euroflora-search-modal {
    padding: 10px;
  }

  .euroflora-search-modal-content {
    margin-top: 20px;
    max-height: 95vh;
    overflow-y: auto;
  }

  .euroflora-search-modal-header,
  .euroflora-search-modal-body {
    padding: 20px;
  }

  .euroflora-search-results-container {
    padding: 15px 20px;
  }

  .euroflora-search-filters {
    grid-template-columns: 1fr;
  }

  .euroflora-search-input-group {
    flex-direction: row;
    margin-bottom: 0;
  }

  .euroflora-search-result-card {
    padding: 12px;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    width: calc(100% - 8px);
  }

  .euroflora-result-image {
    width: 60px;
    height: 60px;
    align-self: center;
  }

  .euroflora-result-meta {
    font-size: 12px;
  }

  .euroflora-result-meta span {
    display: block;
    margin: 2px 0;
  }

  /* Mobile styles for loading and load more */
  .euroflora-loading-more {
    padding: 15px;
    margin: 10px 0;
  }

  .euroflora-loading-more span {
    font-size: 13px;
  }

  .euroflora-load-more-section {
    padding: 15px;
  }

  .euroflora-load-more-btn {
    min-width: 180px;
    padding: 10px 20px;
    font-size: 14px;
  }

  .euroflora-load-more-hint {
    font-size: 11px;
  }
}

@media (max-width: 480px) {
  .euroflora-search-box {
    border-radius: 35px;
  }

  .euroflora-search-input,
  .euroflora-search-trigger {
    padding: 12px 16px;
  }

  #euroflora-search-query {
    font-size: 14px;
    width: 72%;
  }
  .euroflora-search-btn {
    width: 28%;
  }

  .euroflora-search-modal-header h3 {
    font-size: 18px;
  }
}

/* Focus and Accessibility */
.euroflora-search-result-card:focus {
  outline: 2px solid var(--euroflora-verde);
  outline-offset: 2px;
}

/* Dark Mode Support - DISABLED: Force light theme for better readability */
/* Original dark mode styles removed to ensure consistent light theme appearance */
.euroflora-search-modal-content {
  background: white !important;
  color: #000 !important;
}

.euroflora-search-modal-header {
  background: var(--euroflora-verdino) !important;
  border-bottom-color: #e1e5e9 !important;
}

.euroflora-search-result-card {
  background: white !important;
  border-color: #e1e5e9 !important;
}

.euroflora-result-title {
  color: var(--euroflora-nero) !important;
}

.euroflora-result-meta span {
  background: #f8f9fa !important;
  color: #666 !important;
}

/* Ensure product modal displays correctly within search modal */
#euroflora-search-modal #prodotto-dettaglio-modal {
  position: fixed !important;
  z-index: 999999999999 !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
  background: rgba(0, 0, 0, 0.8) !important;
  overflow: auto !important;
}

#euroflora-search-modal #prodotto-dettaglio-modal .modal-content {
  max-width: 1200px !important;
  margin: 5% auto !important;
}

button.euroflora-search-trigger svg {
  color: #039a47;
}

/* Popular Queries Tag Cloud */
.euroflora-popular-queries {
  margin: 15px 0;
  padding: 15px;
  background: var(--euroflora-boxhomeverdino);
  border-radius: 8px;
  border: 1px solid var(--euroflora-verdino);
}

.euroflora-popular-label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--euroflora-verde);
  margin-bottom: 8px;
  font-family: inherit;
}

.euroflora-popular-query-tag {
  display: inline-block;
  margin: 3px 5px 3px 0;
  padding: 6px 12px;
  background: white;
  color: var(--euroflora-verde);
  border: 1px solid var(--euroflora-verde);
  border-radius: 15px;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: inherit;
  font-weight: 500;
}

.euroflora-popular-query-tag:hover {
  background: var(--euroflora-verde);
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(3, 154, 70, 0.3);
}

.euroflora-popular-query-tag:active {
  transform: translateY(0);
}

/* Loading indicator for infinite scroll */
.euroflora-loading-more {
  text-align: center;
  padding: 20px;
  color: #666;
  font-style: italic;
  background: var(--euroflora-boxhomeverdino);
  border-radius: 8px;
  margin: 15px 0;
  border: 1px solid var(--euroflora-verdino);
  animation: fadeInUp 0.3s ease-out;
}

.euroflora-loading-more .euroflora-spinner {
  width: 20px;
  height: 20px;
  margin-right: 10px;
  display: inline-block;
  vertical-align: middle;
  border-width: 2px;
}

.euroflora-loading-more span {
  font-size: 14px;
  font-weight: 500;
  color: var(--euroflora-verde);
}

/* Load More Button Section */
.euroflora-load-more-section {
  text-align: center;
  padding: 20px;
  margin-top: 20px;
  border-top: 1px solid #e1e5e9;
  position: relative;
  z-index: 10;
}

.euroflora-load-more-btn {
  min-width: 200px;
  padding: 12px 24px;
  font-size: 16px;
  font-weight: 600;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  pointer-events: auto !important;
  z-index: 20;
  cursor: pointer;
  /* FIXED: Ensure button is always clickable inside modal */
  background: #f8f9fa !important;
  border: 1px solid #e1e5e9 !important;
  color: var(--euroflora-nero) !important;
}

.euroflora-load-more-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(3, 154, 70, 0.3);
  background: var(--euroflora-verdino) !important;
  border-color: var(--euroflora-verde) !important;
  color: var(--euroflora-nero) !important;
}

.euroflora-load-more-btn:active {
  transform: translateY(0);
}

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

.euroflora-load-more-btn.loading {
  opacity: 0.8;
  cursor: wait;
  pointer-events: none;
}

.euroflora-load-more-hint {
  margin-top: 10px;
  font-size: 12px;
  color: #999;
  font-style: italic;
}

/* Animation for loading indicator */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Loading state for load more button */
.euroflora-load-more-btn.loading span {
  opacity: 0;
}

.euroflora-load-more-btn.loading::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 2px solid transparent;
  border-top: 2px solid white;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

/* Load More Error Message */
.euroflora-load-more-error {
  background: #f8d7da;
  color: #721c24;
  padding: 15px;
  border-radius: 8px;
  margin: 15px 0;
  border: 1px solid #f5c6cb;
  text-align: center;
}

.euroflora-load-more-error p {
  margin: 0 0 10px 0;
  font-size: 14px;
}

.euroflora-retry-btn {
  background: var(--euroflora-rosso);
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.3s ease;
}

.euroflora-retry-btn:hover {
  background: #b71c1c;
  transform: translateY(-1px);
}

.euroflora-retry-btn:active {
  transform: translateY(0);
}

/* Mobile styles for error messages */
.euroflora-load-more-error {
  padding: 12px;
  margin: 10px 0;
}

.euroflora-load-more-error p {
  font-size: 13px;
}

.euroflora-retry-btn {
  padding: 8px 16px;
  font-size: 13px;
}

/* Compact Suggestions Section */
.euroflora-suggestions-section {
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 8px 0;
  margin-bottom: 12px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.euroflora-suggestions-section .euroflora-search-section-title {
  color: #666;
  font-size: 13px;
  margin: 0;
  border-bottom: none;
  padding-bottom: 0;
  font-weight: 500;
  white-space: nowrap;
}

.euroflora-suggestions-section .euroflora-search-suggestions-list {
  margin: 0;
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
}

.euroflora-suggestions-section .euroflora-suggestion-btn {
  background: #f5f5f5;
  color: #333;
  border: 1px solid #ddd;
  font-weight: 500;
  transition: all 0.2s ease;
  padding: 4px 12px;
  font-size: 12px;
  border-radius: 15px;
  margin: 0;
}

.euroflora-suggestions-section .euroflora-suggestion-btn:hover {
  background: var(--euroflora-verde);
  color: white;
  border-color: var(--euroflora-verde);
  transform: none;
  box-shadow: none;
}

/* ENHANCED: Styling for relevance scores and click counts */
.euroflora-product-score,
.euroflora-product-clicks,
.euroflora-category-score,
.euroflora-category-clicks {
  background: var(--euroflora-boxhomeverdino) !important;
  color: var(--euroflora-verde) !important;
  border: 1px solid var(--euroflora-verde);
  font-weight: 600;
  font-size: 11px;
}

.euroflora-category-meta {
  margin: 8px 0;
  font-size: 12px;
}

.euroflora-category-meta span {
  display: inline-block;
  margin-right: 10px;
  padding: 2px 6px;
  background: var(--euroflora-boxhomeverdino);
  color: var(--euroflora-verde);
  border: 1px solid var(--euroflora-verde);
  border-radius: 3px;
  font-size: 11px;
  font-weight: 600;
}

/* Enhanced Product Card Styles - Matching Category Page Cards */
.euroflora-search-result-card.rg-cat-item {
  position: relative;
}

/* Promotion badges */
.euroflora-search-result-card .promo-evidenza-pill,
.euroflora-search-result-card .promo-multi-conf-pill {
  position: absolute;
  top: -5px;
  right: -5px;
  z-index: 10;
  padding: 5px 10px;
  border-radius: 999px;
  font-weight: bold;
  font-size: 10px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.euroflora-search-result-card .promo-multi-conf-pill {
  bottom: -5px;
  top: auto;
  background: var(--euroflora-verde) !important;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.euroflora-search-result-card .promo-multi-conf-pill svg {
  width: 16px;
  height: 16px;
  display: inline-block;
  vertical-align: middle;
}

/* Sottocosto badge */
.euroflora-search-result-card .rg-prod-scont {
  position: absolute;
  top: -5px;
  left: -5px;
  background: var(--euroflora-rosso);
  color: white;
  padding: 5px 10px;
  border-radius: 50px;
  font-size: 10px;
  font-weight: bold;
  z-index: 10;
  text-transform: lowercase;
}

/* Product image container */
.euroflora-search-result-card .rg-cat-img {
  position: relative;
  display: block;
  width: 100%;
  padding-top: 75%;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  text-decoration: none;
}

/* Wishlist heart */
.euroflora-search-result-card .ef-wishlist-heart {
  position: absolute;
  top: 80px;
  left: 10px;
  background: rgba(255, 255, 255, 0.9);
  border: none;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 11;
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.euroflora-search-result-card .ef-wishlist-heart:hover {
  background: rgba(255, 255, 255, 1);
  transform: scale(1.1);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.euroflora-search-result-card .ef-wishlist-heart.in-wishlist {
  border: 1px solid var(--euroflora-rosso);
  color: white;
}

.euroflora-search-result-card .ef-wishlist-heart .heart-icon {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  fill: none;
}

.euroflora-search-result-card .ef-wishlist-heart.in-wishlist .heart-icon {
  fill: currentColor;
}

/* Product description list */
.euroflora-search-result-card .rg-prod-desc {
  list-style: none;
  padding: 0;
  margin: 10px 0;
  font-size: 13px;
}

.euroflora-search-result-card .rg-prod-desc li {
  margin: 5px 0;
  padding: 0;
}

.euroflora-search-result-card .rg-prod-desc li span:first-child {
  font-weight: 600;
  margin-right: 5px;
}

/* Quantity display */
.euroflora-search-result-card .rgQty {
  font-weight: 600;
}

.euroflora-search-result-card .rgQty.qtaDisp {
  color: var(--euroflora-verde);
}

.euroflora-search-result-card .rgQty.semibold {
  font-weight: 600;
}

/* Price display */
.euroflora-search-result-card .prezzo {
  font-size: 14px;
  font-weight: 600;
  color: var(--euroflora-verde);
}

.euroflora-search-result-card .prezzo .barrato {
  text-decoration: line-through;
  color: #999;
  margin-right: 8px;
}

/* Add to cart button */
.euroflora-search-result-card .box-aggiungi {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  background: var(--euroflora-verde);
  color: white;
  border: none;
  border-radius: 4px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  margin-top: 10px;
}

.euroflora-search-result-card .box-aggiungi:hover {
  background: #028a3e;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(3, 154, 70, 0.3);
}

.euroflora-search-result-card .box-aggiungi img {
  width: 18px;
  height: 18px;
  filter: brightness(0) invert(1);
}

/* Ensure product cards match category page layout */
.euroflora-search-result-card.rg-cat-item h3 {
  margin: 10px 0;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.4;
  min-height: 42px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Highlighted search terms in title */
.euroflora-search-result-card h3 mark {
  background-color: #fff3cd;
  color: #856404;
  padding: 2px 4px;
  border-radius: 3px;
  font-weight: 700;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.euroflora-search-result-card h3 mark mark {
  background-color: #ffc107;
  color: #000;
}

/* Product meta information - cleaner layout */
.euroflora-search-result-card .euroflora-product-meta {
  font-size: 12px;
  margin: 8px 0;
}

.euroflora-search-result-card .euroflora-product-meta li {
  margin: 4px 0;
  padding: 2px 0;
}

.euroflora-search-result-card .euroflora-product-meta .codice {
  color: #666;
}

.euroflora-search-result-card .euroflora-product-meta .disponibilita {
  color: #333;
}

.euroflora-search-result-card .euroflora-product-meta .prezzo {
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px solid #eee;
  font-size: 14px;
}

.euroflora-search-result-card .euroflora-product-meta .prezzo-scontato {
  color: var(--euroflora-rosso);
  font-weight: 700;
  font-size: 16px;
}

.euroflora-search-result-card .euroflora-product-meta .prezzo-originale {
  color: #999;
  font-size: 13px;
  margin-left: 6px;
}

.euroflora-search-result-card .euroflora-product-meta .prezzo-normale {
  color: var(--euroflora-verde);
  font-weight: 600;
  font-size: 15px;
}

/* Adjust spacing for cards with badges */
.euroflora-search-result-card.rg-cat-item.prod-sconto {
  border: 2px solid var(--euroflora-rosso);
}

.euroflora-product-price {
  display: flex !important;
  flex-direction: row;
  gap: 5px;
}
