/* Reset & Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Noto Sans KR', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
  background: #0a0a0a;
  color: #e0e0e0;
}

/* App Container */
.app-container {
  display: flex;
  min-height: 100vh;
  position: relative;
}

/* Sidebar */
.sidebar {
  width: 240px;
  background: linear-gradient(180deg, #1a0f0f 0%, #0d0505 100%);
  border-right: 1px solid #3a1515;
  padding: 20px 0;
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  overflow-y: auto;
  z-index: 100;
}

.logo {
  padding: 0 20px 20px;
  border-bottom: 2px solid #ff4444;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo i {
  color: #ff4444;
  font-size: 24px;
}

.logo span {
  font-size: 20px;
  font-weight: bold;
  color: #ff6666;
  letter-spacing: 1px;
}

.logo small {
  font-size: 11px;
  color: #888;
  margin-left: auto;
}

/* Sidebar Search */
.sidebar-search {
  margin: 10px 20px 20px 20px;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 68, 68, 0.3);
  border-radius: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s;
}

.sidebar-search:focus-within {
  background: rgba(255, 255, 255, 0.08);
  border-color: #ff4444;
  box-shadow: 0 0 0 3px rgba(255, 68, 68, 0.1);
}

.sidebar-search i {
  color: #ff6666;
  font-size: 14px;
  flex-shrink: 0;
}

.sidebar-search-input {
  background: transparent;
  border: none;
  outline: none;
  color: #e0e0e0;
  font-size: 14px;
  width: 100%;
  flex: 1;
}

.sidebar-search-input::placeholder {
  color: #888;
}

/* Menu */
.menu {
  padding: 0 10px;
}

.menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  margin: 6px 8px;
  cursor: pointer;
  border-radius: 8px;
  transition: all 0.3s;
  color: #aaa;
  font-size: 15px;
  border: 1.5px solid rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.03);
}

.menu-item:hover {
  background: rgba(255, 68, 68, 0.15);
  color: #ff6666;
  border-color: rgba(255, 68, 68, 0.5);
  transform: translateX(3px);
  box-shadow: 0 2px 8px rgba(255, 68, 68, 0.2);
}

.menu-item.active {
  background: linear-gradient(90deg, rgba(255, 68, 68, 0.25), rgba(255, 68, 68, 0.05));
  color: #ff6666;
  border-left: 4px solid #ff4444;
  border-color: rgba(255, 68, 68, 0.6);
  box-shadow: 0 2px 12px rgba(255, 68, 68, 0.3);
  font-weight: 500;
}

.menu-item i {
  width: 20px;
  text-align: center;
  font-size: 16px;
}

/* 토글 아이콘 (버튼 내부) */
.toggle-icon {
  color: #ff9900;
  font-size: 14px;
  margin-right: -8px;
  transition: transform 0.3s;
}

.menu-item:hover .toggle-icon {
  color: #ffbb33;
}

.menu-item .count {
  margin-left: auto;
  background: rgba(255, 255, 255, 0.1);
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.menu-item.active .count {
  background: rgba(255, 68, 68, 0.4);
  color: #ffaaaa;
  border-color: rgba(255, 68, 68, 0.5);
  box-shadow: 0 0 8px rgba(255, 68, 68, 0.3);
}

/* Main Content */
.main-content {
  margin-left: 240px;
  flex: 1;
  min-height: 100vh;
  min-width: 0;           /* flex child가 내용물보다 작아질 수 있게 */
  overflow-x: hidden;     /* 가로 삐져나옴 방지 */
}

/* Header */
.header {
  background: rgba(20, 20, 20, 0.95);
  padding: 0;
  border-bottom: 1px solid #2a2a2a;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(10px);
  overflow: visible;     /* 드롭다운이 헤더 밖으로 나올 수 있게 */
}

.header-row {
  display: flex;
  align-items: center;
  padding: 10px 30px;
  gap: 10px;
  width: 100%;
  box-sizing: border-box;
  min-width: 0;
}

.header-left {
  display: flex;
  gap: 15px;
  align-items: center;
  flex: 0 0 auto;        /* 내용물 크기만큼만 차지 */
  min-width: 0;
}

.shop-status {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.3s;
}

.shop-status i {
  font-size: 10px;
  animation: pulse 2s infinite;
}

.shop-status.open {
  background: rgba(76, 175, 80, 0.15);
  border: 1px solid rgba(76, 175, 80, 0.4);
  color: #4caf50;
}

.shop-status.open i {
  color: #4caf50;
}

.shop-status.closed {
  background: rgba(244, 67, 54, 0.15);
  border: 1px solid rgba(244, 67, 54, 0.4);
  color: #f44336;
}

.shop-status.closed i {
  color: #f44336;
  animation: none;
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

.nav-btn {
  background: transparent;
  border: 1px solid #444;
  color: #aaa;
  padding: 8px 20px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.2s;
}

.nav-btn:hover {
  border-color: #ff4444;
  color: #ff6666;
}

.nav-btn.active {
  background: linear-gradient(135deg, #ff4444, #cc0000);
  border-color: #ff4444;
  color: white;
  box-shadow: 0 0 20px rgba(255, 68, 68, 0.4);
}

.search-input {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid #333;
  padding: 8px 15px;
  border-radius: 6px;
  color: #fff;
  width: 250px;
  font-size: 14px;
}

.search-input::placeholder {
  color: #666;
}

.search-input:focus {
  outline: none;
  border-color: #ff4444;
  box-shadow: 0 0 10px rgba(255, 68, 68, 0.2);
}

.header-right {
  display: flex;
  gap: 8px;
  align-items: center;
  flex: 0 0 auto;        /* 내용물 크기만큼만 차지 */
  min-width: 0;
  margin-left: auto;     /* 항상 오른쪽 끝으로 */
}

/* 사이드바 도구 바로가기는 데스크탑에선 숨김(헤더에 있음), 모바일에서만 노출 */
.menu-item.tool-mobile-only { display: none; }

.btn-cart-header {
  position: relative;
  background: transparent;
  border: 1px solid #ff4444;
  color: #ff6666;
  padding: 8px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 16px;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-cart-header:hover {
  background: rgba(255, 68, 68, 0.1);
  box-shadow: 0 0 15px rgba(255, 68, 68, 0.3);
}

/* ── 헬타이드 이벤트 타이머 헤더 버튼 (전역 — 모든 페이지 헤더) ── */
.btn-helltide-header {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: transparent;
  border: 1px solid #ff4444;
  border-radius: 6px;
  color: #ff6666;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}
.btn-helltide-header:hover {
  background: rgba(255, 68, 68, 0.1);
  box-shadow: 0 0 15px rgba(255, 68, 68, 0.3);
  color: #ff6666;
  text-decoration: none;
}
.btn-helltide-header.ht-live {
  animation: ht-header-glow 2s ease-in-out infinite;
}
@keyframes ht-header-glow {
  0%, 100% { box-shadow: none; }
  50%       { box-shadow: 0 0 14px rgba(255, 68, 68, 0.5); }
}
.helltide-header-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  display: none;
  flex-shrink: 0;
}
.helltide-header-dot.active {
  display: inline-block;
  background: #ff4444;
  animation: ht-dot-pulse 1.4s ease-in-out infinite;
}
.helltide-header-dot.inactive {
  display: inline-block;
  background: #555;
}
@keyframes ht-dot-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.4; transform: scale(1.35); }
}

/* 사이드바 헬타이드 메뉴 LIVE 배지 */
.helltide-live-badge {
  position: absolute;
  top: 50%; right: 15px;
  transform: translateY(-50%);
  background: linear-gradient(135deg, #ff4444, #cc0000);
  color: white;
  font-size: 9px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 10px;
  letter-spacing: 0.4px;
  animation: pulse-sale 2s ease-in-out infinite;
}

/* 모바일: 헬타이드 버튼 텍스트 숨기기 */
@media (max-width: 520px) {
  .btn-helltide-text { display: none; }
  .btn-helltide-header { padding: 8px 10px; }
}

/* 보스 드랍테이블 헤더 버튼 */
.btn-droptable-header {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: transparent;
  border: 1px solid #e6a817;
  border-radius: 6px;
  color: #e6a817;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
  flex-shrink: 0;
}
.btn-droptable-header:hover {
  background: rgba(230, 168, 23, 0.12);
  box-shadow: 0 0 12px rgba(230, 168, 23, 0.3);
  color: #e6a817;
  text-decoration: none;
}
@media (max-width: 520px) {
  .btn-droptable-text { display: none; }
  .btn-droptable-header { padding: 8px 10px; }
}

/* 출석체크 헤더 버튼 */
.btn-attendance-header {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: transparent;
  border: 1px solid #4caf50;
  border-radius: 6px;
  color: #4caf50;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
  flex-shrink: 0;
}
.btn-attendance-header:hover {
  background: rgba(76, 175, 80, 0.12);
  box-shadow: 0 0 12px rgba(76, 175, 80, 0.3);
  color: #4caf50;
  text-decoration: none;
}
.btn-attendance-header i { font-size: 13px; }
.btn-attendance-header.att-done-today {
  background: rgba(76, 175, 80, 0.1);
}
@media (max-width: 520px) {
  .btn-attendance-text { display: none; }
  .btn-attendance-header { padding: 8px 10px; }
}

.cart-badge {
  position: absolute;
  top: -8px;
  right: -8px;
  background: #ff4444;
  color: white;
  font-size: 11px;
  font-weight: bold;
  padding: 2px 6px;
  border-radius: 10px;
  min-width: 18px;
  text-align: center;
}

.btn-login,
.btn-register {
  background: transparent;
  border: 1px solid #ff4444;
  color: #ff6666;
  padding: 8px 20px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.2s;
  white-space: nowrap;
  flex-shrink: 0;
}

.btn-login:hover,
.btn-register:hover {
  background: rgba(255, 68, 68, 0.1);
  box-shadow: 0 0 15px rgba(255, 68, 68, 0.3);
}

/* Hero Section */
.hero {
  position: relative;
  height: 500px;
  background: 
    linear-gradient(to bottom, rgba(0, 0, 0, 0.3), rgba(10, 10, 10, 0.9)),
    url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 600"><defs><radialGradient id="grad"><stop offset="0%" stop-color="%23ff4444" stop-opacity="0.3"/><stop offset="100%" stop-color="%23000000" stop-opacity="0"/></radialGradient></defs><circle cx="600" cy="300" r="300" fill="url(%23grad)"/></svg>');
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(circle at 50% 40%, rgba(139, 0, 0, 0.4) 0%, transparent 50%),
    radial-gradient(circle at 50% 50%, rgba(255, 68, 68, 0.1) 0%, transparent 60%);
  animation: pulse 4s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(ellipse at center, transparent 0%, rgba(0, 0, 0, 0.8) 100%);
}

.hero-content {
  position: relative;
  z-index: 10;
  text-align: center;
}

.hero-logo {
  width: 200px;
  height: auto;
  margin-bottom: 20px;
  filter: drop-shadow(0 0 30px rgba(255, 68, 68, 0.6));
  display: none; /* Hide if image doesn't exist */
}

.hero-title {
  font-size: 48px;
  font-weight: bold;
  line-height: 1.3;
  margin-bottom: 20px;
  text-shadow: 
    0 0 20px rgba(255, 68, 68, 0.8),
    0 0 40px rgba(255, 68, 68, 0.5),
    0 2px 4px rgba(0, 0, 0, 0.8);
  color: #fff;
}

.hero-title .highlight {
  background: linear-gradient(90deg, #ff6666, #ff4444, #cc0000);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: inline-block;
  animation: glow 2s ease-in-out infinite;
}

@keyframes glow {
  0%, 100% {
    filter: drop-shadow(0 0 10px rgba(255, 68, 68, 0.8));
  }
  50% {
    filter: drop-shadow(0 0 20px rgba(255, 68, 68, 1));
  }
}

.hero-info {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 30px;
  color: #aaa;
  font-size: 14px;
}

.hero-info i {
  color: #ff6666;
}

.separator {
  color: #444;
}

.btn-primary {
  background: linear-gradient(135deg, #ff4444, #cc0000);
  border: none;
  color: white;
  padding: 15px 40px;
  font-size: 16px;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  transition: all 0.3s;
  box-shadow: 0 4px 20px rgba(255, 68, 68, 0.4);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 30px rgba(255, 68, 68, 0.6);
}

.btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.btn-primary:disabled:hover {
  transform: none;
  box-shadow: 0 4px 20px rgba(255, 68, 68, 0.4);
}

/* Featured Section */
.featured-section {
  max-width: 1400px;
  margin: 0 auto;
  padding: 40px 30px 60px 30px;
}

.featured-section .products-grid {
  padding: 0;
  margin: 0;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  padding-bottom: 15px;
  border-bottom: 2px solid #2a2a2a;
}

.section-header h2 {
  font-size: 28px;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
}

.section-header h2 i {
  color: #ff6666;
  font-size: 24px;
}

.view-all-link {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #ff6666;
  text-decoration: none;
  font-size: 14px;
  padding: 8px 16px;
  border: 1px solid #ff4444;
  border-radius: 6px;
  transition: all 0.3s;
  background: rgba(255, 68, 68, 0.1);
}

.view-all-link:hover {
  background: rgba(255, 68, 68, 0.2);
  border-color: #ff6666;
  transform: translateX(5px);
}

.view-all-link i {
  transition: transform 0.3s;
}

.view-all-link:hover i {
  transform: translateX(3px);
}

/* Items Grid */
.items-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 20px;
  padding: 30px;
  max-width: 1400px;
}

.item-card {
  background: linear-gradient(135deg, rgba(30, 15, 15, 0.8), rgba(20, 10, 10, 0.6));
  border: 1px solid #3a1515;
  border-radius: 8px;
  padding: 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s;
  position: relative;
  overflow: hidden;
}

.item-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at center, rgba(255, 68, 68, 0.1) 0%, transparent 70%);
  opacity: 0;
  transition: opacity 0.3s;
}

.item-card:hover {
  border-color: #ff4444;
  transform: translateY(-5px);
  box-shadow: 
    0 10px 30px rgba(0, 0, 0, 0.5),
    0 0 20px rgba(255, 68, 68, 0.3);
}

.item-card:hover::before {
  opacity: 1;
}

.item-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.5);
  border: 2px solid #444;
  border-radius: 8px;
  position: relative;
}

.item-icon img {
  max-width: 60px;
  max-height: 60px;
  filter: drop-shadow(0 0 10px rgba(255, 68, 68, 0.5));
}

.item-icon.warning {
  background: rgba(255, 68, 68, 0.2);
  border-color: #ff4444;
}

.item-icon.warning i {
  font-size: 36px;
  color: #ff6666;
}

.item-name {
  color: #ddd;
  font-size: 13px;
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

/* Floating Action Buttons */
.fab {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ff4444, #cc0000);
  border: none;
  color: white;
  font-size: 20px;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(255, 68, 68, 0.5);
  transition: all 0.3s;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  overflow: hidden;
  padding: 0;
}

.fab i {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  line-height: 1;
  margin: 0;
  padding: 0;
}

.fab:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 30px rgba(255, 68, 68, 0.7);
  color: white;
}

.fab-up {
  bottom: 100px;
  background: rgba(40, 40, 40, 0.9);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
}

.fab-up:hover {
  background: rgba(60, 60, 60, 0.9);
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: #1a1a1a;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #ff4444, #cc0000);
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #ff6666, #ff4444);
}

/* Responsive - 구 블록 제거 (3469줄 신규 블록으로 통합됨) */

