/* ===============================
   1. 리스트 그리드 (PC 4개, 모바일 2개)
   =============================== */

/* UL: 그리드 컨테이너 */
.sct_30 {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important; /* PC: 4컬럼 */
    gap: 24px !important;              /* 카드 간격 */
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
}

/* 모바일/태블릿: 2컬럼 */
@media (max-width: 1040px) {
    .sct_30 {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 12px !important;
    }
}

/* li = 카드 하나 */
.sct_30 .sct_li {
    box-sizing: border-box !important;
    width: auto !important;            /* 너비는 grid가 관리 */
    float: none !important;
    position: relative !important;

    background: #ffffff !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 18px !important;

    /* 위/양옆은 그대로, 하단 여백만 과하지 않게 조정 */
    padding: 18px 18px 80px !important;  /* 버튼 자리 + 약간의 여백 */
    transition: all 0.22s ease !important;
    overflow: visible !important;       /* 버튼 잘림 방지 */
}

/* ===============================
   2. 카드 내부
   =============================== */

.sct_30 .li_wr {
    margin: 0 0 8px 0 !important;       /* 이미지 아래 여백 살짝만 */
    padding: 0 !important;
    background: none !important;
    border: 0 !important;
}

/* 이미지 박스 (연회색 안쪽 박스) */
.sct_30 .sct_img {
    background: #ffffff !important;
    border-radius: 14px !important;
    padding: 22px 12px !important;
    margin: 0 0 12px 0 !important;

    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    overflow: hidden !important;
    min-height: 220px !important;      /* 카드 높이 통일감 */
}

.sct_30 .sct_img img {
    max-width: 100% !important;
    height: auto !important;
    transition: transform 0.25s ease !important;
}

/* 할인 표시 라인 */
.discount-percentage {
    display: inline-block !important;
    margin-top: 4px !important;
    margin-right: 4px !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    color: #ef4444 !important;
}

.sct_txt_wr strike,
.sct_txt_wr del {
    font-size: 12px !important;
    color: #9ca3af !important;
}

.sct_txt_wr {
    margin-top: 4px !important;
    font-size: 13px !important;
    text-align: center !important;
}

.sct_txt_wr .sct_txt a {
    display: block !important;
    font-weight: 600 !important;
    font-size: 14px !important;
    color: #111827 !important;
    text-decoration: none !important;
    line-height: 1.4 !important;
    margin: 6px 0 4px 0 !important;
    text-align: left !important;
}

.sct_cost {
    margin-top: 4px !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    color: #111827 !important;
}

/* 품절 뱃지 – 카드 왼쪽 상단 원형 */
.soldout {
    position: absolute !important;
    top: 18px !important;
    left: 18px !important;
    width: 46px !important;
    height: 46px !important;
    border-radius: 50% !important;
    border: 2px solid #f54947 !important;
    background: #ffffff !important;
    color: #f54947 !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    line-height: 42px !important;
    text-align: center !important;
    margin: 0 !important;
}

/* =========================
   3. 장바구니 버튼 – 카드 하단 가득
   ========================= */

/* ✅ 버튼 컨테이너: li 전체 폭을 쓰고, 안에서 패딩으로 정렬 */
.sct_btn {
    position: absolute !important;
    left: 0 !important;                 /* li 왼쪽부터 */
    right: 0 !important;                /* li 오른쪽까지 */
    bottom: 20px !important;            /* 살짝 위로 붙여서 여백 줄임 */

    padding: 0 18px !important;         /* li 패딩(18px)과 정확히 맞춤 */
    margin: 0 !important;
    box-sizing: border-box !important;  /* 패딩 포함해서 폭 계산 */
    text-align: center !important;
}

