/* 주문 페이지 전용 스타일 */

/* 다중 상품 관련 스타일 */
.products-container {
  margin-bottom: 2rem;
}

/* 상품 선택 컨테이너 */
.product-selection-container {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* 상품 섬네일 */
.product-thumbnail {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
  border: 2px solid #e1e5e9;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.product-thumbnail:hover {
  border-color: #ff6b9d;
  box-shadow: 0 4px 16px rgba(255, 107, 157, 0.2);
  transform: translateY(-2px);
}

.product-thumbnail img {
  width: 80px;
  height: 80px;
  border-radius: 8px;
  object-fit: cover;
  border: 2px solid #e1e5e9;
  transition: border-color 0.3s ease;
}

.product-thumbnail:hover img {
  border-color: #ff6b9d;
}

.thumbnail-info {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  flex: 1;
}

.thumbnail-name {
  font-weight: 600;
  color: #333;
  font-size: 1rem;
}

.thumbnail-price {
  font-weight: 500;
  color: #ff6b9d;
  font-size: 1.1rem;
}

.product-section {
  border: 2px solid #e1e5e9;
  border-radius: 12px;
  margin-bottom: 2rem;
  padding: 1.5rem;
  position: relative;
  background: #ffffff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.product-section.active {
  border-color: #ff6b9d;
  box-shadow: 0 4px 12px rgba(255, 107, 157, 0.2);
}

.product-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid #f8f9fa;
}

.product-header h3 {
  margin: 0;
  color: #ff6b9d;
  font-size: 1.25rem;
  font-weight: 600;
}

.remove-product-btn {
  background: #dc3545;
  color: white;
  border: none;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  transition: all 0.2s ease;
}

.remove-product-btn:hover {
  background: #c82333;
  transform: scale(1.1);
}

.add-product-section {
  text-align: center;
  margin: 2rem 0;
}

.add-product-btn {
  background: linear-gradient(135deg, #ff6b9d, #ffa8cc);
  color: white;
  border: none;
  border-radius: 12px;
  padding: 1rem 2rem;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(255, 107, 157, 0.3);
}

.add-product-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(255, 107, 157, 0.4);
}

.plus-icon {
  font-size: 1.3rem;
  font-weight: bold;
}

.products-summary {
  background: #f8f9fa;
  border-radius: 12px;
  margin: 2rem 0;
}

.summary-box {
  padding: 1.5rem;
}

.summary-box h3 {
  margin: 0 0 1rem 0;
  color: #333;
  font-size: 1.25rem;
}

.products-list {
  margin-bottom: 1rem;
}

.product-summary-item {
  background: white;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  padding: 1rem;
  margin-bottom: 0.75rem;
}

.product-summary-item h4 {
  margin: 0 0 0.5rem 0;
  color: #ff6b9d;
  font-size: 1rem;
}

.product-summary-item .summary-details {
  font-size: 0.9rem;
  color: #666;
  line-height: 1.4;
}

.total-price {
  text-align: right;
  padding-top: 1rem;
  border-top: 2px solid #dee2e6;
  font-size: 1.2rem;
  color: #333;
}

.total-price span {
  color: #ff6b9d;
}

/* FAQ 스타일 */
.faq-container {
  margin-top: 1rem;
}

.faq-item {
  border: 1px solid #e1e5e9;
  border-radius: 8px;
  margin-bottom: 0.5rem;
  overflow: hidden;
}

.faq-item summary {
  padding: 1rem;
  background: #f8f9fa;
  cursor: pointer;
  font-weight: 500;
  color: #333;
  border: none;
  outline: none;
  user-select: none;
  transition: background-color 0.2s ease;
}

.faq-item summary:hover {
  background: #e9ecef;
}

.faq-item[open] summary {
  background: #ff6b9d;
  color: white;
}

.faq-answer {
  padding: 1rem;
  background: white;
  border-top: 1px solid #e1e5e9;
  line-height: 1.6;
}

.faq-answer p {
  margin: 0.5rem 0;
}

/* 주문방법 안내 스타일 */
.order-method-guide {
  background: #f8f9fa;
  padding: 1.5rem;
  border-radius: 12px;
  border-left: 4px solid #ff6b9d;
}

.order-method-guide p {
  margin: 0.75rem 0;
  line-height: 1.6;
}

.order-method-guide strong {
  color: #333;
  font-weight: 600;
}

/* 배송 일정 안내 스타일 개선 */
.delivery-note {
  background: #fff3cd;
  border: 1px solid #ffeaa7;
  border-radius: 8px;
  padding: 1rem;
  margin-top: 1rem;
}

.delivery-note p {
  margin: 0.5rem 0;
}