/* Category Page Styles */
.category-header {
  padding: 30px;
  background: linear-gradient(135deg, rgba(30, 15, 15, 0.8), rgba(20, 10, 10, 0.6));
  border-bottom: 2px solid #3a1515;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.category-title {
  display: flex;
  align-items: center;
  gap: 20px;
}

.category-title i {
  font-size: 48px;
  color: #ff6666;
  filter: drop-shadow(0 0 10px rgba(255, 68, 68, 0.5));
}

.category-title h1 {
  font-size: 32px;
  color: #fff;
  margin-bottom: 5px;
}

.category-title p {
  color: #aaa;
  font-size: 14px;
}

.category-actions {
  display: flex;
  gap: 15px;
  align-items: center;
  flex-wrap: wrap;
  width: 100%;
}

.search-filter-group {
  display: flex;
  gap: 10px;
  align-items: center;
  flex: 1;
  max-width: 600px;
  min-width: 300px;
}

/* 작은 PC에서 검색 필터 최대 너비 조정 */
@media (min-width: 992px) and (max-width: 1199px) {
  .search-filter-group {
    max-width: 500px;
    min-width: 250px;
  }
}

/* 태블릿 가로에서 검색 필터 최대 너비 조정 */
@media (min-width: 769px) and (max-width: 991px) {
  .search-filter-group {
    max-width: 450px;
    min-width: 200px;
  }
  
  .search-input {
    font-size: 13px;
  }
  
  .affix-filter,
  .sort-select {
    font-size: 13px;
    padding: 9px 12px;
  }
}

.search-box {
  position: relative;
  flex: 1;
  min-width: 150px;
}

.search-box i {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #888;
  font-size: 14px;
}

.search-input {
  width: 100%;
  padding: 10px 15px 10px 38px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid #3a1515;
  border-radius: 6px;
  color: #fff;
  font-size: 14px;
  transition: all 0.2s;
}

.search-input::placeholder {
  color: #666;
}

.search-input:focus {
  outline: none;
  border-color: #ff4444;
  box-shadow: 0 0 10px rgba(255, 68, 68, 0.2);
}

.affix-filter {
  padding: 10px 15px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid #3a1515;
  border-radius: 6px;
  color: #fff;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
  min-width: 110px;
  flex-shrink: 0;
}

.affix-filter:focus {
  outline: none;
  border-color: #ff4444;
  box-shadow: 0 0 10px rgba(255, 68, 68, 0.2);
}

.affix-filter option {
  background: #1a0f0f;
  color: #fff;
}

.sort-select {
  padding: 10px 15px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid #3a1515;
  border-radius: 6px;
  color: #fff;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
  min-width: 110px;
  flex-shrink: 0;
  white-space: nowrap;
}

.sort-select:focus {
  outline: none;
  border-color: #ff4444;
  box-shadow: 0 0 10px rgba(255, 68, 68, 0.2);
}

.sort-select option {
  background: #1a0f0f;
  color: #fff;
}

/* Products Grid */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 25px;
  padding: 30px;
  max-width: 1400px;
}

/* 큰 화면 (1400px 이상) - 5열 */
@media (min-width: 1400px) {
  .products-grid {
    grid-template-columns: repeat(5, 1fr);
  }
}

/* 중간 큰 화면 (1200px ~ 1399px) - 4열 */
@media (min-width: 1200px) and (max-width: 1399px) {
  .products-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* 작은 PC (992px ~ 1199px) - 3열 */
@media (min-width: 992px) and (max-width: 1199px) {
  .products-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    padding: 25px;
  }
}

/* 태블릿 가로 (769px ~ 991px) - 3열 */
@media (min-width: 769px) and (max-width: 991px) {
  .products-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    padding: 20px;
  }
}

.product-card {
  background: linear-gradient(135deg, rgba(30, 15, 15, 0.9), rgba(20, 10, 10, 0.8));
  border: 2px solid #3a1515;
  border-radius: 12px;
  padding: 20px 15px;
  cursor: pointer;
  transition: all 0.3s;
  position: relative;
  overflow: hidden;
}

.product-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at center, rgba(255, 68, 68, 0.1) 0%, transparent 70%);
  opacity: 0;
  transition: opacity 0.3s;
}

.product-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.product-card:hover::before {
  opacity: 1;
}

/* Grade-based border colors */
/* 일반 (Normal) - 회색 */
.product-card[data-grade="normal"] {
  border-color: #9e9e9e;
}

.product-card[data-grade="normal"]:hover {
  border-color: #bdbdbd;
  box-shadow: 0 10px 40px rgba(158, 158, 158, 0.4);
}

/* 마법 (Magic) - 파란색 */
.product-card[data-grade="magic"] {
  border-color: #4169e1;
}

.product-card[data-grade="magic"]:hover {
  border-color: #6495ed;
  box-shadow: 0 10px 40px rgba(65, 105, 225, 0.4);
}

/* 희귀 (Rare) - 노란색 */
.product-card[data-grade="rare"] {
  border-color: #ffd700;
}

.product-card[data-grade="rare"]:hover {
  border-color: #ffed4e;
  box-shadow: 0 10px 40px rgba(255, 215, 0, 0.4);
}

/* 전설 (Legendary) - 주황색 */
.product-card[data-grade="legendary"] {
  border-color: #ff8800;
}

.product-card[data-grade="legendary"]:hover {
  border-color: #ffaa00;
  box-shadow: 0 10px 40px rgba(255, 136, 0, 0.4);
}

/* 고유 (Unique) - 갈색/금색 */
.product-card[data-grade="unique"] {
  border-color: #d4af37;
}

.product-card[data-grade="unique"]:hover {
  border-color: #f0d060;
  box-shadow: 0 10px 40px rgba(212, 175, 55, 0.4);
}

/* 신화 (Mythic) - 보라색 */
.product-card[data-grade="mythic"] {
  border-color: #a020f0;
}

.product-card[data-grade="mythic"]:hover {
  border-color: #c060ff;
  box-shadow: 0 10px 40px rgba(160, 32, 240, 0.4);
}

.product-badge {
  position: absolute;
  top: 15px;
  right: 15px;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: bold;
  text-transform: uppercase;
  z-index: 10;
}

