/* ============================================
   폰의점 - 휴대폰 판매 자사몰 스타일시트
   ============================================ */

:root {
  --primary: #3182f6;
  --primary-dark: #1b64da;
  --primary-light: #e8f3ff;
  --accent: #3182f6;
  --bg: #f7f8fa;
  --card-bg: #ffffff;
  --text: #191f28;
  --text-light: #8b95a1;
  --text-dark: #191f28;
  --border: #e5e8eb;
  --success: #22c55e;
  --danger: #f04452;
  --radius: 12px;
  --shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.08);
  --transition: 0.2s ease;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family:
    "Pretendard", "Noto Sans Kr", "NanumGothic", "Malgun Gothic", "Exo 2",
    "Work Sans", "Montserrat", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* ── Top Bar ── */
.top-bar {
  background: #191f28;
  color: #b0b8c1;
  font-size: 14px;
  font-weight: 600;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 101;
}
.top-bar-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.top-bar-visitor {
  display: flex;
  align-items: center;
  gap: 8px;
}
.top-bar-visitor strong {
  color: #3182f6;
  font-size: 16px;
}
.top-bar-right {
  display: flex;
  align-items: center;
  gap: 16px;
}
.top-bar-phone {
  font-weight: 800;
  font-size: 15px;
  color: #fff;
  letter-spacing: 0.5px;
}

/* ── Header ── */
.header {
  background: #fff;
  border-bottom: 1px solid var(--border);
  position: fixed;
  top: 52px;
  left: 0;
  right: 0;
  z-index: 100;
}

.header-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* spacer to push content below fixed bars */
.header + * {
  margin-top: 0;
}

.logo {
  font-size: 22px;
  font-weight: 900;
  color: #191f28;
  text-decoration: none;
  cursor: pointer;
  letter-spacing: -0.5px;
}

.logo span {
  color: #3182f6;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0;
}

.nav-links button {
  background: transparent;
  border: none;
  padding: 7px 16px;
  border-radius: 0;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  color: #4e5968;
  transition: var(--transition);
}

.nav-links button:hover,
.nav-links button.active {
  color: #3182f6;
}

.nav-divider {
  color: #d1d6db;
  font-size: 14px;
  user-select: none;
}

/* ── Banner Swiper ── */
.banner-swiper {
  position: relative;
  width: 100%;
  max-width: 1920px;
  max-height: 500px;
  aspect-ratio: 1920 / 500;
  overflow: hidden;
  margin: 0 auto;
}

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

.banner-slide {
  min-width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  position: relative;
}

.banner-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.banner-link {
  position: absolute;
  inset: 0;
  z-index: 3;
}

.banner-content {
  max-width: 600px;
  z-index: 2;
  padding: 0 80px;
}

.banner-content h1 {
  font-size: 48px;
  font-weight: 900;
  margin-bottom: 16px;
  letter-spacing: -1px;
  line-height: 1.2;
}

.banner-content p {
  font-size: 18px;
  opacity: 0.85;
}

.banner-img-placeholder {
  font-size: 120px;
  margin-left: 60px;
  z-index: 2;
}

.banner-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(4px);
  color: #fff;
  font-size: 28px;
  cursor: pointer;
  z-index: 10;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}

.banner-btn:hover {
  background: rgba(255, 255, 255, 0.4);
}

.banner-prev {
  left: 20px;
}

.banner-next {
  right: 20px;
}

.banner-dots {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 10;
}

.banner-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  border: none;
  cursor: pointer;
  transition: var(--transition);
}

.banner-dot.active {
  background: #fff;
  width: 28px;
  border-radius: 5px;
}

/* ── Section ── */
.section {
  max-width: 1280px;
  margin: 0 auto;
  padding: 48px 24px;
}

.section-title {
  font-size: 24px;
  font-weight: 800;
  margin-bottom: 28px;
  letter-spacing: -0.5px;
  color: var(--text-dark);
  position: relative;
  padding-bottom: 12px;
}

