@charset "utf-8";

@property --header-h {
  syntax: '<length>';
  inherits: true;
  initial-value: 0px;
}

html.hdr-anim {
  transition: --header-h 0.3s ease;
}

:root {
  --primary: #002880;
  --primary-soft: #eef2fb;
  --primary-light: #5b8def;
  --danger: #e5484d;
  --success: #2f9e44;
  --warning: #f5a623;
  --trend-down: #4c6ef5;
  --kakao: #fee500;
  --naver: #03a94d;

  --text: #111;
  --text-2: #333;
  --text-3: #666;
  --text-4: #999;
  --text-5: #bbb;

  --bg: #fff;
  --bg-soft: #fafafa;
  --bg-admin: #f7f8fa;
  --bg-input: #f4f4f4;
  --bg-tab: #f1f2f4;

  --border: #ececec;
  --border-2: #f2f2f2;
  --border-input: #ddd;
  --border-input-2: #e2e2e2;

  /* 크기 조절 손잡이(///) — textarea/에디터 우측 하단에 공통으로 깔아 쓴다 */
  --resize-grip: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12'><g stroke='%23b5bcc7' stroke-width='1.4' stroke-linecap='round'><path d='M11 2 2 11'/><path d='M11 6 6 11'/><path d='M11 10 10 11'/></g></svg>");

  --radius-sm: 8px;
  --radius: 10px;
  --radius-lg: 14px;
  --radius-pill: 999px;

  --container: 1300px;
  --gutter: clamp(20px, 4vw, 48px);

  --header-h: 0px;
  --header-full-h: 0px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  overflow-x: hidden;
  min-width: 300px;
  font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo',
               'Malgun Gothic', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  word-break: keep-all;
}
@media (max-width: 300px) {
  body { overflow-x: auto; }
}

a { color: var(--text); text-decoration: none; }
a:hover { color: var(--primary); }

img { max-width: 100%; vertical-align: middle; }
button, input, select, textarea { font-family: inherit; font-size: inherit; }
button { cursor: pointer; }
h1, h2, h3, h4 { margin: 0; font-weight: 800; letter-spacing: -0.5px; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
table { border-collapse: collapse; width: 100%; }

::-webkit-scrollbar { width: 0; height: 0; }


.container {
  max-width: calc(var(--container) + var(--gutter) * 2);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

.site-wrap { position: relative; display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh; }
.site-wrap > main { flex: 1 0 auto; }

main { margin-top: 50px; margin-bottom: 30px; }
main:has(> .hero) { margin-top: 0; }
@media (max-width: 960px) {
  main { margin-top: 32px; }
}

.page { padding-top: clamp(9px, 1.8vw, 14px); padding-bottom: clamp(35px, 4.5vw, 55px); }
.page-narrow { max-width: 560px; margin: 0 auto; }

.section-title { font-size: clamp(20px, 2vw, 24px); font-weight: 800; }
.section-sub { font-size: 15px; color: var(--text-4); margin-top: 4px; }


.hdr-utility {
  max-width: var(--container);
  margin: 0 auto;
  padding: 10px 0 0;
  display: flex;
  justify-content: flex-end;
  gap: 14px;
  font-size: 12px;
  color: var(--text-3);
}
.hdr-utility a { color: var(--text-3); }

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: #fff;
  border-bottom: 1px solid var(--border);
  transform: translateY(calc(var(--header-h, 0px) - var(--header-full-h, 0px)));
}

.hdr-inner {
  max-width: var(--container);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 11px 0;
  flex-wrap: wrap;
}

.logo { display: flex; align-items: center; font-size: clamp(19px, 2vw, 22px); font-weight: 800; letter-spacing: -0.5px; color: var(--text); margin-top: 3px; }
.logo img { height: clamp(16px, 1.8vw, 19px); width: auto; display: block; }
.hdr-inner > .logo, .hdr-mobile-top .logo { margin-top: 1px; }

.search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  height: 36px;
  border-radius: 18px;
  background: var(--bg-input);
  padding: 0 16px;
  min-width: 0;
}
.search-box input {
  border: none; outline: none; background: transparent;
  font-size: 13px; width: 100%; color: var(--text-2);
}
input[type="search"]::-webkit-search-cancel-button {
  -webkit-appearance: none; appearance: none;
  width: 14px; height: 14px; margin-left: 4px; flex-shrink: 0; cursor: pointer;
  background: no-repeat center / contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='2' stroke-linecap='round'%3E%3Cline x1='6' y1='6' x2='18' y2='18'/%3E%3Cline x1='18' y1='6' x2='6' y2='18'/%3E%3C/svg%3E");
  opacity: 0.7;
}
input[type="search"]::-webkit-search-cancel-button:hover { opacity: 1; }
.input.board-search-input:focus { border-color: var(--border-input); }
.hdr-search { display: flex; align-items: center; gap: 14px; flex: 1; min-width: 220px; max-width: 420px; order: 3; }
.hdr-icons { display: flex; align-items: center; gap: 20px; order: 4; }
.hdr-icons a { display: flex; position: relative; }

