/* =====================================================================
   FDM × 그누보드/영카트 브릿지 스타일
   (familier 디자인을 영카트 스킨 마크업에 맞춰주는 보강 레이어)
   ===================================================================== */
body.fdm-page { background: #fff; color: var(--color-text); }

/* ---- 헤더: 브랜드행 = 로고(좌) ↔ 검색(우), Figma 697:22070 (카트 아이콘 없음) ---- */
.brand-row__inner { justify-content: space-between; }

/* ---- 공통 컨텐츠 래퍼 ---- */
.fdm-shop { padding: 32px 0 80px; }
.fdm-shop .container { display: block; }
.fdm-page #wrapper > #container {
  width: min(var(--content-width), calc(100% - 48px));
  margin-inline: auto;
  padding: 24px 0 72px;
}
.fdm-page-head { margin-bottom: 28px; }
.fdm-page-head h2 { font-size: var(--fs-title-md); font-weight: var(--fw-bold); color: var(--neutral-10); letter-spacing: var(--tracking); }
.fdm-breadcrumb { font-size: 13px; color: var(--neutral-50); margin-bottom: 18px; }
.fdm-breadcrumb a { color: var(--neutral-50); }
.fdm-breadcrumb a:hover { color: var(--orange-65); }
.fdm-breadcrumb span + span::before { content: " › "; color: var(--neutral-70); }

/* ---- 영카트 상품 리스트를 우리 product-grid 로 ---- */
.fdm-prd-grid { display: grid; gap: 24px; grid-template-columns: repeat(4, 1fr); }

/* ---- 영카트 유형별 상품(listtype.php) 레거시 5열 스킨 보정 ---- */
.fdm-page .sct.sct_10.lists-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
}
.fdm-page .sct_10.lists-row::after { display: none; }
.fdm-page .sct_10.lists-row .sct_li {
  float: none !important;
  width: auto !important;
  min-width: 0;
  margin: 0 !important;
  padding: 0 !important;
  text-align: left;
}
.fdm-page .sct_10.lists-row .sct_img {
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: var(--radius-sm);
  background: var(--neutral-95);
}
.fdm-page .sct_10.lists-row .sct_img a,
.fdm-page .sct_10.lists-row .sct_img img {
  display: block;
  width: 100%;
  height: 100%;
}
.fdm-page .sct_10.lists-row .sct_img img { object-fit: cover; }
.fdm-page .sct_10.lists-row .sct_btn {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 10px;
  display: block;
}
.fdm-page .sct_10.lists-row .sct_cart {
  position: static;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: var(--radius-xs);
  background: rgba(34, 34, 34, .82);
  color: #fff;
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
}
.fdm-page .sct_10.lists-row .sct_ct_wrap { min-width: 0; margin-top: 12px; }
.fdm-page .sct_10.lists-row .sct_txt {
  margin: 0;
  padding: 0;
  border: 0;
  font-size: var(--fs-base);
  font-weight: var(--fw-medium);
  line-height: var(--lh-body);
}
.fdm-page .sct_10.lists-row .sct_txt a {
  display: -webkit-box;
  overflow: hidden;
  color: var(--neutral-10);
  text-decoration: none;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.fdm-page .sct_10.lists-row .sct_basic {
  margin-top: 7px;
  color: var(--neutral-50);
  font-size: var(--fs-sm);
  line-height: 1.45;
}
.fdm-page .sct_10.lists-row .sct_bottom {
  position: static;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
  min-height: 0;
  margin-top: 9px;
}
.fdm-page .sct_10.lists-row .sct_cost {
  min-width: 0;
  margin: 0;
  color: var(--neutral-10);
  font-size: var(--fs-xl);
  font-weight: var(--fw-semibold);
  line-height: var(--lh-heading);
}
.fdm-page .sct_10.lists-row .sct_op_btn {
  position: static;
  display: flex;
  flex: 0 0 auto;
  gap: 4px;
}
.fdm-page .sct_10.lists-row .sct_op_btn > button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--neutral-90);
  border-radius: 999px;
  background: #fff;
  color: var(--neutral-50);
  font-size: 15px;
  transition: border-color .15s, color .15s, box-shadow .15s;
}
.fdm-page .sct_10.lists-row .sct_op_btn > button:hover {
  border-color: var(--orange-80);
  color: var(--orange-60);
  box-shadow: 0 6px 14px rgba(23,23,23,.08);
}

