/* =====================================
   PLAYGROUND BASE RESET
===================================== */
body.page-playground {
  margin: 0;
  padding: 0;
  background: #ffffff;
}

body.page-playground header,
body.page-playground footer,
body.page-playground .wp-block-separator {
  display: none;
}

/* =====================================
   CONTAINER
===================================== */
#playground-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 40px;
}
#playground-content > *:not(.product-modal-inner, .template-guide-modal-inner) {
  width: 100%;
  max-width: 1500px;
  box-sizing: border-box;
}
/* =====================================
   HEADER
===================================== */
.product-list-header {
  display: flex;
  justify-content: center;
}

.everythings-playground-logo {
  height: 52px;
}

/* =====================================
   EXPERIENCE GUIDE
===================================== */
.guide-section {
}
.guide-section .section-header {
  text-align: center;
  margin-bottom: 32px;
}

.guide-section .section-header h2 {
  font-size: 28px;
  font-weight: 800;
  /* margin-bottom: 8px; */
}

.guide-section .section-header p {
  font-size: 14px;
  color: #86868b;
}

.guide-steps {
  display: flex;
  gap: 20px;
  justify-content: center;
}

.step-card {
  width: 200px;
  background: #ffffff;
  padding: 24px;
  border-radius: 20px;
  /* box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04); */
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.step-num {
  font-size: 12px;
  font-weight: 700;
  color: #7b2cff;
  background: #f0e6ff;
  padding: 4px 10px;
  border-radius: 8px;
  display: inline-block;
  /* margin-bottom: 12px; */
}

.step-card h4 {
  font-size: 15px;
  margin-bottom: 6px;
}

.step-card p {
  font-size: 12px;
  color: #86868b;
}
.step-naver-link {
  text-decoration: none;
  color: #7b2cff;
}
.step-guide-template {
  text-decoration: none !important;
  color: #7b2cff !important;
  cursor: pointer !important;
}
/* =====================================
   EVENT SECTION
===================================== */
.event-section {
}

.event-grid .product-card {
  border: 2px solid #7b2cff;
  position: relative;
}

.event-badge {
  position: absolute;
  top: 14px;
  left: 14px;
  background: #7b2cff;
  color: #fff;
  font-size: 11px;
  padding: 6px 10px;
  border-radius: 8px;
  font-weight: 600;
}

/* =====================================
   PRODUCT SECTION
===================================== */
.product-section {
}
.section-header {
  /* margin-bottom: 24px; */
}

.section-header h3 {
  font-size: 20px;
  font-weight: 700;
}

/* =====================================
   PRODUCT GRID
===================================== */
.product-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 24px;
}

.product-card {
  background: #ffffff;
  border-radius: 24px;
  overflow: hidden;
  transition: all 0.2s ease;
  cursor: pointer;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.04);
}

.product-card:hover {
  transform: translateY(-6px);
}

.product-card:active {
  transform: scale(0.97);
}

.card-image-info {
  /* background: #f8f8f8; */
  aspect-ratio: 1 / 1;
  display: flex;
  /* align-items: center; */
  justify-content: center;
}

.card-image-info img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.card-body {
  padding: 16px;
}

.product-name {
  font-size: 14px;
  font-weight: 600;
}

/* =====================================
   MODAL
===================================== */
.product-modal-inner {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 999999;
  backdrop-filter: blur(4px);
}

.product-modal-inner.open {
  display: flex;
}

.product-modal-content {
  background: #ffffff;
  border-radius: 24px;
  width: 420px;
  max-width: 90%;
  padding: 32px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
  display: flex;
  flex-direction: column;
  gap: 20px;
  animation: modalPop 0.25s ease;
}

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