/* 버튼 자체는 컨테이너 100% 안에서만 사용 → 밖으로 절대 안 나감 */
.sct_btn .btn_cart {
    width: 100% !important;
    height: 44px !important;          /* 보기 좋게 약간 두껍게 */
    border-radius: 10px !important;
    border: 1px solid #e5e7eb !important;
    background: #f3f4f6 !important;
    color: #111827 !important;
    font-size: 13px !important;
/*     font-weight: 500 !important; */

    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    padding: 0 12px !important;
    margin: 0 !important;             /* 혹시 남은 margin 제거 */
}

.sct_btn .btn_cart i {
    font-size: 14px !important;
}

/* 버튼 텍스트 – 뒤에 붙이는 방식 */
.sct_btn .btn_cart::after {
    content: "Add To Cart" !important; /* 필요하면 '장바구니' 로 변경 */
}

/* 예전 버튼 스타일 사용 안 함 */
.sct_30 .sct_btns { display: none !important; }

/* 이미지 박스는 확대될 때 박스 밖으로 안 튀어나오게 */
.sct_30 .sct_img {
    overflow: hidden !important;
}

/* =========================
   4. 호버 효과 (PC)
   ========================= */
@media (min-width: 1041px) {

    /* ① 카드 전체는 '테두리 색만' 변경 */
    .sct_30 .sct_li:hover {
        border-color: #2563eb !important;  /* 파란 테두리 */
        /* box-shadow, transform 제거 → 카드 자체는 안 움직임 / 안 커짐 */
        box-shadow: none !important;
        transform: none !important;
    }

    /* ② 이미지만 살짝 줌 인 */
    .sct_30 .sct_li:hover .sct_img img {
        transform: scale(1.06) !important;  /* 이미지만 확대 */
    }

    /* ③ 버튼 컬러만 같이 변경 (원하면 유지) */
    .sct_30 .sct_li:hover .sct_btn .btn_cart {
        background: #2563eb !important;
        border-color: #2563eb !important;
        color: #ffffff !important;
    }
}



/* 가격 영역 전체 래퍼 */
.sct_price_wrap {
    margin-top: 6px !important;
    text-align: left !important;        /* 가운데 정렬 원하면 center로 */
    line-height: 1.3 !important;
}

/* 1줄째: 정상가 (회색, 취소선) */
.sct_price_original {
    font-size: 12px !important;
    color: #9ca3af !important;
    text-decoration: line-through !important;
    margin-bottom: 2px !important;
}

/* 2줄째: 퍼센트 + 현재가 한 줄 */
.sct_price_row {
    font-size: 14px !important;
    font-weight: 700 !important;
}

/* 퍼센트 (보라색) */
.sct_price_percent {
    display: inline-block !important;
    margin-right: 4px !important;
    color: #6366f1 !important;          /* 보라색 계열 */
    font-weight: 700 !important;
    font-size: 14px !important;
}
/* ✅ 기본설명 2줄 말줄임 */
.sct_basic{
  margin-top:6px;
  font-size:12px;
  line-height:1.35;
  color:rgba(0,0,0,.68);

  display:-webkit-box;
  -webkit-box-orient:vertical;
  -webkit-line-clamp:2;   /* ✅ 2줄 */
  overflow:hidden;
  word-break:break-word;
  text-align: left !important;
}
/* 현재 판매가 (진한 검정) */
.sct_price_now {
    color: #111827 !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    padding: 5px !important;
}
.sct_30 .sct_txt {

    height: 10px !important;
}
/* 할인 없는 경우 – 그냥 현재가만 */
.sct_price_row.no-discount .sct_price_now {
    font-size: 15px !important;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 로딩 아이콘 디자인 개선 */
#loading-overlay::before {
    content: "";
    display: inline-block;
    width: 60px;
    height: 60px;
    border: 6px solid rgba(255, 255, 255, 0.2);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

/* 전체 오버레이 텍스트 정렬 및 폰트 개선 */
#loading-overlay {
    font-family: 'Noto Sans KR', 'Apple SD Gothic Neo', sans-serif;
    letter-spacing: -0.3px;
    text-align: center;
    line-height: 1.7;
    color: #f0f0f0;
}