/* 일반 (Normal) 배지 */
.product-card[data-grade="normal"] .product-badge {
  background: linear-gradient(135deg, #9e9e9e, #757575);
  color: #fff;
  box-shadow: 0 0 15px rgba(158, 158, 158, 0.5);
}

/* 마법 (Magic) 배지 */
.product-card[data-grade="magic"] .product-badge {
  background: linear-gradient(135deg, #4169e1, #1e90ff);
  color: #fff;
  box-shadow: 0 0 15px rgba(65, 105, 225, 0.5);
}

/* 희귀 (Rare) 배지 */
.product-card[data-grade="rare"] .product-badge {
  background: linear-gradient(135deg, #ffd700, #ffed4e);
  color: #000;
  box-shadow: 0 0 15px rgba(255, 215, 0, 0.5);
  font-weight: 900;
}

/* 전설 (Legendary) 배지 */
.product-card[data-grade="legendary"] .product-badge {
  background: linear-gradient(135deg, #ff8800, #ff6600);
  color: #fff;
  box-shadow: 0 0 15px rgba(255, 136, 0, 0.5);
}

/* 고유 (Unique) 배지 */
.product-card[data-grade="unique"] .product-badge {
  background: linear-gradient(135deg, #d4af37, #b8960e);
  color: #000;
  box-shadow: 0 0 15px rgba(212, 175, 55, 0.5);
  font-weight: 900;
}

/* 신화 (Mythic) 배지 */
.product-card[data-grade="mythic"] .product-badge {
  background: linear-gradient(135deg, #a020f0, #8b00ff);
  color: #fff;
  box-shadow: 0 0 20px rgba(160, 32, 240, 0.6);
  font-weight: 900;
  animation: mythic-glow 2s ease-in-out infinite;
}

@keyframes mythic-glow {
  0%, 100% {
    box-shadow: 0 0 20px rgba(160, 32, 240, 0.6);
  }
  50% {
    box-shadow: 0 0 30px rgba(192, 96, 255, 0.8);
  }
}

.product-image-wrapper {
  position: relative;
  width: 100%;
  margin-bottom: 15px;
}

.product-image-wrapper .product-image {
  width: 100%;
  height: 180px;
  background: rgba(0, 0, 0, 0.5);
  border: 2px solid #444;
  border-radius: 8px;
  overflow: hidden;
  position: relative;
}

.product-image-wrapper .product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-image {
  width: 100%;
  height: 180px;
  background: rgba(0, 0, 0, 0.5);
  border: 2px solid #444;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 15px;
  position: relative;
  overflow: hidden;
}

.product-image::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at center, rgba(255, 68, 68, 0.2) 0%, transparent 70%);
}

.product-image i {
  font-size: 72px;
  color: #ff6666;
  filter: drop-shadow(0 0 20px rgba(255, 68, 68, 0.6));
  z-index: 1;
}

.product-info {
  position: relative;
  z-index: 1;
}

.product-name {
  font-size: 16px;
  font-weight: 600;
  color: #fff;
  margin-bottom: 12px;
  line-height: 1.4;
  min-height: 44px;
}

.product-stats {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid #3a1515;
  border-radius: 6px;
  padding: 10px;
  margin-bottom: 12px;
}

.stat-item {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #4db8ff;
  font-size: 12px;
  margin-bottom: 4px;
}

.stat-item:last-child {
  margin-bottom: 0;
}

.stat-item i {
  color: #ff6666;
  font-size: 10px;
}

.product-price {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px;
  background: rgba(255, 68, 68, 0.1);
  border: 1px solid #ff4444;
  border-radius: 6px;
  margin-bottom: 15px;
  /* price-options-list 등 column 자식 있을 때 전체 너비 사용 */
  flex-wrap: wrap;
  gap: 4px;
}

/* price-options 있을 때 product-price가 column 방향으로 */
.product-price:has(.price-options-list) {
  flex-direction: column;
  align-items: stretch;
}

.price-label {
  color: #aaa;
  font-size: 13px;
}

.price-value {
  font-size: 20px;
  font-weight: bold;
  color: #ff6666;
  text-shadow: 0 0 10px rgba(255, 68, 68, 0.5);
}

.product-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  max-width: 100%;
  margin: 0 auto;
}

.btn-detail,
.btn-cart,
.btn-purchase {
  padding: 12px 10px;
  border: 1px solid #3a1515;
  border-radius: 6px;
  font-size: 13px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.2s;
  font-weight: 500;
  white-space: nowrap;
  width: 100%;
}

.btn-detail {
  background: rgba(255, 255, 255, 0.05);
  color: #ddd;
  border-color: #555;
}

.btn-detail:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: #ff4444;
  color: #ff6666;
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(255, 68, 68, 0.2);
}

.btn-cart {
  background: linear-gradient(135deg, #ff4444, #cc0000);
  color: white;
  border-color: #ff4444;
}

.btn-cart:hover {
  background: linear-gradient(135deg, #ff6666, #ff4444);
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(255, 68, 68, 0.4);
}

.btn-cart i,
.btn-detail i,
.btn-purchase i {
  font-size: 14px;
}

.btn-purchase {
  background: linear-gradient(135deg, #ff9900, #ff6600);
  border-color: #ff9900;
  color: white;
}

.btn-purchase:hover {
  background: linear-gradient(135deg, #ffaa00, #ff7700);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 153, 0, 0.4);
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 30px;
}

.page-btn {
  background: rgba(30, 15, 15, 0.8);
  border: 1px solid #3a1515;
  color: #aaa;
  padding: 10px 15px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 14px;
  min-width: 40px;
}

.page-btn:hover:not(:disabled) {
  border-color: #ff4444;
  color: #ff6666;
  background: rgba(255, 68, 68, 0.1);
}

.page-btn.active {
  background: linear-gradient(135deg, #ff4444, #cc0000);
  border-color: #ff4444;
  color: white;
}

.page-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

/* Auth Pages (Login/Register) */
.auth-container {
  min-height: calc(100vh - 60px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  background: 
    radial-gradient(ellipse at top, rgba(139, 0, 0, 0.2) 0%, transparent 50%),
    radial-gradient(ellipse at bottom, rgba(255, 68, 68, 0.1) 0%, transparent 50%);
}

.auth-box {
  background: linear-gradient(135deg, rgba(30, 15, 15, 0.95), rgba(20, 10, 10, 0.9));
  border: 1px solid #3a1515;
  border-radius: 12px;
  padding: 40px;
  max-width: 480px;
  width: 100%;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.auth-header {
  text-align: center;
  margin-bottom: 30px;
}

.auth-header i {
  font-size: 48px;
  color: #ff6666;
  margin-bottom: 15px;
  filter: drop-shadow(0 0 20px rgba(255, 68, 68, 0.5));
}

.auth-header h2 {
  font-size: 28px;
  color: #fff;
  margin-bottom: 10px;
}

.auth-header p {
  color: #aaa;
  font-size: 14px;
}

.auth-form {
  margin-bottom: 20px;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #ddd;
  font-size: 14px;
  margin-bottom: 8px;
  font-weight: 500;
}

.form-group label i {
  color: #ff6666;
  width: 16px;
}

.form-group input {
  width: 100%;
  padding: 12px 15px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid #3a1515;
  border-radius: 6px;
  color: #fff;
  font-size: 14px;
  transition: all 0.2s;
}

.form-group input:focus {
  outline: none;
  border-color: #ff4444;
  box-shadow: 0 0 10px rgba(255, 68, 68, 0.2);
  background: rgba(0, 0, 0, 0.6);
}

.form-group input::placeholder {
  color: #666;
}

.form-options {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 10px;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #aaa;
  font-size: 13px;
  cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
  width: auto;
  cursor: pointer;
  accent-color: #ff4444;
}

.checkbox-label a {
  color: #ff6666;
  text-decoration: none;
}

.checkbox-label a:hover {
  text-decoration: underline;
}

.link {
  color: #ff6666;
  font-size: 13px;
  text-decoration: none;
}

.link:hover {
  text-decoration: underline;
}

.btn-submit {
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, #ff4444, #cc0000);
  border: none;
  border-radius: 8px;
  color: white;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: all 0.3s;
  box-shadow: 0 4px 15px rgba(255, 68, 68, 0.4);
}

.btn-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 68, 68, 0.6);
}

.auth-divider {
  text-align: center;
  margin: 25px 0;
  position: relative;
}

.auth-divider::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: #3a1515;
}

.auth-divider span {
  position: relative;
  background: linear-gradient(135deg, rgba(30, 15, 15, 0.95), rgba(20, 10, 10, 0.9));
  padding: 0 15px;
  color: #666;
  font-size: 13px;
}

.social-login {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
}

.social-btn {
  padding: 12px;
  border: 1px solid #3a1515;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.3);
  color: #fff;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: all 0.2s;
}

.social-btn:hover {
  background: rgba(0, 0, 0, 0.5);
  border-color: #ff4444;
  transform: translateY(-2px);
}

.social-btn i {
  font-size: 18px;
}

.social-btn.google:hover {
  border-color: #4285f4;
  box-shadow: 0 0 15px rgba(66, 133, 244, 0.3);
}

.social-btn.discord:hover {
  border-color: #5865f2;
  box-shadow: 0 0 15px rgba(88, 101, 242, 0.3);
}

.auth-footer {
  text-align: center;
  color: #aaa;
  font-size: 14px;
}

.auth-footer a {
  color: #ff6666;
  text-decoration: none;
  font-weight: 500;
}

.auth-footer a:hover {
  text-decoration: underline;
}

/* Link Styles */
a {
  color: inherit;
  text-decoration: none;
}

a.menu-item {
  display: flex;
  text-decoration: none;
}

/* Responsive - Auth Pages */
@media (max-width: 768px) {
  .auth-box {
    padding: 30px 20px;
  }

  .category-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .category-actions {
    width: 100%;
    flex-direction: column;
  }

  .search-filter-group {
    width: 100%;
    max-width: 100%;
    flex-direction: column;
    gap: 10px;
  }

  .search-box {
    width: 100%;
    min-width: 100%;
  }

  .affix-filter {
    width: 100%;
  }

  .sort-select {
    width: 100%;
  }

  .products-grid {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 20px;
    padding: 20px;
  }

  .product-card {
    padding: 15px;
  }

  .product-image {
    height: 150px;
  }

  .product-image i {
    font-size: 56px;
  }

  .product-name {
    font-size: 14px;
    min-height: 40px;
  }

  .product-actions {
    grid-template-columns: 1fr 1fr;
  }

  .btn-detail,
  .btn-cart {
    padding: 12px;
  }
}

/* Admin Pages Styles */
.admin-container {
  padding: 30px;
  max-width: 1400px;
  margin: 0 auto;
}

.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 2px solid #3a1515;
}

.admin-header h1 {
  font-size: 28px;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 10px;
}

.admin-header h1 i {
  color: #ff6666;
}

.admin-user {
  display: flex;
  align-items: center;
  gap: 15px;
  color: #aaa;
}

.btn-logout {
  padding: 8px 16px;
  background: rgba(255, 68, 68, 0.2);
  border: 1px solid #ff4444;
  border-radius: 6px;
  color: #ff6666;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-logout:hover {
  background: rgba(255, 68, 68, 0.3);
  transform: translateY(-2px);
}

.admin-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.btn-secondary {
  padding: 10px 20px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid #555;
  border-radius: 6px;
  color: #ddd;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: #ff4444;
  color: #ff6666;
}

.admin-search {
  padding: 10px 15px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid #3a1515;
  border-radius: 6px;
  color: #fff;
  width: 250px;
}

.admin-search:focus {
  outline: none;
  border-color: #ff4444;
}

/* Shop Status Control */
.shop-control-container {
  margin-bottom: 30px;
}

.shop-control-card {
  background: linear-gradient(135deg, rgba(30, 15, 15, 0.9), rgba(20, 10, 10, 0.8));
  border: 2px solid #3a1515;
  border-radius: 12px;
  padding: 25px;
}

.shop-control-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.shop-control-header h3 {
  margin: 0;
  font-size: 18px;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 10px;
}

.shop-status-display {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 600;
}

.shop-status-display i {
  font-size: 10px;
  animation: pulse 2s infinite;
}

.shop-status-display.open {
  background: rgba(76, 175, 80, 0.2);
  border: 1px solid rgba(76, 175, 80, 0.5);
  color: #4caf50;
}

.shop-status-display.open i {
  color: #4caf50;
}

.shop-status-display.closed {
  background: rgba(244, 67, 54, 0.2);
  border: 1px solid rgba(244, 67, 54, 0.5);
  color: #f44336;
}

.shop-status-display.closed i {
  color: #f44336;
  animation: none;
}

.shop-control-buttons {
  display: flex;
  gap: 15px;
}

.btn-shop-control {
  flex: 1;
  padding: 15px 25px;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.btn-shop-control i {
  font-size: 16px;
}

.btn-shop-control.btn-open {
  background: linear-gradient(135deg, #4caf50, #45a049);
  color: white;
  border: 1px solid #4caf50;
}

.btn-shop-control.btn-open:hover {
  background: linear-gradient(135deg, #66bb6a, #4caf50);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(76, 175, 80, 0.4);
}

.btn-shop-control.btn-close {
  background: linear-gradient(135deg, #f44336, #e53935);
  color: white;
  border: 1px solid #f44336;
}

.btn-shop-control.btn-close:hover {
  background: linear-gradient(135deg, #ef5350, #f44336);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(244, 67, 54, 0.4);
}

/* Admin Stats */
.admin-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin-bottom: 40px;
}

.stat-card {
  background: linear-gradient(135deg, rgba(30, 15, 15, 0.8), rgba(20, 10, 10, 0.6));
  border: 1px solid #3a1515;
  border-radius: 12px;
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 20px;
  transition: all 0.3s;
}

.stat-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.stat-icon {
  width: 60px;
  height: 60px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: white;
}

.stat-info h3 {
  font-size: 14px;
  color: #aaa;
  margin-bottom: 8px;
}

.stat-number {
  font-size: 28px;
  font-weight: bold;
  color: #fff;
  margin-bottom: 4px;
}

.stat-label {
  font-size: 12px;
  color: #888;
}

/* Admin Menu */
.admin-menu {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
}

.admin-menu-card {
  background: linear-gradient(135deg, rgba(30, 15, 15, 0.8), rgba(20, 10, 10, 0.6));
  border: 2px solid #3a1515;
  border-radius: 12px;
  padding: 30px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s;
  text-decoration: none;
  color: inherit;
}

.admin-menu-card:hover {
  border-color: #ff4444;
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(255, 68, 68, 0.3);
}

.admin-menu-card i {
  font-size: 48px;
  color: #ff6666;
  margin-bottom: 15px;
  display: block;
}

.admin-menu-card h3 {
  font-size: 20px;
  color: #fff;
  margin-bottom: 10px;
}

.admin-menu-card p {
  color: #aaa;
  font-size: 14px;
}

/* Admin Table */
.admin-table-container {
  background: linear-gradient(135deg, rgba(30, 15, 15, 0.8), rgba(20, 10, 10, 0.6));
  border: 1px solid #3a1515;
  border-radius: 12px;
  padding: 20px;
  overflow-x: auto;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
}

.admin-table thead {
  border-bottom: 2px solid #3a1515;
}

.admin-table th {
  padding: 15px;
  text-align: left;
  color: #ff6666;
  font-weight: 600;
  font-size: 14px;
  text-transform: uppercase;
}

.admin-table td {
  padding: 15px;
  border-bottom: 1px solid #2a1515;
  color: #ddd;
}

.admin-table tbody tr {
  transition: all 0.2s;
}

.admin-table tbody tr:hover {
  background: rgba(255, 68, 68, 0.05);
}

.product-name-cell,
.category-name-cell,
.member-username-cell {
  font-weight: 500;
  color: #fff;
}

.admin-table code {
  background: rgba(0, 0, 0, 0.5);
  padding: 4px 8px;
  border-radius: 4px;
  color: #4db8ff;
  font-size: 12px;
}

/* Grade Badges in Table */
.grade-badge {
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: bold;
  text-transform: uppercase;
}

.grade-badge.normal {
  background: linear-gradient(135deg, #9e9e9e, #757575);
  color: #fff;
}

.grade-badge.magic {
  background: linear-gradient(135deg, #4169e1, #1e90ff);
  color: #fff;
}

.grade-badge.rare {
  background: linear-gradient(135deg, #ffd700, #ffed4e);
  color: #000;
}

.grade-badge.legendary {
  background: linear-gradient(135deg, #ff8800, #ff6600);
  color: #fff;
}

.grade-badge.unique {
  background: linear-gradient(135deg, #d4af37, #b8960e);
  color: #000;
}

.grade-badge.mythic {
  background: linear-gradient(135deg, #a020f0, #8b00ff);
  color: #fff;
  animation: mythic-glow 2s ease-in-out infinite;
}

/* Status Badges */
.status-badge {
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: bold;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.status-badge i {
  font-size: 10px;
}

.status-badge.active {
  background: rgba(67, 233, 123, 0.2);
  color: #43e97b;
  border: 1px solid #43e97b;
}

.status-badge.blocked {
  background: rgba(239, 68, 68, 0.2);
  color: #ef4444;
  border: 1px solid #ef4444;
}

.status-badge.suspended {
  background: rgba(255, 159, 64, 0.2);
  color: #ff9f40;
  border: 1px solid #ff9f40;
}

.status-badge.soldout {
  background: rgba(255, 107, 107, 0.2);
  color: #ff6b6b;
  border: 1px solid #ff6b6b;
}

/* Table Actions */
.table-actions {
  display: flex;
  gap: 8px;
}

.btn-edit,
.btn-delete,
.btn-toggle-hidden {
  padding: 8px 12px;
  border: 1px solid #3a1515;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.05);
  color: #ddd;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-edit:hover {
  background: rgba(79, 172, 254, 0.2);
  border-color: #4facfe;
  color: #4facfe;
}

.btn-delete:hover {
  background: rgba(255, 107, 107, 0.2);
  border-color: #ff6b6b;
  color: #ff6b6b;
}

.btn-toggle-hidden:hover {
  background: rgba(255, 193, 7, 0.2);
  border-color: #ffc107;
  color: #ffc107;
}

/* Responsive - Admin */
@media (max-width: 768px) {
  .admin-container {
    padding: 20px;
  }

  .admin-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
  }

  .admin-actions {
    width: 100%;
    flex-direction: column;
  }

  .admin-search {
    width: 100%;
  }

  .admin-stats {
    grid-template-columns: 1fr;
  }

  .admin-menu {
    grid-template-columns: 1fr;
  }

  .admin-table-container {
    overflow-x: scroll;
  }

  .admin-table {
    min-width: 800px;
  }
}
/* Loading Overlay */
#loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10000;
}

.loading-spinner {
  font-size: 48px;
  color: #ff6666;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* Toast Messages */
.toast {
  position: fixed;
  top: 20px;
  right: 20px;
  padding: 15px 20px;
  background: linear-gradient(135deg, #333 0%, #222 100%);
  border-left: 4px solid #ff6666;
  border-radius: 8px;
  color: white;
  font-size: 14px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5);
  z-index: 9999;
  opacity: 0;
  transform: translateX(400px);
  transition: all 0.3s ease;
}

.toast.show {
  opacity: 1;
  transform: translateX(0);
}

.toast.toast-success {
  border-left-color: #4caf50;
}

.toast.toast-error {
  border-left-color: #f44336;
}

.toast.toast-info {
  border-left-color: #2196f3;
}

.toast.toast-warning {
  border-left-color: #ff9800;
}

/* Modal Styles */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  z-index: 9999;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

.modal-overlay.show {
  display: flex;
}

.modal-content {
  background: linear-gradient(135deg, #1a1a1a 0%, #0d0d0d 100%);
  border: 2px solid #ff6666;
  border-radius: 12px;
  width: 100%;
  max-width: 700px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 10px 40px rgba(255, 102, 102, 0.3);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 25px 30px;
  border-bottom: 2px solid #333;
}

.modal-header h2 {
  color: #ff6666;
  font-size: 24px;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.close-modal {
  background: none;
  border: none;
  color: #999;
  font-size: 28px;
  cursor: pointer;
  transition: color 0.3s;
  padding: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.close-modal:hover {
  color: #ff6666;
}

.btn-refresh-gallery {
  background: rgba(79, 172, 254, 0.1);
  border: 2px solid #4facfe;
  color: #4facfe;
  font-size: 18px;
  cursor: pointer;
  transition: all 0.3s;
  padding: 6px;
  width: 36px;
  height: 36px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-refresh-gallery:hover {
  background: rgba(79, 172, 254, 0.2);
  transform: rotate(180deg);
}

.btn-refresh-gallery:active {
  transform: rotate(360deg);
}

.modal-body {
  padding: 30px;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}

.form-grid.full {
  grid-template-columns: 1fr;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-field label {
  color: #ccc;
  font-size: 14px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
}

.form-field label i {
  color: #ff6666;
}

.form-field input,
.form-field select,
.form-field textarea {
  background: rgba(255, 255, 255, 0.05);
  border: 2px solid #333;
  border-radius: 8px;
  padding: 12px 15px;
  color: white;
  font-size: 14px;
  transition: all 0.3s;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  outline: none;
  border-color: #ff6666;
  background: rgba(255, 255, 255, 0.08);
}

.form-field textarea {
  min-height: 80px;
  resize: vertical;
  font-family: inherit;
}

.form-field small {
  color: #888;
  font-size: 12px;
}

/* Image Upload Section */
.image-upload-section {
  background: rgba(255, 255, 255, 0.03);
  border: 2px dashed #444;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 20px;
}

.image-upload-section h3 {
  color: #ff6666;
  font-size: 16px;
  margin: 0 0 15px 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.image-preview {
  width: 100%;
  height: 200px;
  background: rgba(0, 0, 0, 0.3);
  border: 2px solid #333;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 10px;
  color: #666;
  margin-bottom: 15px;
  overflow: hidden;
}

.image-preview i {
  font-size: 48px;
}

.image-preview img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.image-upload-controls {
  display: flex;
  gap: 10px;
}

.image-upload-controls input[type="file"] {
  flex: 1;
  padding: 10px;
  background: rgba(255, 255, 255, 0.05);
  border: 2px solid #333;
  border-radius: 8px;
  color: #ccc;
  cursor: pointer;
}

.btn-upload {
  padding: 10px 20px;
  background: linear-gradient(135deg, #ff6666 0%, #ff4444 100%);
  border: none;
  border-radius: 8px;
  color: white;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s;
  white-space: nowrap;
}

.btn-upload:hover {
  background: linear-gradient(135deg, #ff8888 0%, #ff6666 100%);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(255, 102, 102, 0.4);
}

.btn-gallery {
  padding: 10px 20px;
  background: rgba(255, 255, 255, 0.05);
  border: 2px solid #444;
  border-radius: 8px;
  color: #ddd;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s;
  white-space: nowrap;
}

.btn-gallery:hover {
  background: rgba(74, 172, 254, 0.2);
  border-color: #4facfe;
  color: #4facfe;
  transform: translateY(-2px);
}

/* Image Gallery Grid */
.image-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 15px;
  max-height: 500px;
  overflow-y: auto;
  padding: 10px;
}

.gallery-item,
.gallery-image-item {
  position: relative;
  aspect-ratio: 1;
  border: 3px solid transparent;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.3s;
  background: rgba(0, 0, 0, 0.3);
}

.gallery-item:hover,
.gallery-image-item:hover {
  border-color: #4facfe;
  transform: translateY(-3px);
  box-shadow: 0 5px 20px rgba(79, 172, 254, 0.4);
}

.gallery-item.selected {
  border-color: #ff6666;
  box-shadow: 0 0 20px rgba(255, 102, 102, 0.6);
}

.gallery-item img,
.gallery-image-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery-image-info {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent);
  padding: 10px;
  opacity: 0;
  transition: opacity 0.3s;
}

.gallery-image-item:hover .gallery-image-info {
  opacity: 1;
}

.gallery-image-info p {
  margin: 0 0 4px 0;
  font-size: 12px;
  color: #fff;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.gallery-image-info small {
  font-size: 10px;
  color: #aaa;
}

.gallery-item-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s;
}

.gallery-item:hover .gallery-item-overlay {
  opacity: 1;
}

.gallery-item.selected .gallery-item-overlay {
  opacity: 1;
  background: rgba(255, 102, 102, 0.3);
}

.gallery-item-overlay i {
  font-size: 32px;
  color: white;
}

.gallery-item-delete {
  position: absolute;
  top: 5px;
  right: 5px;
  width: 32px;
  height: 32px;
  background: rgba(255, 68, 68, 0.9);
  border: none;
  border-radius: 6px;
  color: white;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: all 0.3s;
  z-index: 10;
}

.gallery-item:hover .gallery-item-delete {
  opacity: 1;
}

.gallery-item-delete:hover {
  background: rgba(255, 68, 68, 1);
  transform: scale(1.1);
  box-shadow: 0 3px 10px rgba(255, 68, 68, 0.5);
}

/* Modal Footer */
.modal-footer {
  padding: 20px 30px;
  border-top: 2px solid #333;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.btn-cancel {
  padding: 12px 24px;
  background: rgba(255, 255, 255, 0.05);
  border: 2px solid #444;
  border-radius: 8px;
  color: #ccc;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s;
}

.btn-cancel:hover {
  border-color: #666;
  background: rgba(255, 255, 255, 0.08);
}

.btn-save {
  padding: 12px 24px;
  background: linear-gradient(135deg, #ff6666 0%, #ff4444 100%);
  border: none;
  border-radius: 8px;
  color: white;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-save:hover {
  background: linear-gradient(135deg, #ff8888 0%, #ff6666 100%);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(255, 102, 102, 0.4);
}

/* Badge Styles */
.badge {
  padding: 4px 12px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  display: inline-block;
}

.badge-normal {
  background: rgba(158, 158, 158, 0.2);
  color: #9e9e9e;
  border: 1px solid #9e9e9e;
}

.badge-magic {
  background: rgba(65, 105, 225, 0.2);
  color: #4169e1;
  border: 1px solid #4169e1;
}

.badge-rare {
  background: rgba(255, 215, 0, 0.2);
  color: #ffd700;
  border: 1px solid #ffd700;
}

.badge-legendary {
  background: rgba(255, 136, 0, 0.2);
  color: #ff8800;
  border: 1px solid #ff8800;
}

.badge-unique {
  background: rgba(212, 175, 55, 0.2);
  color: #d4af37;
  border: 1px solid #d4af37;
}

.badge-mythic {
  background: rgba(138, 43, 226, 0.2);
  color: #8a2be2;
  border: 1px solid #8a2be2;
}

.status-badge {
  padding: 4px 12px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  display: inline-block;
}

.status-active {
  background: rgba(76, 175, 80, 0.2);
  color: #4caf50;
  border: 1px solid #4caf50;
}

.status-soldout {
  background: rgba(244, 67, 54, 0.2);
  color: #f44336;
  border: 1px solid #f44336;
}

/* Admin Pagination */
.admin-pagination {
  margin-top: 30px;
  display: flex;
  justify-content: center;
}

.admin-pagination .pagination {
  display: flex;
  gap: 5px;
  align-items: center;
}

.page-btn {
  padding: 8px 14px;
  background: rgba(255, 255, 255, 0.05);
  border: 2px solid #333;
  border-radius: 6px;
  color: #ccc;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s;
}

.page-btn:hover:not([disabled]) {
  border-color: #ff6666;
  color: #ff6666;
  background: rgba(255, 102, 102, 0.1);
}

.page-btn.active {
  border-color: #ff6666;
  background: #ff6666;
  color: white;
}

.page-btn[disabled] {
  opacity: 0.3;
  cursor: not-allowed;
}

.page-dots {
  color: #666;
  padding: 0 5px;
}

/* Responsive */
@media (max-width: 768px) {
  .modal-content {
    max-width: 100%;
    margin: 10px;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .modal-header {
    padding: 20px;
  }

  .modal-body {
    padding: 20px;
  }

  .modal-footer {
    padding: 15px 20px;
  }
}

/* User Menu Dropdown */
.user-menu {
  position: relative;
}

.btn-user {
  padding: 10px 20px;
  background: rgba(255, 255, 255, 0.05);
  border: 2px solid #ff6666;
  border-radius: 25px;
  color: white;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  flex-shrink: 1;         /* 공간 부족 시 줄어들 수 있음 */
  min-width: 0;
  overflow: hidden;
}

/* 유저 이름 텍스트: 길면 말줄임 */
.user-name-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 120px;
  display: inline-block;
}

.btn-user:hover {
  background: rgba(255, 102, 102, 0.1);
  border-color: #ff8888;
}

.btn-user i.fa-user-circle {
  font-size: 18px;
  flex-shrink: 0;
}

.btn-user i.fa-chevron-down {
  font-size: 12px;
  transition: transform 0.3s;
}

.user-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 200px;
  background: linear-gradient(135deg, #1a1a1a 0%, #0d0d0d 100%);
  border: 2px solid #ff6666;
  border-radius: 12px;
  padding: 10px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  opacity: 0;
  visibility: hidden;
  z-index: 9999;         /* 모든 요소 위에 */
  transform: translateY(-10px);
  transition: all 0.3s;
  z-index: 1000;
}

.user-dropdown.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 15px;
  color: #ccc;
  text-decoration: none;
  border-radius: 8px;
  transition: all 0.3s;
  cursor: pointer;
  background: none;
  border: none;
  width: 100%;
  text-align: left;
  font-size: 14px;
}

.dropdown-item:hover {
  background: rgba(255, 102, 102, 0.1);
  color: #ff6666;
}

.dropdown-item i {
  font-size: 16px;
  width: 20px;
  text-align: center;
}

/* Profile Page */
.profile-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 40px 20px;
}

.profile-header {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 40px;
  padding-bottom: 20px;
  border-bottom: 2px solid #333;
}

.profile-avatar {
  width: 100px;
  height: 100px;
  background: linear-gradient(135deg, #ff6666 0%, #ff4444 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  color: white;
}

.profile-info h1 {
  color: #ff6666;
  font-size: 28px;
  margin: 0 0 10px 0;
}

.profile-info p {
  color: #888;
  font-size: 14px;
  margin: 0;
}

.profile-form {
  background: rgba(255, 255, 255, 0.02);
  border: 2px solid #333;
  border-radius: 12px;
  padding: 30px;
}

.profile-form h2 {
  color: #ff6666;
  font-size: 20px;
  margin: 0 0 25px 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.profile-field {
  margin-bottom: 25px;
}

.profile-field label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #ccc;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 10px;
}

.profile-field label i {
  color: #ff6666;
}

.profile-field input {
  width: 100%;
  padding: 12px 15px;
  background: rgba(255, 255, 255, 0.05);
  border: 2px solid #333;
  border-radius: 8px;
  color: white;
  font-size: 14px;
  transition: all 0.3s;
}

.profile-field input:focus {
  outline: none;
  border-color: #ff6666;
  background: rgba(255, 255, 255, 0.08);
}

.profile-field input:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.profile-field small {
  display: block;
  color: #666;
  font-size: 12px;
  margin-top: 5px;
}

.profile-actions {
  display: flex;
  gap: 15px;
  margin-top: 30px;
  padding-top: 25px;
  border-top: 2px solid #333;
}

.btn-save-profile {
  flex: 1;
  padding: 14px 24px;
  background: linear-gradient(135deg, #ff6666 0%, #ff4444 100%);
  border: none;
  border-radius: 8px;
  color: white;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.btn-save-profile:hover {
  background: linear-gradient(135deg, #ff8888 0%, #ff6666 100%);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(255, 102, 102, 0.4);
}

.btn-cancel-profile {
  padding: 14px 24px;
  background: rgba(255, 255, 255, 0.05);
  border: 2px solid #444;
  border-radius: 8px;
  color: #ccc;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
}

.btn-cancel-profile:hover {
  border-color: #666;
  background: rgba(255, 255, 255, 0.08);
}

@media (max-width: 768px) {
  .profile-header {
    flex-direction: column;
    text-align: center;
  }

  .profile-avatar {
    width: 80px;
    height: 80px;
    font-size: 36px;
  }

  .profile-form {
    padding: 20px;
  }

  .profile-actions {
    flex-direction: column;
  }
}

/* Admin Link Styles */
.header-right a[title="관리자 로그인"] {
  color: #666 !important;
  font-size: 14px;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  border-radius: 4px;
  transition: all 0.3s;
}

.header-right a[title="관리자 로그인"]:hover {
  background: rgba(255, 102, 102, 0.1);
  color: #ff6666 !important;
}

.header-right a[title="관리자 로그인"] i {
  font-size: 14px;
}

/* Global Select and Option Styles - 모든 select와 option에 다크 테마 적용 */
select {
  background-color: #1a1a1a !important;
  color: #fff !important;
  border: 1px solid #444 !important;
  padding: 8px 12px !important;
  border-radius: 4px !important;
}

select:focus {
  outline: none !important;
  border-color: #ff6666 !important;
  box-shadow: 0 0 5px rgba(255, 102, 102, 0.3) !important;
}

select option {
  background-color: #1a1a1a !important;
  color: #fff !important;
  padding: 8px 12px !important;
}

select option:hover,
select option:focus,
select option:checked {
  background-color: #2a2a2a !important;
  color: #ff6666 !important;
}

/* Select placeholder (first option) */
select option[value=""] {
  color: #999 !important;
}

/* Dropdown in specific contexts */
.form-field select option,
.admin-form select option,
.auth-form select option {
  background: #1a1a1a !important;
  color: #fff !important;
}

/* Category actions select */
.category-actions select {
  background-color: #1a1a1a !important;
  color: #fff !important;
}

.category-actions select option {
  background-color: #1a1a1a !important;
  color: #fff !important;
}

/* Product Image Sizing - 상품 이미지 크기 제한 */
.product-image img {
  max-width: 90%;
  max-height: 90%;
  object-fit: contain;
  z-index: 2;
  position: relative;
}

/* 폴백 이미지 (카테고리 아이콘) 스타일 */
.product-image img[src*="category-icons"] {
  opacity: 0.6;
  max-width: 80%;
  max-height: 80%;
}

/* 하위 카테고리 스타일 */
.menu-item-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.menu-item-wrapper .menu-item {
  flex: 1;
}

.menu-item-wrapper .menu-item.has-subcategories {
  padding-left: 50px;
}

.toggle-subcategory {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  color: #ff9900;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s;
  z-index: 2;
  width: 18px;
  height: 18px;
}

.toggle-subcategory:hover {
  color: #ffaa33;
  transform: translateY(-50%) scale(1.1);
}




























.toggle-subcategory i {
  font-size: 16px;
  font-weight: bold;
}

.subcategory-list {
  margin-left: 0;
  overflow: hidden;
  transition: all 0.3s ease;
}

.menu-item.subcategory {
  padding-left: 45px;
  font-size: 14px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.15);
  margin: 3px 8px;
}

.menu-item.subcategory:hover {
  background: rgba(255, 153, 0, 0.15);
  padding-left: 48px;
  border-color: rgba(255, 153, 0, 0.2);
  box-shadow: 0 2px 8px rgba(255, 153, 0, 0.2);
}

.menu-item.subcategory.active {
  background: linear-gradient(90deg, rgba(255, 153, 0, 0.25), rgba(255, 153, 0, 0.05));
  border-left: 4px solid #ff9900;
  padding-left: 41px;
  border-color: rgba(255, 153, 0, 0.3);
  box-shadow: 0 2px 12px rgba(255, 153, 0, 0.3);
  font-weight: 500;
}

.menu-item.subcategory .count {
  font-size: 12px;
}

/* ========================================
   모바일 반응형 최적화
   ======================================== */

/* 모바일 네비게이션 토글 버튼 */
.mobile-menu-toggle {
  display: none;
  background: transparent;
  border: none;
  color: #fff;
  font-size: 20px;
  cursor: pointer;
  padding: 8px;
  transition: all 0.3s;
}

.mobile-menu-toggle:hover {
  color: #ff6666;
}

.mobile-menu-toggle:active {
  transform: scale(0.95);
}

/* 오버레이 */
.mobile-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  z-index: 99;
  backdrop-filter: blur(4px);
}

.mobile-overlay.active {
  display: block;
}

/* 태블릿 (768px - 1024px) */
@media (max-width: 1024px) {
  /* 사이드바 완전 숨김 → 모바일 햄버거 전환 */
  .mobile-menu-toggle {
    display: flex !important;
  }

  .sidebar {
    position: fixed;
    left: -280px;
    width: 280px;
    height: 100vh;
    transition: left 0.3s ease;
    z-index: 100;
    box-shadow: 4px 0 20px rgba(0,0,0,0.5);
  }

  .sidebar.mobile-open {
    left: 0;
  }

  .sidebar.mobile-open .logo span,
  .sidebar.mobile-open .logo small,
  .sidebar.mobile-open .menu-item span,
  .sidebar.mobile-open .menu-item .count {
    display: block;
  }

  .sidebar.mobile-open .menu-item {
    justify-content: flex-start;
  }

  .main-content {
    margin-left: 0;
    width: 100%;
  }

  /* ── 헤더 반응형 (1024px 이하) ── */
  .header-row {
    padding: 8px 16px;
    gap: 8px;
  }

  .header-left {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
  }

  .header-right {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 1 1 auto;
    min-width: 0;
    justify-content: flex-end;
  }

  /* 헤더 버튼 텍스트 숨김 */
  .btn-helltide-text {
    display: none;
  }

  .btn-login span,
  .btn-register span {
    display: none;
  }

  .btn-login,
  .btn-register {
    padding: 7px 10px;
    font-size: 13px;
    white-space: nowrap;
    flex-shrink: 0;
  }

  /* 유저 버튼: 이름 숨기고 아이콘만 */
  .btn-user {
    padding: 7px 10px;
    font-size: 13px;
    max-width: none;
    flex-shrink: 0;
  }

  .btn-user .user-name-text {
    display: none;
  }

  .btn-user .fa-caret-down {
    display: none;
  }

  .btn-cart-header {
    padding: 7px 10px;
    flex-shrink: 0;
  }

  .logo span,
  .logo small,
  .menu-item span,
  .menu-item .count {
    display: none;
  }
  
  .products-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
  }
  
  .hero-title {
    font-size: 32px;
  }
}

/* 모바일 (최대 768px) - 추가 세부 조정 */
@media (max-width: 768px) {

  .header-row {
    padding: 6px 10px;
    gap: 6px;
    align-items: center;
    justify-content: space-between;
    min-height: 48px;
  }

  .mobile-menu-toggle {
    display: flex;
    order: -1;
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    align-items: center;
    justify-content: center;
    margin-right: 0;
  }
  
  .header-left {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
  }
  
  .header-right {
    display: flex;
    align-items: center;
    gap: 5px;
    flex: 1 1 auto;
    min-width: 0;
    justify-content: flex-end;
  }
  
  /* 모바일 헤더 정리: 도구 버튼 4종은 숨기고 사이드바로 이동 (영업중·버튼 겹침 해결) */
  .hdr-hide-mobile { display: none !important; }
  .tool-mobile-only { display: flex !important; }

  .shop-status {
    font-size: 11px;
    padding: 5px 8px;
    gap: 4px;
    flex-shrink: 0;
  }

  .shop-status span {
    display: inline;
    font-size: 11px;
    white-space: nowrap;
  }

  /* 헤더 포인트 - 태블릿 */
  #header-point-wrap {
    padding: 4px 8px;
    gap: 3px;
    font-size: 11px;
  }
  #header-point-balance {
    font-size: 11px !important;
  }

  .btn-cart-header {
    padding: 7px 10px;
    font-size: 15px;
    flex-shrink: 0;
  }

  .btn-login, 
  .btn-register {
    padding: 6px 10px;
    font-size: 12px;
    white-space: nowrap;
  }

  .btn-user {
    padding: 6px 8px;
    font-size: 12px;
    flex-shrink: 0;
  }

  .btn-user .user-name-text {
    display: none;
  }

  .btn-user .fa-caret-down {
    display: none;
  }
  
  /* Hero 섹션 */
  .hero {
    padding: 30px 20px;
    min-height: auto;
  }
  
  .hero-title {
    font-size: 24px;
  }
  
  .hero-subtitle {
    font-size: 14px;
  }
  
  .btn-hero {
    padding: 12px 30px;
    font-size: 14px;
  }
  
  /* 카테고리 헤더 */
  .category-header {
    padding: 20px 15px;
    flex-direction: column;
    align-items: flex-start;
  }
  
  .category-title {
    gap: 12px;
  }
  
  .category-title i {
    font-size: 32px;
  }
  
  .category-title h1 {
    font-size: 24px;
  }
  
  .category-actions {
    width: 100%;
    flex-direction: column;
    gap: 10px;
  }
  
  .search-filter-group {
    width: 100%;
    max-width: 100%;
    flex-direction: column;
  }
  
  .search-box {
    width: 100%;
    min-width: 100%;
  }
  
  .sort-select {
    width: 100%;
  }
  
  /* 상품 그리드 */
  .products-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 12px;
    padding: 15px;
  }
  
  .product-card {
    padding: 12px;
  }
  
  .product-name {
    font-size: 14px;
  }
  
  .product-price {
    padding: 10px;
  }
  
  .price-value {
    font-size: 16px;
  }
  
  /* 상품 상세 모달 */
  .modal-content {
    width: 95%;
    max-width: 95%;
    margin: 10px;
    max-height: 90vh;
  }
  
  .product-detail-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  .product-detail-image {
    height: 250px;
  }
  
  /* 버튼 조정 */
  .btn-primary,
  .btn-secondary {
    padding: 12px 20px;
    font-size: 14px;
  }
  
  /* 장바구니 버튼 */
  .btn-cart-header {
    padding: 8px 12px;
    font-size: 18px;
  }
  
  /* 사용자 메뉴 */
  .btn-user {
    padding: 8px 12px;
    font-size: 14px;
  }
  
  .user-dropdown {
    right: 0;
    left: auto;
    min-width: 200px;
  }
  
  /* FAB 버튼 */
  .fab {
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    font-size: 20px;
  }
  
  .fab-up {
    bottom: 80px;
    width: 45px;
    height: 45px;
    font-size: 18px;
  }
  
  /* 관리자 페이지 */
  .dashboard-grid {
    grid-template-columns: 1fr;
    gap: 15px;
  }
  
  .admin-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
  }
  
  .admin-actions {
    width: 100%;
  }
  
  /* 테이블 스크롤 */
  .table-container {
    overflow-x: auto;
  }
  
  table {
    min-width: 600px;
  }
  
  /* 폼 조정 */
  .form-row {
    flex-direction: column;
  }
  
  .form-group {
    width: 100% !important;
  }
}

/* 소형 모바일 (최대 480px) */
@media (max-width: 480px) {
  .hero-title {
    font-size: 20px;
  }
  
  .hero-subtitle {
    font-size: 12px;
  }
  
  .products-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    padding: 10px;
  }
  
  .product-card {
    padding: 10px;
  }
  
  .product-name {
    font-size: 13px;
  }
  
  .product-price {
    padding: 8px;
  }
  
  .price-label {
    font-size: 11px;
  }
  
  .price-value {
    font-size: 14px;
  }
  
  .category-title h1 {
    font-size: 20px;
  }
  
  .category-title i {
    font-size: 28px;
  }
  
  .modal-content {
    width: 98%;
    margin: 5px;
  }
  
  .product-detail-image {
    height: 200px;
  }
  
  /* 메뉴 아이템 작게 */
  .menu-item {
    padding: 12px 14px;
    font-size: 14px;
    gap: 10px;
  }
  
  .menu-item .count {
    font-size: 11px;
    padding: 3px 8px;
  }
  
  /* 하위 카테고리 */
  .menu-item.subcategory {
    padding-left: 35px;
    font-size: 13px;
  }
  
  .menu-item-wrapper .menu-item.has-subcategories {
    padding-left: 40px;
  }
  
  .toggle-subcategory {
    left: 12px;
    width: 16px;
    height: 16px;
  }
  
  .toggle-subcategory i {
    font-size: 14px;
  }
}

/* 가로 모드 최적화 */
@media (max-width: 768px) and (orientation: landscape) {
  .hero {
    padding: 20px 15px;
  }
  
  .hero-title {
    font-size: 20px;
  }
  
  .modal-content {
    max-height: 85vh;
  }
}

/* 터치 디바이스 최적화 */
@media (hover: none) and (pointer: coarse) {
  /* 터치 타겟 크기 증가 */
  .menu-item,
  .btn-primary,
  .btn-secondary,
  .product-card {
    min-height: 44px;
  }
  
  /* 호버 효과 제거 (터치에서는 불필요) */
  .menu-item:hover {
    transform: none;
  }
  
  .product-card:hover {
    transform: none;
  }
  
  /* 탭 시 피드백 */
  .menu-item:active {
    background: rgba(255, 68, 68, 0.2);
    transform: scale(0.98);
  }
  
  .product-card:active {
    transform: scale(0.98);
  }
  
  .btn-primary:active,
  .btn-secondary:active {
    transform: scale(0.95);
  }
}

/* 다크모드 최적화 */
@media (prefers-color-scheme: dark) {
  body {
    background: #000;
  }
  
  .sidebar {
    background: linear-gradient(180deg, #1a0f0f 0%, #050202 100%);
  }
}

/* 고해상도 디스플레이 최적화 */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  .product-image img,
  .category-icon {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
  }
}

/* 인쇄 스타일 */
@media print {
  .sidebar,
  .header,
  .fab,
  .mobile-menu-toggle {
    display: none;
  }
  
  .main-content {
    margin-left: 0;
  }
  
  .product-card {
    break-inside: avoid;
  }
}

/* ========================================
   하위 카테고리 필터 바
   ======================================== */

.subcategory-filter-bar {
  background: linear-gradient(135deg, rgba(20, 10, 10, 0.9), rgba(15, 8, 8, 0.9));
  border-bottom: 1px solid rgba(255, 68, 68, 0.2);
  padding: 15px 30px;
  position: sticky;
  top: 70px; /* 헤더 높이만큼 띄우기 */
  z-index: 45; /* 헤더보다 낮게 */
  backdrop-filter: blur(10px);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.subcategory-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding: 5px 0;
}

/* 큰 화면 (1400px 이상) - 10열 */
@media (min-width: 1400px) {
  .subcategory-filters {
    grid-template-columns: repeat(10, 1fr);
  }
}

/* 중간 큰 화면 (1200px ~ 1399px) - 8열 */
@media (min-width: 1200px) and (max-width: 1399px) {
  .subcategory-filters {
    grid-template-columns: repeat(8, 1fr);
  }
}

/* 작은 PC (992px ~ 1199px) - 6열 */
@media (min-width: 992px) and (max-width: 1199px) {
  .subcategory-filters {
    grid-template-columns: repeat(6, 1fr);
  }
}

/* 태블릿 가로 (769px ~ 991px) - 5열 */
@media (min-width: 769px) and (max-width: 991px) {
  .subcategory-filters {
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
  }
  
  .subcategory-filter-btn {
    padding: 9px 10px;
    font-size: 12px;
  }
}

.subcategory-filters::-webkit-scrollbar {
  height: 6px;
}

.subcategory-filters::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.3);
  border-radius: 3px;
}

.subcategory-filters::-webkit-scrollbar-thumb {
  background: rgba(255, 68, 68, 0.5);
  border-radius: 3px;
}

.subcategory-filters::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 68, 68, 0.7);
}

.subcategory-filter-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 18px;
  background: rgba(255, 255, 255, 0.05);
  border: 1.5px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: #aaa;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s;
  white-space: nowrap;
  text-align: center;
  flex: 0 0 auto;   /* 내용에 맞춰 크기 고정 → 텍스트 짤림 없음 */
}

.subcategory-filter-btn:hover {
  background: rgba(255, 68, 68, 0.15);
  border-color: rgba(255, 68, 68, 0.4);
  color: #ff6666;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(255, 68, 68, 0.2);
}

.subcategory-filter-btn.active {
  background: linear-gradient(135deg, rgba(255, 68, 68, 0.3), rgba(255, 68, 68, 0.15));
  border-color: rgba(255, 68, 68, 0.6);
  color: #ff6666;
  font-weight: 600;
  box-shadow: 0 4px 15px rgba(255, 68, 68, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.subcategory-filter-btn i {
  font-size: 16px;
}

.subcategory-filter-btn img {
  filter: grayscale(50%);
  opacity: 0.7;
  transition: all 0.3s;
}

.subcategory-filter-btn:hover img,
.subcategory-filter-btn.active img {
  filter: grayscale(0%);
  opacity: 1;
}

.subcategory-filter-btn .filter-count {
  background: rgba(255, 255, 255, 0.1);
  padding: 3px 8px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 600;
  margin-left: 4px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.subcategory-filter-btn:hover .filter-count {
  background: rgba(255, 68, 68, 0.3);
  border-color: rgba(255, 68, 68, 0.4);
  color: #ff8888;
}

.subcategory-filter-btn.active .filter-count {
  background: rgba(255, 68, 68, 0.5);
  border-color: rgba(255, 68, 68, 0.6);
  color: #ffaaaa;
  box-shadow: 0 0 8px rgba(255, 68, 68, 0.3);
}

/* 모바일 반응형 */
@media (max-width: 768px) {
  .subcategory-filter-bar {
    padding: 8px 15px;
    top: 50px; /* 헤더와 붙이기 (기존 90px → 50px) */
  }
  
  .subcategory-filters {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    max-height: 100px; /* 1.5줄 높이 (44px * 2 + 6px + 여유) */
    overflow-y: auto;
    padding: 5px 0;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 68, 68, 0.5) rgba(0, 0, 0, 0.3);
  }
  
  .subcategory-filters::-webkit-scrollbar {
    width: 4px;
  }
  
  .subcategory-filters::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 2px;
  }
  
  .subcategory-filters::-webkit-scrollbar-thumb {
    background: rgba(255, 68, 68, 0.5);
    border-radius: 2px;
  }
  
  .subcategory-filter-btn {
    padding: 8px 6px;
    font-size: 11px;
    gap: 4px;
    min-width: 0;
    overflow: hidden;
    min-height: 44px; /* 최소 높이 보장 */
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
  }
  
  .subcategory-filter-btn span:not(.filter-count) {
    display: block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    line-height: 1.2;
  }
  
  .subcategory-filter-btn img {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
  }
  
  .subcategory-filter-btn i {
    font-size: 14px;
    flex-shrink: 0;
  }
  
  .subcategory-filter-btn .filter-count {
    font-size: 10px;
    padding: 2px 5px;
    min-width: 20px;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .subcategory-filter-bar {
    padding: 8px 10px;
    top: 50px; /* 헤더와 붙이기 */
  }
  
  .subcategory-filters {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 5px;
    max-height: 130px; /* 1.5줄 높이 (더 넉넉하게) */
    overflow-y: auto;
  }
  
  .subcategory-filter-btn {
    padding: 8px 4px;
    font-size: 10px;
    flex-direction: column;
    gap: 3px;
    min-height: 58px; /* 최소 높이 보장 */
    display: flex;
    align-items: center;
    justify-content: center;
  }
  
  .subcategory-filter-btn span:not(.filter-count) {
    font-size: 10px;
    line-height: 1.2;
    text-align: center;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  
  .subcategory-filter-btn img {
    width: 14px;
    height: 14px;
  }
  
  .subcategory-filter-btn i {
    font-size: 13px;
  }
  
  .subcategory-filter-btn .filter-count {
    font-size: 9px;
    padding: 2px 4px;
    margin-left: 0;
    margin-top: 2px;
  }
}

/* Notices Styles */
.notices-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 30px;
}

.notices-header {
  margin-bottom: 40px;
  text-align: center;
}

.notices-header h1 {
  font-size: 36px;
  color: #fff;
  margin-bottom: 10px;
}

.notices-header h1 i {
  color: #ff6666;
  margin-right: 10px;
}

.notices-header p {
  color: #aaa;
  font-size: 16px;
}

.notices-list {
  background: rgba(20, 20, 20, 0.6);
  border: 1px solid #2a2a2a;
  border-radius: 12px;
  padding: 20px;
}

.notice-item {
  background: rgba(30, 30, 30, 0.8);
  border: 1px solid #3a3a3a;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 15px;
  cursor: pointer;
  transition: all 0.3s;
}

.notice-item:hover {
  border-color: #ff4444;
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(255, 68, 68, 0.2);
}

.notice-item.important {
  border-color: #ff6666;
  background: rgba(255, 68, 68, 0.05);
}

.notice-item-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.notice-item-title {
  font-size: 18px;
  color: #fff;
  margin: 0;
  flex: 1;
}

.notice-important-badge {
  background: linear-gradient(135deg, #ff4444, #cc0000);
  color: #fff;
  padding: 4px 12px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: bold;
}

.notice-item-meta {
  display: flex;
  gap: 20px;
  color: #888;
  font-size: 14px;
}

.notice-item-meta span {
  display: flex;
  align-items: center;
  gap: 5px;
}

.notice-item-meta i {
  color: #ff6666;
}

/* Latest Notices Section (메인 페이지용) */
.latest-notices-section {
  max-width: 1400px;
  margin: 0 auto;
  padding: 20px 30px 40px 30px;
}

.notices-list-compact {
  background: rgba(20, 20, 20, 0.6);
  border: 1px solid #2a2a2a;
  border-radius: 12px;
  padding: 10px;
}

.notice-item-compact {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
  border-bottom: 1px solid #2a2a2a;
  cursor: pointer;
  transition: all 0.3s;
}

.notice-item-compact:last-child {
  border-bottom: none;
}

.notice-item-compact:hover {
  background: rgba(255, 68, 68, 0.05);
}

.notice-item-compact.important {
  background: rgba(255, 68, 68, 0.08);
}

.notice-compact-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
}

.notice-important-badge-sm {
  background: linear-gradient(135deg, #ff4444, #cc0000);
  color: #fff;
  padding: 3px 8px;
  border-radius: 3px;
  font-size: 11px;
  font-weight: bold;
}

.notice-compact-title {
  color: #fff;
  font-size: 15px;
}

.notice-compact-date {
  color: #888;
  font-size: 13px;
  white-space: nowrap;
}

/* Notice Detail */
.notice-detail-container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 40px 30px;
}

.notice-detail {
  background: rgba(20, 20, 20, 0.6);
  border: 1px solid #2a2a2a;
  border-radius: 12px;
  padding: 40px;
  margin-bottom: 30px;
}

.notice-detail-header {
  border-bottom: 2px solid #2a2a2a;
  padding-bottom: 20px;
  margin-bottom: 30px;
}

.notice-detail-header h1 {
  font-size: 28px;
  color: #fff;
  margin: 10px 0;
}

.notice-meta {
  display: flex;
  gap: 20px;
  color: #888;
  font-size: 14px;
  margin-top: 15px;
}

.notice-meta span {
  display: flex;
  align-items: center;
  gap: 5px;
}

.notice-meta i {
  color: #ff6666;
}

.notice-detail-content {
  color: #ddd;
  font-size: 16px;
  line-height: 1.8;
  min-height: 200px;
}

.notice-actions {
  text-align: center;
}

.notice-actions .btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  font-size: 15px;
}

/* Responsive */
@media (max-width: 768px) {
  .notices-header h1 {
    font-size: 28px;
  }
  
  .notice-item {
    padding: 15px;
  }
  
  .notice-item-title {
    font-size: 16px;
  }
  
  .notice-item-meta {
    flex-wrap: wrap;
    gap: 10px;
  }
  
  .notice-compact-title {
    font-size: 14px;
  }
  
  .notice-detail {
    padding: 20px;
  }
  
  .notice-detail-header h1 {
    font-size: 22px;
  }
}

/* ===== Sale Page Styles ===== */
.sale-container {
  padding: 30px;
  max-width: 1400px;
  margin: 0 auto;
}

.sale-header {
  text-align: center;
  margin-bottom: 40px;
}

.sale-header h1 {
  font-size: 36px;
  margin-bottom: 10px;
  color: #ff6666;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
}

.sale-header h1 i {
  color: #ff9900;
}

.sale-header p {
  font-size: 16px;
  color: #999;
}

.sale-filter-bar {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 30px;
  gap: 20px;
  align-items: center;
}

.sale-menu {
  position: relative;
}

.sale-badge {
  position: absolute;
  top: 50%;
  right: 15px;
  transform: translateY(-50%);
  background: linear-gradient(135deg, #ff6b6b, #ff9900);
  color: white;
  font-size: 10px;
  font-weight: bold;
  padding: 3px 8px;
  border-radius: 10px;
  animation: pulse-sale 2s ease-in-out infinite;
}

@keyframes pulse-sale {
  0%, 100% {
    transform: translateY(-50%) scale(1);
    opacity: 1;
  }
  50% {
    transform: translateY(-50%) scale(1.1);
    opacity: 0.8;
  }
}

.discount-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: linear-gradient(135deg, #ff3b3b, #ff8800);
  color: white;
  padding: 8px 12px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: bold;
  z-index: 10;
  box-shadow: 0 4px 12px rgba(255, 59, 59, 0.4);
  animation: discount-pulse 2s ease-in-out infinite;
}

@keyframes discount-pulse {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 4px 12px rgba(255, 59, 59, 0.4);
  }
  50% {
    transform: scale(1.05);
    box-shadow: 0 6px 16px rgba(255, 59, 59, 0.6);
  }
}

.original-price {
  text-decoration: line-through;
  color: #888;
  font-size: 14px;
}

.discount-price {
  color: #ff3b3b !important;
  font-weight: bold;
  font-size: 20px;
}

/* Responsive */
@media (max-width: 768px) {
  .sale-header h1 {
    font-size: 28px;
  }
  
  .sale-filter-bar {
    justify-content: center;
  }
  
  /* 모바일에서 할인 배지 크기 줄이기 */
  .discount-badge {
    padding: 4px 8px;
    font-size: 10px;
    border-radius: 12px;
    top: 8px;
    left: 8px;
  }
  
  @keyframes discount-pulse {
    0%, 100% {
      transform: scale(1);
      box-shadow: 0 2px 8px rgba(255, 59, 59, 0.3);
    }
    50% {
      transform: scale(1.03);
      box-shadow: 0 4px 10px rgba(255, 59, 59, 0.5);
    }
  }
  
  /* 모바일에서 할인가 텍스트 크기 줄이기 */
  .discount-price {
    font-size: 16px;
  }
  
  .original-price {
    font-size: 12px;
  }
}

/* Admin Product Filter Buttons */
.btn-filter {
  padding: 8px 16px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid #444;
  border-radius: 6px;
  color: #aaa;
  font-size: 13px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
  font-weight: 500;
}

.btn-filter:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: #666;
  color: #fff;
}

.btn-filter.active {
  background: rgba(255, 102, 102, 0.2);
  border-color: #ff6666;
  color: #ff6666;
}

/* 회원 탈퇴 버튼 */
.btn-withdraw {
  background: #ff4444;
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: bold;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s;
  font-size: 14px;
}

.btn-withdraw:hover {
  background: #ff2222;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(255, 68, 68, 0.4);
}

.btn-withdraw:active {
  transform: translateY(0);
}

/* 위험 영역 섹션 */
.profile-danger-zone {
  margin-top: 40px;
  padding: 30px;
  background: rgba(255, 68, 68, 0.1);
  border: 2px solid rgba(255, 68, 68, 0.3);
  border-radius: 12px;
  animation: pulse-danger 3s infinite;
}

@keyframes pulse-danger {
  0%, 100% {
    border-color: rgba(255, 68, 68, 0.3);
  }
  50% {
    border-color: rgba(255, 68, 68, 0.5);
  }
}

.profile-danger-zone h3 {
  color: #ff4444;
  margin-bottom: 15px;
  font-size: 18px;
}

.profile-danger-zone p {
  color: #aaa;
  margin-bottom: 20px;
  line-height: 1.6;
}

.profile-danger-zone strong {
  color: #ff4444;
}


/* ==================== 팝업 스타일 ==================== */
.popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  animation: fadeIn 0.3s ease;
  padding: 20px;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.popup-container {
  background: linear-gradient(180deg, #1a1a1a 0%, #0f0f0f 100%);
  border: 2px solid #3a1515;
  border-radius: 12px;
  width: 100%;
  max-width: var(--popup-custom-width, 500px);
  position: relative;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.9);
  animation: slideUp 0.4s ease;
  overflow: hidden;
  /* flex layout은 반응형 블록에서 추가됨 */
}

@keyframes slideUp {
  from {
    transform: translateY(30px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* 긴급 팝업 스타일 */
.popup-urgent {
  border: 2px solid #ff4444;
  box-shadow: 0 0 30px rgba(255, 68, 68, 0.3);
}

.popup-urgent::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #ff4444, #ff6b6b, #ff4444);
  animation: shimmer 2s infinite;
}

@keyframes shimmer {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.6;
  }
}

.popup-badge {
  position: absolute;
  top: 15px;
  right: 50px;
  background: linear-gradient(135deg, #ff4444, #cc0000);
  color: white;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: bold;
  box-shadow: 0 2px 8px rgba(255, 68, 68, 0.4);
  z-index: 1;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

.popup-close {
  position: absolute;
  top: 15px;
  right: 15px;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #fff;
  font-size: 18px;
  transition: all 0.3s ease;
  z-index: 2;
}

.popup-close:hover {
  background: rgba(255, 68, 68, 0.8);
  transform: rotate(90deg);
}

.popup-header {
  padding: 30px 30px 20px;
  text-align: center;
  border-bottom: 1px solid rgba(255, 68, 68, 0.2);
}

.popup-icon {
  font-size: 48px;
  color: #ff4444;
  margin-bottom: 15px;
  display: block;
  animation: bounce 1s infinite;
}

@keyframes bounce {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

.popup-title {
  font-size: 24px;
  font-weight: bold;
  color: #fff;
  margin: 0;
}

.popup-body {
  padding: 30px;
}

.popup-image {
  width: 100%;
  border-radius: 8px;
  margin-bottom: 20px;
}

.popup-content {
  color: #e0e0e0;
  line-height: 1.8;
  margin-bottom: 20px;
}

.popup-content p {
  margin-bottom: 15px;
}

.popup-content strong {
  color: #ff4444;
}

.popup-button {
  display: inline-block;
  width: 100%;
  padding: 14px 24px;
  background: linear-gradient(135deg, #ff4444, #cc0000);
  color: white;
  text-decoration: none;
  border-radius: 8px;
  text-align: center;
  font-weight: bold;
  font-size: 15px;
  transition: all 0.3s ease;
  margin-top: 10px;
  box-shadow: 0 4px 12px rgba(255, 68, 68, 0.3);
}

.popup-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 68, 68, 0.5);
}

.popup-button.secondary {
  background: linear-gradient(135deg, #4a5568, #2d3748);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.popup-footer {
  padding: 20px 30px;
  background: rgba(0, 0, 0, 0.3);
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid rgba(255, 68, 68, 0.1);
}

.popup-checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  color: #aaa;
  font-size: 14px;
  user-select: none;
}

.popup-checkbox input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: #ff4444;
}

.popup-checkbox:hover {
  color: #fff;
}

.popup-close-text {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #aaa;
  padding: 8px 20px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.3s ease;
}

.popup-close-text:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.4);
}

/* 반응형 - 팝업 */

/* 공통: 팝업이 화면 높이를 초과하면 내부 스크롤 */
.popup-container {
  max-height: calc(100vh - 40px);
  display: flex;
  flex-direction: column;
  overflow: hidden; /* 모서리 둥글기 유지 */
}

.popup-body {
  overflow-y: auto;
  flex: 1 1 auto;
  min-height: 0; /* flex 자식 스크롤 허용 */
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

/* ── 태블릿 / 중간 모바일 (768px 이하) ── */
@media (max-width: 768px) {
  .popup-overlay {
    padding: 12px;
    align-items: center;
  }

  .popup-container {
    max-width: calc(100vw - 24px) !important;
    width: 100% !important;
    max-height: calc(100vh - 24px);
    border-radius: 14px;
  }

  .popup-header {
    padding: 22px 20px 14px;
  }

  .popup-icon {
    font-size: 36px;
    margin-bottom: 10px;
  }

  .popup-title {
    font-size: 18px;
  }

  .popup-body {
    padding: 18px 20px;
  }

  .popup-content {
    font-size: 14px;
    line-height: 1.7;
    margin-bottom: 14px;
  }

  .popup-button {
    padding: 12px 20px;
    font-size: 14px;
  }

  .popup-footer {
    padding: 14px 20px;
    flex-direction: column;
    gap: 10px;
    flex-shrink: 0;
  }

  .popup-checkbox {
    font-size: 13px;
    align-self: flex-start;
  }

  .popup-close-text {
    width: 100%;
    padding: 10px;
    font-size: 14px;
    text-align: center;
    min-height: 44px; /* 터치 타겟 확보 */
  }

  .popup-badge {
    right: 48px;
    top: 12px;
    font-size: 11px;
    padding: 4px 9px;
  }

  .popup-close {
    width: 36px;
    height: 36px;
    font-size: 16px;
    top: 12px;
    right: 12px;
    min-width: 36px;
    min-height: 36px;
  }
}

/* ── 소형 모바일 (480px 이하) — 하단 시트 스타일 ── */
@media (max-width: 480px) {
  .popup-overlay {
    padding: 0;
    align-items: flex-end; /* 화면 하단에서 슬라이드업 */
  }

  .popup-container {
    border-radius: 20px 20px 0 0 !important; /* 바텀 시트 */
    max-height: 90vh !important;
    width: 100% !important;
    max-width: 100% !important;
    /* 슬라이드업 애니메이션 재정의 */
    animation: popupSlideUp 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  }

  @keyframes popupSlideUp {
    from {
      transform: translateY(100%);
      opacity: 0;
    }
    to {
      transform: translateY(0);
      opacity: 1;
    }
  }

  /* 스와이프 핸들 표시 */
  .popup-container::before {
    content: '';
    display: block;
    width: 36px;
    height: 4px;
    background: rgba(255, 255, 255, 0.25);
    border-radius: 2px;
    margin: 10px auto 0;
    flex-shrink: 0;
  }

  .popup-header {
    padding: 14px 16px 12px;
  }

  .popup-icon {
    font-size: 30px;
    margin-bottom: 8px;
  }

  .popup-title {
    font-size: 16px;
  }

  .popup-body {
    padding: 14px 16px;
    max-height: calc(90vh - 160px); /* 헤더 + 푸터 제외 */
  }

  .popup-content {
    font-size: 13px;
    line-height: 1.65;
    margin-bottom: 12px;
  }

  .popup-button {
    padding: 13px 16px;
    font-size: 14px;
    min-height: 48px; /* 터치 타겟 */
  }

  .popup-footer {
    padding: 12px 16px 20px; /* 하단 안전 영역 여백 */
    gap: 10px;
    flex-direction: column;
  }

  .popup-checkbox {
    font-size: 13px;
  }

  .popup-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
  }

  .popup-close-text {
    width: 100%;
    padding: 13px;
    font-size: 14px;
    min-height: 48px; /* 터치 타겟 */
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.08);
  }

  .popup-badge {
    right: 44px;
    top: 10px;
    font-size: 10px;
    padding: 3px 8px;
  }

  .popup-close {
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    min-width: 36px;
    min-height: 36px;
  }

  /* iOS 홈바 영역 대응 */
  @supports (padding-bottom: env(safe-area-inset-bottom)) {
    .popup-footer {
      padding-bottom: calc(20px + env(safe-area-inset-bottom));
    }
  }
}

/* ── 초소형 모바일 (360px 이하) ── */
@media (max-width: 360px) {
  .popup-body {
    padding: 12px 14px;
  }

  .popup-header {
    padding: 12px 14px 10px;
  }

  .popup-title {
    font-size: 15px;
  }

  .popup-footer {
    padding: 10px 14px 16px;
  }
}

/* ── 가로 모드 (landscape, 768px 이하) ── */
@media (max-width: 768px) and (orientation: landscape) {
  .popup-overlay {
    align-items: center;
    padding: 8px 16px;
  }

  .popup-container {
    max-height: calc(100vh - 16px);
    border-radius: 12px !important;
    max-width: min(480px, calc(100vw - 32px)) !important;
  }

  /* 가로모드에서는 바텀시트 비활성화 */
  .popup-container::before {
    display: none;
  }

  .popup-header {
    padding: 12px 16px 8px;
  }

  .popup-icon {
    font-size: 24px;
    margin-bottom: 4px;
    display: inline;
    margin-right: 8px;
  }

  .popup-title {
    font-size: 15px;
    display: inline;
    vertical-align: middle;
  }

  .popup-body {
    padding: 10px 16px;
    max-height: calc(100vh - 140px);
  }

  .popup-footer {
    padding: 8px 16px;
    flex-direction: row;
    justify-content: space-between;
    gap: 8px;
  }

  .popup-close-text {
    width: auto;
    padding: 8px 20px;
    min-height: 40px;
  }
}


/* ========================================
   모바일 반응형 심층 개선 (추가)
   ======================================== */

/* ── 구매 모달 (purchase) ── */
/* 모바일에서만 패딩 축소 (PC는 기본 modal-overlay padding 유지) */
@media (max-width: 768px) {
  #purchase-modal,
  #purchase-modal-overlay {
    padding: 10px;
  }
}

@media (max-width: 768px) {
  /* 구매 모달 */
  #purchase-modal .modal-content,
  div[id$="-modal"] > div[style*="max-width"] {
    width: 96% !important;
    max-width: 96% !important;
    max-height: 92vh !important;
    overflow-y: auto !important;
    margin: 0 !important;
  }

  /* 포인트 UI row */
  .point-use-row {
    flex-wrap: wrap;
    gap: 6px !important;
  }

  /* 상품 액션 버튼 - 2열 유지 */
  .product-actions {
    grid-template-columns: 1fr 1fr !important;
    gap: 6px !important;
  }

  .btn-detail, .btn-cart, .btn-purchase {
    padding: 9px 6px !important;
    font-size: 11px !important;
    gap: 3px !important;
    flex-direction: column !important;
    white-space: nowrap !important;
  }

  .btn-cart i, .btn-purchase i, .btn-detail i {
    font-size: 14px !important;
    margin: 0 !important;
  }

  /* 상품 이미지 높이 */
  .product-image,
  .product-image-wrapper .product-image {
    height: 110px !important;
    margin-bottom: 8px !important;
  }

  /* 상품 이름 최소 높이 제거 + 2줄 말줄임 */
  .product-name {
    min-height: auto !important;
    font-size: 13px !important;
    margin-bottom: 4px !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
  }

  /* 상품 코드 - 모바일에서 숨김 */
  .product-code-text {
    display: none !important;
  }
  /* 인라인 스타일 monospace 텍스트도 숨김 */
  .product-card .product-info span[style*="monospace"] {
    display: none !important;
  }

  /* 상품 통계 - 모바일에서 최대 2개, 패딩 축소 */
  .product-stats {
    padding: 5px 7px !important;
    margin-bottom: 6px !important;
  }
  .stat-item {
    margin-bottom: 1px !important;
  }
  .stat-item i {
    font-size: 9px !important;
  }
  .stat-item span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
    font-size: 10px !important;
  }
  /* 3번째 stat부터 숨기기 */
  .product-stats .stat-item:nth-child(n+3) {
    display: none !important;
  }

  /* 가격 영역 - 모바일 2열에서 column 방향 */
  .product-price {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 2px !important;
    padding: 7px 8px !important;
    margin-bottom: 8px !important;
  }

  /* 가격 옵션 모바일 */
  .price-options-list {
    width: 100%;
  }
  .price-option-label {
    font-size: 11px !important;
  }
  .price-option-value {
    font-size: 13px !important;
  }
  .price-option-row {
    padding: 4px 0 !important;
  }
  /* 가격 옵션 전체 표시 (이전 hidden 제거) */

  /* 할인/원가 표시 모바일 */
  .original-price {
    font-size: 11px !important;
  }
  .price-label {
    font-size: 10px !important;
  }
  .price-value {
    font-size: 14px !important;
  }
  .discount-price {
    font-size: 14px !important;
  }

  /* 공지사항 */
  .notices-container {
    padding: 20px 15px;
  }

  .notices-header h1 {
    font-size: 24px;
  }

  /* 히어로 */
  .hero {
    height: auto !important;
    min-height: 280px;
    padding: 40px 20px !important;
  }

  .hero-title {
    font-size: 22px !important;
  }

  .hero-info {
    font-size: 12px;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: center;
  }

  /* featured-section */
  .featured-section {
    padding: 20px 15px 40px !important;
  }

  .section-header h2 {
    font-size: 20px;
  }

  /* 프로필 탭 */
  .profile-container {
    padding: 20px 15px !important;
  }

  .profile-header {
    flex-direction: column;
    text-align: center;
    gap: 12px;
  }

  .profile-avatar {
    width: 72px !important;
    height: 72px !important;
    font-size: 32px !important;
    align-self: center;
  }

  .profile-form {
    padding: 16px !important;
  }

  .profile-actions {
    flex-direction: column;
    gap: 10px;
  }

  .btn-save-profile,
  .btn-cancel-profile {
    width: 100%;
    text-align: center;
    justify-content: center;
  }

  /* 프로필 탭 버튼 - 가로 스크롤 허용 */
  .profile-tab-btn {
    padding: 10px 14px !important;
    font-size: 13px !important;
    white-space: nowrap;
    flex-shrink: 0;
  }
  /* 프로필 탭 컨테이너 - 좁은 화면에서 가로 스크롤 */
  .profile-tabs-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .profile-tabs-wrap::-webkit-scrollbar {
    display: none;
  }

  /* 주문 목록 카드 */
  div[style*="background:#111"][style*="border:1px solid #222"] {
    padding: 12px !important;
  }

  /* 관리자 주문 테이블 */
  #orders-table-container {
    overflow-x: auto;
  }

  #orders-table-container table {
    min-width: 700px;
  }

  /* 필터 버튼 그룹 */
  .btn-filter {
    padding: 7px 10px !important;
    font-size: 12px !important;
  }

  /* 관리자 헤더 */
  .admin-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .admin-header h1 {
    font-size: 20px;
  }

  .admin-actions {
    width: 100%;
    flex-wrap: wrap;
    gap: 8px;
  }

  .admin-search {
    width: 100%;
    min-width: 0;
  }

  .btn-primary, .btn-secondary {
    padding: 10px 16px;
    font-size: 13px;
  }

  /* 관리자 통계 카드 */
  .admin-stats {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 12px;
  }

  .stat-card {
    padding: 14px !important;
    gap: 12px !important;
  }

  .stat-icon {
    width: 48px !important;
    height: 48px !important;
    font-size: 20px !important;
  }

  .stat-number {
    font-size: 22px !important;
  }

  /* 관리자 메뉴 카드 */
  .admin-menu {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 12px;
  }

  .admin-menu-card {
    padding: 20px 12px !important;
  }

  .admin-menu-card i {
    font-size: 32px !important;
  }

  .admin-menu-card h3 {
    font-size: 15px !important;
  }

  .admin-menu-card p {
    font-size: 12px !important;
  }

  /* 관리자 컨테이너 */
  .admin-container {
    padding: 15px 12px !important;
  }

  /* 영업 상태 버튼 */
  .shop-control-buttons {
    flex-direction: column;
    gap: 10px;
  }

  .btn-shop-control {
    padding: 12px 20px !important;
    font-size: 14px !important;
  }

  /* admin-table */
  .admin-table-container {
    padding: 12px !important;
  }

  /* 설정 페이지 */
  section[style*="padding:30px"] {
    padding: 20px 15px !important;
  }

  /* 토스트 */
  .toast {
    top: 10px;
    right: 10px;
    left: 10px;
    transform: none;
    font-size: 13px;
  }

  .toast.show {
    transform: none;
  }

  /* 검색 결과 */
  .featured-section .section-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
}

/* ── 소형 모바일 (480px 이하) ── */
@media (max-width: 480px) {
  /* 헤더 더 타이트하게 */
  .header {
    padding: 0 !important;
  }

  .header-row {
    padding: 5px 8px !important;
    gap: 5px !important;
    min-height: 46px !important;
  }

  .shop-status {
    padding: 4px 7px !important;
    font-size: 10px !important;
    gap: 3px !important;
  }

  .shop-status span {
    display: inline !important;
    font-size: 10px !important;
    white-space: nowrap;
  }

  /* 포인트 - 금액 숨기고 아이콘+간략 표시 */
  #header-point-wrap {
    padding: 4px 6px !important;
    gap: 2px !important;
    border-radius: 14px !important;
  }
  #header-point-balance {
    font-size: 10px !important;
    max-width: 60px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  #header-point-wrap .fa-coins {
    font-size: 11px !important;
  }

  /* 로그인/회원가입 버튼 - 아이콘만 */
  .btn-login span,
  .btn-register span {
    display: none !important;
  }
  .btn-login,
  .btn-register {
    padding: 6px 8px !important;
    font-size: 13px !important;
  }

  /* 카트 버튼 */
  .btn-cart-header {
    padding: 6px 9px !important;
    font-size: 15px !important;
  }

  /* 상품 그리드 2열 고정 */
  .products-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 8px !important;
    padding: 8px !important;
  }

  .product-card {
    padding: 8px !important;
  }

  .product-image,
  .product-image-wrapper .product-image {
    height: 100px !important;
    margin-bottom: 6px !important;
  }

  .product-image i {
    font-size: 40px !important;
  }

  /* 배지 크기 축소 */
  .product-badge {
    top: 5px !important;
    right: 5px !important;
    padding: 2px 5px !important;
    font-size: 9px !important;
  }

  /* 상품명 */
  .product-name {
    min-height: unset !important;
    font-size: 12px !important;
    margin-bottom: 3px !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
  }

  /* 상품코드 숨김 */
  .product-code-text,
  .product-card .product-info span[style*="monospace"] {
    display: none !important;
  }

  /* 가격 영역 */
  .product-price {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 1px !important;
    padding: 6px 7px !important;
    margin-bottom: 6px !important;
  }
  .price-value {
    font-size: 13px !important;
  }
  .price-label {
    font-size: 10px !important;
  }
  .discount-price {
    font-size: 13px !important;
  }
  .original-price {
    font-size: 10px !important;
  }

  /* price-options 모바일 */
  .price-option-label {
    font-size: 11px !important;
  }
  .price-option-value {
    font-size: 12px !important;
  }
  .price-options-list {
    width: 100%;
    gap: 1px !important;
  }
  .price-option-row {
    padding: 1px 0 !important;
  }
  /* 가격 옵션 전체 표시 (이전 hidden 제거) */

  /* 상품 통계 패딩 축소 + 최대 1개 */
  .product-stats {
    padding: 4px 6px !important;
    margin-bottom: 5px !important;
  }
  .stat-item {
    font-size: 10px !important;
    gap: 3px !important;
    margin-bottom: 0 !important;
  }
  .stat-item i {
    font-size: 8px !important;
  }
  .stat-item span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 10px !important;
  }
  /* 2번째 stat부터 숨기기 (480px 이하 극소 카드) */
  .product-stats .stat-item:nth-child(n+2) {
    display: none !important;
  }

  /* 버튼 */
  .btn-detail, .btn-cart, .btn-purchase {
    padding: 8px 5px !important;
    font-size: 10px !important;
    gap: 2px !important;
  }
  .btn-cart i, .btn-purchase i, .btn-detail i {
    font-size: 13px !important;
  }

  /* 관리자 통계 1열 */
  .admin-stats {
    grid-template-columns: 1fr !important;
  }

  /* 드롭다운: 오른쪽 정렬 (화면 밖으로 잘리지 않게) */
  .user-dropdown {
    left: auto;
    right: 0;
    min-width: 200px;
    width: auto;
    max-width: calc(100vw - 20px);
    top: calc(100% + 5px);
  }

  /* 버튼 텍스트 숨기기 */
  .btn-login span,
  .btn-register span {
    display: none;
  }

  /* 인증 박스 */
  .auth-box {
    padding: 24px 16px !important;
  }

  .auth-header h2 {
    font-size: 22px;
  }

  /* 공지사항 */
  .notices-container {
    padding: 15px 10px !important;
  }

  /* 페이지네이션 */
  .pagination {
    gap: 5px;
    padding: 20px 10px;
  }

  .page-btn {
    padding: 8px 10px;
    font-size: 13px;
    min-width: 36px;
  }

  /* FAB */
  .fab {
    bottom: 15px !important;
    right: 15px !important;
    width: 46px !important;
    height: 46px !important;
  }

  .fab-up {
    bottom: 70px !important;
    width: 42px !important;
    height: 42px !important;
  }

  /* 상품 카드 버튼 480px 이하 최적화 */
  .product-actions {
    grid-template-columns: 1fr 1fr !important;
    gap: 6px !important;
  }

  .btn-cart,
  .btn-purchase,
  .btn-detail {
    padding: 9px 4px !important;
    font-size: 10px !important;
    gap: 3px !important;
    white-space: nowrap;
    overflow: hidden;
  }

  .btn-cart i,
  .btn-purchase i,
  .btn-detail i {
    font-size: 12px !important;
    flex-shrink: 0;
  }
}

/* ── 모달 내부 모바일 최적화 ── */
@media (max-width: 768px) {
  .modal-content {
    width: 96% !important;
    max-width: 96% !important;
    margin: 8px auto !important;
    max-height: 92vh !important;
  }

  .modal-header {
    padding: 16px 20px !important;
  }

  .modal-header h2 {
    font-size: 18px !important;
  }

  .modal-body {
    padding: 16px 20px !important;
  }

  .modal-footer {
    padding: 12px 20px !important;
    flex-wrap: wrap;
    gap: 8px;
  }

  .form-grid {
    grid-template-columns: 1fr !important;
    gap: 14px !important;
  }

  .btn-save, .btn-cancel {
    padding: 10px 18px;
    font-size: 14px;
  }
}

/* ── 가로 모드 (landscape) 모바일 ── */
@media (max-width: 768px) and (orientation: landscape) {
  .modal-content {
    max-height: 88vh !important;
  }

  .hero {
    min-height: 200px !important;
    padding: 20px !important;
  }

  .hero-title {
    font-size: 18px !important;
  }
}

/* ═══════════════════════════════════════
   약관 동의 체크박스 (회원가입)
═══════════════════════════════════════ */
.agree-group {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid #3a1515;
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 20px;
}

.agree-item {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  padding: 6px 0;
}

.agree-item input[type="checkbox"] {
  width: 17px;
  height: 17px;
  accent-color: #ff4444;
  cursor: pointer;
  flex-shrink: 0;
}

.agree-label {
  font-size: 14px;
  color: #ccc;
  line-height: 1.4;
}

.agree-label a {
  color: #ff6666;
  text-decoration: underline;
}

.agree-label a:hover {
  color: #ff9999;
}

.agree-required {
  color: #ff4444;
  font-size: 12px;
  margin-left: 2px;
}

.agree-all-label {
  color: #fff;
  font-weight: 600;
  font-size: 15px;
}

.agree-divider {
  border-top: 1px solid #3a1515;
  margin: 8px 0;
}

/* ═══════════════════════════════════════
   약관 / 개인정보처리방침 페이지
═══════════════════════════════════════ */
.policy-container {
  max-width: 860px;
  margin: 0 auto;
  padding: 40px 20px 60px;
}

.policy-box {
  background: linear-gradient(135deg, rgba(30,15,15,0.95), rgba(20,10,10,0.9));
  border: 1px solid #3a1515;
  border-radius: 12px;
  overflow: hidden;
}

.policy-header {
  background: linear-gradient(135deg, #1a0808, #2d0f0f);
  border-bottom: 1px solid #3a1515;
  padding: 36px 40px 30px;
  text-align: center;
}

.policy-header i {
  font-size: 42px;
  color: #ff6666;
  margin-bottom: 14px;
  filter: drop-shadow(0 0 16px rgba(255,68,68,0.4));
  display: block;
}

.policy-header h1 {
  font-size: 26px;
  color: #fff;
  margin-bottom: 8px;
}

.policy-header p {
  color: #888;
  font-size: 13px;
}

.policy-content {
  padding: 36px 40px;
  color: #ccc;
  line-height: 1.8;
}

.policy-content .policy-intro {
  background: rgba(255,68,68,0.06);
  border-left: 3px solid #ff4444;
  padding: 14px 18px;
  border-radius: 0 6px 6px 0;
  margin-bottom: 28px;
  font-size: 14px;
  color: #bbb;
}

.policy-content h2 {
  font-size: 16px;
  color: #ff9999;
  margin-top: 30px;
  margin-bottom: 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid #2a1010;
}

.policy-content p {
  font-size: 14px;
  margin-bottom: 10px;
  color: #bbb;
}

.policy-content ul {
  padding-left: 20px;
  margin-bottom: 12px;
}

.policy-content ul li {
  font-size: 14px;
  color: #aaa;
  margin-bottom: 6px;
  list-style: disc;
}

.policy-content strong {
  color: #ddd;
}

.policy-date {
  margin-top: 36px;
  padding-top: 20px;
  border-top: 1px solid #2a1010;
  text-align: right;
}

.policy-date p {
  color: #666;
  font-size: 13px;
}

@media (max-width: 768px) {
  .policy-header {
    padding: 24px 20px 20px;
  }
  .policy-content {
    padding: 24px 20px;
  }
}

/* ====================================================
   모바일 반응형 종합 개선 (2026-03-08)
   ==================================================== */

/* 헤더 포인트 뱃지 - 모바일 최적화 */
#header-point-wrap {
  white-space: nowrap;
}
@media (max-width: 768px) {
  #header-point-wrap {
    padding: 4px 9px;
    gap: 4px;
    border-radius: 16px;
  }
  #header-point-wrap .fa-coins {
    font-size: 12px;
  }
  #header-point-balance {
    font-size: 12px !important;
  }
}
@media (max-width: 380px) {
  /* 매우 좁은 화면 - 포인트 숫자만 표시, 아이콘 숨김 */
  #header-point-wrap .fa-coins {
    display: none;
  }
  #header-point-balance {
    font-size: 11px !important;
  }
}

