/**
 * CD Product Styles
 * Custom styles for Cyfrowy Dialog products
 * Includes testimonial slider, cards, grids, etc.
 *
 * Generated by Claude Code - 2026-01-13
 */

/* === STATUS DOSTĘPNOŚCI === */
.stock.out-of-stock {
  display: inline-block;
  color: #386ab3;
  background: #eef3fb;
  font-size: 0.8em;
  font-weight: 600;
  padding: 3px 12px;
  border-radius: 20px;
  letter-spacing: 0.02em;
  margin-bottom: 8px;
}

/* === PRODUCT WRAPPER === */
.cd-product-wrapper {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

/* === GRID LAYOUTS === */
.cd-grid-2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 30px;
  margin: 30px 0;
}

@media (min-width: 768px) {
  .cd-grid-2 {
    grid-template-columns: repeat(2, 1fr);
  }
}

.cd-grid-3 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 25px;
  margin: 30px 0;
}

@media (min-width: 640px) {
  .cd-grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .cd-grid-3 {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* === CARDS === */
.cd-card {
  background: #ffffff;
  padding: 30px;
  border-radius: 15px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.cd-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

/* === TEXT ALIGNMENT === */
.cd-text-center {
  text-align: center;
}

.cd-text-left {
  text-align: left;
}

/* === LISTS === */
.cd-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.cd-list-item {
  display: flex;
  align-items: flex-start;
  margin-bottom: 15px;
  padding: 10px;
  background: #f8fafc;
  border-radius: 8px;
  transition: background 0.2s ease;
}

.cd-list-item:hover {
  background: #f1f5f9;
}

.cd-list-item svg {
  flex-shrink: 0;
  margin-right: 12px;
  margin-top: 2px;
}

/* === SIMPLE LIST (for module contents) === */
.cd-list-simple {
  list-style: none;
  padding: 0;
  margin: 0;
}

.cd-list-simple li {
  position: relative;
  padding-left: 20px;
  margin-bottom: 8px;
  color: #4a5568;
  font-size: 0.95rem;
}

.cd-list-simple li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  width: 8px;
  height: 8px;
  background: #f7941d;
  border-radius: 50%;
}

/* === ICONS === */
.cd-icon-sm {
  width: 24px;
  height: 24px;
}

.cd-icon-lg {
  width: 60px;
  height: 60px;
}

/* === AVATAR === */
.cd-avatar {
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid #f7941d;
}

/* === DIVIDER === */
.cd-divider {
  margin: 50px 0;
}

/* === UPPERCASE === */
.cd-uppercase {
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: bold;
}

/* === EXPERT BOX === */
.cd-expert-box {
  display: flex;
  flex-direction: column;
  gap: 25px;
  align-items: center;
  background: #f8fafc;
  padding: 40px;
  border-radius: 20px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

@media (min-width: 768px) {
  .cd-expert-box {
    flex-direction: row;
    text-align: left;
  }

  .cd-expert-box img {
    flex-shrink: 0;
    width: 150px;
    height: 150px;
  }
}

/* === TESTIMONIAL SLIDER === */
.cd-slider-container {
  position: relative;
  overflow: hidden;
  max-width: 800px;
  margin: 0 auto;
  background: white;
  border-radius: 15px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

#testimonial-slider {
  display: flex;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  width: 100%;
}

.cd-slide {
  min-width: 100%;
  flex: 0 0 100%;
  padding: 30px;
  box-sizing: border-box;
}

/* === DOTS === */
.cd-dots {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px 0;
  gap: 8px;
}

.cd-dot {
  cursor: pointer;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: none;
  background: #cbd5e0;
  transition: all 0.3s ease;
  padding: 0;
}

.cd-dot:hover {
  background: #a0aec0;
  transform: scale(1.1);
}

.cd-dot.is-active {
  background: #f7941d;
  transform: scale(1.2);
  width: 14px;
  height: 14px;
}

/* === RESPONSIVE ADJUSTMENTS === */
@media (max-width: 640px) {
  .cd-product-wrapper {
    padding: 15px;
  }

  .cd-card {
    padding: 20px;
  }

  .cd-slide {
    padding: 20px 15px;
  }

  .cd-expert-box {
    padding: 25px 20px;
  }

  .cd-icon-lg {
    width: 50px;
    height: 50px;
  }

  .cd-avatar {
    width: 80px;
    height: 80px;
  }

  .cd-expert-box img {
    width: 120px;
    height: 120px;
  }
}

/* === UTILITY CLASSES === */
.mx-auto {
  margin-left: auto;
  margin-right: auto;
}

/* === BRAND COLORS (ensuring they exist) === */
.brand-orange {
  color: #f7941d;
}

.brand-blue {
  color: #386ab3;
}

.bg-brand-orange {
  background-color: #f7941d;
}

.bg-brand-blue {
  background-color: #386ab3;
}

.text-brand-gray {
  color: #4a5568;
}

.bg-brand-light-gray {
  background-color: #f8f8f8;
}

/* === BULLET LIST FIX (po usunięciu Tailwind CDN reset) === */
.entry-content ul,
.entry-content ol {
  list-style: revert !important;
  margin-left: 1.5em;
}

.entry-content ul li {
  list-style-type: disc !important;
}

.entry-content ol li {
  list-style-type: decimal !important;
}

/* === TESTIMONIAL EXPANDABLE TEXT === */
.testimonial-full-text {
  transition: max-height 0.5s ease-out, opacity 0.5s ease-out;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  position: relative;
  z-index: 10;
}

.testimonial-full-text.expanded {
  max-height: 1000px;
  opacity: 1;
}

.testimonial-short-text.hidden {
  display: none;
}

/* === TESTIMONIAL DOTS (#testimonial-dots) === */
#testimonial-dots {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px 0;
  gap: 8px;
}

#testimonial-dots button {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: none;
  margin: 0 5px;
  cursor: pointer;
  padding: 0;
  background-color: #A0AEC0;
  transition: background-color 0.3s ease, opacity 0.3s ease;
}

#testimonial-dots button:hover {
  background-color: #f7941d;
  opacity: 0.8;
}

