/* =========================================================
   EEFE Product List Widget — style.css
   ========================================================= */

/* Layout wrapper */
.eefe-product-widget {
  display: flex;
  gap: 40px;
  align-items: flex-start;
  font-family: inherit;
  position: relative;
}

/* ─── Left column (list) ─── */
.eefe-product-left {
  flex: 0 0 55%;
  min-width: 0;
}

.eefe-product-heading {
  font-size: 1.6em;
  font-weight: 700;
  margin: 0 0 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid #e0e0e0;
}

/* List */
.eefe-product-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.eefe-product-item {
  display: flex;
  align-items: center;
  padding: 15px 10px;
  cursor: pointer;
  transition: background 0.18s ease;
  border-radius: 5px;
}

.eefe-product-item:hover {
  background: #f7faff;
}

.eefe-product-item.is-active {
  background: #eaf3ff;
}

.eefe-product-name {
  font-size: 0.95em;
  color: #111;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.18s ease;
  display: block;
  line-height: 1.35;
}

.eefe-product-name:hover {
  color: #0073aa;
  text-decoration: none;
}

.eefe-no-products {
  padding: 16px;
  color: #888;
  font-style: italic;
}

/* ─── Right column (card) ─── */
.eefe-product-right {
  flex: 0 0 40%;
  min-width: 0;
  position: sticky;
  top: 150px;
}

/* Enable sticky ONLY when mega menu is actually visible */
.whb-submenu-open .eefe-product-right,
.menu-open .eefe-product-right,
.opend > .sub-menu .eefe-product-right {
  position: sticky;
  top: 150px;
}

.eefe-product-card {
  background: #fff;
  border: 1px solid #e4e4e4;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
  opacity: 0;
  transform: translateY(8px);
  transition:
    opacity 0.22s ease,
    transform 0.22s ease;
  pointer-events: none;
  /* Card body uses flex-column so image-wrap + card-body can be reordered */
  display: flex;
  flex-direction: column;
}

/* ── Card visible state ── */
.eefe-product-card.is-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: none;
}

/* ─── Card Image ─── */
.eefe-card-image-wrap {
  width: 100%;
  overflow: hidden;
  background: #f5f5f5;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.eefe-card-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  transition: transform 0.3s ease;
}

.eefe-product-card.eefe-card-visible:hover .eefe-card-image {
  transform: scale(1.04);
}

/* ─── Card Body ─── */
.eefe-card-body {
  padding: 16px 18px 20px;
  display: flex;
  flex-direction: column;
}

.eefe-card-title {
  font-size: 1em;
  font-weight: 700;
  margin: 0 0 4px;
  color: #111;
  line-height: 1.4;
}

.eefe-card-subtitle {
  font-size: 0.875em;
  color: #666;
  margin: 0 0 8px;
  line-height: 1.4;
}

.eefe-card-price {
  font-size: 0.95em;
  color: #333;
  margin-bottom: 10px;
}

.eefe-card-price ins {
  text-decoration: none;
  font-weight: 700;
}

.eefe-card-price del {
  color: #aaa;
  font-size: 0.9em;
  margin-right: 4px;
}

/* Stars */
.eefe-card-stars {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.9em;
}

.stars-inner {
  display: inline-flex;
  gap: 2px;
}

.star-filled {
  color: #f5a623;
}

.star-empty {
  color: #ddd;
}

.eefe-card-review-count {
  color: #666;
  font-size: 0.85em;
}

/* ─── Hidden elements based on toggles ─── */
.eefe-product-widget[data-show-image="0"]    .eefe-card-image-wrap { display: none; }
.eefe-product-widget[data-show-title="0"]    .eefe-card-title      { display: none; }
.eefe-product-widget[data-show-subtitle="0"] .eefe-card-subtitle   { display: none; }
.eefe-product-widget[data-show-price="0"]    .eefe-card-price      { display: none; }
.eefe-product-widget[data-show-review="0"]   .eefe-card-stars      { display: none; }

/* ─── Responsive ─── */
@media (max-width: 768px) {
  .eefe-product-widget {
    flex-direction: column;
  }

  .eefe-product-left,
  .eefe-product-right {
    flex: 0 0 100%;
    width: 100%;
  }

  .eefe-product-right {
    position: static;
  }

  .eefe-product-card {
    opacity: 1;
    transform: none;
    pointer-events: auto;
  }
}
