/* ============================================================
   themes/dodon/style/product-list.css
   ////상품 상세 (product/detail.php) 전용 <- 수정피룡
   로드: ////product_controller::detail() 의 $additionalCss <- 수정피룡
   ============================================================ */
   
 *{ box-sizing:border-box; }

html,body{ margin:0; padding:0; }

body{
  font-family:"Noto Sans KR", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  color:var(--ink);
  background:
    radial-gradient(320px 180px at 0% 0%, var(--hero-tint-2), rgba(255,255,255,0) 70%),
    linear-gradient(180deg, var(--background), var(--background));
  line-height:1.55;
  letter-spacing:-0.1px;
}

body.page-custom-payment{
  --custom-accent:#4E7B97;
  --custom-soft:#EAF2F7;
  --custom-glow:rgba(78,123,151,.12);
}

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

img{ display:block; max-width:100%; height:auto; }

button,input,select{ font:inherit; }

.nav-link{
  padding:8px 10px;
  border-radius:8px;
  font-weight:700;
  font-size:14px;
}

.nav-link.is-active{
  background:color-mix(in srgb, var(--accent) 12%, white);
  color:var(--accent2);
}

.catalog-page{ background:var(--background); }

body.page-custom-payment .catalog-page{
  background:
    radial-gradient(620px 280px at 0% 0%, var(--custom-glow), rgba(255,255,255,0) 60%),
    linear-gradient(180deg, var(--background), var(--background));
}

.catalog-section{ padding:18px 0 54px; }

.catalog-intro{
  display:grid;
  gap:14px;
  margin-bottom:18px;
}

.catalog-intro-box{
  display:grid;
  grid-template-columns:1.2fr .8fr;
  gap:18px;
  padding:26px;
  border:1px solid var(--line);
  background:#fff;
}