/* 관리자 페이지 전반 모바일 */
@media (max-width: 768px) {
  .admin-container {
    padding: 12px;
  }
  .admin-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    padding-bottom: 12px;
  }
  .admin-header h1 {
    font-size: 18px;
  }
  .admin-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    width: 100%;
  }
  .admin-actions .btn-primary,
  .admin-actions .btn-secondary,
  .admin-actions a button {
    font-size: 12px;
    padding: 7px 12px;
    flex-shrink: 0;
  }

  /* 관리자 테이블 가로 스크롤 */
  .admin-table-wrap,
  .table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .admin-table-wrap table,
  .table-responsive table {
    min-width: 600px;
  }

  /* 관리자 폼 그리드 */
  .admin-form-grid {
    grid-template-columns: 1fr !important;
  }

  /* 관리자 필터 행 */
  .admin-filter-row {
    flex-direction: column;
    gap: 8px;
  }
  .admin-filter-row select,
  .admin-filter-row input {
    width: 100%;
  }

  /* 통계 카드 그리드 */
  .stats-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px;
  }
  .stat-card {
    padding: 14px 12px;
  }
  .stat-value {
    font-size: 22px;
  }

  /* 주문 관리 테이블 */
  #orders-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  #orders-table-wrap table {
    min-width: 700px;
  }

  /* 재화 관리 테이블 */
  #materials-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  #materials-table-wrap table {
    min-width: 580px;
  }

  /* 회원 관리 테이블 */
  #members-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  /* 모달 모바일 최적화 */
  .modal-content {
    width: 96% !important;
    max-width: 96% !important;
    margin: 8px auto !important;
    max-height: 92vh !important;
    border-radius: 10px;
  }
  .modal-header {
    padding: 14px 16px;
  }
  .modal-header h2,
  .modal-header h3 {
    font-size: 16px;
  }
  .modal-body {
    padding: 14px 16px !important;
  }

  /* 장바구니 모달 */
  #cart-modal .modal-content {
    max-height: 90vh !important;
  }
  #cart-modal .modal-body {
    max-height: calc(90vh - 160px) !important;
    overflow-y: auto !important;
  }

  /* 구매 모달 버튼 */
  .purchase-btn-group {
    flex-direction: column;
    gap: 8px;
  }
  .purchase-btn-group button {
    width: 100%;
  }
}

