/* ==========================================================================
   Elemento - Opinie produktowe (Product Reviews & Submission Form)
   ========================================================================== */

.el-pdp-reviews {
  padding: clamp(3.5rem, 6vw, 6rem) 0 clamp(4rem, 7vw, 7rem);
  background: var(--light-bg, #fbf9f5);
  border-top: 1px solid rgba(30, 30, 30, 0.08);
  position: relative;
  color: var(--dark-text, #1e1e1e);
}

.el-pdp-reviews .ifil-container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 clamp(1rem, 3vw, 2.5rem);
}

/* --------------------------------------------------------------------------
   Header sekcji
   -------------------------------------------------------------------------- */
.el-pdp-reviews__head {
  text-align: center;
  max-width: 680px;
  margin: 0 auto clamp(2.5rem, 4vw, 3.5rem);
}

.el-pdp-reviews__eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--light-text, #7a756b);
  font-weight: 600;
  margin-bottom: 0.6rem;
}

.el-pdp-reviews__title {
  font-family: var(--font-heading, "Cormorant Garamond", serif);
  font-size: clamp(2rem, 3.5vw, 2.85rem);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--dark-text, #1e1e1e);
  margin: 0 0 0.75rem;
}

.el-pdp-reviews__count {
  font-size: 0.75em;
  color: var(--light-text, #888);
  font-weight: 400;
}

.el-pdp-reviews__lead {
  font-size: 1rem;
  line-height: 1.55;
  color: var(--light-text, #666);
  margin: 0;
}

/* --------------------------------------------------------------------------
   Lista opinii (Siatka kart)
   -------------------------------------------------------------------------- */
.el-pdp-reviews__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin-bottom: clamp(3rem, 5vw, 4.5rem);
}

@media (min-width: 768px) {
  .el-pdp-reviews__grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.75rem;
  }
}

@media (min-width: 1080px) {
  .el-pdp-reviews__grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
  }
}

/* Karta pojedynczej opinii */
.el-review-card {
  background: #ffffff;
  border: 1px solid rgba(30, 30, 30, 0.08);
  border-radius: 12px;
  padding: 1.65rem 1.75rem;
  display: flex;
  flex-direction: column;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
  position: relative;
  box-shadow: 0 4px 18px rgba(30, 30, 30, 0.03);
}

.el-review-card:hover {
  transform: translateY(-2px);
  border-color: rgba(30, 30, 30, 0.16);
  box-shadow: 0 10px 28px rgba(30, 30, 30, 0.07);
}

.el-review-card__header {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  margin-bottom: 1.15rem;
  padding-bottom: 0.9rem;
  border-bottom: 1px solid rgba(30, 30, 30, 0.06);
}

.el-review-card__avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--el-pdp-sticky-bg, #ebe3d2);
  color: var(--dark-text, #1e1e1e);
  font-family: var(--font-heading, "Cormorant Garamond", serif);
  font-size: 1.35rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 1px solid rgba(30, 30, 30, 0.1);
}

.el-review-card__meta {
  flex: 1;
  min-width: 0;
}

.el-review-card__author {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--dark-text, #1e1e1e);
  margin: 0 0 0.2rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.el-review-card__sub {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
  font-size: 0.78rem;
}

.el-review-card__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: #eef7f0;
  color: #1a7f37;
  padding: 0.15rem 0.5rem;
  border-radius: 20px;
  font-weight: 600;
  font-size: 0.72rem;
  letter-spacing: 0.01em;
}