.section-title::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 40px;
  height: 3px;
  background: var(--primary);
  border-radius: 2px;
}

/* ── Filter Bar ── */
.filter-bar {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-bottom: 32px;
  flex-wrap: wrap;
  align-items: center;
}

.filter-btn {
  padding: 8px 20px;
  border-radius: 8px;
  border: 1.5px solid var(--border);
  background: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  color: var(--text-light);
}

.filter-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}
.filter-btn.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

/* ── Sort Select ── */
.sort-select {
  margin-left: auto;
}
.sort-select select {
  padding: 8px 12px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: 13px;
  font-family: inherit;
  background: #fff;
  cursor: pointer;
  outline: none;
}
.sort-select select:focus {
  border-color: var(--primary);
}

/* ── Special Section ── */
.special-section {
  background: linear-gradient(135deg, #fff5f5 0%, #fff9ed 100%);
  border-radius: var(--radius);
  padding: 32px 24px;
  margin-bottom: 16px;
  border: 1px solid #fde2e2;
}
.special-section .section-title {
  color: var(--danger);
}
.special-section .section-title::after {
  background: var(--danger);
}

/* ── Search Bar ── */
.search-bar {
  margin-bottom: 24px;
}

.search-bar input {
  width: 100%;
  padding: 12px 20px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-size: 15px;
  font-family: inherit;
  outline: none;
  transition: var(--transition);
  background: #fff;
}

.search-bar input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(45, 59, 135, 0.08);
}

/* ── Product Grid ── */
.product-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

/* ── Product Card ── */
.product-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  cursor: pointer;
  transition: var(--transition);
  position: relative;
}

.product-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary);
}

.card-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--danger);
  color: #fff;
  padding: 4px 12px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  z-index: 2;
}

.card-badge.best {
  background: var(--primary);
}
.card-badge.new {
  background: var(--success);
}
.card-badge.hot {
  background: var(--danger);
}
.card-badge.value {
  background: var(--accent);
  color: #fff;
}

.card-image {
  width: 100%;
  height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f8f9fc;
  padding: 24px;
  border-bottom: 1px solid var(--border);
}

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

.card-body {
  padding: 20px;
}

.card-brand {
  font-size: 11px;
  font-weight: 700;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 6px;
}

.card-name {
  font-size: 17px;
  font-weight: 800;
  margin-bottom: 4px;
  color: var(--text-dark);
  line-height: 1.3;
}

.card-subtitle {
  font-size: 13px;
  color: var(--text-light);
  margin-bottom: 8px;
}

.card-factory-price {
  font-size: 12px;
  color: var(--text-light);
  margin-bottom: 2px;
  text-decoration: line-through;
}

.card-real-price {
  font-size: 13px;
  font-weight: 600;
  color: var(--danger);
  margin-bottom: 4px;
}

.card-price {
  font-size: 20px;
  font-weight: 800;
  color: var(--danger);
}

.card-price small {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-light);
}

.card-discount-badge {
  display: inline-block;
  background: var(--danger);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  margin-top: 2px;
}

.card-calc-info {
  font-size: 11px;
  color: #a0aec0;
  margin-top: 2px;
}

/* ── Visitor Counter (now in top bar) ── */
.visitor-dot {
  width: 9px;
  height: 9px;
  background: #4ade80;
  border-radius: 50%;
  display: inline-block;
  animation: pulse-dot 1.5s infinite;
}
@keyframes pulse-dot {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.4;
  }
}

