@charset "utf-8";

/* ==========================================================================
   대구메이트 상품리스트
     Package Tours (Figma 0200 / node 7288:16304)
     Tickets       (Figma 0300 / node 7288:17109)

   - main.css → sub.css → 이 파일 순서로 로드된다.
     상단/하단/퀵메뉴는 main.css, 서브 히어로는 sub.css, 상품 카드(.dm-goods-*)는
     main.css 정의를 그대로 쓰고, 여기서는 리스트 화면에만 있는 것
     (소개 문구·검색·분류 탭·HOT 배지·평점·페이징)만 더한다.
   - 모바일 전용 페이지 없이 반응형으로 대응한다. (theme.config.php : G5_THEME_DEVICE='pc')
   - main.css 와 마찬가지로 body 기본 font-size 가 0.75em 이므로 모두 px 로 작성한다.

   두 시안의 차이는 #dm_list 의 .dm-list-tours / .dm-list-tickets 로 가른다.

   브레이크포인트 (main.css / sub.css 와 동일)
     ~1279px  태블릿 가로  : 블록 간 간격 1단계 축소
     ~1023px  태블릿       : 분류 탭 3열, 소개 문구 축소
     ~767px   모바일       : 상품 2열(main.css), 검색창 축소
     ~479px   소형 모바일  : 분류 탭 2열
   ========================================================================== */

:root {
    --dm-base3: #666666;            /* Colors/Grey Color/Light/Base3 (평점) */
    --dm-red: #f1294f;              /* Colors/Used Color/Light/Red (HOT 배지) */
    --dm-list-search-bg: #f3f8ff;   /* 검색창 배경 */
    --dm-list-gap: 120px;           /* 히어로 → 소개/검색, 목록 → 페이징 */
    --dm-list-gap-lg: 160px;        /* 소개 문구 → 목록 */
    --dm-list-gap-sm: 100px;        /* 분류 탭 → 목록 */
}

/* 시안 리스트 본문의 기본 글꼴은 Montserrat 이다.
   상품명/가격은 .dm-goods-* 규칙(main.css)이 Pretendard 로 따로 지정한다. */
#dm_list {
    width: 100%;
    max-width: calc(var(--dm-content) + var(--dm-gutter) * 2);
    margin: 0 auto;
    padding-left: var(--dm-gutter);
    padding-right: var(--dm-gutter);
    font-family: var(--dm-font-en);
}
/* default_shop.css 가 h1~h6 에 폰트를 직접 지정하므로 되돌린다. */
#dm_list h2 {
    font-family: inherit;
}

/* ------------------------------------------------------------- 분류 관리 버튼 */
/* 최고관리자에게만 보이는 바로가기. 시안에는 없는 운영용 요소라 눈에 띄지 않게 둔다. */
.dm-list-admin {
    display: flex;
    justify-content: flex-end;
    padding-top: 20px;
}
.dm-list-admin a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 4px;
    background: var(--dm-base9);
    color: var(--dm-base1);
}

/* 분류 상단/하단 HTML (관리자 입력값) */
.dm-list-html {
    margin-top: 40px;
}

/* --------------------------------------------------- 소개 문구 (Package Tours) */
.dm-list-intro {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 40px;
    margin-top: var(--dm-list-gap);
    text-align: center;
}
.dm-list-intro-tit {
    font-weight: 500;
    font-size: 28px;
    line-height: normal;
}
.dm-list-intro-desc {
    font-weight: 400;
    font-size: 16px;
    line-height: 1.5;
    color: var(--dm-base1);
}

