@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+KR:wght@300;400;500;700;900&family=Poppins:wght@400;600;700;900&display=swap');

:root {
  --primary: #FF4E8E;
  --primary-light: #FF8CB5;
  --primary-dark: #E03070;
  --brown: #8B5E3C;
  --brown-light: #C49A6C;
  --cream: #FFF8F2;
  --cream2: #FFF0E6;
  --text: #2D2D2D;
  --text-secondary: #777777;
  --text-light: #AAAAAA;
  --border: #E8E0D8;
  --white: #FFFFFF;
  --success: #4CAF50;
  --warning: #FF9800;
  --error: #F44336;
  --radius: 16px;
  --radius-sm: 8px;
  --shadow: 0 4px 20px rgba(0,0,0,0.08);
  --shadow-hover: 0 8px 30px rgba(0,0,0,0.14);
  --transition: 0.25s cubic-bezier(0.4,0,0.2,1);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Noto Sans KR', sans-serif;
  background: var(--cream);
  color: var(--text);
  line-height: 1.7;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input, textarea, select { font-family: inherit; }

/* ========== HEADER ========== */
.header {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

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

.header-logo {
  flex-shrink: 0;
}

.header-logo img {
  height: 38px;
  width: auto;
}

.header-logo span {
  font-family: 'Poppins', sans-serif;
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.5px;
}

.header-logo span em {
  color: var(--primary);
  font-style: normal;
}

.header-nav {
  display: flex;
  gap: 32px;
}

.header-nav a {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color var(--transition);
  position: relative;
}

.header-nav a:hover, .header-nav a.active {
  color: var(--primary);
}

.header-nav a.active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0; right: 0;
  height: 2px;
  background: var(--primary);
  border-radius: 2px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-actions .btn-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  transition: all var(--transition);
  position: relative;
}

.header-actions .btn-icon:hover {
  background: var(--cream2);
  color: var(--primary);
}

.cart-badge {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 18px;
  height: 18px;
  background: var(--primary);
  color: white;
  font-size: 10px;
  font-weight: 700;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.btn-login {
  padding: 8px 20px;
  background: var(--primary);
  color: white;
  border-radius: 24px;
  font-size: 14px;
  font-weight: 600;
  transition: all var(--transition);
}

.btn-login:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
}

/* ========== FOOTER ========== */
footer {
  background: #2D2D2D;
  color: #AAAAAA;
  margin-top: auto;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 48px 24px 32px;
}

.footer-top {
  display: flex;
  justify-content: space-between;
  gap: 40px;
  padding-bottom: 32px;
  border-bottom: 1px solid #444;
}

.footer-brand .logo-text {
  font-family: 'Poppins', sans-serif;
  font-size: 20px;
  font-weight: 700;
  color: white;
  margin-bottom: 8px;
}

.footer-brand .logo-text em {
  color: var(--primary);
  font-style: normal;
}

.footer-brand p {
  font-size: 13px;
  line-height: 2.0;
  color: #888;
}

.footer-links {
  display: flex;
  gap: 60px;
}

.footer-col h4 {
  font-size: 14px;
  font-weight: 600;
  color: #CCC;
  margin-bottom: 16px;
}

.footer-col a {
  display: block;
  font-size: 13px;
  color: #888;
  margin-bottom: 8px;
  transition: color var(--transition);
}

.footer-col a:hover { color: var(--primary); }

.footer-bottom {
  padding-top: 24px;
  font-size: 12px;
  color: #666;
  text-align: center;
}

/* ========== BUTTONS ========== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 50px;
  font-size: 15px;
  font-weight: 600;
  transition: all var(--transition);
  cursor: pointer;
  border: none;
  white-space: nowrap;
}

.btn-primary {
  background: var(--primary);
  color: white;
}
.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255,78,142,0.35);
}

.btn-secondary {
  background: var(--cream2);
  color: var(--brown);
  border: 2px solid var(--border);
}
.btn-secondary:hover {
  background: var(--border);
  transform: translateY(-2px);
}

.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
}
.btn-outline:hover {
  background: var(--primary);
  color: white;
  transform: translateY(-2px);
}

.btn-brown {
  background: var(--brown);
  color: white;
}
.btn-brown:hover {
  background: #6B4427;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(139,94,60,0.3);
}

.btn-lg { padding: 16px 40px; font-size: 16px; }
.btn-sm { padding: 9px 18px; font-size: 13px; }
.btn-full { width: 100%; }

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

/* ========== FORMS ========== */
.form-group {
  margin-bottom: 20px;
}

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

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

.form-control {
  width: 100%;
  padding: 13px 16px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 15px;
  background: white;
  transition: all var(--transition);
  outline: none;
  color: var(--text);
}

.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(255,78,142,0.12);
}

