.container.product_list{
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    padding-top:20px;
}


/*카테고리 메뉴*/
aside.categories-menu {
  width: 18%;              /* 필요 시 조정 */
  padding: 8px 0;
  margin-bottom: 16px;
  box-sizing: border-box;
}

.categories-menu .cat-all,
.categories-menu .cat-list a {
  display: inline-block;
  padding: 4px 4px;
  text-decoration: none;
  color: #222;
}

.categories-menu .cat-all {
  font-weight: 500;
  margin-bottom: 8px;
}

.categories-menu .cat-section{
    /*padding:0 10px;*/
}
.categories-menu .cat-title {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: transparent;
  border: 0;
  padding: 6px 0;
  cursor: pointer;
  font-weight: 700;
}

.categories-menu .cat-title:focus {
  outline: 2px solid #cde;
  outline-offset: 2px;
}

.categories-menu .caret {
  transition: transform 0.2s ease;
}

.categories-menu .cat-section.open .caret {
  transform: rotate(180deg);
}



.categories-menu .cat-list {
  list-style: none;
  padding-left: 0;
  margin: 10px 10px 10px 20px;
  font-size:14px;

  /* 아코디언 애니메이션 */
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.25s ease, opacity 0.25s ease;
}

.categories-menu .cat-section.open .cat-list {
  opacity: 1;
  /* max-height는 JS에서 실제 높이로 설정 */
}

.categories-menu .cat-list li + li {
  margin-top: 4px;
}

.categories-menu hr {
  border: none;
  border-top: 1px solid #ccc;
  margin: 12px 0;
}

.categories-menu a.active {
  text-decoration: underline; /* 선택 강조 */
}

.wrap_list{
  width:80%;
  box-sizing: border-box;
}

/* 카드 그리드 */
.card-grid {
  width:100%;
  box-sizing: border-box;
  display: flex;
  gap: 16px;
  flex-wrap: wrap; /* 줄바꿈 허용 */
  grid-template-columns: repeat(4, 1fr);
}

/* 카드 */
.card {
  border: 1px solid #eee;
  /*width:25%;*/
  width: calc((100% - 48px) / 4);
  border-radius: 12px;
  background: #fff;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  position:relative;
}

.card:hover {
  background-color: #f8f9fa; /* 연한 그레이 */
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05); /* 부드러운 그림자 (선택 사항) */
}

/* 카드 내용 */
.card-body {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 16px;
}

/* 썸네일 + 제품명 영역 */
.card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.product-thumb {
  width: 64px;
  height: 64px;
  object-fit: contain;
  border-radius: 8px;
  background: #f9f9f9;
}

.card-title {
  flex: 1;
  min-width: 0;
}

.category {
  font-size: 0.8rem;
  color: #888;
}
.desc{
  font-size: 0.8rem;
  height:100px;
  padding-top:10px;
}