/* ---------------------------------------------------------- 검색 (Tickets) */
.dm-list-search {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 600px;
    max-width: 100%;
    margin: var(--dm-list-gap) auto 0;
    padding: 8px 8px 8px 40px;
    border-radius: 40px;
    background: var(--dm-list-search-bg);
}
.dm-list-search input[type="text"] {
    flex: 1 1 auto;
    min-width: 0;
    padding: 0;
    border: 0;
    background: transparent;
    font-family: var(--dm-font-kr);
    font-weight: 400;
    font-size: 18px;
    line-height: 26px;
    color: var(--dm-base1);
}
/* default_shop.css 의 input:focus 가 파란 테두리/그림자를 !important 로 넣는다. */
.dm-list-search input[type="text"]:focus {
    border: 0 !important;
    box-shadow: none !important;
}
.dm-list-search input[type="text"]::-webkit-input-placeholder {
    color: var(--dm-base4);
}
.dm-list-search input[type="text"]::placeholder {
    color: var(--dm-base4);
}
/* 테두리를 지운 대신 초점 표시는 감싼 상자가 대신한다. */
.dm-list-search:focus-within {
    box-shadow: 0 0 0 2px rgba(31, 57, 121, 0.25);
}
.dm-list-search button {
    flex: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 12px 20px 12px 16px;
    border: 0;
    border-radius: 30px;
    background: var(--dm-primary);
    font-family: var(--dm-font-en);
    font-weight: 600;
    font-size: 15px;
    line-height: normal;
    color: var(--dm-base10);
    white-space: nowrap;
}
.dm-list-search button img {
    display: block;
    flex: none;
    width: 28px;
    height: 28px;
}

/* ------------------------------------------------------- 분류 탭 (Tickets) */
.dm-list-cate {
    margin-top: 60px;
}
.dm-list-cate ul {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
}
/* 여섯 개가 한 줄에 들어가는 폭(본문 1096px 이상)에서만 시안대로 166px 고정이다.
   그보다 좁으면 5+1 로 어색하게 넘어가므로 아래 ~1279px 구간에서 3열로 바꾼다. */
.dm-list-cate li {
    flex: none;
    min-width: 0;
}
.dm-list-cate a {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    width: 166px;
    padding: 32px 20px;
    /* 선택된 탭은 시안에 테두리가 없지만, 같은 색 테두리를 둬야 크기가 어긋나지 않는다. */
    border: 1px solid var(--dm-base8);
    border-radius: 4px;
    font-family: var(--dm-font-en);
    font-weight: 400;
    font-size: 16px;
    line-height: normal;
    color: var(--dm-base0);
    text-align: center;
}
.dm-list-cate-nm {
    display: block;
    min-width: 0;
    word-break: normal;
    overflow-wrap: break-word;
}
/* 아이콘 파일은 모두 단색(#1F3979)이라 선택 상태의 흰색을 만들 수 없다.
   마스크를 쓸 수 있으면 색을 배경색으로 칠하고, 아니면 파일 그대로 깐다.
   파일 경로는 마크업에서 --dm-cate-ic 로 넘어온다. */
.dm-list-cate-ic {
    display: block;
    flex: none;
    width: 44px;
    height: 44px;
    background: var(--dm-cate-ic) no-repeat center;
    background-size: contain;
}
@supports ((-webkit-mask-image: url("")) or (mask-image: url(""))) {
    .dm-list-cate-ic {
        background: var(--dm-primary);
        -webkit-mask: var(--dm-cate-ic) no-repeat center;
        mask: var(--dm-cate-ic) no-repeat center;
        -webkit-mask-size: contain;
        mask-size: contain;
    }
    .dm-list-cate .dm-on .dm-list-cate-ic {
        background: var(--dm-base10);
    }
}
.dm-list-cate .dm-on {
    border-color: var(--dm-primary);
    background: var(--dm-primary);
    color: var(--dm-base10);
}

/* ------------------------------------------------------------------ 상품 목록 */
.dm-list-goods {
    margin-top: var(--dm-list-gap-lg);
}
/* 분류 탭이 있는 Tickets 는 시안 간격이 한 단계 좁다. */
.dm-list-cate + .dm-list-goods {
    margin-top: var(--dm-list-gap-sm);
}