.delivery-note ul {
  margin: 0.5rem 0;
  padding-left: 1.5rem;
}

.delivery-note li {
  margin: 0.25rem 0;
}

/* 특별 안내사항 스타일 */
.balloon-bouquet-notice, .clear-balloon-notice {
  margin: 1rem 0;
}

.warning-box {
  background: #fff5f5;
  border: 2px solid #fed7d7;
  border-left: 5px solid #f56565;
  border-radius: 8px;
  padding: 1rem;
}

.warning-box h4 {
  margin: 0 0 0.75rem 0;
  color: #c53030;
  font-weight: 600;
}

.warning-box ul {
  margin: 0;
  padding-left: 1.5rem;
}

.warning-box li {
  margin: 0.5rem 0;
  color: #2d3748;
  line-height: 1.5;
}

.order-page {
  max-width: 800px;
  margin: 0 auto;
  padding: 1rem;
  background: #ffffff;
  min-height: 100vh;
}

.order-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 2px solid #f1f1f1;
}

.back-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  background: #ff6b9d;
  border-radius: 8px;
  text-decoration: none;
  color: white;
  transition: all 0.2s ease;
}

.back-link:hover {
  background: #e55a8a;
}

.back-link svg {
  width: 1.25rem;
  height: 1.25rem;
  fill: currentColor;
}

.header-content h1 {
  margin: 0;
  font-size: 1.75rem;
  font-weight: 600;
  color: #333;
}

.header-desc {
  margin: 0.25rem 0 0 0;
  color: #666;
  font-size: 0.9rem;
}

.order-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.form-section {
  background: #fff;
  border-radius: 8px;
  padding: 1.5rem;
  border: 1px solid #e5e5e5;
  margin-bottom: 1rem;
}

.form-section h2 {
  margin: 0 0 1.25rem 0;
  font-size: 1.25rem;
  font-weight: 600;
  color: #333;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.form-section h2::before {
  content: '';
  width: 4px;
  height: 1.25rem;
  background: #ff6b9d;
  border-radius: 2px;
}

.form-group {
  margin-bottom: 1rem;
}

.form-group:last-child {
  margin-bottom: 0;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: #333;
  font-size: 0.9rem;
}

.required {
  color: #ff6b9d;
  font-weight: 600;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.75rem;
  border: 2px solid #e5e5e5;
  border-radius: 6px;
  font-size: 1rem;
  font-family: inherit;
  background: #fff;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #ff6b9d;
  box-shadow: 0 0 0 3px rgba(255, 107, 157, 0.1);
}

.form-group textarea {
  resize: vertical;
  min-height: 80px;
}

.form-hint {
  display: block;
  margin-top: 0.25rem;
  color: #666;
  font-size: 0.8rem;
  line-height: 1.4;
}