.el-review-card__date {
  color: var(--light-text, #8c887e);
}

.el-review-card__body {
  font-size: 0.95rem;
  line-height: 1.6;
  color: #333333;
  flex: 1;
}

.el-review-card__body p {
  margin: 0 0 0.6rem;
}

.el-review-card__body p:last-child {
  margin-bottom: 0;
}

/* Zdjęcie w karcie opinii */
.el-review-card__photo-box {
  margin-top: 1.25rem;
}

.el-review-card__photo-link {
  display: inline-block;
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid rgba(30, 30, 30, 0.1);
  line-height: 0;
  cursor: pointer;
  max-width: 120px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.el-review-card__photo-link:hover {
  transform: scale(1.03);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
}

.el-review-card__photo {
  width: 120px;
  height: 90px;
  object-fit: cover;
  display: block;
}

.el-review-card__photo-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.el-review-card__photo-link:hover .el-review-card__photo-overlay {
  opacity: 1;
}

/* Brak opinii */
.el-pdp-reviews__empty {
  text-align: center;
  padding: 3rem 1.5rem;
  background: #ffffff;
  border: 1px dashed rgba(30, 30, 30, 0.18);
  border-radius: 12px;
  max-width: 600px;
  margin: 0 auto clamp(2.5rem, 4vw, 4rem);
}

.el-pdp-reviews__empty-title {
  font-family: var(--font-heading, "Cormorant Garamond", serif);
  font-size: 1.5rem;
  font-weight: 500;
  margin: 0 0 0.5rem;
  color: var(--dark-text, #1e1e1e);
}

.el-pdp-reviews__empty-desc {
  font-size: 0.95rem;
  color: var(--light-text, #666);
  margin: 0;
}

/* --------------------------------------------------------------------------
   Formularz dodawania opinii
   -------------------------------------------------------------------------- */
.el-pdp-reviews__form-wrapper {
  max-width: 780px;
  margin: 0 auto;
}

.el-review-form-card {
  background: #ffffff;
  border: 1px solid rgba(30, 30, 30, 0.1);
  border-radius: 16px;
  padding: clamp(1.75rem, 4vw, 3rem);
  box-shadow: 0 12px 36px rgba(30, 30, 30, 0.05);
}

.el-review-form-card__head {
  text-align: center;
  margin-bottom: 2rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid rgba(30, 30, 30, 0.08);
}

.el-review-form-card__title {
  font-family: var(--font-heading, "Cormorant Garamond", serif);
  font-size: clamp(1.65rem, 2.8vw, 2.15rem);
  font-weight: 500;
  line-height: 1.2;
  margin: 0 0 0.5rem;
  color: var(--dark-text, #1e1e1e);
}

.el-review-form-card__desc {
  font-size: 0.92rem;
  line-height: 1.5;
  color: var(--light-text, #666);
  margin: 0;
  max-width: 580px;
  margin-left: auto;
  margin-right: auto;
}

/* Pola formularza */
.el-review-form__row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  margin-bottom: 1.25rem;
}

@media (min-width: 600px) {
  .el-review-form__row {
    grid-template-columns: 1fr 1fr;
  }
}

.el-review-form__field {
  margin-bottom: 1.25rem;
}

.el-review-form__label {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--dark-text, #1e1e1e);
  margin-bottom: 0.45rem;
}

.el-review-form__label .required {
  color: #c93b2b;
  margin-left: 0.15rem;
}

.el-review-form__input,
.el-review-form__textarea {
  width: 100%;
  padding: 0.75rem 0.95rem;
  border: 1px solid rgba(30, 30, 30, 0.2);
  border-radius: 8px;
  background: #fdfdfd;
  font-size: 0.95rem;
  color: #1e1e1e;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
  box-sizing: border-box;
  font-family: inherit;
}

.el-review-form__input:focus,
.el-review-form__textarea:focus {
  outline: none;
  border-color: #1e1e1e;
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(30, 30, 30, 0.08);
}

.el-review-form__textarea {
  resize: vertical;
  min-height: 110px;
  line-height: 1.5;
}

.el-review-form__hint {
  display: block;
  font-size: 0.78rem;
  color: var(--light-text, #7a756b);
  margin-top: 0.35rem;
}

/* Upload zdjęcia */
.el-review-form__upload-box {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  position: relative;
}

.el-review-form__file-input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.el-review-form__file-trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.65rem 1rem;
  background: #f5f2eb;
  border: 1px dashed rgba(30, 30, 30, 0.28);
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.88rem;
  color: var(--dark-text, #1e1e1e);
  font-weight: 500;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.el-review-form__file-trigger:hover,
.el-review-form__file-input:focus + .el-review-form__file-trigger {
  background: #ece7dc;
  border-color: #1e1e1e;
}

.el-review-form__file-remove {
  background: #fee2e2;
  color: #dc2626;
  border: 1px solid #fca5a5;
  border-radius: 50%;
  width: 26px;
  height: 26px;
  font-size: 16px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  transition: background-color 0.2s ease;
}

.el-review-form__file-remove:hover {
  background: #fca5a5;
  color: #991b1b;
}

/* Zgoda RODO / Polityka prywatności */
.el-review-form__field--consent {
  margin: 1.5rem 0 1.75rem;
}

.el-review-form__checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  font-size: 0.85rem;
  line-height: 1.45;
  color: #4a4a4a;
  cursor: pointer;
}

.el-review-form__checkbox {
  margin-top: 0.2rem;
  accent-color: #1e1e1e;
  cursor: pointer;
}

.el-review-form__checkbox-label a {
  color: #1e1e1e;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.el-review-form__checkbox-label a:hover {
  color: #000000;
}

/* Stopka formularza i przycisk */
.el-review-form__footer {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

@media (min-width: 600px) {
  .el-review-form__footer {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

.el-review-form__submit {
  min-width: 180px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.6rem;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  background: #1e1e1e;
  color: #ffffff;
  border: 1px solid #1e1e1e;
  transition: background-color 0.2s ease, transform 0.15s ease;
}

.el-review-form__submit:hover:not(:disabled) {
  background: #333333;
  border-color: #333333;
}

.el-review-form__submit:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.el-review-form__pending-notice {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.78rem;
  color: var(--light-text, #7a756b);
  line-height: 1.4;
  max-width: 440px;
}

.el-review-form__spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-radius: 50%;
  border-top-color: #ffffff;
  animation: elReviewSpin 0.7s linear infinite;
}

@keyframes elReviewSpin {
  to {
    transform: rotate(360deg);
  }
}

/* Komunikaty zwrotne (Alert feedback) */
.el-review-form__feedback {
  padding: 1rem 1.25rem;
  border-radius: 8px;
  margin-bottom: 1.5rem;
  font-size: 0.92rem;
  line-height: 1.5;
  animation: elFadeIn 0.3s ease;
}

.el-review-form__feedback--success {
  background: #eef7f0;
  border: 1px solid #c2e2c9;
  color: #14532d;
}

.el-review-form__feedback--error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
}

@keyframes elFadeIn {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* --------------------------------------------------------------------------
   Modal Lightbox (Powiększenie zdjęcia)
   -------------------------------------------------------------------------- */
.el-review-modal {
  position: fixed;
  inset: 0;
  z-index: 10090;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.el-review-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 15, 15, 0.85);
  backdrop-filter: blur(4px);
  animation: elModalFade 0.25s ease;
}

.el-review-modal__content {
  position: relative;
  z-index: 2;
  max-width: 90vw;
  max-height: 85vh;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: elModalZoom 0.25s ease;
}

.el-review-modal__image {
  max-width: 100%;
  max-height: 85vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5);
}

.el-review-modal__close {
  position: absolute;
  top: -42px;
  right: -6px;
  background: transparent;
  border: 0;
  color: #ffffff;
  font-size: 32px;
  line-height: 1;
  cursor: pointer;
  padding: 6px;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.el-review-modal__close:hover {
  opacity: 0.8;
  transform: scale(1.1);
}

@keyframes elModalFade {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes elModalZoom {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}