/* ---- 게시판/기본 스킨 버튼 최소 클릭 영역 보정 ---- */
.fdm-page .btn_bo_sch,
.fdm-page .btn_b01.btn,
.fdm-page .bo_vc_act button,
.fdm-page .bo_vc_act a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  min-height: 36px;
  border-radius: var(--radius-sm);
}
.fdm-page .sct_10.lists-row .sit_icon_li {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 8px;
}

/* ---- 리스트: 카테고리 필터 + 정렬 ---- */
.fdm-cat-filter { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 16px; margin-bottom: 24px; border-bottom: 1px solid var(--neutral-90); -webkit-overflow-scrolling: touch; }
.fdm-cat-filter::-webkit-scrollbar { display: none; }
.fdm-chip { flex: 0 0 auto; padding: 9px 18px; border-radius: var(--radius-pill); background: var(--neutral-100); color: var(--neutral-30); font-size: 15px; font-weight: 500; white-space: nowrap; transition: background .15s, color .15s; }
.fdm-chip:hover { background: var(--neutral-90); }
.fdm-chip.is-on { background: rgba(234,97,27,.14); color: var(--orange-60); font-weight: 700; }
.fdm-list-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.fdm-list-title { font-size: var(--fs-title-sm); font-weight: var(--fw-bold); color: var(--neutral-10); letter-spacing: var(--tracking); }
.fdm-list-count { color: var(--orange-65); font-size: var(--fs-md); margin-left: 4px; }
.fdm-sort { height: 42px; padding: 0 40px 0 16px; border: 1px solid var(--neutral-80); border-radius: var(--radius-sm); font-size: 14px; color: var(--neutral-30); appearance: none; cursor: pointer; flex: 0 0 auto;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 20 20' fill='none'%3E%3Cpath d='M5 8l5 5 5-5' stroke='%239b9b9b' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 12px center; }

/* ---- 페이지네이션 ---- */
.fdm-paging { display: flex; justify-content: center; gap: 6px; margin-top: 48px; }
.fdm-paging a, .fdm-paging strong { display: flex; align-items: center; justify-content: center; min-width: 40px; height: 40px; padding: 0 8px; border: 1px solid var(--neutral-90); border-radius: var(--radius-sm); font-size: 14px; color: var(--neutral-40); text-decoration: none; }
.fdm-paging strong { background: var(--orange-65); border-color: var(--orange-65); color: #fff; font-weight: 700; }
.fdm-paging a:hover { border-color: var(--orange-65); color: var(--orange-65); }

/* ---- 빈 상태 ---- */
.fdm-empty { text-align: center; padding: 80px 0; color: var(--neutral-50); font-size: 15px; }

/* ---- 상세: 찜 버튼 + 상세설명 ---- */
.pd-actions .pd-wish { flex: 0 0 56px; height: 56px; border: 1px solid var(--neutral-80); border-radius: var(--radius-sm); background: #fff; display: flex; align-items: center; justify-content: center; color: var(--neutral-50); }
.pd-actions .pd-wish:hover { border-color: var(--orange-65); color: var(--orange-65); }
.pd-actions .pd-wish .material-symbols-outlined { font-size: 26px; }
.pd-explan { max-width: 860px; margin: 0 auto; padding: 12px 0; color: var(--neutral-20); line-height: 1.7; font-size: 15px; }
.pd-explan img { max-width: 100%; height: auto; }
.pd-explan p { margin-bottom: 14px; }

/* =====================================================================
   장바구니 (cart.php) — FDM 톤
   ===================================================================== */
.fdm-cart-layout { display: grid; grid-template-columns: 1fr 340px; gap: 32px; align-items: start; }
.fdm-cart-list { min-width: 0; }
.fdm-cart-listhead { padding: 0 4px 14px; border-bottom: 2px solid var(--neutral-10); margin-bottom: 4px; }
.fdm-cart-listhead__title { font-size: 16px; font-weight: 700; color: var(--neutral-10); }
.fdm-cart-listhead__title em { color: var(--orange-65); font-style: normal; }

.fdm-cart-item { display: grid; grid-template-columns: 96px 1fr auto 36px; gap: 18px; align-items: center; padding: 20px 4px; border-bottom: 1px solid var(--neutral-90); }
.fdm-cart-thumb { display: block; width: 96px; height: 96px; border-radius: var(--radius-md); overflow: hidden; background: var(--neutral-95); }
.fdm-cart-thumb img { width: 100%; height: 100%; object-fit: cover; }
.fdm-cart-thumb__ph { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; color: var(--neutral-70); }
.fdm-cart-thumb__ph svg { width: 34px; height: 34px; }
.fdm-cart-info { min-width: 0; }
.fdm-cart-name { display: block; font-size: 15px; font-weight: 600; color: var(--neutral-10); line-height: 1.4; margin-bottom: 4px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.fdm-cart-name:hover { color: var(--orange-65); }
.fdm-cart-opt { font-size: 13px; color: var(--neutral-50); margin-bottom: 6px; }
.fdm-cart-meta { font-size: 13px; color: var(--neutral-50); display: flex; align-items: center; gap: 6px; }
.fdm-cart-meta__dot { color: var(--neutral-75); }
.fdm-cart-sub { text-align: right; white-space: nowrap; }
.fdm-cart-sub strong { font-size: 17px; font-weight: 700; color: var(--neutral-10); }
.fdm-cart-del { width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: var(--neutral-60); transition: background .15s, color .15s; }
.fdm-cart-del:hover { background: rgba(234,97,27,.1); color: var(--orange-65); }
.fdm-cart-del svg { width: 19px; height: 19px; }

/* 주문 요약 카드 */
.fdm-cart-aside { position: sticky; top: 92px; }
.fdm-summary { border: 1px solid var(--neutral-90); border-radius: var(--radius-lg); padding: 24px; background: #fff; }
.fdm-summary__title { font-size: var(--fs-base); font-weight: var(--fw-bold); color: var(--neutral-10); margin-bottom: 18px; }
.fdm-summary__list { display: flex; flex-direction: column; gap: 11px; margin-bottom: 18px; }
.fdm-summary__list > div { display: flex; justify-content: space-between; align-items: center; }
.fdm-summary__list dt { font-size: 14px; color: var(--neutral-50); }
.fdm-summary__list dd { font-size: 14px; font-weight: 600; color: var(--neutral-20); }
.fdm-summary__total { display: flex; justify-content: space-between; align-items: baseline; padding-top: 18px; border-top: 1px solid var(--neutral-90); margin-bottom: 20px; }
.fdm-summary__total span { font-size: 16px; font-weight: 700; color: var(--neutral-10); }
.fdm-summary__total strong { font-size: var(--fs-title-sm); font-weight: var(--fw-extrabold); color: var(--orange-65); letter-spacing: var(--tracking); }
.fdm-btn-order { display: flex; align-items: center; justify-content: center; width: 100%; height: 54px; border: 0; border-radius: var(--radius-md); background: var(--orange-65); color: #fff; font-size: 16px; font-weight: 700; cursor: pointer; transition: background .15s; }
.fdm-btn-order:hover { background: var(--orange-60); }
.fdm-btn-continue { display: flex; align-items: center; justify-content: center; width: 100%; height: 46px; margin-top: 10px; color: var(--neutral-50); font-size: 14px; }
.fdm-btn-continue:hover { color: var(--orange-65); }

/* 빈 장바구니 */
.fdm-cart-empty { text-align: center; padding: 80px 20px; }
.fdm-cart-empty__ic { display: inline-flex; align-items: center; justify-content: center; width: 80px; height: 80px; border-radius: 50%; background: var(--neutral-95); color: var(--neutral-60); margin-bottom: 20px; }
.fdm-cart-empty__ic svg { width: 40px; height: 40px; }
.fdm-cart-empty__title { font-size: 20px; font-weight: 700; color: var(--neutral-10); margin-bottom: 8px; }
.fdm-cart-empty__desc { font-size: 15px; color: var(--neutral-50); margin-bottom: 26px; }
.fdm-cart-empty__btn { display: inline-flex; width: auto; padding: 0 36px; }

@media (max-width: 1024px) {
  .fdm-cart-layout { grid-template-columns: 1fr; }
  .fdm-cart-aside { position: static; }
}
@media (max-width: 768px) {
  .fdm-cart-item { grid-template-columns: 76px 1fr 30px; grid-template-areas: "thumb info del" "thumb sub  sub"; gap: 6px 14px; padding: 16px 2px; }
  .fdm-cart-thumb { grid-area: thumb; width: 76px; height: 76px; }
  .fdm-cart-info { grid-area: info; }
  .fdm-cart-del { grid-area: del; width: 30px; height: 30px; }
  .fdm-cart-del svg { width: 17px; height: 17px; }
  .fdm-cart-sub { grid-area: sub; text-align: left; padding-left: 90px; margin-top: -6px; }
  .fdm-cart-sub strong { font-size: 16px; color: var(--orange-65); }
  .fdm-cart-name { font-size: 14px; }
  .fdm-summary { padding: 20px; }
  .fdm-summary__total strong { font-size: 22px; }
}

/* ---- 모바일 하단 네비 (FDM 톤) ---- */
.fdm-bottom-nav, .fdm-bottom-nav-spacer { display: none; }
@media (max-width: 768px) {
  .fdm-bottom-nav {
    display: grid; grid-template-columns: repeat(5, 1fr); align-items: center; justify-items: center;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
    background: #fff; border-top: 1px solid var(--neutral-90);
    padding: 6px 4px max(8px, env(safe-area-inset-bottom)); box-shadow: 0 -4px 16px rgba(0,0,0,.05);
  }
  .fdm-bottom-nav a { display: flex; flex-direction: column; align-items: center; gap: 2px; color: var(--neutral-50); font-size: 11px; font-weight: 600; position: relative; text-decoration: none; }
  .fdm-bottom-nav a.is-on { color: var(--orange-65); }
  .fdm-bottom-nav .material-symbols-outlined { font-size: 22px; }
  .fdm-bn-center { margin-top: -22px; width: 48px; height: 48px; background: var(--orange-65); color: #fff !important; border-radius: 50%; justify-content: center; border: 4px solid #fff; box-shadow: 0 4px 12px rgba(255,95,32,.35); }
  .fdm-bn-center .material-symbols-outlined { font-size: 24px; }
  .fdm-bn-badge { position: absolute; top: -2px; right: 12px; min-width: 16px; height: 16px; padding: 0 4px; background: var(--orange-65); color: #fff; font-size: 9px; font-weight: 700; border-radius: var(--radius-pill); display: flex; align-items: center; justify-content: center; line-height: 1; }
  .fdm-bottom-nav-spacer { display: block; height: calc(88px + env(safe-area-inset-bottom)); }
}

@media (max-width: 1024px) {
  .fdm-prd-grid { grid-template-columns: repeat(3, 1fr); }
  .fdm-page .sct.sct_10.lists-row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 768px) {
  .fdm-page #wrapper > #container { width: 100%; padding: 20px 24px 72px; }
  .fdm-prd-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .fdm-page .sct.sct_10.lists-row { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 20px; }
  .fdm-page .sct_10.lists-row .sct_ct_wrap { margin-top: 10px; }
  .fdm-page .sct_10.lists-row .sct_txt { font-size: 14px; }
  .fdm-page .sct_10.lists-row .sct_basic { font-size: 13px; }
  .fdm-page .sct_10.lists-row .sct_cost { font-size: 17px; }
  .fdm-page .sct_10.lists-row .sct_cart { height: 36px; font-size: 12px; }
  .fdm-page .sct_10.lists-row .sct_op_btn > button { width: 36px; height: 36px; font-size: 15px; }
  .fdm-page-head h2 { font-size: 22px; }
  .fdm-list-title { font-size: 20px; }
  .fdm-list-count { font-size: 15px; }
  .fdm-chip { font-size: 14px; padding: 8px 14px; }
  .fdm-list-head { gap: 10px; }
  .fdm-sort { height: 38px; font-size: 13px; }
}

/* Order form polish: FDM reset is loaded after Tailwind, so restore controls in this scope. */
#forderform input[type="text"],
#forderform input[type="password"],
#forderform input[type="email"],
#forderform input[type="tel"],
#forderform input[type="number"],
#forderform select,
#forderform textarea {
  min-height: 44px;
  border: 1px solid var(--neutral-80);
  border-radius: 14px;
  background: #fff;
  color: var(--neutral-20);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.9);
}
#forderform input[type="text"],
#forderform input[type="password"],
#forderform input[type="email"],
#forderform input[type="tel"],
#forderform input[type="number"],
#forderform select {
  padding: 0 14px;
}
#forderform textarea { padding: 12px 14px; }
#forderform input[readonly],
#forderform input:disabled,
#forderform select:disabled,
#forderform textarea:disabled {
  background: var(--neutral-100);
  color: var(--neutral-45);
}
#forderform input:focus,
#forderform select:focus,
#forderform textarea:focus {
  border-color: var(--orange-65);
  box-shadow: 0 0 0 3px rgba(255, 95, 32, .12);
}
#forderform label { line-height: 1.45; }
#forderform button[type="button"],
#forderform button[type="submit"] { font: inherit; }