/* 레터링 문구 줄 단위 입력 */
.lettering-lines {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.lettering-line-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.lettering-line-badge {
  flex: 0 0 auto;
  min-width: 2.25rem;
  text-align: center;
  font-size: 0.8rem;
  font-weight: 600;
  color: #999;
}

.lettering-line-row input {
  flex: 1 1 auto;
  min-width: 0;
}

.add-lettering-line-btn {
  display: inline-flex;
  align-items: center;
  margin-top: 0.6rem;
  padding: 0.5rem 1rem;
  border: 1px dashed #ccc;
  border-radius: 6px;
  background: #fafafa;
  color: #555;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s ease;
}

.add-lettering-line-btn:hover {
  background: #f0f0f0;
}

.add-lettering-line-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* 라디오 버튼 커스텀 스타일 */
.radio-group {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.radio-label {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem;
  background: #f8f9fa;
  border: 2px solid #e5e5e5;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-bottom: 0;
}

.radio-label:hover {
  background: #f0f0f0;
  border-color: #ff6b9d;
}

.radio-label input[type="radio"] {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  border: 0;
  opacity: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.radio-custom {
  min-width: 1.25rem;
  min-height: 1.25rem;
  width: 1.25rem;
  height: 1.25rem;
  border: 2px solid #ddd;
  border-radius: 50%;
  position: relative;
  flex-shrink: 0;
  flex-grow: 0;
  box-sizing: border-box;
  display: inline-block;
  background: white;
  transition: border-color 0.2s ease;
  /* Safari 호환성 */
  -webkit-box-sizing: border-box;
  -webkit-flex-shrink: 0;
  -webkit-flex-grow: 0;
}

.radio-custom::after {
  content: '';
  width: 0.625rem;
  height: 0.625rem;
  background: #ff6b9d;
  border-radius: 50%;
  position: absolute;
  top: 50%;
  left: 50%;
  box-sizing: border-box;
  transform: translate(-50%, -50%) scale(0);
  transition: transform 0.2s ease;
  /* Safari 호환성 */
  -webkit-box-sizing: border-box;
  -webkit-transform: translate(-50%, -50%) scale(0);
  -webkit-transition: -webkit-transform 0.2s ease;
}

.radio-label input[type="radio"]:checked + .radio-custom {
  border-color: #ff6b9d;
}

.radio-label input[type="radio"]:checked + .radio-custom::after {
  transform: translate(-50%, -50%) scale(1);
  -webkit-transform: translate(-50%, -50%) scale(1);
}

.radio-label input[type="radio"]:checked ~ span {
  color: #ff6b9d;
  font-weight: 500;
}

/* 배송 상세 정보 */
.delivery-details {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid #e5e5e5;
}

/* 풍선 배송일정 안내 */
.delivery-schedule-info {
  margin-top: 2rem;
  padding: 1.5rem;
  background: #f8f9fa;
  border-radius: 6px;
  border: 1px solid #e5e5e5;
}

.delivery-schedule-info h3 {
  margin: 0 0 1rem 0;
  color: #333;
  font-size: 1.1rem;
  font-weight: 600;
  text-align: center;
}

.schedule-description {
  margin: 0 0 1.5rem 0;
  color: #555;
  font-size: 0.9rem;
  line-height: 1.6;
  text-align: center;
}

.schedule-table {
  overflow-x: auto;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.schedule-table table {
  width: 100%;
  border-collapse: collapse;
  background: white;
  margin: 0;
}

.schedule-table th {
  background: #333;
  color: white;
  padding: 0.75rem 0.5rem;
  text-align: center;
  font-weight: 600;
  font-size: 0.85rem;
  border-right: 1px solid #555;
}

.schedule-table th:last-child {
  border-right: none;
}

.schedule-table td {
  padding: 1rem 0.5rem;
  text-align: center;
  color: #333;
  font-weight: 500;
  font-size: 0.9rem;
  border-right: 1px solid #e5e5e5;
  border-bottom: 1px solid #e5e5e5;
}

.schedule-table td:last-child {
  border-right: none;
}

/* 제출 버튼 */
.form-actions {
  text-align: center;
  padding: 2rem 0;
}

.submit-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 1rem 2rem;
  background: #ff6b9d;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  min-width: 200px;
}

.submit-btn:hover {
  background: #e55a8a;
}

.submit-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

.submit-btn svg {
  width: 1.25rem;
  height: 1.25rem;
  fill: currentColor;
}

.submit-note {
  margin-top: 1rem;
  color: #666;
  font-size: 0.9rem;
  line-height: 1.5;
}

/* 반응형 디자인 */
@media (max-width: 768px) {
  .order-page {
    padding: 1rem;
    background: linear-gradient(135deg, #f8faff 0%, #fff5f7 100%);
  }

  /* 모바일에서 섬네일 최적화 */
  .product-thumbnail {
    flex-direction: column;
    text-align: center;
    gap: 0.75rem;
    padding: 1rem;
  }

  .product-thumbnail img {
    width: 100px;
    height: 100px;
  }

  .thumbnail-info {
    align-items: center;
    text-align: center;
  }
  
  .order-header {
    margin-bottom: 2rem;
    padding: 1.5rem;
    border-radius: 16px;
  }
  
  .header-content h1 {
    font-size: 1.75rem;
  }
  
  .form-section {
    padding: 2rem 1.5rem;
    border-radius: 20px;
  }
  
  .form-section h2 {
    font-size: 1.25rem;
  }
  
  .radio-group {
    gap: 0.75rem;
  }
  
  .radio-label {
    padding: 1.25rem;
    border-radius: 16px;
  }
  
  .submit-btn {
    padding: 1rem 2rem;
    font-size: 1rem;
    min-width: auto;
    width: 100%;
    border-radius: 16px;
  }
  
  .form-group input,
  .form-group select,
  .form-group textarea {
    padding: 0.875rem 1rem;
    border-radius: 12px;
  }
  
  .back-link {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 12px;
  }
}

/* 주문 전 안내사항 모달 */
.notice-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 1rem;
}

.notice-content {
  background: white;
  border-radius: 12px;
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.notice-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 1.5rem 0;
  border-bottom: 1px solid #e5e5e5;
  margin-bottom: 1.5rem;
}

.notice-header h2 {
  margin: 0;
  color: #333;
  font-size: 1.2rem;
  font-weight: 600;
}

.notice-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: #999;
  cursor: pointer;
  padding: 0.5rem;
  line-height: 1;
  transition: color 0.2s ease;
}

.notice-close:hover {
  color: #333;
}

.notice-body {
  padding: 0 1.5rem 1.5rem;
}

.notice-section {
  margin-bottom: 1.5rem;
}

.notice-section:last-child {
  margin-bottom: 0;
}

.notice-section h3 {
  margin: 0 0 0.75rem 0;
  color: #ff6b9d;
  font-size: 1rem;
  font-weight: 600;
}

.notice-section ul {
  margin: 0;
  padding-left: 1.2rem;
}

.notice-section li {
  margin-bottom: 0.5rem;
  font-size: 0.9375rem;
  line-height: 1.6;
  color: #333;
}

.notice-section p {
  margin: 0 0 0.75rem 0;
  font-size: 0.9375rem;
  line-height: 1.6;
  color: #333;
}

.notice-section p:last-child {
  margin-bottom: 0;
}

.notice-section .notice-subheading {
  margin: 1rem 0 0.5rem 0;
  font-weight: 600;
  color: #333;
}

.notice-section .notice-subheading:first-child {
  margin-top: 0;
}

.notice-footer {
  padding: 1.5rem;
  border-top: 1px solid #e5e5e5;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* 체크박스 커스텀 스타일 */
.checkbox-label {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
  font-size: 0.9rem;
  margin-bottom: 0;
  line-height: 1.5;
}

.checkbox-label input[type="checkbox"] {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  border: 0;
  opacity: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.checkbox-custom {
  min-width: 1.25rem;
  min-height: 1.25rem;
  width: 1.25rem;
  height: 1.25rem;
  border: 2px solid #ddd;
  border-radius: 4px;
  position: relative;
  flex-shrink: 0;
  flex-grow: 0;
  box-sizing: border-box;
  display: inline-block;
  transition: all 0.2s ease;
  background: white;
  /* Safari 호환성 */
  -webkit-box-sizing: border-box;
  -webkit-flex-shrink: 0;
  -webkit-flex-grow: 0;
}

.checkbox-custom::after {
  content: '✓';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0);
  color: white;
  font-size: 0.75rem;
  font-weight: bold;
  line-height: 1;
  transition: transform 0.2s ease;
  /* Safari 호환성 */
  -webkit-transform: translate(-50%, -50%) scale(0);
  -webkit-transition: -webkit-transform 0.2s ease;
}

.checkbox-label input[type="checkbox"]:checked + .checkbox-custom {
  background: #ff6b9d;
  border-color: #ff6b9d;
}

.checkbox-label input[type="checkbox"]:checked + .checkbox-custom::after {
  transform: translate(-50%, -50%) scale(1);
  -webkit-transform: translate(-50%, -50%) scale(1);
}

/* 버튼 스타일 */
.btn {
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-primary {
  background: linear-gradient(135deg, #ff6b9d, #ffa726);
  color: white;
  box-shadow: 0 2px 8px rgba(255, 107, 157, 0.3);
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(255, 107, 157, 0.4);
}

.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* 개수 선택 옵션 */
.quantity-options {
  background: #f0f8ff;
  border-radius: 6px;
  padding: 1rem;
  margin-top: 1rem;
  border: 1px solid #e5e5e5;
}

.quantity-selector {
  margin-bottom: 0.5rem;
}

.quantity-selector select {
  width: 100%;
  max-width: 200px;
  padding: 0.5rem;
  border: 2px solid #e5e5e5;
  border-radius: 6px;
  font-size: 0.9rem;
  font-family: inherit;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.quantity-selector select:focus {
  outline: none;
  border-color: #ff6b9d;
  box-shadow: 0 0 0 3px rgba(255, 107, 157, 0.1);
}

.custom-quantity {
  margin-top: 0.5rem;
}

.custom-quantity input {
  width: 100%;
  max-width: 150px;
  padding: 0.5rem;
  border: 2px solid #e5e5e5;
  border-radius: 6px;
  font-size: 0.9rem;
  font-family: inherit;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.custom-quantity input:focus {
  outline: none;
  border-color: #ff6b9d;
  box-shadow: 0 0 0 3px rgba(255, 107, 157, 0.1);
}

.price-display {
  margin-top: 0.75rem;
  padding: 0.5rem;
  background: #fff;
  border-radius: 6px;
  border: 1px solid #e5e5e5;
}

.calculated-price {
  font-weight: 600;
  color: #ff6b9d;
  font-size: 1.1rem;
}

/* 레터링 옵션 */
.lettering-options {
  background: #f8f9fa;
  border-radius: 6px;
  padding: 1rem;
  margin-top: 1rem;
  border: 1px solid #e5e5e5;
}

/* 색상 옵션 */
.color-options {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.color-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 4px;
  transition: background 0.2s ease;
  margin-bottom: 0;
}

/* .form-group label { display: block } 의 우선순위가 더 높아 위 flex 선언을
   덮어쓰면서 .color-preview(인라인 span)가 width/height를 무시하고 찌그러지던
   문제 수정. 부모 클래스를 더해 specificity를 높여 명시적으로 되살림 */
.color-options .color-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 0;
}

.color-option:hover {
  background: #f0f0f0;
}

.color-option input[type="radio"] {
  display: none;
}

.color-preview {
  display: inline-block;
  width: 2rem;
  height: 2rem;
  flex-shrink: 0;
  border-radius: 50%;
  border: 2px solid transparent;
  transition: border-color 0.2s ease;
}

.color-option input[type="radio"]:checked + .color-preview {
  border-color: #ff6b9d;
  box-shadow: 0 0 0 2px rgba(255, 107, 157, 0.2);
}

.color-option span:last-child {
  font-size: 0.8rem;
  color: #666;
}

/* 체크박스 그룹 */
.checkbox-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

/* 시간 선택기 */
.time-selector {
  background: #f8f9fa;
  border: 1px solid #e5e5e5;
  border-radius: 6px;
  padding: 1rem;
  margin-top: 0.5rem;
}

.time-field-group {
  margin-bottom: 1rem;
}

.time-field-group:last-of-type {
  margin-bottom: 1rem;
}

.time-field-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: #333;
  font-size: 0.9rem;
}

.time-field-group select {
  width: 100%;
  max-width: 150px;
  padding: 0.5rem;
  border: 2px solid #e5e5e5;
  border-radius: 6px;
  font-size: 0.9rem;
  font-family: inherit;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.time-field-group select:focus {
  outline: none;
  border-color: #ff6b9d;
  box-shadow: 0 0 0 3px rgba(255, 107, 157, 0.1);
}

.time-options {
  border-top: 1px solid #e5e5e5;
  padding-top: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.time-options .checkbox-label {
  font-size: 0.85rem;
  color: #666;
}

@media (min-width: 640px) {
  .time-selector {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    align-items: start;
  }
  
  .time-options {
    grid-column: span 2;
    border-top: 1px solid #e5e5e5;
    padding-top: 1rem;
    margin-top: 0.5rem;
  }
  
  .time-field-group {
    margin-bottom: 0;
  }
}

/* 배송 안내 */
.delivery-note {
  font-size: 0.8rem;
  color: #666;
  margin-left: auto;
}

/* 최종 확인 체크박스 */
.final-checks {
  background: #f8f9fa;
  padding: 1rem;
  border-radius: 6px;
  border: 1px solid #e5e5e5;
}

.final-checks .checkbox-label {
  margin-bottom: 0.75rem;
}

.final-checks .checkbox-label:last-child {
  margin-bottom: 0;
}

/* 주문 요약 */
.order-summary {
  background: #f8f9fa;
  border: 1px solid #e5e5e5;
  border-radius: 6px;
  padding: 1rem;
  margin-bottom: 1.5rem;
}

.order-summary h3 {
  margin: 0 0 0.75rem 0;
  color: #333;
  font-size: 1.1rem;
  font-weight: 600;
}

.summary-content {
  color: #666;
  font-size: 0.9rem;
  line-height: 1.5;
}

.summary-order-item {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.4rem 0;
  border-bottom: 1px solid #e5e5e5;
}

.summary-order-total {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  padding-top: 0.6rem;
  margin-top: 0.4rem;
  color: #e91e63;
  font-size: 1rem;
}

.kakao-copy-status {
  font-size: 0.85rem;
  color: #888;
  margin: 0.5rem 0;
}

.kakao-message-textarea {
  width: 100%;
  box-sizing: border-box;
  resize: vertical;
  padding: 0.75rem;
  border: 1px solid #e5e5e5;
  border-radius: 8px;
  font-size: 0.85rem;
  line-height: 1.5;
  color: #333;
  background: #f8f9fa;
  margin-bottom: 1rem;
}

.kakao-send-btn {
  display: block;
  width: 100%;
  text-align: center;
  text-decoration: none;
  box-sizing: border-box;
  margin-bottom: 0.75rem;
}

.kakao-reset-btn {
  display: block;
  width: 100%;
  background: #f1f1f1;
  color: #555;
}

@media (max-width: 768px) {
  .notice-content {
    margin: 0.5rem;
    max-height: 95vh;
  }
  
  .notice-header,
  .notice-body,
  .notice-footer {
    padding-left: 1rem;
    padding-right: 1rem;
  }
  
  .color-options {
    gap: 0.5rem;
  }
  
  .color-preview {
    width: 1.5rem;
    height: 1.5rem;
  }
}

@media (max-width: 480px) {
  .order-page {
    padding: 0.75rem;
  }
  
  .order-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.25rem;
  }
  
  .back-link {
    align-self: flex-start;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 10px;
  }
  
  .form-section {
    padding: 1.5rem 1.25rem;
    border-radius: 16px;
  }
  
  .form-section h2 {
    font-size: 1.125rem;
  }
  
  .form-group input,
  .form-group select,
  .form-group textarea {
    padding: 0.75rem 1rem;
    border-radius: 10px;
  }
  
  .notice-header h2 {
    font-size: 1rem;
  }
  
  .color-options {
    justify-content: center;
    gap: 0.75rem;
  }
  
  .color-option {
    padding: 0.75rem;
  }
  
  .color-preview {
    width: 2rem;
    height: 2rem;
  }
  
  .checkbox-group {
    gap: 1rem;
  }
  
  /* 모바일에서 체크박스와 라디오 버튼 크기 유지 */
  .checkbox-custom,
  .radio-custom {
    min-width: 1.5rem;
    min-height: 1.5rem;
    width: 1.5rem;
    height: 1.5rem;
  }
  
  .checkbox-custom::after {
    font-size: 0.875rem;
  }
  
  .radio-custom::after {
    width: 0.75rem;
    height: 0.75rem;
  }
  
  .checkbox-label,
  .radio-label {
    gap: 1rem;
    padding: 1rem;
    border-radius: 12px;
  }
  
  /* 모바일에서 배송일정 테이블 최적화 */
  .delivery-schedule-info {
    padding: 1.25rem;
    margin-top: 1.5rem;
    border-radius: 16px;
  }
  
  .delivery-schedule-info h3 {
    font-size: 1rem;
  }
  
  .schedule-description {
    font-size: 0.825rem;
    margin-bottom: 1rem;
  }
  
  .schedule-table {
    border-radius: 6px;
  }
  
  .schedule-table th,
  .schedule-table td {
    padding: 0.75rem 0.375rem;
    font-size: 0.775rem;
  }
  
  .schedule-table th {
    font-size: 0.75rem;
    padding: 0.875rem 0.375rem;
  }
  
  .submit-btn {
    padding: 1rem 1.5rem;
    border-radius: 14px;
  }
  
  .form-actions {
    padding: 2rem 1rem;
    border-radius: 16px;
  }
}

/* 홈 링크 페이지와 맞춘 주문 페이지 디자인 */
.order-page {
  width: min(var(--site-width), calc(100% - 48px));
  max-width: none;
  margin: 0 auto;
  padding: 40px 0 96px;
  background: var(--paper);
}

.order-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  padding-top: 170px;
}

.order-content {
  min-width: 0;
}

.order-content h1 {
  margin: 0;
  font-size: 35px;
  font-weight: 900;
  line-height: 1;
}

.order-form {
  display: block;
  margin-top: 72px;
  border-top: 1px solid var(--line-strong);
}

.form-section {
  margin: 0;
  padding: 42px 10px 44px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
}

.form-section h2,
.product-header h3,
.summary-box h3,
.delivery-schedule-info h3,
.order-summary h3 {
  margin: 0 0 24px;
  color: var(--ink);
  font-size: 20px;
  font-weight: 900;
  line-height: 1.2;
}

.form-section h2::before {
  content: none;
}

.form-group {
  margin-bottom: 22px;
}

.form-group label,
.time-field-group label {
  margin-bottom: 9px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.2;
}

.required,
.thumbnail-price,
.product-summary-item h4,
.summary-order-total,
.total-price span {
  color: var(--accent);
}

.form-group input,
.form-group select,
.form-group textarea,
.kakao-message-textarea {
  border: 1px solid var(--line);
  border-radius: 3px;
  background: var(--paper);
  color: var(--ink);
  padding: 12px 14px;
  font-size: 13px;
  line-height: 1.45;
  box-shadow: none;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus,
.kakao-message-textarea:focus {
  border-color: var(--ink);
  box-shadow: none;
}

.fixed-value-field {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: var(--paper);
  color: var(--ink);
  padding: 12px 14px;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.45;
}

.form-hint,
.summary-content,
.product-summary-item .summary-details,
.schedule-description,
.delivery-note,
.submit-note,
.kakao-copy-status {
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.55;
}

.order-method-guide,
.products-summary,
.summary-box,
.delivery-schedule-info,
.final-checks,
.order-summary {
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 0;
  box-shadow: none;
}

.order-method-guide {
  display: grid;
  gap: 18px;
  border-left: 0;
}

.order-method-guide p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.order-method-guide strong {
  color: var(--ink);
  font-weight: 900;
}

.product-section {
  border: 1px solid var(--line);
  border-radius: 3px;
  background: var(--paper);
  box-shadow: none;
  padding: 24px;
}

.product-section.active {
  border-color: var(--ink);
  box-shadow: none;
}

.product-header {
  border-bottom: 1px solid var(--line);
}

.product-thumbnail {
  border: 1px solid var(--line);
  border-radius: 3px;
  background: var(--paper);
  box-shadow: none;
}

.product-thumbnail:hover {
  border-color: var(--ink);
  box-shadow: none;
  transform: none;
}

.product-thumbnail img {
  border: 1px solid var(--line);
  border-radius: 2px;
}

.add-product-section {
  margin: 32px 0;
  text-align: left;
}

.add-product-btn,
.submit-btn,
.btn,
.btn-primary,
.kakao-reset-btn {
  border: 1px solid var(--ink);
  border-radius: 3px;
  background: var(--ink);
  color: var(--paper);
  box-shadow: none;
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
  text-decoration: none;
  transition: background 160ms ease, color 160ms ease, border-color 160ms ease;
}

.add-product-btn,
.submit-btn {
  padding: 13px 18px;
}

.add-product-btn:hover,
.submit-btn:hover,
.btn-primary:hover:not(:disabled) {
  background: var(--paper);
  color: var(--ink);
  box-shadow: none;
  transform: none;
}

.remove-product-btn {
  width: 30px;
  height: 30px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: var(--paper);
  color: var(--ink);
}

.remove-product-btn:hover {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--paper);
  transform: none;
}

.radio-group {
  gap: 0;
}

.radio-label,
.checkbox-label,
.color-option {
  border: 1px solid var(--line);
  border-radius: 3px;
  background: var(--paper);
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
}

.radio-label {
  align-items: flex-start;
  margin-bottom: 10px;
}

.radio-group .radio-label {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 14px;
  margin-bottom: 0;
  padding: 18px 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
}

.radio-group .radio-custom {
  flex: 0 0 auto;
}

.radio-group .radio-label:first-child {
  border-top: 1px solid var(--line);
}

.radio-group .radio-label:hover {
  border-color: var(--line);
  background: transparent;
}

.delivery-method-copy {
  display: flex;
  min-width: 0;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 4px;
  line-height: 1.35;
}

.delivery-method-copy strong {
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
  line-height: 1.25;
}

.delivery-method-copy small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.35;
}

.radio-label:hover,
.checkbox-label:hover,
.color-option:hover {
  border-color: var(--ink);
  background: var(--paper);
}

.notice-footer .checkbox-label,
.final-checks .checkbox-label {
  margin: 0;
  padding: 8px 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.notice-footer .checkbox-label:hover,
.final-checks .checkbox-label:hover {
  border-color: transparent;
  background: transparent;
}

.radio-custom,
.checkbox-custom {
  border-color: var(--muted);
}

.checkbox-custom::after {
  content: "";
  width: 5px;
  height: 9px;
  border: solid var(--paper);
  border-width: 0 2px 2px 0;
  background: transparent;
  transform: translate(-50%, -58%) rotate(45deg) scale(0);
}

.radio-custom::after,
.checkbox-label input[type="checkbox"]:checked + .checkbox-custom {
  background: var(--ink);
}

.checkbox-label input[type="checkbox"]:checked + .checkbox-custom::after {
  transform: translate(-50%, -58%) rotate(45deg) scale(1);
}

.radio-label input[type="radio"]:checked + .radio-custom {
  border-color: var(--ink);
}

.radio-label input[type="radio"]:checked ~ span {
  color: var(--ink);
  font-weight: 900;
}

.radio-label input[type="radio"]:checked ~ .delivery-method-copy small {
  color: var(--muted);
  font-weight: 500;
}

.time-options p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.delivery-details {
  margin-top: 20px;
  padding: 24px 0 0;
  border-top: 1px solid var(--line);
}

.warning-box,
.delivery-note {
  border: 1px solid var(--line);
  border-left: 3px solid var(--ink);
  border-radius: 3px;
  background: var(--paper);
}

.warning-box h4 {
  color: var(--ink);
}

.warning-box li,
.delivery-note li {
  color: var(--muted);
}

.schedule-table {
  border: 1px solid var(--line);
  border-radius: 3px;
  box-shadow: none;
}

.schedule-table th {
  border-right: 1px solid var(--line);
  background: var(--ink);
  color: var(--paper);
}

.schedule-table td {
  border-color: var(--line);
  color: var(--ink);
  font-weight: 600;
}

.faq-item {
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
}

.faq-item summary {
  background: transparent;
  color: var(--ink);
  padding: 20px 0;
  font-size: 13px;
  font-weight: 800;
}

.faq-item summary:hover,
.faq-item[open] summary {
  background: transparent;
  color: var(--ink);
}

.faq-answer {
  border-top: 0;
  background: transparent;
  padding: 0 0 20px;
  color: var(--muted);
  font-size: 13px;
}

.faq-answer ul {
  margin: 0;
  padding-left: 1.1rem;
}

.faq-answer li {
  margin-bottom: 0.4rem;
}

.faq-answer li:last-child {
  margin-bottom: 0;
}

.form-actions {
  padding: 42px 10px 0;
  text-align: left;
}

.submit-btn svg {
  display: none;
}

.notice-modal {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
}

.notice-content {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  width: min(600px, calc(100% - 40px));
  max-height: calc(100vh - 48px);
  border: 1px solid var(--line-strong);
  border-radius: 3px;
  background: var(--paper);
  box-shadow: none;
  overflow: hidden;
}

.notice-header,
.notice-footer {
  border-color: var(--line);
  background: var(--paper);
}

.notice-body {
  overflow: auto;
}

.notice-header h2,
.notice-section h3 {
  color: var(--ink);
  font-weight: 900;
}

.notice-close {
  color: var(--ink);
}

.product-select {
  position: relative;
  width: 100%;
}

.form-group select.balloon-type-select.product-native-select {
  position: absolute !important;
  left: 0 !important;
  bottom: 0 !important;
  width: 1px !important;
  height: 1px !important;
  min-height: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.product-select-trigger {
  width: 100%;
  min-height: 46px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: var(--paper);
  color: var(--ink);
  font-family: inherit;
  font-size: 13px;
  line-height: 1.45;
  text-align: left;
  cursor: pointer;
}

.product-select-trigger::after {
  content: "";
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border-right: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
  transform: translateY(-2px) rotate(45deg);
  transition: transform 0.16s ease;
}

.product-select-trigger:focus {
  outline: none;
  border-color: var(--ink);
}

.product-select.is-open .product-select-trigger,
.product-select.is-invalid .product-select-trigger {
  border-color: var(--ink);
}

.product-select.is-open .product-select-trigger::after {
  transform: translateY(2px) rotate(225deg);
}

.product-select-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.product-select:not(.has-value) .product-select-label {
  color: var(--muted);
}

.product-select-menu {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  z-index: 60;
  display: none;
  max-height: min(360px, calc(100vh - 160px));
  overflow: auto;
  border: 1px solid var(--ink);
  border-radius: 3px;
  background: var(--paper);
  box-shadow: 0 18px 36px rgba(16, 16, 16, 0.14);
}

.product-select.is-upward .product-select-menu {
  top: auto;
  bottom: calc(100% + 6px);
}

.product-select.is-open .product-select-menu {
  display: block;
}

.product-select-option {
  width: 100%;
  display: block;
  padding: 12px 14px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  font-family: inherit;
  font-size: 13px;
  line-height: 1.45;
  text-align: left;
  cursor: pointer;
}

.product-select-option:last-child {
  border-bottom: 0;
}

.product-select-option:hover,
.product-select-option:focus,
.product-select-option.is-selected {
  outline: none;
  background: var(--ink);
  color: var(--paper);
}

.product-select-option:disabled {
  color: var(--muted);
  cursor: default;
}

.product-select-option:disabled:hover {
  background: var(--paper);
  color: var(--muted);
}

@media (max-width: 820px) {
  .order-page {
    width: min(100% - 32px, var(--site-width));
    padding: 28px 0 72px;
  }

  .order-layout {
    display: block;
    padding-top: 88px;
  }

  .order-content {
    margin-top: 54px;
  }

  .order-content h1 {
    font-size: 34px;
  }

  .order-form {
    margin-top: 48px;
  }

  .form-section {
    padding: 36px 0 38px;
  }

  .product-section {
    padding: 20px;
  }

  .product-select-menu {
    max-height: min(320px, calc(100vh - 140px));
  }
}

@media (max-width: 520px) {
  .order-layout {
    padding-top: 70px;
  }

  .order-content h1 {
    font-size: 32px;
  }

  .product-thumbnail {
    align-items: flex-start;
  }

  .radio-label,
  .checkbox-label {
    gap: 12px;
    padding: 14px;
  }

  .form-actions {
    padding: 36px 0 0;
  }
}