.form-control::placeholder { color: var(--text-light); }

.form-hint {
  font-size: 12px;
  color: var(--text-light);
  margin-top: 5px;
}

.form-error {
  font-size: 12px;
  color: var(--error);
  margin-top: 5px;
}

/* ========== CARDS ========== */
.product-card {
  background: white;
  border-radius: var(--radius);
  overflow: hidden;
  transition: all var(--transition);
  box-shadow: var(--shadow);
  cursor: pointer;
}

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

.product-card-img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  background: var(--cream2);
  position: relative;
}

.product-card-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: var(--primary);
  color: white;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 20px;
  z-index: 1;
  line-height: 1.4;
  box-shadow: 0 2px 8px rgba(255,78,142,0.35);
}

.product-card-img.placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
}

.product-card-body {
  padding: 16px;
}

.product-card-flavor {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 20px;
  margin-bottom: 8px;
  color: white;
}

.product-card-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 10px;
  line-height: 1.4;
}

.product-card-price {
  display: flex;
  align-items: center;
  gap: 8px;
}

.price-sale {
  font-size: 18px;
  font-weight: 700;
  color: var(--primary);
}

.price-original {
  font-size: 13px;
  color: var(--text-light);
  text-decoration: line-through;
}

.price-discount {
  font-size: 12px;
  font-weight: 700;
  color: var(--primary);
  background: #FFE8F2;
  padding: 2px 6px;
  border-radius: 4px;
}

/* ========== SECTION ========== */
.section {
  padding: 80px 0;
}

.section-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.section-title {
  text-align: center;
  margin-bottom: 48px;
}

.section-title h2 {
  font-size: 32px;
  font-weight: 900;
  color: var(--text);
  line-height: 1.4;
}

.section-title p {
  font-size: 16px;
  color: var(--text-secondary);
  margin-top: 14px;
  line-height: 1.7;
}

/* ========== TOAST ========== */
#toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  padding: 14px 20px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  color: white;
  box-shadow: 0 4px 16px rgba(0,0,0,0.15);
  animation: slideIn 0.3s ease;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 260px;
}

.toast.success { background: #2DC98A; }
.toast.error { background: #F44336; }
.toast.info { background: var(--primary); }

@keyframes slideIn {
  from { transform: translateX(100px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* ========== BREADCRUMB ========== */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-light);
  margin-bottom: 32px;
}

.breadcrumb a:hover { color: var(--primary); }
.breadcrumb .sep { color: var(--border); }
.breadcrumb .current { color: var(--text); font-weight: 500; }

/* ========== BADGE ========== */
.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}

.badge-pink { background: #FFE8F2; color: var(--primary); }
.badge-green { background: #E8F8EE; color: #2DC98A; }
.badge-orange { background: #FFF3E0; color: #FF9800; }
.badge-gray { background: #F5F5F5; color: #777; }
.badge-blue { background: #E3F2FD; color: #2196F3; }

/* ========== LOADING ========== */
.loading-spinner {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 60px;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

/* ========== STAR RATING ========== */
.stars {
  display: flex;
  gap: 2px;
  color: #FFD700;
  font-size: 16px;
}

.stars.sm { font-size: 13px; }

/* ========== DIVIDER ========== */
.divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 24px 0;
}

/* ========== PAGE TITLE ========== */
.page-title {
  background: linear-gradient(135deg, var(--cream) 0%, var(--cream2) 100%);
  padding: 48px 0;
  text-align: center;
  border-bottom: 1px solid var(--border);
}

.page-title h1 {
  font-size: 28px;
  font-weight: 900;
  color: var(--text);
}

.page-title p {
  font-size: 14px;
  color: var(--text-secondary);
  margin-top: 6px;
}

/* ========== EMPTY STATE ========== */
.empty-state {
  text-align: center;
  padding: 80px 24px;
}

.empty-state .emoji {
  font-size: 56px;
  margin-bottom: 16px;
}

.empty-state h3 {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}

.empty-state p {
  font-size: 15px;
  color: var(--text-secondary);
  margin-bottom: 24px;
}

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

/* ========== MOBILE ========== */
.mobile-menu-btn {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
  cursor: pointer;
}

.mobile-menu-btn span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all var(--transition);
}

@media (max-width: 768px) {
  .header-nav { display: none; }
  .mobile-menu-btn { display: flex; }

  .product-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }

  .section { padding: 48px 0; }
  .section-title h2 { font-size: 24px; }

  .footer-top { flex-direction: column; gap: 32px; }
  .footer-links { flex-wrap: wrap; gap: 32px; }
}

@media (max-width: 480px) {
  .header-inner { padding: 0 16px; }
  .section-inner { padding: 0 16px; }
}