/* 소형 모바일 (480px 이하) 추가 최적화 */
@media (max-width: 480px) {
  /* 헤더 영역 - 요소 압축 */
  .header {
    padding: 0 !important;
  }
  .header-row {
    padding: 5px 8px !important;
    gap: 5px !important;
    min-height: 46px !important;
  }
  .shop-status {
    font-size: 10px !important;
    padding: 4px 7px !important;
    gap: 3px !important;
  }
  .shop-status span {
    display: inline !important;
    font-size: 10px !important;
    white-space: nowrap !important;
  }
  .shop-status .fa-circle {
    display: inline !important;
    font-size: 7px !important;
  }
  .btn-cart-header {
    padding: 6px 9px !important;
    font-size: 15px !important;
  }
  .btn-login,
  .btn-register {
    padding: 6px 8px !important;
    font-size: 13px !important;
  }
  .btn-login span,
  .btn-register span {
    display: none !important;
  }
  /* 포인트 최소화 */
  #header-point-wrap {
    padding: 4px 6px !important;
  }
  #header-point-balance {
    font-size: 10px !important;
    max-width: 55px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  /* 통계 카드 1열 */
  .stats-grid {
    grid-template-columns: 1fr 1fr !important;
  }

  /* 히어로 버튼 */
  .hero-actions {
    flex-direction: column;
    align-items: center;
    gap: 10px;
  }
  .btn-hero {
    width: 100%;
    max-width: 260px;
    text-align: center;
  }

  /* 공지사항 카드 */
  .notice-card {
    padding: 14px;
  }

  /* 섹션 헤더 */
  .section-header {
    padding: 10px 14px;
  }
  .section-header h2 {
    font-size: 16px;
  }

  /* 관리자 대시보드 메뉴 카드 */
  .admin-menu-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 8px;
  }
  .admin-menu-card {
    padding: 14px 10px !important;
  }
  .admin-menu-card i {
    font-size: 22px !important;
  }
  .admin-menu-card span {
    font-size: 12px !important;
  }

  /* 골드 판매 카드 */
  .gold-card {
    padding: 14px;
  }

  /* 포인트 내역 */
  .point-history-item {
    flex-direction: column;
    gap: 4px;
  }
}

