/* DR Shop Engine - 장바구니 페이지 전용 스타일. [drshop_cart] 숏코드가 있는 페이지에서만 로드. */

.st-page-body:has(.drshop-cart-table) { max-width: none; }
.st-home:has(.drshop-cart-table) {
    max-width: none;
    width: 100%;
    margin-left: 0;
    margin-right: 0;
}
.grid-container:has(.drshop-cart-table) { max-width: 1600px; }

.drshop-cart-table { background: #fff; border: 1px solid #e0e4d5; border-radius: 16px; box-shadow: 0 6px 18px rgba(47, 74, 55, 0.06); overflow: hidden; }
.drshop-cart-row { display: grid; grid-template-columns: 84px minmax(0, 1fr) auto; gap: 16px; padding: 20px; border-bottom: 1px solid #f0f1ea; align-items: center; }
.drshop-cart-row:last-child { border-bottom: 0; }
.drshop-cart-row img { width: 84px; height: 84px; object-fit: cover; border-radius: 12px; }
.drshop-cart-row-name { font-weight: 700; color: #2f2d26; text-decoration: none; display: block; margin-bottom: 8px; overflow-wrap: anywhere; }
.drshop-cart-qty { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }

.drshop-qty-minus, .drshop-qty-plus { flex: 0 0 28px; width: 28px; height: 28px; border: 1px solid #e0e4d5; background: #fff; color: #2f4a37; font-weight: 700; line-height: 1; border-radius: 6px; cursor: pointer; }
.drshop-qty-value { flex: 0 0 48px; width: 48px; text-align: center; border: 1px solid #e0e4d5; border-radius: 6px; padding: 4px; }
.drshop-cart-remove { flex: 0 0 auto; white-space: nowrap; border: none; background: none; color: #8a8f7f; text-decoration: underline; cursor: pointer; margin-left: 8px; }
.drshop-cart-row-total { font-weight: 800; color: #a1573a; white-space: nowrap; }
.drshop-cart-totals { display: flex; justify-content: space-between; align-items: center; padding: 20px; background: #fff; border: 1px solid #e0e4d5; border-top: 0; border-radius: 0 0 16px 16px; font-size: 1.1rem; }

/* 모바일 장바구니 - 표(table) 행 나열 대신 상품별 독립 카드로 재설계.
   각 카드에 그림자를 줘서 분리감을 주고, 수량 조절은 알약형 스테퍼로, 삭제는 우상단 원형 아이콘 버튼으로,
   가격은 카드 하단에 크게 강조 - 실제 쇼핑 앱(쿠팡/11번가류) 카트 카드 패턴을 참고. */
@media (max-width: 480px) {
    .drshop-cart-table { background: transparent; border: none; box-shadow: none; border-radius: 0; overflow: visible; }
    .drshop-cart-row {
        position: relative;
        display: flex;
        flex-wrap: wrap;
        grid-template-columns: none;
        background: #fff;
        border: 1px solid #e0e4d5;
        border-radius: 16px;
        box-shadow: 0 4px 14px rgba(47, 74, 55, 0.07);
        padding: 16px;
        margin-bottom: 14px;
    }
    .drshop-cart-row:last-child { margin-bottom: 14px; }
    .drshop-cart-row img { flex: 0 0 76px; width: 76px; height: 76px; border-radius: 12px; }
    .drshop-cart-row-info { flex: 1 1 auto; min-width: 0; padding-right: 26px; }
    .drshop-cart-row-name { font-size: 0.98rem; margin-bottom: 10px; }

    .drshop-cart-qty { flex-wrap: nowrap; background: #f5f6ef; border-radius: 999px; padding: 4px; gap: 0; width: fit-content; }
    .drshop-qty-minus, .drshop-qty-plus {
        flex: 0 0 30px; width: 30px; height: 30px; border: none; border-radius: 50%;
        background: #fff; box-shadow: 0 1px 3px rgba(47, 74, 55, 0.15); font-size: 1rem;
    }
    .drshop-qty-value { flex: 0 0 40px; width: 40px; border: none; background: transparent; font-weight: 800; }

    .drshop-cart-remove {
        position: absolute; top: 14px; right: 14px; margin-left: 0;
        width: 24px; height: 24px; border-radius: 50%;
        background: #f5f6ef; color: #8a8f7f;
        text-decoration: none; font-size: 0; line-height: 24px;
        display: flex; align-items: center; justify-content: center;
    }
    .drshop-cart-remove::before { content: "\2715"; font-size: 12px; }

    .drshop-cart-row-total {
        flex: 0 0 100%; order: 3; text-align: right; margin-top: 12px;
        padding-top: 12px; border-top: 1px dashed #e8ebdf;
        font-size: 1.1rem;
    }

    .drshop-cart-totals {
        border: 1px solid #e0e4d5; border-radius: 16px; box-shadow: 0 4px 14px rgba(47, 74, 55, 0.07);
        padding: 18px 20px;
    }
    .drshop-cart-totals span { font-weight: 700; color: #55503f; font-size: 1rem; }
    .drshop-cart-totals strong { font-size: 1.3rem; color: #a1573a; }
    .drshop-place-order, .drshop-checkout-btn { padding: 16px; font-size: 1.05rem; }
}