.product-options-contents {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.product-modal-inner select {
  width: 100%;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid #ddd;
  font-size: 15px;
  outline: none;
}

.product-modal-inner select:focus {
  border-color: #7b2cff;
}

.product-modal-guide {
  background: #f7f7f9;
  border-radius: 14px;
  padding: 16px;
  text-align: center;
}

.product-modal-guide strong {
  display: block;
  font-size: 15px;
  margin-bottom: 6px;
}

.product-modal-guide p {
  font-size: 13px;
  color: #666;
}

.button-row {
  display: flex;
  gap: 12px;
}

.product-modal-inner button {
  flex: 1;
  height: 48px;
  border-radius: 14px;
  font-size: 15px;
  font-weight: 600;
  border: none;
  cursor: pointer;
}

/* 닫기 */
.modal-close-btn {
  background: #eee;
  color: #444;
}

/* 디자인 버튼 */
.modal-design-btn {
  background: #e5e5e5;
  color: #999;
  cursor: not-allowed;
  transition: all 0.2s ease;
}

.modal-design-btn:not(:disabled) {
  background: #7b2cff;
  color: #ffffff;
  cursor: pointer;
}

.modal-design-btn:not(:disabled):hover {
  filter: brightness(1.05);
}

.modal-design-btn:not(:disabled):active {
  transform: scale(0.97);
}

/* =====================================
   TEMPLATE GUIDE MODAL
===================================== */
.template-guide-modal-inner {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 999999;
  backdrop-filter: blur(4px);
}

.template-guide-modal-inner.open {
  display: flex;
}

.template-guide-modal-content {
  background: #ffffff;
  width: 400px;
  max-width: 92%;
  border-radius: 24px;
  padding: 32px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
  display: flex;
  flex-direction: column;
  gap: 20px;
  animation: templateGuidePop 0.25s ease;
}

/* 등장 애니메이션 */
@keyframes templateGuidePop {
  from {
    transform: scale(0.95);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

/* 헤더 */
.template-guide-title {
  font-size: 18px;
  font-weight: 700;
  text-align: center;
  color: #111;
}

/* 이미지 */
.template-guide-image {
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.04);
}

.template-guide-image img {
  width: 100%;
  height: auto;
  max-height: 280px; /* 추가 */
  object-fit: contain; /* 비율 유지 */
  display: block;
}

/* 설명 영역 */
.template-guide-body {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.template-guide-list {
  list-style: none;
  background: #f7f7f9;
  border-radius: 16px;
  padding: 16px;
  border: 1px solid #eee;
  margin: 0;
  counter-reset: guide-step;
}

.template-guide-list li {
  counter-increment: guide-step;
  display: flex;
  align-items: center; /* 핵심 */
  gap: 12px;
  margin-bottom: 6px;
  font-size: 12px;
  color: #444;
  line-height: 1.6;
}

.template-guide-list li::before {
  content: counter(guide-step);
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #7b2cff;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}
.template-guide-list li:last-child {
  margin-bottom: 0;
}
/* 강조 박스 */
.template-guide-note {
  font-size: 11px;
  color: #666;
  margin: 0;
}

/* 닫기 버튼 */
.template-guide-close-btn {
  width: 100%;
  height: 48px;
  border-radius: 14px;
  border: none;
  font-size: 15px;
  font-weight: 600;
  background: #7b2cff;
  color: #ffffff;
  cursor: pointer;
  transition: all 0.2s ease;
}

.template-guide-close-btn:hover {
  filter: brightness(1.05);
}

.template-guide-close-btn:active {
  transform: scale(0.97);
}

/* =====================================
   TABLET (iPad 대응)
===================================== */
@media (max-width: 1024px) and (min-width: 769px) {
  /* 전체 좌우 여백 */
  #playground-content > * {
    padding: 0 24px;
  }

  /* GUIDE → 3열 */
  .guide-steps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
  }

  /* 이벤트 → 3열 */
  .event-grid {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
  }

  /* 일반 상품 → 3열 */
  .product-section .product-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
  }
}
/* =====================================
   MOBILE OPTIMIZED (2-COLUMN GRID)
===================================== */
@media (max-width: 768px) {
  #playground-content {
    padding-bottom: 40px;
  }
  .wp-block-post-content {
    padding: 0 16px;
  }
  /* --------------------------
     GUIDE → 2열 그리드
  -------------------------- */
  .guide-steps {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
    padding: 0 4px;
  }

  .step-card {
    width: 100%;
    padding: 14px;
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    box-sizing: border-box;
  }

  .step-card h4 {
    font-size: 13px;
  }

  .step-card p {
    font-size: 11px;
  }

  .step-num {
    font-size: 10px;
    padding: 3px 8px;
  }

  /* --------------------------
     🔥 이벤트 → 2열 그리드
  -------------------------- */
  .event-grid {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
    padding: 0 16px;
  }

  .event-grid .product-card {
    min-width: auto;
  }

  /* --------------------------
     일반 상품 → 2열 그리드
  -------------------------- */
  .product-section .product-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
    padding: 0 4px;
  }

  /* 카드 크기 축소 */
  .product-card {
    border-radius: 18px;
  }

  .card-body {
    padding: 12px;
  }

  .product-name {
    font-size: 13px;
  }

  .event-badge {
    font-size: 10px;
    padding: 4px 8px;
  }
}
/* =====================================
   MOBILE MODAL ADJUST
===================================== */
@media (max-width: 768px) {
  .product-modal-inner {
    align-items: flex-end; /* 아래에서 올라오게 */
  }

  .product-modal-content {
    width: 100%;
    max-width: 100%;
    border-radius: 24px 24px 0 0;
    padding: 24px;
    animation: mobileSlideUp 0.25s ease;
  }

  @keyframes mobileSlideUp {
    from {
      transform: translateY(40px);
      opacity: 0;
    }
    to {
      transform: translateY(0);
      opacity: 1;
    }
  }

  .product-modal-inner select {
    font-size: 16px; /* iOS 확대 방지 */
  }
}

/* =====================================
   TEMPLATE GUIDE - TABLET
===================================== */
@media (max-width: 1024px) and (min-width: 769px) {
  .template-guide-modal-content {
    width: 400px; /* 520 → 460 */
    padding: 28px;
    gap: 18px;
  }

  .template-guide-image img {
    max-height: 240px; /* 이미지도 살짝 축소 */
  }

  .template-guide-title {
    font-size: 17px;
  }

  .template-guide-list li {
    font-size: 12px;
  }
}

/* =====================================
   TEMPLATE GUIDE - MOBILE
===================================== */
@media (max-width: 768px) {
  .template-guide-modal-inner {
    align-items: flex-end; /* 아래에서 올라오는 스타일 */
  }

  .template-guide-modal-content {
    width: 100%;
    max-width: 100%;
    border-radius: 24px 24px 0 0;
    padding: 22px;
    gap: 16px;
    animation: templateGuideSlideUp 0.25s ease;
    max-height: 90vh;
    overflow-y: auto;
  }

  @keyframes templateGuideSlideUp {
    from {
      transform: translateY(40px);
      opacity: 0;
    }
    to {
      transform: translateY(0);
      opacity: 1;
    }
  }

  .template-guide-title {
    font-size: 16px;
  }

  .template-guide-image img {
    max-height: 200px; /* 아이폰 SE 대비 */
  }

  .template-guide-list {
    padding: 14px;
  }

  .template-guide-list li {
    font-size: 12px;
    gap: 10px;
  }

  .template-guide-list li::before {
    width: 24px;
    height: 24px;
    font-size: 11px;
  }

  .template-guide-close-btn {
    height: 46px;
    font-size: 13px;
  }
}
