@import url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css');

:root {
  --primary: #1B64F2;
  --primary-hover: #0D4ED8;
  --primary-light: #EBF2FE;
  --dark-header: #0F2B5C;
  --text-dark: #1E293B;
  --text-muted: #64748B;
  --text-light: #94A3B8;
  --border-color: #E2E8F0;
  --bg-gray: #F8FAFC;
  --danger: #FF3B30;
  --success: #00B06B;
  --warning: #FFB800;
  --card-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-full: 9999px;
}

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

body {
  font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--text-dark);
  background-color: var(--bg-gray);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a {
  text-decoration: none;
  color: inherit;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px;
}

/* Header */
.site-header {
  background: #ffffff;
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  gap: 20px;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 800;
  color: var(--text-dark);
  cursor: pointer;
}

.logo-icon {
  width: 38px;
  height: 38px;
  background: var(--primary);
  color: #fff;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  box-shadow: 0 4px 10px rgba(27, 100, 242, 0.3);
}

.logo-badge {
  background: var(--danger);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: var(--radius-full);
}

.header-search {
  flex: 1;
  max-width: 500px;
  position: relative;
}

.header-search input {
  width: 100%;
  height: 44px;
  padding: 0 45px 0 20px;
  border: 1.5px solid #CBD5E1;
  border-radius: var(--radius-full);
  font-size: 14px;
  outline: none;
  transition: all 0.2s;
  background: #fff;
}

.header-search input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(27, 100, 242, 0.15);
}

.search-btn {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 18px;
}

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

.btn-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 600;
  transition: all 0.2s;
}

.btn-price-board {
  background: #F1F5F9;
  color: var(--text-dark);
}

.btn-price-board:hover {
  background: #E2E8F0;
}

.btn-admin {
  background: #F59E0B;
  color: #fff;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3);
}

.btn-admin:hover {
  background: #D97706;
}

.btn-cart {
  background: #F1F5F9;
  color: var(--text-dark);
  padding: 8px 12px;
  border-radius: 12px;
  position: relative;
  font-size: 18px;
}

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

/* Category Nav - 2-Row Clean Grid Layout */
.category-nav {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px 10px;
  padding: 12px 0 16px;
}

.cat-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 12px;
  background: #ffffff;
  border: 1.5px solid #E2E8F0;
  border-radius: 12px;
  font-size: 13.5px;
  font-weight: 700;
  color: #334155;
  white-space: nowrap;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 1px 3px rgba(0,0,0,0.03);
  cursor: pointer;
  text-align: center;
}

.cat-btn:hover {
  background: #F0F7FF;
  border-color: #93C5FD;
  color: var(--primary);
  transform: translateY(-1px);
}

.cat-btn.active {
  background: linear-gradient(135deg, #1D4ED8 0%, #2563EB 100%);
  color: #ffffff;
  border-color: #1D4ED8;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
  transform: translateY(-1px);
}

/* Notice Bar */
.notice-bar {
  background: linear-gradient(90deg, #1E293B, #0F172A);
  color: #fff;
  padding: 10px 16px;
  border-radius: var(--radius-md);
  margin: 16px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13.5px;
}

.notice-bar strong {
  color: #38BDF8;
  margin-right: 8px;
}

/* Section Header */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 24px 0 18px;
  flex-wrap: wrap;
  gap: 12px;
}

.section-title-wrap {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.section-title {
  font-size: 22px;
  font-weight: 800;
  color: #0F172A;
}

.section-live-badge {
  background: #EF4444;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--radius-full);
}

.section-subtitle {
  font-size: 13px;
  color: var(--primary);
  font-weight: 600;
  margin-top: 4px;
}

.verified-tag {
  border: 1px solid #93C5FD;
  background: #EFF6FF;
  color: #1D4ED8;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: var(--radius-full);
}

/* Store Grid */
.store-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 40px;
}

.store-card {
  background: #ffffff;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--card-shadow);
  border: 1px solid #E2E8F0;
  transition: transform 0.25s, box-shadow 0.25s;
  display: flex;
  flex-direction: column;
}

.store-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.1);
  border-color: #BFDBFE;
}

.store-top-bar {
  background: var(--dark-header);
  color: #ffffff;
  padding: 8px 16px;
  font-size: 12.5px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 600;
}

.store-top-bar .menu-count-badge {
  background: rgba(255, 255, 255, 0.2);
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-size: 11px;
}

.store-info-box {
  padding: 16px;
  display: flex;
  gap: 14px;
  align-items: center;
  border-bottom: 1px solid #F1F5F9;
}

.store-avatar-wrap {
  position: relative;
  width: 68px;
  height: 68px;
  flex-shrink: 0;
}

.store-avatar {
  width: 100%;
  height: 100%;
  border-radius: 16px;
  object-fit: cover;
  border: 2px solid #E2E8F0;
}

.store-live-chip {
  position: absolute;
  bottom: -4px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(15, 23, 42, 0.85);
  color: #fff;
  font-size: 9px;
  padding: 1px 6px;
  border-radius: 4px;
  white-space: nowrap;
}

.store-meta {
  flex: 1;
  min-width: 0;
}