.cart-badge {
  position: absolute; top: -6px; right: -8px;
  min-width: 16px; height: 16px; padding: 0 4px;
  border-radius: 8px; background: var(--danger); color: #fff;
  font-size: 10px; font-weight: 700; line-height: 16px; text-align: center;
}

.gnb {
  max-width: var(--container);
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 8px 0 10px;
  overflow: visible;
  font-size: 15px;
  font-weight: 600;
  color: #444;
  white-space: nowrap;
}
.gnb a { color: #444; }
.gnb-divider { width: 1px; height: 14px; background: var(--border-input); flex-shrink: 0; }

.gnb-item { position: relative; z-index: 0; display: flex; align-items: center; }
.gnb-item::before {
  content: '';
  position: absolute;
  top: -8px;
  bottom: -10px;
  left: -10px;
  right: -10px;
  z-index: -1;
}

.gnb-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  min-width: 170px;
  background: #fff;
  border-radius: var(--radius-sm);
  box-shadow: 0 6px 16px rgba(17, 17, 17, 0.10);
  padding: 8px;
  z-index: 60;
  visibility: hidden;
  opacity: 0;
  transition: opacity .08s ease, visibility .08s;
}
.gnb-item.has-children:hover .gnb-dropdown,
.gnb-item.has-children.is-open .gnb-dropdown {
  visibility: visible;
  opacity: 1;
}

.gnb-dropdown a {
  display: block;
  padding: 6px 12px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-2);
  border-radius: var(--radius-sm);
}
.gnb-dropdown a:hover { background: var(--bg-soft); color: var(--primary); }

.gnb-mid { position: relative; z-index: 0; }
.gnb-mid.has-children > a::after {
  content: '\203A';
  float: right;
  margin-left: 16px;
  color: var(--text-4);
}
.gnb-mid.has-children::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: -10px;
  z-index: -1;
}
.gnb-mid.flyout-left.has-children::before {
  left: -10px;
  right: 0;
}

.gnb-flyout {
  position: absolute;
  top: -8px;
  left: 100%;
  margin-left: 8px;
  min-width: 170px;
  background: #fff;
  border-radius: var(--radius-sm);
  box-shadow: 0 6px 16px rgba(17, 17, 17, 0.10);
  padding: 8px;
  z-index: 61;
  visibility: hidden;
  opacity: 0;
  transition: opacity .12s ease, visibility .12s;
}
.gnb-mid.has-children:hover .gnb-flyout,
.gnb-mid.has-children.is-open .gnb-flyout {
  visibility: visible;
  opacity: 1;
}
.gnb-mid.flyout-left .gnb-flyout {
  left: auto;
  right: 100%;
  margin-left: 0;
  margin-right: 8px;
}
.gnb-flyout a {
  display: block;
  padding: 6px 12px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-2);
  border-radius: var(--radius-sm);
  white-space: nowrap;
}
.gnb-flyout a:hover { background: var(--bg-soft); color: var(--primary); }

.hdr-desktop { padding: 0 var(--gutter); }

.hdr-mobile { display: none; padding: 0 var(--gutter); }
@media (max-width: 960px) {
  .hdr-desktop { display: none; }
  .hdr-mobile { display: block; }
}

.hdr-mobile-inner { max-width: var(--container); margin: 0 auto; padding: 16px 0 14px; }
.hdr-mobile-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.icon-btn { border: none; background: none; padding: 0; display: flex; align-items: center; }