#testimonial-dots button.dot-active,
#testimonial-dots button.is-active {
  background-color: #f7941d;
  opacity: 1;
}

/* === REVIEW TEXT WRAPPER (for testimonials) === */
.review-text-wrapper p {
  margin-bottom: 0.5rem;
}

.read-more-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

/* === CUSTOM PRODUCT LAYOUT === */
.custom-product-layout h1 {
  color: #386ab3;
}

.custom-product-layout h2 {
  font-size: 1.5rem;
}

.custom-product-layout h3 {
  font-size: 1.25rem;
}

/* === INTRO SECTION === */
.cd-intro-section {
  margin-bottom: 40px;
}

.cd-main-title {
  font-size: 1.8rem;
  font-weight: bold;
  color: #386ab3;
  margin-bottom: 15px;
}

.cd-intro-text {
  color: #4a5568;
  line-height: 1.6;
  margin-bottom: 10px;
}

/* === CARD TITLES === */
.cd-card-title {
  font-size: 1.3rem;
  font-weight: bold;
  text-align: center;
  margin-bottom: 20px;
}

.cd-card-intro {
  font-size: 0.95rem;
  color: #4a5568;
  margin-bottom: 15px;
}

/* === FEATURE LISTS === */
.cd-feature-list {
  list-style: none !important;
  padding: 0 !important;
  margin: 0 !important;
}

.cd-feature-list li {
  position: relative;
  padding: 12px 15px 12px 45px;
  margin-bottom: 10px;
  background: #f8fafc;
  border-radius: 8px;
  color: #4a5568;
  font-size: 0.95rem;
  line-height: 1.5;
}

.cd-feature-list li::before {
  content: "";
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  border-radius: 50%;
}

.cd-feature-list-orange li::before {
  background: #f7941d;
}

.cd-feature-list-blue li::before {
  background: #386ab3;
}

/* === SECTION TITLE === */
.cd-section-title {
  text-align: center;
  font-size: 1.5rem;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 30px;
}

/* === TESTIMONIAL SLIDER V2 === */
.cd-testimonial-slider-wrapper {
  position: relative;
  overflow: hidden;
  max-width: 700px;
  margin: 0 auto;
  background: #fff;
  border-radius: 15px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.cd-testimonial-track {
  display: flex;
  width: 100%;
  transition: transform 0.5s ease-in-out;
}

.cd-testimonial-slide {
  width: 100%;
  min-width: 100%;
  flex: 0 0 100%;
  padding: 30px;
  box-sizing: border-box;
  text-align: center;
}

.cd-testimonial-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #f7941d;
  margin: 0 auto 15px;
  display: block;
}

.cd-testimonial-name {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0 0 5px 0;
}

.cd-testimonial-role {
  font-size: 0.85rem;
  color: #718096;
  margin: 0 0 20px 0;
}

.cd-testimonial-text {
  text-align: center;
}

.cd-testimonial-short {
  font-style: italic;
  color: #4a5568;
  line-height: 1.6;
  margin: 0 0 10px 0;
}

.cd-testimonial-full {
  display: none;
  color: #4a5568;
  line-height: 1.6;
  text-align: left;
  margin-top: 15px;
  padding: 15px;
  background: #f8fafc;
  border-radius: 8px;
}

.cd-testimonial-full.is-visible {
  display: block;
}

.cd-testimonial-short.is-hidden {
  display: none;
}

.cd-read-more-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-weight: 600;
  padding: 5px 10px;
  margin-top: 10px;
}

.cd-read-more-btn:hover {
  text-decoration: underline;
}

.cd-testimonial-dots {
  display: flex;
  justify-content: center;
  gap: 10px;
  padding: 20px;
}

