/* ===========================
   MOBILE PRODUCT LIST - MINIMAL DESIGN
   트렌디하고 미니멀한 모바일 스타일
   =========================== */

/* PC에서 모바일 제조사 메뉴 숨김 */
#mobile-maker-menu {
    display: none !important;
}

@media screen and (max-width: 1310px) {
    /* 상단 배너 영역 숨김 */
    .container-text-center {
        display: none;
    }

    .popup-first-category-nav-top {
        display: none;
    }

    /* ===========================
       카테고리 탭 - 가로 스크롤
       =========================== */
    .popup-first-category-nav-bottom {
        padding: 16px 0 !important;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }

    .popup-first-category-nav-bottom::-webkit-scrollbar {
        display: none;
    }

    .popup-first-category-nav-bottom ul {
        flex-wrap: nowrap !important;
        justify-content: flex-start !important;
        padding: 0 16px !important;
        gap: 8px !important;
        border-bottom: none !important;
    }

    .popup-first-category-nav-bottom ul > li.categoryDepth3 {
        flex-shrink: 0;
        padding: 10px 18px !important;
        font-size: 14px !important;
        white-space: nowrap;
        border-radius: 20px !important;
        background: #f5f5f7 !important;
        color: #6e6e73 !important;
        min-width: auto !important;
    }

    .popup-first-category-nav-bottom ul > li.categoryDepth3::after {
        display: none !important;
    }

    .popup-first-category-nav-bottom ul > li.categoryDepth3.curentPage {
        background: #1d1d1f !important;
        color: #fff !important;
    }

    .popup-first-category-nav-bottom ul > li.categoryDepth3.curentPage *,
    .popup-first-category-nav-bottom ul > li.categoryDepth3.curentPage a,
    .popup-first-category-nav-bottom ul > li.categoryDepth3.curentPage span {
        color: #fff !important;
    }

    .popup-first-category-nav-bottom ul > li.categoryDepth3:hover {
        background: #e8e8e8 !important;
        border-radius: 20px !important;
    }

    .popup-first-category-nav-bottom ul > li.categoryDepth3.curentPage:hover {
        background: #1d1d1f !important;
    }

    /* ===========================
       제조사 메뉴 (maker-menu) - 숨김 처리
       모바일에서는 별도 행으로 표시됨
       =========================== */
    .categoryDepth3 .maker-menu {
        display: none !important;
    }

    .categoryDepth3:hover .maker-menu {
        display: none !important;
    }

    .categoryDepth3:hover {
        border-radius: 20px !important;
    }

    /* 모바일 제조사 메뉴 - 별도 행으로 가로 스크롤 */
    #mobile-maker-menu {
        display: flex !important;
        flex-direction: row;
        flex-wrap: nowrap;
        gap: 8px;
        padding: 16px 16px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        -ms-overflow-style: none;
        background: #fff;
    }

    #mobile-maker-menu::-webkit-scrollbar {
        display: none;
    }

    #mobile-maker-menu:empty {
        display: none !important;
        padding: 0;
    }

    /* 제조사 아이템 - 필 버튼 스타일 */
    #mobile-maker-menu .mobile-maker-item {
        flex-shrink: 0;
        padding: 8px 14px;
        font-size: 13px;
        font-weight: 500;
        color: #6e6e73;
        background: #f5f5f7;
        border: none;
        border-radius: 16px;
        white-space: nowrap;
        cursor: pointer;
        transition: all 0.2s ease;
        list-style: none;
    }

    #mobile-maker-menu .mobile-maker-item:hover,
    #mobile-maker-menu .mobile-maker-item:active,
    #mobile-maker-menu .mobile-maker-item.active {
        background: #1d1d1f;
        color: #fff;
    }

    /* 정렬/필터 영역 */
    .popup-second-category-container-father {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        gap: 12px;
    }

    .popup-second-category-container-son-select {
        position: static !important;
    }

    .popup-second-category-container-son-select .form-select {
        min-width: 110px;
        padding: 10px 36px 10px 14px !important;
        font-size: 13px;
    }

    .popup-second-category-container-span {
        font-size: 13px;
    }

    /* 제품 그리드 - 2열 */
    #list-product.popup-second-category-product {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        padding: 0 10px;
        width: 100%;
        box-sizing: border-box;
        overflow: hidden;
    }

    /* 제품 카드 요소 */
    #list-product .popup-second-category-product-element {
        width: 100%;
        min-width: 0;
        overflow: hidden;
        box-sizing: border-box;
    }

    /* 제품 카드 */
    #list-product .popup-second-category-product-element .product-list-div {
        border-radius: 10px;
        width: 100%;
        box-sizing: border-box;
        overflow: hidden;
    }

    #list-product .popup-second-category-product-element .product-list-div:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 12px rgba(0, 0, 0, 0.08);
    }

    /* 뱃지 */
    #list-product .area-icon-r-n-product {
        top: 5px;
        left: 5px;
        gap: 2px;
    }

    #list-product .new-product,
    #list-product .recommended-product {
        padding: 2px 5px;
        font-size: 7px;
        border-radius: 2px;
    }

    /* 제품 이미지 - 고정 높이로 통일 */
    #list-product .area-move-detail-img-product {
        padding: 12px;
        height: 140px;
        display: flex;
        align-items: center;
        justify-content: center;
        box-sizing: border-box;
    }

    #list-product .area-move-detail-img-product img {
        max-width: 100%;
        max-height: 100%;
        width: auto;
        height: auto;
        object-fit: contain;
    }

    /* 제품명 */
    #list-product .area-move-detail-title-prduct {
        padding: 6px 8px 4px;
    }

    #list-product .area-move-detail-title-prduct h3 {
        font-size: 11px !important;
        -webkit-line-clamp: 2;
        line-height: 1.3;
        word-break: break-word;
    }

    /* 버튼 영역 - 좌우 배치 */
    #list-product .product-btn-area {
        flex-direction: row !important;
        flex-wrap: nowrap;
        padding: 6px 8px 10px;
        gap: 4px;
    }

    #list-product .product-btn-area form {
        flex: 1;
        min-width: 0;
    }

    #list-product .product-btn-area .btn-product-group {
        width: 100%;
        padding: 7px 2px;
        font-size: 9px;
        border-radius: 5px;
        display: block;
        text-align: center;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    #list-product .product-btn-area .btn-secondary-action {
        flex: 1;
        min-width: 0;
    }

    /* 페이지네이션 */
    .popup-second-category > .container .page-item .page-link,
    #paging .page-item .page-link {
        width: 38px !important;
        height: 38px !important;
        font-size: 13px !important;
        border-radius: 8px !important;
    }

    /* 추천 제품 */
    .footer-list.area-product-recommended h1 {
        font-size: 20px;
        padding: 20px 16px;
        margin-top: 20px;
    }

    /* 추천 제품 카드 */
    .footer-list-product .footer-list-product-element {
        padding: 0 12px;
        margin: 0;
    }
}

