/* =============================================
   여우랑쇼핑몰 반응형 스타일
   shop-responsive.css
   ============================================= */

/* =============================================
   태블릿 (768px 이하)
   ============================================= */
@media (max-width: 991px) {
    .product-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }

    .nav-list {
        gap: 25px;
    }

    .nav-item > a {
        font-size: 15px;
    }

    .header-search {
        max-width: 300px;
    }
}

/* =============================================
   모바일 (768px 이하)
   ============================================= */
@media (max-width: 767px) {
    :root {
        --header-height: var(--header-height-mobile);
    }

    /* 헤더 */
    .header-inner {
        padding: 10px 15px;
        gap: 10px;
    }

    .mobile-menu-btn {
        display: flex;
        order: -1;
    }

    .logo img {
        height: 30px;
    }

    .logo span {
        font-size: 20px;
    }

    .header-search {
        position: fixed;
        top: var(--header-height-mobile);
        left: 0;
        right: 0;
        max-width: 100%;
        padding: 10px 15px;
        background: var(--shop-white);
        border-bottom: 1px solid var(--shop-border);
        display: none;
        z-index: 999;
    }

    .header-search.active {
        display: block;
    }

    .header-search form {
        border-radius: var(--shop-radius);
    }

    .header-util {
        gap: 10px;
        margin-left: auto;
    }

    .util-text {
        display: none;
    }

    .util-link svg {
        width: 22px;
        height: 22px;
    }

    .cart-count {
        top: -3px;
        right: -3px;
        min-width: 16px;
        height: 16px;
        font-size: 10px;
        line-height: 16px;
    }

    /* 네비게이션 숨김 */
    .main-nav {
        display: none;
    }

    /* 메인 컨텐츠 */
    .shop-main {
        min-height: calc(100vh - var(--header-height-mobile) - 150px);
    }

    .shop-container {
        padding: 0 15px;
    }

    .shop-section {
        padding: 30px 0;
    }

    .section-title {
        font-size: 20px;
        margin-bottom: 20px;
    }

    /* 상품 그리드 */
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .product-card {
        border-radius: var(--shop-radius-sm);
    }

    .product-badges {
        top: 8px;
        left: 8px;
    }

    .badge {
        padding: 3px 6px;
        font-size: 10px;
    }

    .product-wish {
        opacity: 1;
        width: 30px;
        height: 30px;
        top: 8px;
        right: 8px;
    }

    .product-wish svg {
        width: 16px;
        height: 16px;
    }

    .product-info {
        padding: 10px;
    }

    .product-brand {
        font-size: 11px;
    }

    .product-name {
        font-size: 13px;
        min-height: 36px;
        margin-bottom: 8px;
    }

    .price-original {
        font-size: 11px;
    }

    .price-sale {
        font-size: 15px;
    }

    .price-discount {
        font-size: 12px;
    }

    .product-rating {
        font-size: 11px;
    }

    /* 버튼 */
    .btn {
        padding: 10px 20px;
        font-size: 14px;
    }

    .btn-lg {
        padding: 14px 28px;
        font-size: 16px;
    }

    /* 테이블 */
    .shop-table th,
    .shop-table td {
        padding: 10px 8px;
        font-size: 13px;
    }

    /* 페이지네이션 */
    .pagination {
        gap: 3px;
        margin-top: 30px;
    }

    .pagination a,
    .pagination span {
        min-width: 32px;
        height: 32px;
        font-size: 13px;
    }

    /* 푸터 */
    .shop-footer {
        padding: 30px 0;
        margin-top: 40px;
    }

    .footer-links {
        font-size: 12px;
    }

    .footer-links .divider {
        margin: 0 6px;
    }

    .footer-info {
        font-size: 12px;
    }

    .footer-info .company-name {
        font-size: 14px;
    }

    /* 맨위로 버튼 */
    .btn-top {
        width: 44px;
        height: 44px;
        bottom: 20px;
        right: 15px;
    }

    /* 폼 */
    .form-control {
        padding: 10px 12px;
        font-size: 14px;
    }

    /* 알럿 */
    .alert {
        padding: 12px 15px;
        font-size: 13px;
    }

    /* 빈 상태 */
    .empty-state {
        padding: 40px 15px;
    }

    .empty-state svg {
        width: 60px;
        height: 60px;
    }

    .empty-state p {
        font-size: 14px;
    }
}

/* =============================================
   소형 모바일 (480px 이하)
   ============================================= */
@media (max-width: 479px) {
    .header-inner {
        padding: 10px 12px;
    }

    .mobile-menu-btn {
        width: 26px;
        height: 20px;
    }

    .mobile-menu-btn span {
        height: 2px;
    }

    .logo img {
        height: 26px;
    }

    .logo span {
        font-size: 18px;
    }

    .util-link svg {
        width: 20px;
        height: 20px;
    }

    .product-grid {
        gap: 10px;
    }

    .product-info {
        padding: 8px;
    }

    .product-name {
        font-size: 12px;
        min-height: 34px;
    }

    .price-sale {
        font-size: 14px;
    }

    .btn {
        padding: 10px 16px;
        font-size: 13px;
    }

    .footer-links a {
        font-size: 11px;
    }

    .footer-info {
        font-size: 11px;
    }
}

/* =============================================
   데스크탑 전용 (1024px 이상)
   ============================================= */
@media (min-width: 1024px) {
    .product-grid.large {
        grid-template-columns: repeat(5, 1fr);
    }
}

/* =============================================
   터치 디바이스 최적화
   ============================================= */
@media (hover: none) and (pointer: coarse) {
    .product-wish {
        opacity: 1;
    }

    .product-card:hover {
        transform: none;
    }

    .product-card:hover .product-thumb img {
        transform: none;
    }

    .nav-item:hover .sub-nav {
        opacity: 0;
        visibility: hidden;
    }
}

/* =============================================
   프린트 스타일
   ============================================= */
@media print {
    .shop-header,
    .shop-footer,
    .btn-top,
    .mobile-menu-btn,
    .mobile-side-menu,
    .mobile-menu-overlay {
        display: none !important;
    }

    .shop-main {
        min-height: auto;
    }

    body {
        font-size: 12pt;
        color: #000;
    }

    a {
        text-decoration: none;
        color: #000;
    }
}

/* =============================================
   다크모드 지원 (선택적)
   ============================================= */
@media (prefers-color-scheme: dark) {
    /* 다크모드가 필요한 경우 여기에 추가 */
}

/* =============================================
   접근성 - 고대비 모드
   ============================================= */
@media (prefers-contrast: high) {
    :root {
        --shop-border: #666;
        --shop-text-muted: #555;
    }

    .btn-outline {
        border-width: 3px;
    }
}

/* =============================================
   접근성 - 모션 감소
   ============================================= */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