/* 카드 좌측 상단 HOT 배지. .dm-goods-thumb 이 position:relative 다. */
.dm-goods-badge {
    position: absolute;
    z-index: 1;
    top: 8px;
    left: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px 12px;
    border-radius: 8px;
    background: var(--dm-red);
    font-family: var(--dm-font-kr);
    font-weight: 700;
    font-size: 15px;
    line-height: 22px;
    color: var(--dm-base10);
}

/* 가격(좌) + 평점(우) 한 줄 */
.dm-goods-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}
.dm-goods-rate {
    flex: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-family: var(--dm-font-kr);
    font-weight: 500;
    font-size: 15px;
    line-height: 22px;
    color: var(--dm-base3);
}
.dm-goods-rate img {
    display: block;
    flex: none;
    width: 16px;
    height: 16px;
}

/* Tickets 시안은 취소선 원가가 한 단계 크고 간격도 넓다. */
.dm-list-tickets .dm-goods-price {
    gap: 8px;
}
.dm-list-tickets .dm-goods-price del {
    font-weight: 400;
    font-size: 15px;
    line-height: 22px;
}

/* --------------------------------------------------------------- 페이징 */
/* 마크업은 코어의 get_paging() 이 만든다(.pg_wrap > .pg > .pg_page/.pg_current). */
.dm-list-page {
    margin-top: var(--dm-list-gap);
}
.dm-list-page .pg_wrap {
    display: flex;
    justify-content: center;
}
.dm-list-page .pg {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 4px;
}
.dm-list-page .pg_page,
.dm-list-page .pg_current {
    /* .sound_only 가 absolute 라 각 항목 안에 갇히도록 기준을 만든다. */
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 4px;
    border: 0;
    border-radius: 4px;
    background: none;
    font-family: var(--dm-font-kr);
    font-weight: 400;
    font-size: 12px;
    line-height: 16px;
    color: #555555;
}
.dm-list-page .pg_current {
    border-radius: 2px;
    background: rgba(31, 57, 121, 0.1);
    font-weight: 700;
    color: var(--dm-primary);
}
/* 처음/이전/다음/맨끝은 글자를 숨기고 시안의 화살표를 깐다.
   시안도 왼쪽 화살표 하나를 뒤집어 오른쪽으로 쓰므로 파일은 두 개뿐이다.
   글자가 .sound_only(화면 밖) 뿐이라 요소째 뒤집어도 읽기에 지장이 없다. */
.dm-list-page .pg_start,
.dm-list-page .pg_prev,
.dm-list-page .pg_next,
.dm-list-page .pg_end {
    min-width: 16px;
    width: 16px;
    height: 16px;
    padding: 0;
    background-repeat: no-repeat;
    background-position: center;
    background-size: 16px 16px;
}
.dm-list-page .pg_start,
.dm-list-page .pg_end {
    background-image: url(../img/sub/pg_first.svg);
}
.dm-list-page .pg_prev,
.dm-list-page .pg_next {
    background-image: url(../img/sub/pg_prev.svg);
}
.dm-list-page .pg_next,
.dm-list-page .pg_end {
    transform: scaleX(-1);
}

/* ======================================================================
   마우스가 있는 환경(PC)에서만 호버를 준다.
   ====================================================================== */
@media (hover: hover) and (pointer: fine) {
    .dm-list-cate a {
        transition: border-color 0.2s ease, background-color 0.2s ease, color 0.2s ease;
    }
    .dm-list-cate a:hover {
        border-color: var(--dm-primary);
    }
    .dm-list-search button {
        transition: background-color 0.2s ease;
    }
    .dm-list-search button:hover {
        background: var(--dm-primary-hover);
    }
    .dm-list-page .pg_page:hover {
        background: var(--dm-base9);
    }
    .dm-list-page .pg_start:hover,
    .dm-list-page .pg_prev:hover,
    .dm-list-page .pg_next:hover,
    .dm-list-page .pg_end:hover {
        background-color: var(--dm-base9);
    }
}

@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: reduce) {
    .dm-list-cate a,
    .dm-list-search button {
        transition: none;
    }
}