.catalog-intro-box--visual{
  grid-template-columns:1fr .78fr .52fr;
  align-items:stretch;
  background:linear-gradient(180deg, color-mix(in srgb, var(--custom-soft, #EAF2F7) 28%, white), #fff 48%);
}

.catalog-intro-kicker{
  font-size:12px;
  font-weight:900;
  letter-spacing:.08em;
  color:#64748B;
  text-transform:uppercase;
}

body.page-custom-payment .catalog-intro-kicker{
  display:inline-flex;
  align-items:center;
  padding:7px 12px;
  background:color-mix(in srgb, var(--custom-soft, #EAF2F7) 82%, white);
  color:var(--custom-accent);
}

.catalog-intro-copy h1{
  margin:10px 0 12px;
  font-size:34px;
  line-height:1.18;
  letter-spacing:-0.8px;
}

body.page-custom-payment .catalog-intro-copy h1{
  color:var(--custom-accent);
}

.catalog-intro-copy p{
  margin:0;
  color:#475569;
  font-weight:600;
  max-width:720px;
}

.catalog-intro-visual{
  overflow:hidden;
  border:1px solid var(--line);
  background:#fff;
  display:grid;
  grid-template-rows:minmax(250px, 1fr) auto;
}

.catalog-intro-visual img{
  width:100%;
  height:100%;
  object-fit:cover;
}

.catalog-intro-visual figcaption{
  margin:0;
  padding:18px 20px 20px;
  background:linear-gradient(180deg, color-mix(in srgb, var(--custom-soft, #EAF2F7) 62%, white), #fff);
  color:#475569;
  font-weight:600;
}

.catalog-intro-side{
  display:grid;
  grid-template-columns:1fr;
  gap:12px;
}

.intro-metric{
  border:1px solid var(--line);
  background:#F8FAFC;
  padding:18px;
}

body.page-custom-payment .intro-metric{
  border-top:3px solid var(--custom-accent);
  background:linear-gradient(180deg, color-mix(in srgb, var(--custom-soft, #EAF2F7) 42%, white), #fff);
}

.intro-metric strong{
  display:block;
  font-size:28px;
  line-height:1;
  margin-bottom:8px;
}

.intro-metric span{
  color:#64748B;
  font-weight:700;
}

.catalog-note-grid{
  display:grid;
  grid-template-columns:repeat(3, minmax(0, 1fr));
  gap:14px;
}

.note-card{
  border:1px solid var(--line);
  background:#fff;
  padding:18px;
}

body.page-custom-payment .note-card{
  border-top:3px solid var(--custom-accent);
  background:linear-gradient(180deg, color-mix(in srgb, var(--custom-soft, #EAF2F7) 28%, white), #fff);
  box-shadow:0 12px 24px rgba(36,50,71,.04);
}

.note-card strong{
  display:block;
  margin-bottom:8px;
}

body.page-custom-payment .note-card strong{
  color:var(--custom-accent);
}

.note-card p{
  margin:0;
  color:#475569;
  font-weight:600;
  font-size:14px;
}

. {
  padding:14px;
  border:1px solid var(--line);
  background:
    radial-gradient(180px 120px at 100% 0%, var(--hero-tint), rgba(255,255,255,0) 72%),
    linear-gradient(180deg, rgba(255,255,255,.94), rgba(255,255,255,.92));
  margin-bottom:10px;
  position:sticky;
  top:114px;
  z-index:20;
  box-shadow:0 12px 28px rgba(36,50,71,.06);
}

.catalog-filters::before{
  content:"";
  display:block;
  height:3px;
  margin:-14px -14px 12px;
  background:linear-gradient(90deg, var(--accent), color-mix(in srgb, var(--accent) 50%, var(--accent3)));
}

.filter-row{
  display:flex;
  align-items:center;
  gap:14px;
  min-width:0;
}

.filter-label{
  margin-top:0;
  margin-bottom:0;
  font-weight:900;
  font-size:14px;
  color:var(--accent3);
  min-width:58px;
  flex-shrink:0;
}

.category-list,
.type-filters{
  display:flex;
  flex-wrap:wrap;
  gap:6px;
}

.category-chip,
.type-filter{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border:1px solid color-mix(in srgb, var(--line) 82%, var(--accent));
  background:rgba(255,255,255,.88);
  color:var(--ink);
  border-radius:0;
  padding:9px 13px;
  cursor:pointer;
  font-weight:900;
  font-size:12px;
  transition:background .16s ease, color .16s ease, border-color .16s ease, transform .16s ease, box-shadow .16s ease;
}

.category-chip:hover,
.type-filter:hover{
  transform:translateY(-1px);
  border-color:color-mix(in srgb, var(--accent) 48%, var(--line));
  background:color-mix(in srgb, var(--accent-soft) 58%, white);
  box-shadow:0 6px 14px rgba(36,50,71,.06);
}

.category-chip.is-active,
.type-filter.is-active{
  background:var(--accent);
  border-color:var(--accent);
  color:#fff;
  box-shadow:0 10px 20px rgba(47,143,123,.18);
}

.catalog-main{
  min-width:0;
  padding:14px;
  border:1px solid rgba(226,232,240,.90);
  border-radius:0;
  background:#fff;
}

.catalog-main.catalog-main--wide{
  padding:0;
  border:0;
  background:transparent;
}

.catalog-toolbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  margin-bottom:12px;
}

.toolbar-search{ flex:1; }

.toolbar-search input,
.toolbar-selects select{
  width:100%;
  height:42px;
  border:1px solid var(--line);
  border-radius:0;
  background:#fff;
  padding:0 12px;
  outline:none;
}

.toolbar-search input:focus,
.toolbar-selects select:focus{
  border-color:var(--accent);
  box-shadow:0 0 0 4px rgba(47,143,123,.10);
}

.toolbar-selects{ width:180px; }

.catalog-meta{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:12px;
  margin-bottom:12px;
}

body.page-custom-payment .result-title strong{
  color:var(--custom-accent);
}

.result-title{
  font-size:14px;
  color:#334155;
  font-weight:800;
}

.result-title strong{
  font-size:22px;
  color:var(--ink);
}

.catalog-meta p{
  margin:0;
  color:var(--muted);
  font-weight:700;
  font-size:13px;
}

.product-grid{
  display:grid;
  grid-template-columns:repeat(4, minmax(0, 1fr));
  gap:28px 22px;
}

.product-card{
  display:flex;
  flex-direction:column;
  min-width:0;
  padding:0;
  border:0;
  background:transparent;
  transition:transform .18s ease;
}

.product-card:hover{
  transform:translateY(-4px);
}

.product-visual{
  position:relative;
  display:flex;
  align-items:center;
  justify-content:center;
  min-height:214px;
  padding:28px 20px 18px;
  border-radius:8px;
  background:
    radial-gradient(150px 100px at 84% 14%, rgba(47,143,123,.16), rgba(255,255,255,0) 70%),
    linear-gradient(180deg, color-mix(in srgb, var(--accent-soft) 74%, white), #F9FBFA 72%);
  border:0;
  box-shadow: inset 0 0 0 1px rgba(47,143,123,.08);
  transition:box-shadow .18s ease, transform .18s ease;
}

body.page-custom-payment .product-visual{
  background:
    radial-gradient(150px 100px at 84% 14%, rgba(78,123,151,.16), rgba(255,255,255,0) 70%),
    linear-gradient(180deg, color-mix(in srgb, var(--custom-soft, #EAF2F7) 72%, white), #FBFCFD 72%);
  box-shadow: inset 0 0 0 1px rgba(78,123,151,.10);
}

.product-card:hover .product-visual{
  box-shadow:
    inset 0 0 0 1px rgba(47,143,123,.14),
    0 18px 28px rgba(36,50,71,.08);
}

body.page-custom-payment .product-card:hover .product-visual{
  box-shadow:
    inset 0 0 0 1px rgba(78,123,151,.18),
    0 18px 28px rgba(36,50,71,.08);
}

.product-visual img{
  width:100%;
  max-width:196px;
  height:178px;
  object-fit:contain;
}

.product-badges{
  position:absolute;
  left:14px;
  top:14px;
  display:flex;
  flex-wrap:wrap;
  gap:6px;
}

.product-body{
  display:flex;
  flex-direction:column;
  gap:8px;
  margin-top:16px;
  min-width:0;
  padding:0 4px;
}

.product-category{
  font-size:12px;
  font-weight:900;
  color:var(--accent2);
  letter-spacing:.04em;
}

body.page-custom-payment .product-category{ color:var(--custom-accent); }

.product-name{
  font-size:17px;
  line-height:1.35;
  font-weight:900;
  letter-spacing:-0.3px;
  display:-webkit-box;
  -webkit-box-orient:vertical;
  -webkit-line-clamp:2;
  overflow:hidden;
}

.product-meta{
  font-size:13px;
  line-height:1.6;
  color:#475569;
  font-weight:700;
  display:-webkit-box;
  -webkit-box-orient:vertical;
  -webkit-line-clamp:2;
  overflow:hidden;
}

.product-footer{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-top:auto;
  padding-top:8px;
}

.product-footer--browse{
  justify-content:flex-start;
}

.product-price{
  font-size:21px;
  font-weight:900;
  color:var(--price);
}

.product-price.quote{ color:var(--quote); }

.product-link{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:auto;
  padding:9px 12px;
  border-radius:999px;
  border:1px solid color-mix(in srgb, var(--accent) 28%, rgba(36,50,71,.16));
  background:rgba(255,255,255,.78);
  color:var(--ink);
  font-size:13px;
  font-weight:900;
  transition:background .18s ease, border-color .18s ease, color .18s ease;
}

.product-link:hover{
  background:#fff;
  border-color:color-mix(in srgb, var(--accent) 44%, rgba(36,50,71,.16));
  color:var(--accent2);
}

body.page-custom-payment .product-link{
  border-color:color-mix(in srgb, var(--custom-accent) 26%, rgba(36,50,71,.16));
}

body.page-custom-payment .product-link:hover{
  border-color:color-mix(in srgb, var(--custom-accent) 44%, rgba(36,50,71,.16));
  color:var(--custom-accent);
}

.product-card:hover .product-name{
  text-decoration:underline;
}

.product-card--browse .product-price{
  font-size:20px;
}

.empty-state{
  padding:56px 20px;
  border:1px dashed color-mix(in srgb, var(--line) 72%, var(--accent));
  border-radius:0;
  text-align:center;
  background:rgba(255,255,255,.72);
}

.empty-state h3{
  margin:0 0 8px;
  font-size:24px;
}

.empty-state p{
  margin:0;
  color:var(--muted);
  font-weight:700;
}

.kakao-id{ color:color-mix(in srgb, var(--accent-soft) 76%, white); }

@media (max-width: 1120px){
  .product-grid{ grid-template-columns:repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 980px){
  .catalog-intro-box,
    .catalog-intro-box--visual,
    .catalog-note-grid{
      grid-template-columns:1fr;
    }
  .catalog-main{ padding:12px; }
  .catalog-toolbar,
    .catalog-meta{
      flex-direction:column;
      align-items:stretch;
    }
  .product-grid{ grid-template-columns:repeat(2, minmax(0, 1fr)); }
  .toolbar-selects{ width:100%; }
  .catalog-filters{ top:98px; }
}

@media (max-width: 640px){
  .catalog-section{ padding-top:8px; }
  .catalog-filters{
      top:84px;
      padding:10px;
    }
  .catalog-filters::before{
      margin:-10px -10px 12px;
    }
  .filter-row{
      flex-direction:column;
      gap:6px;
    }
  .filter-label{
      min-width:0;
      margin-top:0;
    }
  .product-grid{ grid-template-columns:1fr; }
}

/* ------------------------------------------------------------
   빵가루 select
   목업엔 없던 요소. 빵가루 글자와 같은 크기·색으로 맞춰서
   select 라는 느낌을 죽이고 링크처럼 보이게 한다.
   ------------------------------------------------------------ */
.crumb-select{
  padding:3px 22px 3px 8px;
  border:1px solid var(--line);
  border-radius:var(--r-soft);
  background:#fff;
  color:var(--ink);
  font-size:13px;
  font-weight:700;
  cursor:pointer;

  /* 기본 화살표 제거 후 직접 그림 */
  appearance:none;
  background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2361707A' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat:no-repeat;
  background-position:right 6px center;
  background-size:12px;
}
.crumb-select:hover{ border-color:var(--accent); }
.crumb-select:focus{ outline:2px solid var(--accent); outline-offset:1px; }

/* ------------------------------------------------------------
   목록 머리 (분류명 + 총 개수)
   .catalog-meta 는 목업의 다른 화면에서도 쓰므로 직접 고치지 않고
   list-head 를 얹어서 이 화면에서만 밑줄이 생기게 한다.
   ------------------------------------------------------------ */
.catalog-meta.list-head{
  align-items:baseline;              /* 제목과 개수의 글자 밑선을 맞춤 */
  padding-bottom:12px;
  margin-bottom:20px;
  border-bottom:1px solid gray;
}
.catalog-meta.list-head h2{
  margin:0;
  font-size:24px;
  font-weight:900;
}
.catalog-meta.list-head .muted{
  margin:0;
  font-size:13px;
  font-weight:700;
}

/* 배지 버튼 옆 상품수 */
.sub-nav-cnt{ margin-left:3px; font-size:11px; opacity:.6; }