/* ── Review Section ── */
.review-section {
  max-width: 1200px;
  margin: 0 auto;
  padding-bottom: 48px;
}
.review-summary {
  text-align: center;
  font-size: 16px;
  color: var(--text-light);
  margin-bottom: 24px;
}
.review-summary strong {
  color: var(--primary);
  font-size: 20px;
}
.review-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
  padding: 0 16px;
}
.review-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  transition: box-shadow 0.2s;
}
.review-card:hover {
  box-shadow: var(--shadow);
}
.review-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.review-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 16px;
  flex-shrink: 0;
}
.review-meta {
  flex: 1;
}
.review-name {
  font-weight: 600;
  font-size: 14px;
  color: var(--text-dark);
}
.review-date {
  font-size: 12px;
  color: #a0aec0;
}
.review-stars {
  color: #f6ad55;
  font-size: 14px;
  letter-spacing: 1px;
}
.review-device {
  font-size: 12px;
  color: var(--primary);
  background: #ebf4ff;
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  margin-bottom: 8px;
}
.review-text {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text);
}

/* ── Review Board ── */
.review-write-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  margin-top: 16px;
}
.review-write-card h3 {
  margin-bottom: 16px;
  font-size: 18px;
}
.review-form-row {
  margin-bottom: 14px;
}
.review-form-row label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text-dark);
}
.review-form-row input,
.review-form-row select,
.review-form-row textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  outline: none;
  box-sizing: border-box;
}
.review-form-row input:focus,
.review-form-row select:focus,
.review-form-row textarea:focus {
  border-color: var(--primary);
}
.star-picker {
  display: flex;
  gap: 4px;
}
.star-picker span {
  font-size: 28px;
  cursor: pointer;
  color: #d1d5db;
  transition: color 0.15s;
  user-select: none;
}
.star-picker span.active {
  color: #f6ad55;
}
.review-board-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin-bottom: 12px;
}
.review-board-top {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}
.review-board-top .review-avatar {
  width: 36px;
  height: 36px;
  font-size: 14px;
}
.review-board-info {
  flex: 1;
}
.review-board-info .review-name {
  font-weight: 600;
  font-size: 14px;
}
.review-board-info .review-date {
  font-size: 12px;
  color: #a0aec0;
}
.review-board-stars {
  color: #f6ad55;
  font-size: 14px;
}
.review-board-device {
  font-size: 12px;
  color: var(--primary);
  margin-bottom: 6px;
}
.review-board-text {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text);
}
.pagination-btn {
  display: inline-block;
  padding: 6px 14px;
  margin: 0 2px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
  font-size: 13px;
}
.pagination-btn.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

/* ── Product Detail (Modal-like Page) ── */
.detail-page {
  display: none;
  max-width: 1100px;
  margin: 0 auto;
  margin-left: calc(50% - 500px);
  padding: 48px 24px;
}

.detail-page.active {
  display: block;
  padding-bottom: 100px;
}

.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-light);
  background: none;
  border: none;
  cursor: pointer;
  margin-bottom: 32px;
  padding: 8px 0;
  transition: var(--transition);
}

.back-btn:hover {
  color: var(--primary);
}

.detail-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}

.detail-image-wrap {
  background: #f8f9fc;
  border-radius: var(--radius);
  padding: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 400px;
  border: 1px solid var(--border);
}

.detail-image-wrap img {
  max-width: 100%;
  max-height: 350px;
  object-fit: contain;
}

.detail-info h1 {
  font-size: 32px;
  font-weight: 900;
  margin-bottom: 4px;
}

.detail-subtitle {
  font-size: 15px;
  color: var(--text-light);
  margin-bottom: 24px;
}

.detail-price {
  font-size: 32px;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 32px;
}

.option-group {
  margin-bottom: 24px;
}

.option-label {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--text);
}