/* 초소형 (360px 이하) */
@media (max-width: 360px) {
  .products-grid {
    grid-template-columns: 1fr 1fr !important;
    gap: 6px !important;
    padding: 6px !important;
  }
  .product-card {
    padding: 7px !important;
  }
  .product-name {
    font-size: 11px !important;
  }
  .product-image,
  .product-image-wrapper .product-image {
    height: 85px !important;
  }
  .btn-detail, .btn-cart, .btn-purchase {
    padding: 7px 4px !important;
    font-size: 10px !important;
  }
  .btn-cart i, .btn-purchase i, .btn-detail i {
    font-size: 12px !important;
  }
  .admin-menu-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }
  .stats-grid {
    grid-template-columns: 1fr 1fr !important;
  }
  /* 초소형 헤더: 영업상태 텍스트 숨기고 아이콘만 */
  .shop-status span {
    display: none !important;
  }
  .shop-status {
    padding: 4px 6px !important;
    min-width: 24px;
  }
  #header-point-balance {
    display: none !important;
  }
  #header-point-wrap .fa-coins {
    font-size: 13px !important;
  }
  #header-point-wrap {
    padding: 5px 7px !important;
    border-radius: 50% !important;
  }
}

/* 태블릿 (769px ~ 1024px) 헤더 포인트 */
@media (min-width: 769px) and (max-width: 1024px) {
  #header-point-wrap {
    padding: 5px 11px;
    font-size: 12px;
  }
  #header-point-balance {
    font-size: 12px !important;
  }
}