/* ======================================================================
   ~1279px : 태블릿 가로
   ====================================================================== */
@media (max-width: 1279px) {
    :root {
        --dm-list-gap: 96px;
        --dm-list-gap-lg: 120px;
        --dm-list-gap-sm: 80px;
    }

    /* 여섯 개를 한 줄에 두기엔 좁다. 3열 2행으로 나눈다. */
    .dm-list-cate {
        margin-top: 40px;
    }
    .dm-list-cate ul {
        gap: 12px;
    }
    .dm-list-cate li {
        flex: 1 1 calc(33.333% - 8px);
    }
    .dm-list-cate a {
        width: 100%;
    }
}

/* ======================================================================
   ~1023px : 태블릿
   ====================================================================== */
@media (max-width: 1023px) {
    :root {
        --dm-list-gap: 80px;
        --dm-list-gap-lg: 96px;
        --dm-list-gap-sm: 64px;
    }

    .dm-list-intro {
        gap: 24px;
    }
    .dm-list-intro-tit {
        font-size: 24px;
    }
    .dm-list-intro-desc {
        font-size: 15px;
    }

    .dm-list-cate {
        margin-top: 32px;
    }
    .dm-list-cate a {
        gap: 12px;
        padding: 24px 12px;
        font-size: 15px;
    }
}

/* ======================================================================
   ~767px : 모바일
   ====================================================================== */
@media (max-width: 767px) {
    :root {
        --dm-list-gap: 56px;
        --dm-list-gap-lg: 64px;
        --dm-list-gap-sm: 48px;
    }

    .dm-list-admin {
        padding-top: 12px;
    }
    .dm-list-html {
        margin-top: 24px;
    }

    .dm-list-intro {
        gap: 16px;
    }
    .dm-list-intro-tit {
        font-size: 20px;
    }
    .dm-list-intro-desc {
        font-size: 14px;
    }
    /* 시안의 줄바꿈은 좁은 폭에서 문장을 어색하게 끊는다. */
    .dm-list-intro-desc br {
        display: none;
    }

    .dm-list-search {
        gap: 4px;
        padding: 6px 6px 6px 20px;
    }
    .dm-list-search input[type="text"] {
        font-size: 15px;
        line-height: 22px;
    }
    .dm-list-search button {
        gap: 4px;
        padding: 10px 14px 10px 12px;
        font-size: 13px;
    }
    .dm-list-search button img {
        width: 20px;
        height: 20px;
    }

    /* 좁은 화면에서는 아이콘을 글자 위에 쌓지 않고 한 줄에 나란히 둬서
       탭 묶음이 차지하는 높이를 줄인다. */
    .dm-list-cate a {
        flex-direction: row;
        justify-content: center;
        gap: 8px;
        padding: 14px 10px;
        font-size: 13px;
    }
    .dm-list-cate-ic {
        width: 24px;
        height: 24px;
    }

    .dm-goods-badge {
        padding: 2px 8px;
        font-size: 12px;
        line-height: 18px;
    }
    .dm-goods-info {
        gap: 4px;
    }
    .dm-goods-rate {
        font-size: 12px;
        line-height: 18px;
    }
    .dm-goods-rate img {
        width: 13px;
        height: 13px;
    }
    .dm-list-tickets .dm-goods-price {
        gap: 4px;
    }
    .dm-list-tickets .dm-goods-price del {
        font-size: 12px;
        line-height: 18px;
    }
}

/* ======================================================================
   ~479px : 소형 모바일
   ====================================================================== */
@media (max-width: 479px) {
    .dm-list-cate ul {
        gap: 8px;
    }
    .dm-list-cate li {
        flex: 1 1 calc(50% - 4px);
    }
    /* 320px 2열에서 'Transportation' 이 단어 중간에 끊기지 않을 만큼만 줄인다. */
    .dm-list-cate a {
        gap: 6px;
        padding: 14px 8px;
        font-size: 12px;
    }
    .dm-list-cate-ic {
        width: 22px;
        height: 22px;
    }
}