.color-options {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.color-swatch {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 3px solid transparent;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
}

.color-swatch:hover {
  transform: scale(1.15);
}
.color-swatch.selected {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px var(--primary-light);
}

.color-swatch::after {
  content: attr(data-name);
  position: absolute;
  bottom: -22px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 11px;
  white-space: nowrap;
  color: var(--text-light);
  opacity: 0;
  transition: var(--transition);
  pointer-events: none;
}

.color-swatch:hover::after,
.color-swatch.selected::after {
  opacity: 1;
}

.storage-options {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.storage-btn {
  padding: 10px 20px;
  border: 2px solid var(--border);
  border-radius: 8px;
  background: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.storage-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}
.storage-btn.selected {
  border-color: var(--primary);
  background: var(--primary);
  color: #fff;
}

.quantity-control {
  display: inline-flex;
  align-items: center;
  border: 2px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}

.qty-btn {
  width: 44px;
  height: 44px;
  border: none;
  background: #f8fafc;
  font-size: 20px;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}

.qty-btn:hover {
  background: var(--primary-light);
  color: var(--primary);
}

.qty-value {
  width: 50px;
  text-align: center;
  font-size: 16px;
  font-weight: 700;
  border: none;
  outline: none;
  background: transparent;
}

.spec-list {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 16px;
}

.spec-list li {
  font-size: 13px;
  color: var(--text-light);
  padding: 6px 0;
  display: flex;
  align-items: center;
  gap: 6px;
}

.spec-list li::before {
  content: "✓";
  color: var(--success);
  font-weight: 700;
}

.buy-btn {
  width: 100%;
  padding: 18px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  font-size: 18px;
  font-weight: 800;
  cursor: pointer;
  transition: var(--transition);
  margin-top: 24px;
}

.buy-btn:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

/* ── Order Page ── */
.order-page {
  display: none;
  max-width: 680px;
  margin: 0 auto;
  padding: 48px 24px;
}

.order-page.active {
  display: block;
}

.order-summary {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 32px;
  box-shadow: var(--shadow);
  display: flex;
  gap: 20px;
  align-items: center;
}

.order-summary img {
  width: 100px;
  height: 100px;
  object-fit: contain;
}

.order-summary-info h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 4px;
}

.order-summary-info p {
  font-size: 13px;
  color: var(--text-light);
}

.order-summary-price {
  margin-left: auto;
  font-size: 24px;
  font-weight: 800;
  color: var(--primary);
  white-space: nowrap;
}

.form-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow);
}

.form-card h2 {
  font-size: 22px;
  font-weight: 800;
  margin-bottom: 24px;
}

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

.form-group label {
  display: block;
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--text);
}

.form-group label .required {
  color: var(--danger);
  margin-left: 2px;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  font-size: 15px;
  font-family: inherit;
  transition: var(--transition);
  outline: none;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(45, 59, 135, 0.08);
}

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

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.submit-btn {
  width: 100%;
  padding: 18px;
  background: var(--danger);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  font-size: 18px;
  font-weight: 800;
  cursor: pointer;
  transition: var(--transition);
  margin-top: 8px;
}

.submit-btn:hover {
  background: #c62828;
}
.submit-btn:disabled {
  background: #94a3b8;
  cursor: not-allowed;
}

/* ── Sticky Order Bar ── */
.sticky-order-bar {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 900;
  background: var(--primary);
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
  padding: 0;
}
.sticky-order-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  gap: 24px;
}
.sticky-order-info {
  display: flex;
  align-items: center;
  gap: 20px;
  flex: 1;
  min-width: 0;
}
.sticky-order-name {
  font-weight: 700;
  font-size: 15px;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sticky-order-price {
  font-size: 20px;
  font-weight: 900;
  color: #ffd54f;
  white-space: nowrap;
}
.sticky-order-btn {
  flex-shrink: 0;
  padding: 14px 40px;
  background: #fff;
  color: var(--primary);
  border: none;
  border-radius: var(--radius);
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
  transition: var(--transition);
}
.sticky-order-btn:hover {
  background: #f0f0f0;
}

.sticky-order-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 950;
}
.sticky-order-overlay.active {
  display: block;
}

.sticky-order-panel {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 960;
  background: #fff;
  border-radius: 20px 20px 0 0;
  padding: 24px;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.15);
  transform: translateY(100%);
  transition: transform 0.3s ease;
}
.sticky-order-panel.active {
  display: block;
  transform: translateY(0);
}
.sticky-order-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.sticky-order-panel-header h3 {
  margin: 0;
  font-size: 18px;
}
.sticky-order-close {
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
  color: var(--text-light);
  padding: 4px 8px;
}