/* 작은 모바일 (480px 이하) */
@media screen and (max-width: 480px) {
    /* 카테고리 탭 */
    .popup-first-category-nav-bottom {
        padding: 12px 0 !important;
    }

    .popup-first-category-nav-bottom ul {
        padding: 0 12px !important;
        gap: 6px !important;
    }

    .popup-first-category-nav-bottom ul > li.categoryDepth3 {
        padding: 8px 14px !important;
        font-size: 13px !important;
    }

    /* 제품 그리드 - 2열 유지 */
    #list-product.popup-second-category-product {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
        padding: 0 8px;
    }

    /* 제품 카드 */
    #list-product .popup-second-category-product-element .product-list-div {
        border-radius: 8px;
    }

    /* 제품 이미지 - 고정 높이로 통일 */
    #list-product .area-move-detail-img-product {
        padding: 10px;
        height: 120px;
        display: flex;
        align-items: center;
        justify-content: center;
        box-sizing: border-box;
    }

    #list-product .area-move-detail-img-product img {
        max-width: 100%;
        max-height: 100%;
        width: auto;
        height: auto;
        object-fit: contain;
    }

    /* 제품명 */
    #list-product .area-move-detail-title-prduct {
        padding: 5px 6px 3px;
    }

    #list-product .area-move-detail-title-prduct h3 {
        font-size: 10px !important;
    }

    /* 버튼 영역 - 좌우 배치 */
    #list-product .product-btn-area {
        flex-direction: row !important;
        flex-wrap: nowrap;
        padding: 5px 6px 8px;
        gap: 3px;
    }

    #list-product .product-btn-area form {
        flex: 1;
        min-width: 0;
    }

    #list-product .product-btn-area .btn-product-group {
        width: 100%;
        padding: 6px 2px;
        font-size: 8px;
        border-radius: 4px;
        display: block;
        text-align: center;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    #list-product .product-btn-area .btn-secondary-action {
        flex: 1;
        min-width: 0;
    }

    /* 뱃지 */
    #list-product .area-icon-r-n-product {
        top: 5px;
        left: 5px;
    }

    #list-product .new-product,
    #list-product .recommended-product {
        padding: 2px 5px;
        font-size: 7px;
    }

    /* 필터/정렬 */
    .popup-second-category-container-father {
        padding: 0 12px;
        margin-bottom: 16px;
    }

    .popup-second-category-container-span {
        font-size: 12px;
    }

    .popup-second-category-container-son-select .form-select {
        min-width: 100px;
        padding: 8px 30px 8px 12px !important;
        font-size: 12px;
    }

    /* 페이지네이션 */
    .popup-second-category > .container .page-item .page-link,
    #paging .page-item .page-link {
        width: 34px !important;
        height: 34px !important;
        font-size: 12px !important;
    }

    /* 배경 여백 */
    .popup-second-category {
        padding: 24px 0 40px;
    }
}