.sidebar-backdrop {
  position: fixed; inset: 0; background: rgba(17, 17, 17, 0.45);
  z-index: 400; display: none;
}
.sidebar-backdrop.is-open { display: flex; }
.sidebar-panel {
  width: min(78vw, 320px); height: 100%; background: #fff;
  padding: 22px 22px 32px; overflow-y: auto;
}
.sidebar-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; }
.sidebar-label { font-size: 12px; font-weight: 700; color: var(--text-4); letter-spacing: 0.5px; margin-bottom: 12px; }
.sidebar-group { display: flex; flex-direction: column; gap: 2px; padding-bottom: 20px; margin-bottom: 20px; border-bottom: 1px solid var(--border); }
.sidebar-group:last-child { border-bottom: none; margin-bottom: 0; }
.sidebar-group a { padding: 10px 0; font-size: 15px; font-weight: 600; color: #222; }

.sidebar-tree .sidebar-node-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.sidebar-tree .sidebar-node-row > a { flex: 1; min-width: 0; }
.sidebar-toggle {
  flex-shrink: 0; border: none; background: none; padding: 8px;
  margin-right: -8px; display: flex; align-items: center; color: var(--text-4);
  transition: color .15s ease;
  -webkit-tap-highlight-color: transparent;
}
.sidebar-node.is-open > .sidebar-node-row > .sidebar-toggle { transform: rotate(180deg); color: var(--text-2); }

.sidebar-sub { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .22s ease; }
.sidebar-node.is-open > .sidebar-sub { grid-template-rows: 1fr; }
.sidebar-sub-inner { overflow: hidden; min-height: 0; padding-left: 12px; }
.sidebar-sub .sidebar-node-row > a { font-size: 14px; font-weight: 500; color: var(--text-3); padding: 8px 0; }
.sidebar-sub .sidebar-sub .sidebar-node-row > a { font-size: 13px; color: var(--text-4); }

.is-keyboard-open .pd-mobile-bar,
.is-keyboard-open .cart-btn-row.is-floating,
.is-keyboard-open .checkout-paybar.is-floating {
  visibility: hidden;
  pointer-events: none;
  transition: none;
}



.site-footer { padding: clamp(48px, 6vw, 72px) var(--gutter) 32px; background: #111; color: var(--text-4); }
.site-footer a { color: var(--text-4); }
.site-footer a:hover { color: #fff; }
.site-footer .container { max-width: var(--container); padding-left: 0; padding-right: 0; }
.footer-top { display: flex; flex-wrap: wrap; gap: 36px; padding-bottom: 40px; border-bottom: 1px solid #2a2a2a; }
.footer-brand { display: block; height: 26px; width: auto; margin-bottom: 14px; }
.footer-info { font-size: 13px; line-height: 2; color: var(--text-4); }
.footer-title { font-size: 13px; font-weight: 700; color: #fff; margin-bottom: 14px; }
.footer-tels { display: flex; flex-direction: column; gap: 3px; margin-bottom: 10px; }
.footer-tel { font-size: 20px; font-weight: 800; color: #fff; line-height: 1.35; }
.footer-tel-note { margin-left: 6px; font-size: 12px; font-weight: 600; color: var(--text-4); }
.footer-lunch-hours { white-space: nowrap; }
.footer-links { display: flex; flex-direction: column; gap: 10px; font-size: 13px; }
.footer-bottom {
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 12px; padding-top: 24px; font-size: 12px; color: #666;
}
.footer-bottom a { color: #666; }
@media (max-width: 1080px) {
  .footer-top { display: grid; grid-template-columns: 1fr 1fr; gap: 32px 24px; }
}
@media (max-width: 960px) {
  .footer-bottom { flex-direction: column-reverse; align-items: center; text-align: center; }
}
@media (max-width: 700px) {
  .footer-top > *:nth-child(1), .footer-top > *:nth-child(2) { grid-column: span 2; }
}
@media (max-width: 400px) {
  .footer-top { grid-template-columns: 1fr; gap: 28px; }
  .footer-top > *:nth-child(1), .footer-top > *:nth-child(2) { grid-column: auto; }
}

.btn-kakao {
  display: inline-block; margin-top: 16px; padding: 10px 18px;
  background: var(--kakao); color: #191919; border-radius: var(--radius-sm);
  font-size: 13px; font-weight: 700;
}
.site-footer .btn-kakao, .site-footer .btn-kakao:hover { color: #191919; }
.site-footer .btn-kakao:hover { background: #fff; }


.btn {
  display: inline-flex; align-items: center; justify-content: center;
  height: 46px; padding: 0 22px; border: 1px solid transparent;
  border-radius: var(--radius-sm); font-size: 14px; font-weight: 600;
  background: #fff; color: var(--text); transition: opacity 0.15s;
}
.btn:hover { opacity: 0.88; }
.btn-primary { background: var(--primary); color: #fff; border-color: var(--primary); }
.btn-primary:hover { color: #fff; }
.btn-outline { background: #fff; color: var(--text); border-color: var(--border-input); }
.btn-outline:hover { opacity: 1; background: var(--bg-soft); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--text-3); }
.btn-danger { background: var(--danger); color: #fff; border-color: var(--danger); }
.btn-danger:hover { color: #fff; }
.btn-block { width: 100%; }
.btn-lg { height: 54px; font-size: 16px; font-weight: 700; border-radius: 12px; }
.btn-sm { height: 36px; padding: 0 14px; font-size: 13px; }
.btn:disabled, .btn.is-disabled { background: #ccc; border-color: #ccc; color: #fff; cursor: not-allowed; opacity: 1; }

.back-link {
  display: inline-flex; align-items: center; gap: 4px;
  margin-left: -5px; margin-bottom: 20px;
  font-size: 13px; font-weight: 600; color: var(--text-3);
}
.back-link:hover { color: var(--primary); }
.back-link-inline { margin-bottom: 0; min-width: 48px; }

.btn-link-sm {
  border: none; background: none; color: var(--text-4);
  font-size: 12px; cursor: pointer; padding: 2px;
}
.btn-link-sm:hover { color: var(--text-2); }


.field { margin-bottom: 16px; }
.field-label { font-size: 14px; font-weight: 500; color: var(--text); margin-bottom: 8px; display: block; }
.field-label .req { color: var(--danger); }

.input, .select, .textarea {
  width: 100%; height: 46px;
  border: 1px solid var(--border-input); border-radius: var(--radius-sm);
  padding: 0 14px; font-size: 14px; color: var(--text-2); background: #fff;
  outline: none;
}
.input:focus, .select:focus, .textarea:focus { border-color: var(--primary); }
.textarea {
  height: auto; min-height: 120px; padding: 12px 14px 18px; resize: vertical; line-height: 1.6;
  background-image: var(--resize-grip); background-repeat: no-repeat; background-position: right 5px bottom 5px;
}
/* 브라우저 기본 손잡이는 숨기고(드래그 동작은 그대로) 위 그립만 보이게 한다 */
.textarea::-webkit-resizer { background: none; }
.input::placeholder, .textarea::placeholder { color: #aaa; }
.input:disabled, .select:disabled { background: #f7f7f7; color: var(--text-4); }

.select {
  appearance: none; -webkit-appearance: none;
  background: #fff url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6' fill='none'><path d='M1 1l4 4 4-4' stroke='%23999' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/></svg>") no-repeat right 14px center;
  padding-right: 34px;
}

.field-error { font-size: 12px; color: var(--danger); margin-top: 6px; }
input.is-invalid, select.is-invalid, textarea.is-invalid { border-color: var(--danger); }
.input.has-error { border-color: var(--danger); }

.checkbox { display: flex; align-items: center; gap: 8px; cursor: pointer; font-size: 14px; color: var(--text-2); }
.checkbox input { width: 16px; height: 16px; accent-color: var(--primary); cursor: pointer; flex-shrink: 0; }

.pw-toggle-wrap { position: relative; display: block; }
.pw-toggle-wrap input { padding-right: 38px !important; }
.pw-toggle-btn {
  position: absolute; top: 50%; right: 12px; transform: translateY(-50%);
  width: 20px; height: 20px;
  display: flex; align-items: center; justify-content: center;
  background: none; border: none; padding: 0; margin: 0; cursor: pointer;
  color: var(--text-4);
}
.pw-toggle-btn:hover { color: var(--text-2); }
.pw-toggle-btn:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: 6px; }
.pw-toggle-btn svg { display: block; }


.card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 24px; }

.sum-sub { font-size: 13px; color: var(--text-4); margin-top: -4px; }
.sum-mark { display: inline-block; width: 15px; flex-shrink: 0; }

.alert { padding: 14px 16px; border-radius: var(--radius-sm); font-size: 14px; margin-bottom: 16px; }
.alert-error { background: #fdf0f0; color: #b3282d; }
.alert-success { background: #eef7f0; color: #1f7a33; }
.alert-info { background: var(--primary-soft); color: var(--primary); }

.badge {
  display: inline-block; padding: 3px 9px; border-radius: 11px;
  font-size: 11px; font-weight: 700;
}
.badge-done { background: var(--primary-soft); color: var(--primary); }
.badge-wait { background: #f3f3f3; color: var(--text-4); }
.badge-danger { background: #fdecec; color: var(--danger); }

.empty { padding: 80px 20px; text-align: center; color: var(--text-4); font-size: 14px; }

.st { font-weight: 700; }
.st-입금전, .st-결제완료 { color: var(--text); }
.st-취소요청, .st-취소, .st-부분취소, .st-전체취소 { color: var(--danger); }


.my-row-thumb {
  width: 52px; height: 52px; flex-shrink: 0; border-radius: var(--radius-sm);
  overflow: hidden; background: var(--bg-soft);
}
.my-row-thumb img { width: 100%; height: 100%; object-fit: cover; }

.my-alert-danger {
  display: flex; gap: 12px; align-items: flex-start;
  background: #fdeaea; border-radius: var(--radius); padding: 16px 18px;
  font-size: 13px; color: #a83a3a; line-height: 1.6;
}
.my-alert-danger svg { flex-shrink: 0; margin-top: 2px; }

.point-row-title {
  font-size: 14px; font-weight: 600; line-height: 1.4; word-break: break-all;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2;
  overflow: hidden; text-overflow: ellipsis;
}

.my-star-picker { display: flex; gap: 4px; font-size: 28px; color: #ddd; cursor: pointer; }

.my-tabs { display: flex; gap: 8px; background: var(--bg-tab); border-radius: 12px; padding: 4px; }
.my-tabs a {
  flex: 1; height: 42px; border-radius: 9px; font-size: 14px; font-weight: 700;
  display: flex; align-items: center; justify-content: center; color: #888;
}
.my-tabs a.is-active { background: #fff; color: var(--primary); box-shadow: 0 1px 3px rgba(0,0,0,0.1); }


.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(230px, 45%), 1fr));
  gap: 20px;
}

.product-card { display: flex; flex-direction: column; gap: 12px; }
.product-thumb { position: relative; aspect-ratio: 1; border-radius: var(--radius); overflow: hidden; background: var(--bg-soft); }
.product-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.18s ease; }
.product-card:hover .product-thumb img { transform: scale(1.03); }
.product-rank {
  position: absolute; top: 10px; left: 10px; z-index: 2;
  background: #111; color: #fff; font-size: 11px; font-weight: 700;
  padding: 3px 9px; border-radius: 12px;
}
.product-info { min-height: 65px; }
.product-name {
  font-size: 14px; font-weight: 600; color: #222; line-height: 1.4;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2;
  overflow: hidden; text-overflow: ellipsis;
}
.product-price { font-size: 14px; margin-top: 6px; }
.product-price .rate { color: var(--danger); font-weight: 700; font-size: 12px; margin-right: 4px; }
.product-price .final { font-weight: 800; color: var(--text); }
.product-price .final.is-sale { color: var(--danger); }
.product-price .base { color: var(--text-5); text-decoration: line-through; font-size: 12px; margin-left: 6px; font-weight: 400; }

.rank-list { display: flex; flex-direction: column; }
.rank-item { display: flex; align-items: center; gap: 14px; padding: 12px 0; border-bottom: 1px solid #eee; }
.rank-num { font-size: 14px; font-weight: 700; color: var(--text-5); width: 18px; flex-shrink: 0; }
.rank-thumb { width: 48px; height: 48px; flex-shrink: 0; border-radius: 6px; overflow: hidden; background: var(--bg-soft); }
.rank-thumb img { width: 100%; height: 100%; object-fit: cover; }
.rank-name { font-size: 14px; font-weight: 600; color: #222; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.home-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.home-grid .product-card:nth-child(9) { display: none; }
@media (max-width: 900px) {
  .home-grid { grid-template-columns: repeat(3, 1fr); }
  .home-grid .product-card:nth-child(9) { display: flex; }
}
@media (max-width: 560px) {
  .home-grid { grid-template-columns: repeat(2, 1fr); }
  .home-grid .product-card:nth-child(9) { display: none; }
}

.trend-columns {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr));
  gap: 48px;
}
.trend-columns > * { min-width: 0; }
.trend-list { display: flex; flex-direction: column; }
.trend-item { display: flex; align-items: center; gap: 14px; padding: 12px 0; border-bottom: 1px solid #eee; color: inherit; }
.trend-rank { font-size: 14px; font-weight: 700; color: var(--text-5); width: 18px; flex-shrink: 0; }
.trend-thumb { width: 48px; height: 48px; flex-shrink: 0; border-radius: 6px; overflow: hidden; background: var(--bg-soft); }
.trend-thumb img { width: 100%; height: 100%; object-fit: cover; }
.trend-name {
  font-size: 14px; font-weight: 600; color: #222; line-height: 1.4; min-width: 0; flex: 1;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2;
  overflow: hidden; text-overflow: ellipsis;
}
.trend-change { font-size: 13px; font-weight: 700; flex-shrink: 0; width: 36px; text-align: center; }
.trend-change.is-up { color: var(--danger); }
.trend-change.is-down { color: var(--trend-down); }
.trend-change.is-new { color: var(--success); }
.trend-change.is-same { color: var(--text-4); }

/* TREND 전체보기(/trend/) — 50위까지 한 줄씩. 두 자리 순위와 가격이 더 붙는다 */
.trend-full { max-width: calc(1000px + var(--gutter) * 2); }
.trend-full .trend-rank { width: 28px; text-align: center; }

/* 제목 자체가 주간/월간 전환 드롭다운이다 (.simple-dropdown 동작을 그대로 쓴다) */
.trend-switch.simple-dropdown { display: inline-block; }
.trend-switch .simple-dropdown-btn { font: inherit; color: inherit; gap: 10px; cursor: pointer; }
.trend-switch .simple-dropdown-btn svg { width: 12px; height: 8px; transition: transform 0.15s ease; }
.trend-switch .simple-dropdown-menu { left: 50%; right: auto; transform: translateX(-50%); min-width: 170px; text-align: left; }
/* 금액은 상품명 쪽으로 당겨 붙이고, 등락(▲▼)을 맨 오른쪽에 둔다 */
.trend-price { font-size: 13px; font-weight: 800; color: #222; flex-shrink: 0; width: 76px; text-align: right; margin-right: 32px; }
@media (max-width: 700px) {
  .trend-price { display: none; }
}

.is-placeholder { pointer-events: none; }
.is-placeholder .product-thumb,
.is-placeholder .trend-thumb,
.is-placeholder .rank-thumb {
  background: #fff;
  border: 1.5px dashed var(--border-input);
}
.ph-bar { display: block; border-radius: 4px; border: 1px dashed var(--border-input); background: transparent; }
.ph-bar-title { width: 75%; height: 12px; }
.ph-bar-price { width: 40%; height: 10px; margin-top: 8px; }
.ph-bar-name { width: 60%; height: 12px; }


.pagination { display: flex; justify-content: center; align-items: center; gap: 4px; margin-top: 64px; }
.pagination a, .pagination span {
  width: 34px; height: 34px; border-radius: 17px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 13px; color: var(--text-3); font-weight: 500; background: transparent;
}
.pagination a:hover { background: #f2f4f8; }
.pagination .is-current { background: var(--primary); color: #fff; font-weight: 700; }
.pagination .pagination-edge { width: auto; padding: 0 10px; border-radius: 6px; }
.pagination .is-disabled { color: #ddd; cursor: default; }
@media (max-width: 480px) {
  .pagination { flex-wrap: wrap; gap: 2px; }
  .pagination a, .pagination span { width: 28px; height: 28px; font-size: 12px; }
  .pagination .pagination-edge { width: auto; padding: 0 6px; }
}

@media (max-width: 350px) {
  .my-row-thumb { display: none; }
}


.simple-dropdown { position: relative; display: inline-block; flex-shrink: 0; }
.simple-dropdown-btn {
  display: flex; align-items: center; gap: 6px;
  border: none; background: none; padding: 0; margin: 0;
  font-size: 13px; font-weight: 700; color: var(--primary);
  -webkit-tap-highlight-color: transparent;
}
.simple-dropdown-btn svg { color: var(--text-4); flex-shrink: 0; }
.simple-dropdown.is-open .simple-dropdown-btn svg { transform: rotate(180deg); }

.simple-dropdown-menu {
  position: absolute; top: calc(100% + 8px); right: 0; z-index: 20;
  min-width: 140px; background: #fff; border-radius: var(--radius-sm);
  box-shadow: 0 6px 16px rgba(17, 17, 17, 0.12); padding: 6px;
  display: none;
}
.simple-dropdown.is-open .simple-dropdown-menu { display: block; }
.simple-dropdown-menu a {
  display: block; padding: 9px 12px; font-size: 13px; font-weight: 500;
  color: var(--text-3); border-radius: var(--radius-sm); white-space: nowrap;
}
.simple-dropdown-menu a:hover { background: var(--bg-soft); color: var(--primary); }
.simple-dropdown-menu a.is-active { color: var(--primary); font-weight: 700; background: var(--primary-soft); }


.sort-links {
  display: flex; gap: 14px; font-size: 13px;
  flex-shrink: 1; min-width: 0; overflow-x: auto; white-space: nowrap;
  -webkit-overflow-scrolling: touch;
}
.sort-links a { flex-shrink: 0; color: var(--text-4); font-weight: 500; }
.sort-links a.is-active { color: var(--primary); font-weight: 700; }

.sort-dropdown { display: none; }
@media (max-width: 960px) {
  .sort-links { display: none; }
  .sort-dropdown { display: inline-block; }
}


.version-dropdown .simple-dropdown-menu { left: 0; right: auto; min-width: 170px; }
.version-dropdown .simple-dropdown-btn { font-weight: 400; color: var(--text-4); }


.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.text-center { text-align: center; }
.text-muted { color: var(--text-4); }
.text-danger { color: var(--danger); }
.text-primary { color: var(--primary); }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.mt-0 { margin-top: 0; } .mt-8 { margin-top: 8px; } .mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; } .mt-40 { margin-top: 40px; }
.trim-last > *:last-child { border-bottom: none !important; }


.hero {
  position: relative;
  z-index: 0;
  overflow: hidden;
  min-height: 60vh;
  display: flex;
  align-items: center;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -2;
  background-size: cover;
  background-position: center;
}

.hero-overlay { position: absolute; inset: 0; z-index: -1; background: rgba(255, 255, 255, 0.9); }

.hero-fade {
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: clamp(60px, 14vw, 160px);
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0), #fff);
  z-index: 1;
}


.banner-photo { position: relative; overflow: hidden; background: #111; }

.banner-photo-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-size: cover;
  background-position: center;
}

.banner-photo-overlay { position: absolute; inset: 0; z-index: 0; background: rgba(0, 0, 0, 0.85); }


.hero-cta, .banner-cta {
  transition: filter 0.18s ease;
}
.hero-cta:hover, .banner-cta:hover {
  filter: brightness(0.92);
}


/* FAQ 아코디언 — 게시판(FAQ)과 상품 상세의 자주묻는질문 탭이 함께 쓴다 */
.faq-list { border-top: 2px solid var(--text); }
.faq-item { border-bottom: 1px solid var(--border-2); }
.faq-item summary {
  padding: 16px 12px; cursor: pointer; font-size: 14.5px; font-weight: 600;
  display: flex; align-items: center; gap: 4px; list-style: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: '+'; margin-left: auto; color: var(--text-4); font-size: 18px; }
.faq-item[open] summary::after { content: '−'; }
.faq-item summary:hover { color: var(--primary); }
.faq-title { flex: 1; min-width: 0; overflow-wrap: break-word; }
.faq-body { padding: 4px 12px 22px; font-size: 14px; line-height: 1.8; color: var(--text-2); }
.faq-body a { color: #1a56db; text-decoration: underline; }
.faq-body img { max-width: 100%; height: auto; }
.faq-admin-tools {
  display: flex; justify-content: flex-end; align-items: center; gap: 12px;
  margin-bottom: 12px; font-size: 12.5px;
}
.faq-admin-tools form { display: inline; margin: 0; }
.faq-admin-tools a, .faq-admin-tools button {
  border: none; background: none; padding: 0; margin: 0; cursor: pointer;
  font-size: 12.5px; color: var(--text-4); text-decoration: underline;
}
.faq-admin-tools a:hover, .faq-admin-tools button:hover { color: var(--primary); }