@media (max-width: 768px) {
  .sticky-order-inner {
    padding: 12px 16px;
    gap: 12px;
  }
  .sticky-order-info {
    gap: 8px;
  }
  .sticky-order-name {
    font-size: 13px;
  }
  .sticky-order-price {
    font-size: 16px;
  }
  .sticky-order-btn {
    padding: 12px 20px;
    font-size: 14px;
  }
}

/* ── Success Modal ── */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 200;
  align-items: center;
  justify-content: center;
}

.modal-overlay.active {
  display: flex;
}

.modal-content {
  background: #fff;
  border-radius: var(--radius);
  padding: 48px;
  text-align: center;
  max-width: 420px;
  width: 90%;
  animation: modalIn 0.3s ease;
}

@keyframes modalIn {
  from {
    transform: scale(0.9);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

.modal-icon {
  width: 64px;
  height: 64px;
  background: #dcfce7;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  font-size: 32px;
}

.modal-content h2 {
  font-size: 24px;
  font-weight: 800;
  margin-bottom: 8px;
}

.modal-content p {
  color: var(--text-light);
  margin-bottom: 24px;
}

.modal-btn {
  padding: 14px 40px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
}

.modal-btn:hover {
  background: var(--primary-dark);
}

/* ── Footer ── */
.footer {
  background: #191f28;
  color: #8b95a1;
  padding: 40px 24px 24px;
  margin-top: 64px;
  font-size: 13px;
  line-height: 1.8;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 32px;
  flex-wrap: wrap;
}

.footer-brand strong {
  color: #fff;
  font-size: 16px;
}

.footer-info a {
  color: #8b95a1;
  text-decoration: none;
}

.footer-info a:hover {
  color: #3182f6;
}

.footer-cert-img {
  height: 56px;
  opacity: 0.85;
  transition: opacity 0.2s;
}

.footer-cert-img:hover {
  opacity: 1;
}

.footer-copy {
  text-align: center;
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid #333d4b;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

.footer-cert {
  text-align: center;
  margin-top: 16px;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

.footer strong {
  color: #fff;
}

/* ── Responsive ── */
@media (max-width: 1024px) {
  .product-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  body {
    font-size: 14px;
    line-height: 1.65;
    color: #1a202c;
  }

  /* ── Top Bar Mobile ── */
  .top-bar-inner {
    padding: 12px 16px;
    font-size: 12px;
  }
  .top-bar-phone {
    font-size: 13px;
  }
  .top-bar-visitor strong {
    font-size: 14px;
  }

  /* ── Header Mobile ── */
  .header {
    top: 44px;
  }
  .header-inner {
    height: 48px;
    padding: 0 16px;
  }
  .logo {
    font-size: 18px;
  }
  .nav-links {
    gap: 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .nav-links::-webkit-scrollbar {
    display: none;
  }
  .nav-links button {
    font-size: 12px;
    padding: 5px 10px;
    white-space: nowrap;
  }
  .nav-divider {
    font-size: 12px;
  }

  /* ── Banner Mobile ── */
  .banner-swiper {
    max-height: none;
    aspect-ratio: 1920 / 500;
  }
  .banner-slide {
    flex-direction: column;
    text-align: center;
  }
  .banner-content h1 {
    font-size: 22px;
    line-height: 1.35;
    letter-spacing: -0.3px;
  }
  .banner-content p {
    font-size: 13px;
    line-height: 1.5;
    color: #4a5568;
  }
  .banner-img-placeholder {
    font-size: 64px;
    margin-left: 0;
    margin-top: 16px;
  }

  /* ── Product Grid Mobile ── */
  .product-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    padding: 0 4px;
  }
  .card-body {
    padding: 12px;
  }
  .card-brand {
    font-size: 10px;
    letter-spacing: 0.5px;
  }
  .card-name {
    font-size: 14px;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: -0.2px;
    color: #1a202c;
  }
  .card-subtitle {
    font-size: 11px;
    line-height: 1.4;
    color: #718096;
  }
  .card-factory-price {
    font-size: 11px;
    color: #a0aec0;
  }
  .card-real-price {
    font-size: 12px;
  }
  .card-price {
    font-size: 16px;
    font-weight: 800;
  }
  .card-price small {
    font-size: 11px;
  }
  .card-discount-badge {
    font-size: 10px;
    padding: 1px 6px;
  }
  .card-calc-info {
    font-size: 10px;
  }
  .review-grid {
    grid-template-columns: 1fr;
  }
  .card-badge {
    font-size: 10px;
    padding: 3px 8px;
    top: 10px;
    left: 10px;
  }
  .card-image {
    height: 150px;
    padding: 16px;
  }

  /* ── Detail Page Mobile ── */
  .detail-page {
    padding: 24px 16px;
    margin-left: auto;
    margin-right: auto;
  }
  .detail-layout {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .detail-image-wrap {
    min-height: 240px;
    padding: 20px;
  }
  .detail-info h1 {
    font-size: 22px;
    font-weight: 800;
    line-height: 1.3;
    letter-spacing: -0.3px;
    color: #1a202c;
  }
  .detail-subtitle {
    font-size: 13px;
    color: #718096;
  }
  .detail-price {
    font-size: 24px;
    font-weight: 800;
  }
  .option-label {
    font-size: 13px;
    font-weight: 700;
    color: #2d3748;
  }
  .storage-btn {
    font-size: 13px;
    padding: 8px 16px;
  }
  .buy-btn {
    font-size: 16px;
    padding: 16px;
  }
  .back-btn {
    font-size: 13px;
  }
  .spec-list {
    grid-template-columns: 1fr;
  }
  .spec-list li {
    font-size: 12px;
    color: #4a5568;
  }

  /* ── Calculator Mobile ── */
  .form-card {
    padding: 20px 16px;
  }
  .form-card h2 {
    font-size: 18px;
    font-weight: 800;
  }
  .form-group label {
    font-size: 13px;
    font-weight: 700;
    color: #2d3748;
  }
  .form-group input,
  .form-group textarea {
    font-size: 14px;
    padding: 10px 14px;
  }
  .form-select {
    font-size: 13px;
    padding: 10px 14px;
  }
  .calc-result {
    padding: 16px;
  }
  .calc-result-row {
    font-size: 13px;
    padding: 6px 0;
    color: #2d3748;
  }
  .calc-result-row.total {
    font-size: 16px;
  }
  .calc-result-row.total strong {
    font-size: 20px;
  }

  /* ── Order Page Mobile ── */
  .order-page {
    padding: 24px 16px;
  }
  .order-summary {
    flex-direction: column;
    text-align: center;
    padding: 16px;
  }
  .order-summary-info h3 {
    font-size: 15px;
  }
  .order-summary-info p {
    font-size: 12px;
  }
  .order-summary-price {
    margin-left: 0;
    margin-top: 8px;
    font-size: 20px;
  }
  .form-row {
    grid-template-columns: 1fr;
  }
  .submit-btn {
    font-size: 16px;
    padding: 16px;
  }

  /* ── Modal Mobile ── */
  .modal-content {
    padding: 32px 24px;
  }
  .modal-content h2 {
    font-size: 20px;
  }
  .modal-content p {
    font-size: 13px;
  }

  /* ── Footer Mobile ── */
  .footer {
    font-size: 12px;
    padding: 28px 16px 20px;
  }
  .footer-brand strong {
    font-size: 14px;
  }
}

/* ── Loading Spinner ── */
.spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: #fff;
  animation: spin 0.6s linear infinite;
}

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

/* ── Form Select ── */
.form-select {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  font-size: 15px;
  font-family: inherit;
  transition: var(--transition);
  outline: none;
  background: #fff;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23777' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
}

.form-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(45, 59, 135, 0.08);
}

.readonly-input {
  background: #f1f5f9 !important;
  color: var(--text-light);
}

/* ── Detail Landing Image Section ── */
.detail-landing-section {
  margin-top: 48px;
}

.detail-landing-images {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.detail-landing-images img {
  width: 100%;
  display: block;
}

.landing-placeholder {
  text-align: center;
  padding: 80px 24px;
  background: linear-gradient(180deg, #f1f5f9, #e2e8f0);
  border-radius: var(--radius);
  color: var(--text-light);
  font-size: 16px;
  font-weight: 600;
}

/* ── Detail Calculator Section ── */
.detail-calculator-section {
  margin-top: 48px;
  margin-bottom: 48px;
}

.detail-calculator-section .form-card {
  max-width: 100%;
}

.calc-toggle-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  user-select: none;
  padding-bottom: 8px;
}

.calc-toggle-header:hover {
  opacity: 0.8;
}

.calc-toggle-header h2 {
  margin: 0;
}

.calc-toggle-icon {
  font-size: 18px;
  transition: transform 0.3s ease;
  color: var(--text-light);
}

.calc-toggle-icon.collapsed {
  transform: rotate(180deg);
}

#calcBody {
  overflow: hidden;
  transition:
    max-height 0.4s ease,
    opacity 0.3s ease;
  max-height: 2000px;
  opacity: 1;
}

#calcBody.collapsed {
  max-height: 0;
  opacity: 0;
  margin-top: 0;
}

.calc-result {
  background: #f1f5f9;
  border-radius: var(--radius);
  padding: 24px;
  margin-top: 24px;
}

.calc-result-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  font-size: 15px;
}

.calc-result-row.total {
  font-size: 20px;
  color: var(--primary);
}

.calc-result-row.total strong {
  font-size: 24px;
}

.calc-result-divider {
  height: 1px;
  background: var(--border);
  margin: 8px 0;
}

/* ── Admin Page ── */
.admin-page {
  display: none;
  max-width: 100%;
  margin: 0;
  padding: 0;
}

.admin-page.active {
  display: block;
}

.admin-product-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-bottom: 12px;
  transition: var(--transition);
}