.cd-testimonial-dots button {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: none;
  background: #cbd5e0;
  cursor: pointer;
  padding: 0;
  transition: all 0.3s ease;
}

.cd-testimonial-dots button:hover {
  background: #a0aec0;
}

.cd-testimonial-dots button.is-active {
  background: #f7941d;
  transform: scale(1.2);
}

/* === BENEFIT CARDS === */
.cd-benefit-card {
  background: #f8f8f8;
  padding: 25px;
  border-radius: 15px;
  text-align: center;
  box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.cd-benefit-icon {
  font-size: 2.5rem;
  margin-bottom: 15px;
  color: #f7941d;
}

.cd-benefit-title {
  font-size: 1.1rem;
  font-weight: bold;
  margin-bottom: 10px;
}

.cd-benefit-text {
  font-size: 0.9rem;
  color: #4a5568;
  line-height: 1.5;
}

/* === INFO BOX === */
.cd-info-box {
  background: #f8fafc;
  padding: 25px;
  border-radius: 15px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.cd-info-box p {
  color: #4a5568;
  line-height: 1.6;
  margin: 0;
  text-align: center;
}

/* === WPAUTOP FIX === */
/* Hide empty paragraphs created by wpautop */
.cd-product-wrapper p:empty,
.cd-testimonial-slide p:empty,
.cd-card p:empty {
  display: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* Fix for stray closing p tags after images */
.cd-testimonial-avatar + br,
.cd-testimonial-slide > br {
  display: none;
}

/* Ensure testimonial slide layout is correct */
.cd-testimonial-slide > p:first-of-type {
  display: none;
}

/* Reset any extra margins from wpautop */
.cd-product-wrapper p {
  margin-bottom: 10px;
}

.cd-product-wrapper p:last-child {
  margin-bottom: 0;
}

/* === KARUZELA ZDJĘĆ / WIDEO (cd-carousel) === */
.cd-carousel-section {
  margin: 0 0 40px 0;
}

.cd-carousel-wrapper {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  background: #e8edf2;
  width: 100%;
  aspect-ratio: 16 / 9;
  max-height: 520px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
}

.cd-carousel-track {
  display: flex;
  width: 100%;
  height: 100%;
  transition: transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.cd-carousel-slide {
  min-width: 100%;
  width: 100%;
  height: 100%;
  flex: 0 0 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.cd-carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

/* Placeholder Vimeo */
.cd-carousel-video-placeholder {
  background: linear-gradient(135deg, #1a2a4a 0%, #1e3a6e 50%, #386ab3 100%);
  cursor: default;
}

.cd-video-placeholder-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: white;
  text-align: center;
  padding: 20px;
  gap: 10px;
}

.cd-play-icon {
  width: 64px;
  height: 64px;
  color: white;
  opacity: 0.85;
  background: rgba(247, 148, 29, 0.75);
  border-radius: 50%;
  padding: 14px;
  box-sizing: border-box;
  flex-shrink: 0;
}

.cd-video-placeholder-inner p {
  font-size: 1.2rem;
  font-weight: 700;
  margin: 0;
  color: white;
}

.cd-video-placeholder-inner small {
  font-size: 0.88rem;
  opacity: 0.72;
  color: white;
  display: block;
  margin: 0;
}

/* Przyciski prev/next */
.cd-carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.92);
  border: none;
  border-radius: 50%;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
  transition: background 0.2s, transform 0.2s;
  padding: 0;
}

.cd-carousel-btn:hover {
  background: #ffffff;
  transform: translateY(-50%) scale(1.1);
}

.cd-carousel-btn:focus-visible {
  outline: 3px solid #f7941d;
  outline-offset: 2px;
}

.cd-carousel-prev {
  left: 12px;
}

.cd-carousel-next {
  right: 12px;
}

.cd-carousel-btn svg {
  width: 22px;
  height: 22px;
  color: #386ab3;
  stroke: #386ab3;
  flex-shrink: 0;
}

/* Dots */
.cd-carousel-dots {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  padding: 12px 0 0 0;
}

.cd-carousel-dots button {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: none;
  background: #cbd5e0;
  cursor: pointer;
  padding: 0;
  transition: all 0.3s ease;
}

.cd-carousel-dots button:hover {
  background: #a0aec0;
}

.cd-carousel-dots button.is-active {
  background: #f7941d;
  transform: scale(1.35);
  width: 12px;
  height: 12px;
}

@media (max-width: 640px) {
  .cd-carousel-wrapper {
    border-radius: 8px;
    max-height: 260px;
  }

  .cd-carousel-btn {
    width: 34px;
    height: 34px;
  }

  .cd-carousel-btn svg {
    width: 16px;
    height: 16px;
  }

  .cd-carousel-prev {
    left: 6px;
  }

  .cd-carousel-next {
    right: 6px;
  }

  .cd-play-icon {
    width: 48px;
    height: 48px;
    padding: 10px;
  }

  .cd-video-placeholder-inner p {
    font-size: 1rem;
  }
}