.store-name {
  font-size: 18px;
  font-weight: 800;
  color: #0F172A;
  margin-bottom: 3px;
  cursor: pointer;
}

.store-name:hover {
  color: var(--primary);
}

.store-rating {
  font-size: 12.5px;
  color: #475569;
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 6px;
}

.star-icon {
  color: var(--warning);
}

.store-tag-list {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

.store-tag {
  font-size: 10.5px;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 600;
}

.tag-coupon { background: #FEE2E2; color: #DC2626; border: 1px solid #FECACA; }
.tag-order { background: #DBEAFE; color: #2563EB; border: 1px solid #BFDBFE; }
.tag-pickup { background: #D1FAE5; color: #059669; border: 1px solid #A7F3D0; }

.store-preview-menus {
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}

.preview-menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px;
  border-radius: var(--radius-sm);
  background: #F8FAFC;
  cursor: pointer;
  transition: background 0.15s;
}

.preview-menu-item:hover {
  background: #F1F5F9;
}

.preview-menu-thumb {
  width: 52px;
  height: 52px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
}

.preview-menu-info {
  flex: 1;
  min-width: 0;
}

.preview-menu-title {
  font-size: 12.5px;
  font-weight: 700;
  color: #1E293B;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 2px;
}

.preview-menu-price-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.discount-rate {
  color: var(--danger);
  font-weight: 800;
  font-size: 13px;
}

.current-price {
  font-weight: 800;
  font-size: 14px;
  color: #0F172A;
}

.store-card-footer {
  padding: 12px 16px;
  border-top: 1px solid #F1F5F9;
  text-align: center;
}

.btn-store-link {
  color: var(--primary);
  font-size: 13px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: transform 0.2s;
}

.btn-store-link:hover {
  transform: translateX(4px);
}

/* Store Detail Page Banner */
.store-header-banner {
  background: linear-gradient(135deg, #0F2B5C 0%, #1E40AF 100%);
  color: #ffffff;
  padding: 24px 20px;
  margin-bottom: 20px;
  border-radius: 16px;
  box-shadow: 0 4px 16px rgba(15, 43, 92, 0.15);
}

.store-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.store-head-info {
  display: flex;
  align-items: center;
  gap: 16px;
  flex: 1;
  min-width: 260px;
}

.store-head-img {
  width: 76px;
  height: 76px;
  border-radius: 14px;
  object-fit: cover;
  border: 2px solid rgba(255,255,255,0.4);
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.store-head-text h1 {
  font-size: 22px;
  font-weight: 800;
  margin-bottom: 3px;
  letter-spacing: -0.3px;
}

.store-head-text p {
  font-size: 13px;
  opacity: 0.9;
  line-height: 1.4;
}

/* Product Menu Cards Grid */
.product-menu-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-bottom: 40px;
}

.product-item-card {
  background: #ffffff;
  border: 1.5px solid #E2E8F0;
  border-radius: 14px;
  padding: 16px;
  box-shadow: var(--card-shadow);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.product-item-card:hover {
  border-color: #60A5FA;
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.09);
  transform: translateY(-2px);
}

.product-main-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 10px;
}

.product-info-col {
  flex: 1;
  min-width: 0;
}

.product-tag-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 6px;
}

.badge-rank {
  background: #EF4444;
  color: #fff;
  font-size: 10.5px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 4px;
}

.badge-origin {
  color: #2563EB;
  font-size: 11px;
  font-weight: 700;
  background: #EFF6FF;
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid #DBEAFE;
}

.product-title {
  font-size: 15.5px;
  font-weight: 800;
  color: #0F172A;
  line-height: 1.35;
  margin-bottom: 4px;
  word-break: keep-all;
}

.product-desc {
  font-size: 12px;
  color: #64748B;
  line-height: 1.4;
  margin-bottom: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-servings {
  font-size: 11.5px;
  color: #0284C7;
  font-weight: 600;
  margin-bottom: 6px;
}

.product-price-box {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.origin-price {
  font-size: 13.5px;
  color: #94A3B8;
  text-decoration: line-through;
}

.final-price {
  font-size: 20px;
  font-weight: 800;
  color: #1B64F2;
}

.product-image-col {
  width: 130px;
  height: 130px;
  flex-shrink: 0;
}

.product-thumb-img {
  width: 100%;
  height: 100%;
  border-radius: 12px;
  object-fit: cover;
}

.product-options-box {
  background: #F8FAFC;
  border: 1px solid #EDF2F7;
  border-radius: 10px;
  padding: 10px 14px;
  margin-bottom: 14px;
  font-size: 12px;
  color: #64748B;
}

.product-options-box div {
  margin-bottom: 2px;
}

.btn-order-direct {
  width: 100%;
  height: 46px;
  background: var(--primary);
  color: #ffffff;
  border-radius: 10px;
  font-size: 14.5px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background 0.2s;
}

.btn-order-direct:hover {
  background: var(--primary-hover);
}

/* Modal Styles (Image 3) */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  z-index: 999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

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

.modal-dialog {
  background: #ffffff;
  border-radius: 20px;
  max-width: 480px;
  width: 100%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0,0,0,0.25);
  animation: slideUp 0.25s ease-out;
}

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

.modal-header {
  padding: 14px 18px;
  border-bottom: 1px solid #E2E8F0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-title-text {
  font-size: 15px;
  font-weight: 800;
  color: #0F172A;
}

.btn-modal-close {
  font-size: 22px;
  color: #64748B;
  line-height: 1;
}

.modal-banner {
  background: #0F172A;
  color: #FBBF24;
  font-size: 11.5px;
  font-weight: 700;
  padding: 6px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-body-scroll {
  padding: 16px;
  overflow-y: auto;
  flex: 1;
}

.modal-product-hero {
  position: relative;
  width: 100%;
  height: 200px;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 14px;
}

.modal-product-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.modal-product-name {
  font-size: 17px;
  font-weight: 800;
  color: #0F172A;
  margin-bottom: 4px;
}

.modal-product-specs {
  font-size: 12px;
  color: #64748B;
  margin-bottom: 8px;
}

.order-type-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 16px 0 6px;
}

.type-tab-btn {
  border: 1.5px solid #CBD5E1;
  border-radius: 12px;
  padding: 12px 10px;
  text-align: center;
  font-size: 13.5px;
  font-weight: 700;
  color: #475569;
  background: #fff;
  transition: all 0.2s;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.type-tab-btn.active {
  border-color: var(--primary);
  background: var(--primary-light);
  color: var(--primary);
}

.type-tab-sub {
  font-size: 11px;
  color: var(--primary);
  font-weight: 600;
  margin-bottom: 16px;
  text-align: center;
}

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

.option-group-title {
  font-size: 14px;
  font-weight: 800;
  color: #0F172A;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.badge-req {
  background: #EF4444;
  color: #fff;
  font-size: 10px;
  padding: 1px 5px;
  border-radius: 3px;
}

.badge-opt {
  color: #64748B;
  font-size: 11px;
  font-weight: normal;
}

.option-select-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.opt-radio-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1px solid #E2E8F0;
  border-radius: 10px;
  padding: 12px 14px;
  cursor: pointer;
  transition: all 0.15s;
  font-size: 13px;
  font-weight: 600;
  background: #fff;
}

.opt-radio-card:hover {
  border-color: #93C5FD;
}

.opt-radio-card.selected {
  border-color: var(--primary);
  background: #F0F7FF;
}

.opt-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.custom-radio {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid #CBD5E1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.opt-radio-card.selected .custom-radio {
  border-color: var(--primary);
  background: var(--primary);
}

.opt-radio-card.selected .custom-radio::after {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #fff;
}

.opt-price {
  font-weight: 800;
  color: #0F172A;
}

.qty-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #F8FAFC;
  padding: 12px 16px;
  border-radius: 10px;
  margin-bottom: 20px;
}

.qty-stepper {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #fff;
  border: 1px solid #CBD5E1;
  border-radius: 8px;
  padding: 4px 8px;
}

.qty-btn {
  font-size: 16px;
  font-weight: 700;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #475569;
}

.qty-val {
  font-weight: 800;
  font-size: 14px;
  width: 24px;
  text-align: center;
}

.modal-footer-bar {
  padding: 14px 18px;
  border-top: 1px solid #E2E8F0;
  background: #fff;
}

.total-summary-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 12px;
}

.total-summary-row .total-title {
  font-size: 13.5px;
  color: #64748B;
}

.total-summary-row .total-amount {
  font-size: 22px;
  font-weight: 800;
  color: #0F172A;
}

.modal-btn-grid {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 10px;
}

.btn-add-cart {
  height: 48px;
  border: 1.5px solid var(--primary);
  border-radius: 12px;
  color: var(--primary);
  font-size: 14.5px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.btn-buy-now {
  height: 48px;
  background: var(--primary);
  border-radius: 12px;
  color: #ffffff;
  font-size: 14.5px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.btn-buy-now:hover {
  background: var(--primary-hover);
}

/* Modal Price Board */
.price-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 12px;
}
.price-table th, .price-table td {
  padding: 12px;
  border-bottom: 1px solid #E2E8F0;
  text-align: left;
}
.price-table th { background: #F8FAFC; color: #475569; }
.price-up { color: var(--danger); font-weight: 700; }
.price-down { color: var(--primary); font-weight: 700; }
.price-same { color: var(--text-muted); font-weight: 600; }

/* Toast */
.toast-msg {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(15, 23, 42, 0.9);
  color: #fff;
  padding: 12px 24px;
  border-radius: var(--radius-full);
  font-size: 14px;
  font-weight: 600;
  z-index: 10000;
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}
.toast-msg.show { opacity: 1; }

/* Footer */
.site-footer {
  background: #0F172A;
  color: #94A3B8;
  padding: 40px 0 30px;
  font-size: 13px;
  border-top: 1px solid #1E293B;
  margin-top: 60px;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 30px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.footer-brand {
  font-size: 18px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 8px;
}

.footer-info p {
  margin-bottom: 4px;
}

.footer-bottom {
  border-top: 1px solid #1E293B;
  padding-top: 20px;
  text-align: center;
  font-size: 12px;
}