.admin-product-item:hover {
  box-shadow: var(--shadow);
}

.admin-product-item img {
  width: 64px;
  height: 64px;
  object-fit: contain;
  border-radius: 8px;
  background: #f1f5f9;
  padding: 4px;
}

.admin-product-info {
  flex: 1;
}

.admin-product-info h4 {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 2px;
}

.admin-product-info p {
  font-size: 13px;
  color: var(--text-light);
}

.admin-actions {
  display: flex;
  gap: 8px;
}

.admin-btn {
  padding: 8px 16px;
  border-radius: 8px;
  border: 1.5px solid var(--border);
  background: #fff;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.admin-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.admin-btn.delete {
  color: var(--danger);
}

.admin-btn.delete:hover {
  border-color: var(--danger);
  background: #fef2f2;
}

/* ── 플로팅 상담 위젯 ── */
.float-widgets {
  position: fixed;
  bottom: 24px;
  right: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 9999;
}

.float-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 18px;
  border-radius: 50px;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  color: #fff;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18);
  transition:
    transform 0.15s,
    box-shadow 0.15s;
  white-space: nowrap;
}

.float-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.22);
}

.float-btn svg {
  flex-shrink: 0;
}

.float-tel {
  background: #2563eb;
}

.float-kakao {
  background: #ffe812;
  color: #3a1d1d;
}

@media (max-width: 768px) {
  .float-widgets {
    bottom: 16px;
    right: 14px;
    gap: 8px;
  }

  .float-btn {
    padding: 11px 14px;
    font-size: 13px;
  }

  .float-btn span {
    display: none;
  }

  .float-btn svg {
    width: 22px;
    height: 22px;
  }
}