.product-link {
  font-weight: bold;
  text-decoration: none;
  color: #222;
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.product-link:hover {
  color: #007bff;
}

/* 스펙 리스트 */
.spec-list {
  list-style: none;
  padding: 0;
  margin: 0 0 16px;
  font-size: 0.85rem;
}

.spec-list li {
  display: flex;
  justify-content: space-between;
  margin-bottom: 4px;
}

.spec-list span {
  color: #666;
}

/* 하단 버튼 영역 */
.card-footer {
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.btn {
  display: block;
  position:absolute;
  right:10px;
  bottom:10px;
  padding: 6px 12px;
  background: #f5f5f5;
  border-radius: 6px;
  font-size: 0.85rem;
  text-decoration: none;
  color: #333;
}

.btn:hover {
  background: #ddd;
}
.badge {
     position: absolute;
     top: 0;
     left: 0;
     background-color: #f3b601;
          font-size: 11px;
          font-weight: 600;
          text-transform: uppercase;
          display: inline-block;
          padding: 2px 0;
          width: 40px;
          text-align: center;
          color: var(--color-black-100);
          border-bottom-right-radius: 5px; /* 값은 취향껏 */
 }
 .badge.basic {
     background-color: #dae2e7;
 }
 .badge.uwt {background-color: #00659f; color:#fff;}
 .badge.vega {background-color: #f3b601;}
 .badge.highper {background-color: #000;color:#fff;width:60px;}




/* 버튼 스타일 */
.producer-tags{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:16px}
.tag-btn{display:inline-block;padding:6px 12px;border:1px solid #ddd;border-radius:999px;
         font-size:14px;text-decoration:none;color:#333}
.tag-btn.active, .producer-filter .tag-btn[aria-current="true"]{background:#111;color:#fff;border-color:#111}

/* :target용 앵커를 화면 밖으로 */
.producer-filter .anchor{position:fixed;top:-100vh;left:0;width:0;height:0;overflow:hidden}

/* 기본(해시 없음/all): 모두 보임 + all 버튼 강조 */
.card-grid .card{display:block}
.producer-filter:not(:has(:target)) ~ .card-grid .card{display:block}
.producer-filter:has(#all:target) ~ .card-grid .card{display:block}
.producer-filter:not(:has(:target)) .tag-btn[href="#all"],
.producer-filter:has(#all:target) .tag-btn[href="#all"]{background:#21293c;color:#fff;border-color:#21293c}

/* vega 필터 */
.producer-filter:has(#prod-vega:target) ~ .card-grid .card:not([data-producer="vega"]){display:none}
.producer-filter:has(#prod-vega:target) .tag-btn[href="#prod-vega"]{background:#f3b601;color:#000;border-color:#f3b601}

/* uwt 필터 */
.producer-filter:has(#prod-uwt:target) ~ .card-grid .card:not([data-producer="uwt"]){display:none}
.producer-filter:has(#prod-uwt:target) .tag-btn[href="#prod-uwt"]{background:#00659f;color:#fff;border-color:#00659f}

/* highper 필터 (공백→대시로 슬러그 맞춤) */
.producer-filter:has(#prod-highper:target) ~ .card-grid .card:not([data-producer="highper"]){display:none}
.producer-filter:has(#prod-highper:target) .tag-btn[href="#prod-highper"]{background:#000;color:#fff;border-color:#000}


/* --------------------------------------------------- */
/*  카테고리 메뉴 - 모바일 반응형                       */
/*  768px 이하에서 aside를 상단으로, 풀폭으로 변경       */
/* --------------------------------------------------- */
@media (max-width: 768px) {

  /* 전체 구조: 좌/우 → 상/하 */
  .container.product_list {
    flex-direction: column;
  }

  /* 카테고리 메뉴 full width 상단 */
  aside.categories-menu {
    width: 100%;
    padding: 12px 10px;
    border: 1px solid #eee;
    border-radius: 8px;
    background: #fff;
    margin-bottom: 20px;
  }

  /* All 메뉴 */
  .categories-menu .cat-all {
    font-size: 16px;
    padding: 0;
  }

  /* 루트 카테고리 제목 */
  .categories-menu .cat-title {
    font-size: 15px;
     padding: 0;   /* 기존 10px → 6px */
     margin: 0;    /* 간격 축소를 위해 추가 */
  }

  .categories-menu .caret {
    font-size: 14px;
  }

  /* 서브 카테고리 목록 */
  .categories-menu .cat-list {
    margin: 8px 0 12px 16px;
    font-size: 14px;
  }

  /* 메뉴 구분선 여백 축소 */
  .categories-menu hr {
    margin: 10px 0;
  }

  /* 오른쪽 영역(제품 목록)도 full width */
  .wrap_list {
    width: 100%;
  }

  /* 카드 2개씩 */
  .card {
    width: calc((100% - 16px) / 2);
  }
}

/* ------------------------------ */
/*  작은 모바일(480px 이하)       */
/* ------------------------------ */
@media (max-width: 480px) {
  /* 카테고리 메뉴 */
  aside.categories-menu {
    padding: 10px 8px;
  }

  .categories-menu .cat-title {
    font-size: 14px;
  }

  /* 카드 1열 */
  .card {
    width: 100%;
  }
}


/* ------------------------------ */
/*  1280px ~ 1024px : 3열         */
/* ------------------------------ */
@media (max-width: 1280px) {
  .card-grid {
    gap: 14px;
  }

  .card {
    width: calc((100% - 28px) / 3); /* 3열 */
  }
}

/* ------------------------------ */
/*  1024px ~ 768px : 2열          */
/* ------------------------------ */
@media (max-width: 1024px) {

  .wrap_list {
    width: 100%;
  }

  .card-grid {
    gap: 14px;
  }

  .card {
    width: calc((100% - 14px) / 2); /* 2열 */
  }
}

/* ------------------------------ */
/*  768px 이하 (모바일) : 2열     */
/* ------------------------------ */
@media (max-width: 768px) {

  .card-grid {
    gap: 12px;
  }

  .card {
    width: calc((100% - 12px) / 2);
  }

  .product-thumb {
    width: 56px;
    height: 56px;
  }

  .card-body {
    padding: 14px;
  }

  .desc {
    height: 80px;
  }
}

/* ------------------------------ */
/*  480px 이하 (작은 모바일) : 1열 */
/* ------------------------------ */
@media (max-width: 480px) {
  .card-grid {
    gap: 12px;
  }

  .card {
    width: 100%; /* 한 줄에 하나 */
  }

  .product-thumb {
    width: 50px;
    height: 50px;
  }

  .desc {
    height: auto; /* 작은 화면에서는 설명도 자동 높이 */
  }
}