/* 아주 작은 모바일 (360px 이하) */
@media screen and (max-width: 360px) {
    /* 제품 그리드 - 2열 유지 */
    #list-product.popup-second-category-product {
        grid-template-columns: repeat(2, 1fr);
        gap: 6px;
        padding: 0 6px;
    }

    /* 제품 이미지 - 고정 높이로 통일 */
    #list-product .area-move-detail-img-product {
        padding: 8px;
        height: 100px;
        display: flex;
        align-items: center;
        justify-content: center;
        box-sizing: border-box;
    }

    #list-product .area-move-detail-img-product img {
        max-width: 100%;
        max-height: 100%;
        width: auto;
        height: auto;
        object-fit: contain;
    }

    /* 제품명 */
    #list-product .area-move-detail-title-prduct h3 {
        font-size: 9px !important;
    }

    /* 버튼 - 좌우 배치 */
    #list-product .product-btn-area {
        flex-direction: row !important;
        flex-wrap: nowrap;
        padding: 4px 5px 6px;
        gap: 2px;
    }

    #list-product .product-btn-area form {
        flex: 1;
        min-width: 0;
    }

    #list-product .product-btn-area .btn-product-group {
        font-size: 7px;
        padding: 5px 1px;
        border-radius: 3px;
        display: block;
        text-align: center;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    #list-product .product-btn-area .btn-secondary-action {
        flex: 1;
        min-width: 0;
    }
}

/* 비교하기 버튼 숨김 */
@media screen and (max-width: 900px) {
    .compare-product-btn {
        display: none !important;
    }

    .group-center {
        display: none !important;
    }

    /* 배너 숨김 */
    #banner {
        display: none !important;
    }

    /* content-wrapper 오버플로우 */
    .content-wrapper {
        overflow: hidden;
    }
}

/* 추천 제품 캐러셀 반응형 */
@media screen and (max-width: 768px) {
    #productRecommand .owl-nav {
        display: none;
    }

    .footer-list-product .footer-list-product-element {
        box-shadow: none;
        padding: 0;
    }

    .footer-list-product .footer-list-product-element p {
        padding: 0 16px;
    }

    .container-nameSpecRecommanded {
        margin: 0 16px;
    }

    .saleAmountRecommanded {
        padding: 0 16px 20px;
    }
}