/* 터치 디바이스 - 버튼 최소 터치 영역 44px 보장 */
@media (hover: none) and (pointer: coarse) {
  .btn-quick-stock {
    width: 36px !important;
    height: 36px !important;
    font-size: 18px !important;
  }
  .menu-item {
    min-height: 44px;
  }
  .dropdown-item {
    min-height: 44px;
    display: flex;
    align-items: center;
  }
  .btn-cart-header {
    min-height: 44px;
    min-width: 44px;
  }
}

/* admin-table 모바일 최소폭 */
@media (max-width: 768px) {
  .admin-table-container {
    padding: 10px;
  }
  .admin-table {
    min-width: 600px;
  }
  /* 모바일에서 admin-table th/td 폰트 축소 */
  .admin-table th,
  .admin-table td {
    font-size: 12px;
    padding: 8px 7px;
  }
  /* 버튼 압축 */
  .admin-table .btn-primary,
  .admin-table .btn-secondary,
  .admin-table .btn-danger {
    padding: 4px 8px;
    font-size: 11px;
  }
}

/* 영업종료 안내 팝업 애니메이션 */
@keyframes scFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes scSlideUp {
  from { transform: translateY(20px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}

/* ═══════════════════════════════════════════
   헬타이드 이벤트 타이머 버튼 (전역 헤더용)
   ─────────────────────────────────────────── */
.btn-helltide-header {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  background: linear-gradient(135deg, #7a1500, #c62a00);
  border: 1px solid #ff4500;
  border-radius: 20px;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
  position: relative;
}
.btn-helltide-header:hover {
  background: linear-gradient(135deg, #c62a00, #ff4500);
  box-shadow: 0 0 14px rgba(255, 69, 0, 0.5);
  color: #fff;
  text-decoration: none;
}
.btn-helltide-header i { font-size: 13px; }
.btn-helltide-text { display: inline; }

/* 헤더 live dot */
.helltide-header-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  display: none;
}
.helltide-header-dot.active {
  display: inline-block;
  background: #ff6633;
  animation: ht-dot-pulse 1.4s ease-in-out infinite;
}
.helltide-header-dot.inactive {
  display: inline-block;
  background: #555;
}
@keyframes ht-dot-pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50%       { transform: scale(1.4); opacity: 0.5; }
}

/* 사이드바 LIVE 배지 */
.helltide-live-badge {
  font-size: 9px;
  font-weight: 800;
  background: linear-gradient(135deg, #c62a00, #ff4500);
  color: #fff;
  padding: 1px 5px;
  border-radius: 8px;
  margin-left: auto;
  letter-spacing: 0.5px;
  animation: ht-badge-pulse 1.8s ease-in-out infinite;
}
@keyframes ht-badge-pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.55; }
}

/* 모바일: 버튼 텍스트 숨김 */
@media (max-width: 480px) {
  .btn-helltide-text { display: none; }
  .btn-helltide-header { padding: 6px 9px; }
}

/* ── 전광판 배너 ─────────────────────────────────────────── */
#ticker-banner {
  display: none;           /* JS가 활성화 시 block으로 전환 */
  overflow: hidden;
  background: #0a0a0a;
  border-top: 1px solid #1e1e1e;
  height: 34px;
  position: relative;
  flex-shrink: 0;
}
#ticker-banner::before,
#ticker-banner::after {
  content: '';
  position: absolute;
  top: 0; bottom: 0;
  width: 48px;
  z-index: 2;
  pointer-events: none;
}
#ticker-banner::before {
  left: 0;
  background: linear-gradient(to right, #0a0a0a 60%, transparent);
}
#ticker-banner::after {
  right: 0;
  background: linear-gradient(to left, #0a0a0a 60%, transparent);
}
#ticker-track {
  display: inline-flex;
  align-items: center;
  height: 34px;
  white-space: nowrap;
  will-change: transform;
}
#ticker-track span {
  font-size: 13px;
  color: #e6a817;
  letter-spacing: 0.05em;
  padding-right: 120px;
}
#ticker-track span::before {
  content: '★ ';
  color: #ff4500;
  font-size: 11px;
}

/* ── 태블릿 (≤ 1024px) ── */
@media (max-width: 1024px) {
  #ticker-banner {
    height: 30px;
  }
  #ticker-track {
    height: 30px;
  }
  #ticker-track span {
    font-size: 12px;
    padding-right: 90px;
  }
  #ticker-banner::before,
  #ticker-banner::after {
    width: 36px;
  }
}

/* ── 모바일 (≤ 768px) ── */
@media (max-width: 768px) {
  #ticker-banner {
    height: 26px;
  }
  #ticker-track {
    height: 26px;
  }
  #ticker-track span {
    font-size: 11px;
    letter-spacing: 0.03em;
    padding-right: 60px;
  }
  #ticker-track span::before {
    font-size: 10px;
  }
  #ticker-banner::before,
  #ticker-banner::after {
    width: 24px;
  }
}

/* ── 초소형 (≤ 400px) ── */
@media (max-width: 400px) {
  #ticker-banner {
    height: 24px;
  }
  #ticker-track {
    height: 24px;
  }
  #ticker-track span {
    font-size: 10px;
    padding-right: 40px;
  }
  #ticker-banner::before,
  #ticker-banner::after {
    width: 16px;
  }
}

/* ──────────────────────────────────────────
   수량 선택 UI (purchase-modal 내)
────────────────────────────────────────── */
#qty-section {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 10px 0 6px 0;
}
#qty-section .qty-ctrl {
  display: flex;
  align-items: center;
  background: #1a1a1a;
  border: 1px solid #444;
  border-radius: 8px;
  overflow: hidden;
}
#btn-qty-dec,
#btn-qty-inc {
  width: 36px;
  height: 36px;
  background: #2a2a2a;
  border: none;
  color: #fff;
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}
#btn-qty-dec:hover,
#btn-qty-inc:hover {
  background: #3a3a3a;
}
#qty-input {
  width: 50px;
  text-align: center;
  background: #111;
  border: none;
  border-left: 1px solid #333;
  border-right: 1px solid #333;
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  height: 36px;
  padding: 0;
  /* 화살표 숨김 */
  -moz-appearance: textfield;
}
#qty-input::-webkit-inner-spin-button,
#qty-input::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
#qty-price-info {
  color: #e6a817;
  font-size: 13px;
  margin: 4px 0 8px 0;
  min-height: 18px;
}

/* ──────────────────────────────────────────
   가격 옵션 목록 (상품 카드 내)
────────────────────────────────────────── */
.price-options-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 100%;
  /* max-height / overflow 제거 → 옵션 전체 표시 */
}

.price-option-row {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  padding: 5px 0;
  border-bottom: 1px solid rgba(255,255,255,0.07);
}
.price-option-row:last-child {
  border-bottom: none;
}

.price-option-label {
  color: #aaa;
  font-size: 12px;
  white-space: normal;
  word-break: break-all;
  line-height: 1.3;
}

.price-option-value {
  color: #ff6666;
  font-size: 14px;
  font-weight: 700;
  flex-shrink: 0;
}

/* 관리자 채팅: 모바일에서 2단(목록+대화)을 세로로 쌓아 대화창이 찌그러지지 않게
   (기존엔 목록 280px 고정 탓에 375px 화면에서 전송 버튼이 밀려 잘림) */
@media (max-width: 768px) {
  .admin-chat-layout {
    flex-direction: column;
    height: auto !important;
    min-height: 0 !important;
  }
  .admin-chat-convlist {
    width: 100% !important;
    height: 220px;
    flex-shrink: 1 !important;
  }
  .admin-chat-layout > div:last-child {
    min-height: 380px;
  }
  /* 메시지 영역에 상한을 줘 내부 스크롤 (없으면 메시지가 쌓일수록 창이 계속 늘어남) */
  #chat-thread-messages {
    min-height: 0;
    max-height: 52vh;
  }
}

/* ── 위시리스트(찜) ── */
.btn-wish { position: absolute; top: 54px; right: 12px; z-index: 11; width: 32px; height: 32px; border-radius: 50%; background: rgba(0,0,0,0.55); border: 1px solid rgba(255,255,255,0.18); color: #ff6688; font-size: 15px; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: transform .15s, background .15s, color .15s; }
.btn-wish:hover { background: rgba(0,0,0,0.78); transform: scale(1.12); }
.btn-wish.active { color: #ff2d55; }
.btn-wish i { pointer-events: none; }
.btn-wish-header { position: relative; background: transparent; border: 1px solid #ff4477; color: #ff6688; padding: 8px 12px; border-radius: 6px; cursor: pointer; font-size: 16px; transition: all 0.2s; display: flex; align-items: center; justify-content: center; text-decoration: none; }
.btn-wish-header:hover { background: rgba(255,68,119,0.12); }
.wish-badge { position: absolute; top: -6px; right: -6px; background: #ff2d55; color: #fff; font-size: 10px; font-weight: 700; min-width: 16px; height: 16px; border-radius: 8px; padding: 0 4px; display: flex; align-items: center; justify-content: center; line-height: 1; }
@media (max-width: 768px) { .btn-wish-header { padding: 7px 10px; flex-shrink: 0; } }

/* ── 전역 푸터 (글로벌몰) ───────────────────────────────── */
.site-footer {
  margin-top: 48px;
  padding: 28px 20px 36px;
  border-top: 1px solid #2a2a2a;
  background: rgba(0, 0, 0, 0.25);
}
.site-footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  text-align: center;
}
.site-footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 22px;
  margin-bottom: 16px;
}
.site-footer-links a {
  color: #bbb;
  font-size: 13px;
  text-decoration: none;
}
.site-footer-links a:hover {
  color: #ff9900;
  text-decoration: underline;
}
.site-footer-note {
  color: #777;
  font-size: 12px;
  line-height: 1.7;
  margin: 0 0 10px;
}
.site-footer-copy {
  color: #666;
  font-size: 12px;
  margin: 0;
}
