/* 쿠폰 플랫폼 - 모바일 최적화 CSS */

:root {
    --primary-color: #4A90E2;
    --secondary-color: #50C878;
    --accent-color: #FFA726;
    --text-dark: #1a1a1a;
    --text-gray: #666666;
    --text-light: #999999;
    --bg-light: #f5f7fa;
    --bg-white: #ffffff;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
    --shadow-md: 0 2px 8px rgba(0,0,0,0.12);
    --shadow-lg: 0 4px 16px rgba(0,0,0,0.15);
    --border-radius: 8px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Pretendard", "Malgun Gothic", sans-serif;
    background: var(--bg-light);
    color: var(--text-dark);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* 헤더 */
.mobile-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    background: var(--bg-white);
    box-shadow: var(--shadow-md);
    z-index: 1000;
    height: 60px;
}

@media (max-width: 768px) {
    .mobile-header {
        height: auto;
        min-height: 50px;
    }
}

.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

.header-weather {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: rgba(74, 144, 226, 0.1);
    border-radius: 12px;
    transition: background 0.2s;
}

.header-weather:hover {
    background: rgba(74, 144, 226, 0.15);
}

.header-weather-icon {
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #4A90E2;
    font-size: 16px;
    flex-shrink: 0;
}

.header-weather-temp {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    white-space: nowrap;
}

.header-weather-humidity {
    font-size: 12px;
    color: #666;
    white-space: nowrap;
    font-weight: 500;
}

.header-weather-location {
    font-size: 12px;
    color: #666;
    white-space: nowrap;
    font-weight: 500;
}

.logo-link {
    text-decoration: none;
    cursor: pointer;
}

.logo {
    font-size: 20px;
    font-weight: bold;
    color: var(--text-dark);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.header-app-buttons {
    display: flex;
    gap: 8px;
    align-items: center;
}

@media (max-width: 768px) {
    /* 모바일에서 앱 버튼 텍스트 숨김 (아이콘만 표시) */
    .btn-app-text {
        display: none !important;
    }
    
    .header-app-buttons {
        gap: 4px;
        margin-left: 4px !important;
    }
    
    .btn-app-header {
        padding: 6px !important;
        width: 32px;
        height: 32px;
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
        border-radius: 8px !important;
    }
    
    .btn-app-header svg {
        display: block !important;
        width: 18px;
        height: 18px;
    }
    
    .header-right {
        gap: 4px;
        flex-wrap: nowrap;
        align-items: center;
    }
    
    /* 모바일에서는 헤더 날씨 숨김 (하단 바에서만 표시) */
    .header-weather {
        display: none !important;
    }

.mobile-header {
    height: auto;
    min-height: 30px;
    padding: 6px 0;
    background: none;
    box-shadow: none;

}
    
    .header-inner {
        padding: 0 8px;
        flex-wrap: nowrap;
        align-items: center;
        justify-content: space-between;
    }
    
    .logo {
        font-size: 15px;
        white-space: nowrap;
    }
    
    /* 모바일 셀렉트 버튼 스타일 */
    .region-select {
        padding: 5px 24px 5px 10px !important;
        font-size: 12px !important;
        border-radius: 16px !important;
        border: 1.5px solid #e0e0e0 !important;
        background-color: var(--bg-light) !important;
        font-weight: 500;
        min-width: 70px;
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 10 10'%3E%3Cpath fill='%234A90E2' d='M5 7L2 4h6z'/%3E%3C/svg%3E") !important;
        background-position: right 6px center !important;
        background-size: 10px !important;
    }
    
    .region-select:active,
    .region-select:focus {
        border-color: var(--primary-color) !important;
        background-color: white !important;
        box-shadow: 0 0 0 2px rgba(74, 144, 226, 0.15) !important;
    }
    
    /* 모바일 방문자수 아이콘 스타일 */
    .visitor-count {
        gap: 3px;
        font-size: 0;
    }
    
    .visitor-item {
        display: flex;
        align-items: center;
        background: var(--bg-light);
        border-radius: 12px;
    }
    
    .visitor-item svg {
        width: 12px;
        height: 12px;
        flex-shrink: 0;
    }
    
    .visitor-number {
        font-size: 10px;
        font-weight: bold;
        color: var(--text-dark);
        white-space: nowrap;
    }
}

.region-select {
    padding: 6px 12px;
    border: 1px solid #e0e0e0;
    border-radius: 20px;
    background: var(--bg-white);
    font-size: 14px;
    outline: none;
    cursor: pointer;
    transition: all 0.3s;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23333' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    padding-right: 28px;
}

.region-select:hover {
    border-color: var(--primary-color);
    box-shadow: 0 2px 4px rgba(74, 144, 226, 0.1);
}

.region-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.1);
}

@media (prefers-color-scheme: dark) {
    .region-select {
        background-color: #ffffff !important;
        color: #111111 !important;
        border-color: #d0d0d0 !important;
        box-shadow: none !important;
    }

    .region-select option {
        background-color: #ffffff !important;
        color: #111111 !important;
    }
}

.visitor-count {
    font-size: 11px;
    line-height: 1.3;
    color: var(--text-gray);
    text-align: right;
    display: flex;
    align-items: center;
}

.visitor-item {
    display: flex;
    align-items: center;
    gap: 4px;
}

.visitor-number {
    font-size: 11px;
    font-weight: bold;
    color: var(--primary-color);
}

.visitor-count strong {
    color: var(--primary-color);
}

/* 앱 배너 */
.app-banner {
    margin-top: 60px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 20px 16px;
    position: relative;
    width: 100%;
    max-width: 1200px;
    box-sizing: border-box;
}

.banner-slider {
    overflow: hidden;
    border-radius: var(--border-radius);
    margin-bottom: 16px;
    position: relative;
    min-height: 200px;
    box-shadow: var(--shadow-md);
}

/* 슬라이드 초기 로드 시 깜빡임 방지 */
.banner-slider .banner-slide {
    display: none;
    transition: opacity 0.3s ease;
}

.banner-slider .banner-slide:first-child {
    display: block;
}

.banner-slide {
    position: relative;
    cursor: pointer;
    min-height: 200px;
    overflow: hidden;
    border-radius: var(--border-radius);
}

/* 배너 이미지 */
.banner-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.banner-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.banner-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(0,0,0,0.3), rgba(0,0,0,0.6));
}

.banner-content {
    position: relative;
    z-index: 2;
    padding: 20px;
}

.banner-content h3 {
    font-size: 18px;
    margin-bottom: 12px;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.banner-badge {
    display: inline-block;
    background: var(--accent-color);
    color: var(--text-dark);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
    margin-bottom: 12px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.banner-discount {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 12px;
}

.banner-discount .original {
    font-size: 14px;
    opacity: 0.9;
    text-decoration: line-through;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}

.banner-discount .discount {
    font-size: 24px;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.banner-discount .rate {
    background: var(--accent-color);
    color: var(--text-dark);
    padding: 4px 12px;
    border-radius: 16px;
    font-size: 14px;
    font-weight: bold;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.banner-desc {
    font-size: 15px;
    margin-top: 12px;
    opacity: 0.95;
    line-height: 1.5;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.4);
}

.banner-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.banner-prev, .banner-next {
    background: rgba(255,255,255,0.3);
    border: none;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.banner-dots {
    display: flex;
    gap: 6px;
}

.banner-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255,255,255,0.5);
    cursor: pointer;
}

.banner-dot.active {
    background: white;
    width: 24px;
    border-radius: 4px;
}

.app-download {
    text-align: center;
    margin-bottom: 16px;
}

.app-download p {
    font-size: 15px;
    margin-bottom: 12px;
}

.app-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.btn-app {
    flex: 1;
    max-width: 150px;
    padding: 10px 16px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.3s;
}

.btn-android {
    background: rgba(255,255,255,0.9);
    color: #3ddc84;
}

.btn-ios {
    background: rgba(255,255,255,0.9);
    color: #000;
}

.btn-register-float {
    display: inline-block;
    background: white;
    color: var(--primary-color);
    padding: 10px 24px;
    border-radius: 24px;
    text-decoration: none;
    font-weight: bold;
    box-shadow: var(--shadow-md);
}

/* 카테고리 탭 */
.category-tabs {
    display: flex;
    overflow-x: auto;
    padding: 12px 8px;
    border-bottom: 1px solid #e0e0e0;
    position: sticky;
    top: 60px;
    z-index: 999;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
    gap: 8px;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */
}

.category-tabs::-webkit-scrollbar {
    display: none;
}

@media (max-width: 768px) {
    .category-tabs {
        padding: 8px 4px;
        gap: 6px;
        top: 50px;
        touch-action: pan-x; /* 가로 스와이프만 허용 */
        overscroll-behavior-x: contain; /* 스크롤 체이닝 방지 */
    }
    
    .tab {
        padding: 6px 14px;
        font-size: 12px;
    }
}

.tab {
    flex-shrink: 0;
    padding: 8px 20px;
    border: none;
    background: var(--bg-light);
    font-size: 14px;
    font-weight: 500;
    color: var(--text-gray);
    cursor: pointer;
    border-radius: 20px;
    transition: all 0.3s;
    white-space: nowrap;
}

.tab.active {
    background: var(--primary-color);
    color: white;
    font-weight: bold;
}

.tab:hover {
    background: #ffebee;
}

.tab.active:hover {
    background: var(--primary-color);
}

/* 메인 컨텐츠 */
.main-content {
    padding: 16px;
    min-height: 60vh;
    width: 100%;
    max-width: 1200px;
    box-sizing: border-box;
}

/* 메인 배너 모바일 간격 조정 */
@media (max-width: 768px) {
    .main-banner {
        margin-bottom: 4px !important;
        margin-top: 40px !important;
    }
    
    .category-tabs {
        margin-top: 0 !important;
        padding: 4px 4px !important;
        border-bottom: none !important;
    }
    
    .featured-slider {
        margin: 3px 0 !important;
        padding: 0 !important;
    }
    
    .featured-slider-wrapper {
        gap: 0 !important;
    }
    
    .featured-slide {
        min-width: 100% !important;
        max-width: 100% !important;
        border-radius: 0 !important;
    }
    
    .featured-slider-container {
        border-radius: 0px 0px 15px 15px !important;
    }
    
    .main-content {
        padding: 6px 4px 12px !important;
    }
    
    .main-content-header {
        padding: 0 4px 10px !important;
    }
    
    .main-content h2 {
        font-size: 1rem !important;
        margin-bottom: 10px !important;
    }
    
    .coupon-grid {
        padding: 0 2px !important;
        gap: 6px !important;
    }
}

/* 쿠폰 그리드 */
.coupon-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 24px;
    width: 100%;
    box-sizing: border-box;
}

/* 모바일 쿠폰 그리드 최적화 - 한 화면에 더 많은 업체 표시 */
@media (max-width: 768px) {
    .coupon-grid {
        gap: 6px !important;
        margin-bottom: 16px;
        padding: 0 2px !important;
    }
    
    .coupon-card {
        border-radius: 6px;
    }
    
    .coupon-info {
        padding: 8px;
    }
    
    .business-name {
        font-size: 12px;
        min-height: 32px;
        margin-bottom: 4px;
    }
    
    .price-info {
        margin-bottom: 4px;
        min-height: 16px;
    }
    
    .original-price {
        font-size: 10px;
    }
    
    .discount-price {
        font-size: 13px;
    }
    
    .coupon-desc {
        font-size: 11px;
    }
    
    .stats {
        font-size: 10px;
        gap: 3px;
    }
    
    .coupon-image {
        padding-top: 100%;
    }
    
    .discount-badge {
        top: 6px;
        right: 6px;
        padding: 3px 8px;
        font-size: 11px;
    }
    
    .featured-badge {
        top: 6px;
        left: 6px;
        width: 24px;
        height: 24px;
        font-size: 14px;
    }
}

.coupon-card {
    background: var(--bg-white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    transition: all 0.3s;
}

.coupon-card:active {
    transform: scale(0.98);
}

.coupon-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.coupon-image {
    position: relative;
    width: 100%;
    padding-top: 100%;
    background: var(--bg-light);
    overflow: hidden;
}

.coupon-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.discount-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: var(--primary-color);
    color: white;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
    box-shadow: var(--shadow-sm);
}

.featured-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: var(--accent-color);
    color: var(--text-dark);
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    box-shadow: var(--shadow-sm);
}

.coupon-info {
    padding: 12px;
}

.business-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 6px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.4;
    min-height: 36px;
}

.location {
    color: var(--text-gray);
    font-weight: 400;
}

.price-info {
    margin-bottom: 8px;
    min-height: 20px;
}

.price-row {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.original-price {
    font-size: 11px;
    color: var(--text-light);
    text-decoration: line-through;
}

.discount-price {
    font-size: 15px;
    color: var(--primary-color);
    font-weight: bold;
}

.coupon-desc {
    font-size: 12px;
    color: var(--text-gray);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.stats {
    font-size: 11px;
    color: var(--text-gray);
    display: flex;
    align-items: center;
    gap: 4px;
}

.rating {
    color: var(--accent-color);
    font-weight: bold;
}

.separator {
    color: #ddd;
}

.users {
    color: var(--primary-color);
    font-weight: 600;
}

.no-results {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-gray);
    font-size: 15px;
}

.loading {
    text-align: center;
    padding: 24px;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--bg-light);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 무료입점 모달 */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 20px;
}

.modal-container {
    background: var(--bg-white);
    border-radius: 16px;
    width: 100%;
    max-width: 500px;
    box-shadow: var(--shadow-lg);
    animation: modalSlideUp 0.3s ease-out;
}

@keyframes modalSlideUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid #e0e0e0;
}

.modal-header h2 {
    font-size: 20px;
    margin: 0;
    color: var(--text-dark);
}

.btn-close-modal {
    background: none;
    border: none;
    outline: none;
    font-size: 24px;
    color: var(--text-gray);
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
}

.btn-close-modal:hover {
    background: var(--bg-light);
    color: var(--text-dark);
}

.btn-close-modal:focus {
    outline: none;
    border: none;
}

.modal-body {
    padding: 24px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--text-dark);
}

.form-group input[type="text"] {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 15px;
    outline: none;
    transition: all 0.3s;
}

.form-group input[type="text"]:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(74, 144, 226, 0.1);
}

.phone-input {
    display: flex;
    align-items: center;
    gap: 8px;
}

.phone-prefix {
    padding: 14px 16px;
    background: var(--bg-light);
    border-radius: 8px;
    font-weight: 600;
    border: 2px solid #e0e0e0;
}

.phone-input input {
    flex: 1;
}

.separator {
    color: var(--text-gray);
}

.btn-submit {
    width: 100%;
    padding: 16px;
    background: var(--primary-color);
    color: white;
    border: none;
    outline: none;
    border-radius: 8px;
    font-size: 17px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 8px;
}

.btn-submit:hover {
    background: #3a7bc8;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-submit:active {
    transform: translateY(0);
}

.btn-submit:focus {
    outline: none;
    border: none;
}

/* 푸터 */
.footer {
    width: 100%;
    background: #2c3e50;
    margin-top: 60px;
    color: white;
}

.footer-content-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px 20px 20px;
}

.footer-logo {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 16px;
}

.footer-nav {
    display: flex;
    gap: 16px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.footer-nav a {
    color: white;
    text-decoration: none;
    font-size: 13px;
    opacity: 0.8;
}

.footer-nav a:hover {
    opacity: 1;
}

.footer-info {
    font-size: 12px;
    line-height: 1.6;
    opacity: 0.7;
    margin-bottom: 12px;
}

.footer-copyright {
    font-size: 11px;
    opacity: 0.6;
    padding-top: 16px;
    border-top: 1px solid rgba(255,255,255,0.1);
}

/* PWA 설치 프롬프트 */
.install-prompt {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: transparent;
    pointer-events: none;
    z-index: 10000;
    animation: fadeIn 0.3s ease-out;
}

.install-prompt .prompt-content {
    pointer-events: auto;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.btn-register-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 1000;
    background: #4A90E2;
    color: white;
    border: none;
    border-radius: 50px;
    padding: 16px 28px;
    font-size: 15px;
    font-weight: bold;
    box-shadow: 0 4px 16px rgba(74, 144, 226, 0.4);
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-register-float:hover {
    background: #3a7bc8;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(74, 144, 226, 0.5);
}

@media (max-width: 1520px) {
    .install-prompt {
        left: auto !important;
        right: 20px !important;
        transform: translateY(-50%) !important;
    }
}

@media (max-width: 1200px) {
    .page-wrapper {
        max-width: 100% !important;
        padding: 0px;
    }
    
    .install-prompt {
        display: none !important;
    }
}

@media (max-width: 768px) {
    .footer-top-section {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
    }
    
    .footer-content-wrapper {
        padding: 20px 15px 15px !important;
    }
}

/* 반응형 - 태블릿 */
@media (min-width: 768px) {
    .coupon-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 16px;
    }
    
    .mobile-header {
        padding: 16px 32px;
    }
    
    .main-content {
        padding: 24px 32px;
    }
}

/* 구분선 모바일 간격 조정 */
.section-divider {
    margin: 30px 0;
}

@media (max-width: 768px) {
    .section-divider {
        margin: 12px 0 !important;
    }
}

.btn-register-prompt:hover {
    background: #3a7bc8 !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(74, 144, 226, 0.3);
}

.btn-app-prompt:hover {
    transform: scale(1.05);
}

.btn-install:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(74, 144, 226, 0.3);
}

.btn-cancel:hover {
    color: #333 !important;
}

.prompt-content p {
    margin-bottom: 12px;
    text-align: center;
    font-size: 14px;
    font-weight: 600;
}

.prompt-buttons {
    display: flex;
    gap: 8px;
}

.btn-install, .btn-cancel {
    flex: 1;
    padding: 10px;
    border: none;
    border-radius: 20px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-install {
    background: var(--primary-color);
    color: white;
}

.btn-cancel {
    background: var(--bg-light);
    color: var(--text-gray);
}

/* 모바일 하단 바 (무료입점신청) */
.mobile-bottom-bar {
    display: none; /* PC에서는 숨김 */
}

/* 모바일 하단 날씨 바 (날씨 + 지역 + 입점신청) */
.mobile-bottom-weather-bar {
    display: none; /* PC에서는 숨김 */
}

@media (max-width: 768px) {
    .mobile-bottom-weather-bar {
        display: flex;
        align-items: center;
        justify-content: space-between;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        width: 100%;
        background: #ffffff;
        border-top: 1px solid #e0e0e0;
        padding: 10px 16px;
        padding-bottom: calc(10px + env(safe-area-inset-bottom));
        box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
        z-index: 998;
        gap: 12px;
    }
    
    .mobile-weather-display-wrapper {
        display: flex;
        align-items: center;
        gap: 10px;
        flex: 1;
        min-width: 0;
    }
    
    .mobile-weather-icon {
        width: 36px;
        height: 36px;
        border-radius: 50%;
        background: rgba(74, 144, 226, 0.1);
        color: #4A90E2;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 1rem;
        flex-shrink: 0;
    }
    
    .mobile-weather-info {
        flex: 1;
        min-width: 0;
        display: flex;
        flex-direction: column;
        gap: 2px;
    }
    
    .mobile-weather-temp {
        font-size: 0.95rem;
        font-weight: 700;
        color: #111827;
        line-height: 1.2;
    }
    
    .mobile-weather-desc {
        font-size: 0.7rem;
        color: #6b7280;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    .mobile-weather-location {
        font-size: 0.75rem;
        font-weight: 600;
        color: #6b7280;
        white-space: nowrap;
        flex-shrink: 0;
        cursor: pointer;
        transition: all 0.2s;
        padding: 4px 8px;
        border-radius: 4px;
    }
    
    .mobile-weather-location:active {
        background: rgba(74, 144, 226, 0.1);
        color: #4A90E2;
    }
    
    .mobile-register-btn {
        padding: 10px 16px;
        background: #a7a7a7;
        color: #ffffff;
        border: none;
        border-radius: 8px;
        font-size: 0.85rem;
        font-weight: 600;
        cursor: pointer;
        flex-shrink: 0;
        transition: background 0.2s;
        white-space: nowrap;
    }
    
    .mobile-register-btn:active {
        background: #357ABD;
    }
    
    /* 하단 시트가 열렸을 때 하단 바 숨김 */
    body:has(.mobile-bottom-sheet.active) .mobile-bottom-weather-bar {
        display: none !important;
    }
    
    /* 하단 바 공간 확보 */
    .main-content-wrapper {
        padding-bottom: 65px;
    }
    
    .main-content {
        padding-bottom: 65px !important;
    }
    
    .footer {
        margin-bottom: 65px;
    }
    
    /* 기존 mobile-bottom-bar 숨김 */
    .mobile-bottom-bar {
        display: none !important;
    }
}

/* 날씨 지역 선택 모달 (index.php 스타일 복사) */
body.coupon-weather-modal-open {
    overflow: hidden;
}

.coupon-weather-modal {
    position: fixed;
    inset: 0;
    z-index: 1100;
    display: none;
}

.coupon-weather-modal.is-active {
    display: block;
}

.coupon-weather-modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(4px);
}

.coupon-weather-modal-content {
    position: relative;
    max-width: 460px;
    margin: 80px auto;
    background: #ffffff;
    border-radius: 18px;
    padding: 28px 28px 24px;
    box-shadow: 0 20px 60px rgba(15, 23, 42, 0.25);
    border: 1px solid rgba(148, 163, 184, 0.18);
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.coupon-weather-modal-close {
    position: absolute;
    top: 16px;
    right: 18px;
    border: none;
    background: transparent;
    font-size: 1.5rem;
    color: #64748b;
    cursor: pointer;
    transition: color 0.2s ease;
}

.coupon-weather-modal-close:hover {
    color: #1d4ed8;
}

.coupon-weather-modal-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0;
}

.coupon-weather-modal-desc {
    font-size: 0.9rem;
    color: #475569;
    margin: 0;
}

.coupon-weather-modal-body {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.coupon-weather-modal-status {
    font-size: 0.85rem;
    color: #1d4ed8;
    background: rgba(59, 130, 246, 0.08);
    border: 1px solid rgba(59, 130, 246, 0.15);
    border-radius: 10px;
    padding: 10px 12px;
}

.coupon-weather-modal-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 8px;
    max-height: 260px;
    overflow-y: auto;
    padding-right: 4px;
}

.coupon-weather-city-btn {
    border: 1px solid rgba(148, 163, 184, 0.4);
    background: #ffffff;
    border-radius: 10px;
    padding: 10px 12px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    color: #0f172a;
}

.coupon-weather-city-btn:hover {
    border-color: rgba(59, 130, 246, 0.6);
    box-shadow: 0 2px 10px rgba(59, 130, 246, 0.15);
}

.coupon-weather-city-btn.is-selected {
    border-color: #2563eb;
    background: rgba(59, 130, 246, 0.15);
    color: #1d4ed8;
    font-weight: 600;
}

.coupon-weather-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.coupon-weather-modal-button {
    padding: 10px 18px;
    border-radius: 8px;
    border: none;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.coupon-weather-modal-cancel {
    background: #f8fafc;
    color: #475569;
}

.coupon-weather-modal-cancel:hover {
    background: #e2e8f0;
}

.coupon-weather-modal-confirm {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: #ffffff;
    box-shadow: 0 8px 18px rgba(37, 99, 235, 0.2);
}

.coupon-weather-modal-confirm:disabled {
    background: #cbd5f5;
    cursor: not-allowed;
    box-shadow: none;
}

.coupon-weather-modal-confirm:not(:disabled):hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 22px rgba(37, 99, 235, 0.25);
}

@media (max-width: 540px) {
    .coupon-weather-modal-content {
        margin: 60px 16px;
        padding: 24px 22px 20px;
    }
    
    .coupon-weather-modal-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* 모바일 하단 시트 (바텀 시트) */
.mobile-bottom-sheet {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    pointer-events: none;
}

.mobile-bottom-sheet.active {
    display: block;
    pointer-events: auto;
}

/* PC에서도 하단 시트 사용 (중앙 모달 스타일) */
@media (min-width: 769px) {
    .mobile-bottom-sheet.active .bottom-sheet-content {
        position: fixed;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        bottom: auto;
        max-width: 500px;
        width: 90%;
        max-height: 80vh;
        border-radius: 24px;
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    }
    
    .mobile-bottom-sheet.active .bottom-sheet-backdrop {
        background: rgba(0, 0, 0, 0.6);
    }
}

.bottom-sheet-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: auto;
}

.mobile-bottom-sheet.active .bottom-sheet-backdrop {
    opacity: 1;
}

.bottom-sheet-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    border-top-left-radius: 24px;
    border-top-right-radius: 24px;
    max-height: 80vh;
    transform: translateY(100%);
    transition: transform 0.5s cubic-bezier(0.32, 0.72, 0, 1);
    overflow-y: auto;
    box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.2);
    will-change: transform;
    z-index: 10001;
}

.mobile-bottom-sheet.active .bottom-sheet-content {
    transform: translateY(0);
}

/* PC에서 중앙 모달 스타일 (애니메이션 없이 바로 나타남) */
@media (min-width: 769px) {
    .bottom-sheet-content {
        position: fixed;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%) scale(0.95);
        bottom: auto;
        max-width: 500px;
        width: 90%;
        max-height: 80vh;
        border-radius: 24px;
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
        opacity: 0;
        transition: opacity 0.3s ease, transform 0.3s ease;
    }
    
    .mobile-bottom-sheet.active .bottom-sheet-content {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
    
    .mobile-bottom-sheet.active .bottom-sheet-backdrop {
        background: rgba(0, 0, 0, 0.6);
    }
}

.bottom-sheet-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    border-bottom: 1px solid #e0e0e0;
    position: sticky;
    top: 0;
    background: white;
    z-index: 1;
}

.bottom-sheet-header h2 {
    font-size: 18px;
    font-weight: bold;
    color: #333;
    margin: 0;
}

.btn-close-sheet {
    background: none;
    border: none;
    font-size: 24px;
    color: #666;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s;
}

.btn-close-sheet:active {
    background: #f0f0f0;
}

.bottom-sheet-body {
    padding: 20px;
}

.bottom-sheet-body .form-group {
    margin-bottom: 20px;
}

.bottom-sheet-body .form-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

.bottom-sheet-body .form-group input[type="text"] {
    width: 100%;
    padding: 14px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 15px;
    transition: border-color 0.2s;
}

.bottom-sheet-body .form-group input[type="text"]:focus {
    outline: none;
    border-color: #4A90E2;
}

.bottom-sheet-body .phone-input {
    display: flex;
    align-items: center;
    gap: 8px;
}

.bottom-sheet-body .phone-prefix {
    font-size: 15px;
    color: #666;
    font-weight: 500;
}

.bottom-sheet-body .phone-input input {
    flex: 1;
    padding: 14px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 15px;
    text-align: center;
}

.bottom-sheet-body .separator {
    font-size: 15px;
    color: #666;
}

.privacy-check-label {
    display: flex !important;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    cursor: pointer;
    font-weight: normal !important;
    margin-bottom: 0 !important;
}

.privacy-check-label input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin: 0;
    flex-shrink: 0;
}

.privacy-check-label span {
    flex: 1;
    font-size: 14px;
    color: #333;
}

.privacy-link {
    color: #4A90E2;
    text-decoration: underline;
    font-size: 14px;
    margin-left: auto;
}

.btn-submit-sheet {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #4A90E2, #50C878);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 10px;
}

.btn-submit-sheet:active {
    transform: scale(0.98);
    opacity: 0.9;
}

@media (max-width: 768px) {
    .mobile-bottom-sheet {
        display: none;
    }
    
    .mobile-bottom-sheet.active {
        display: block;
    }
}

/* 반응형 - 태블릿 */
@media (min-width: 768px) {
    .coupon-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 16px;
    }
    
    .mobile-header {
        padding: 16px 32px;
    }
    
    .main-content {
        padding: 24px 32px;
    }
}

/* 반응형 - 데스크톱 */
@media (min-width: 1024px) {
    .coupon-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 20px;
    }
    
    .main-content {
        max-width: 1200px;
        margin: 0 auto;
    }
}

/* 추천 업체 슬라이더 */
.featured-slider {
    margin: 20px 0;
    padding: 0 15px;
    width: 100%;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.featured-slider-container {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    width: 100%;
    background: transparent !important;
}

.featured-slider-wrapper {
    display: flex;
    gap: 15px;
    transition: transform 0.3s ease;
    will-change: transform;
    background: transparent !important;
}

.featured-slider-wrapper::-webkit-scrollbar {
    display: none;
}

.featured-slide {
    min-width: calc((100% - 45px) / 4);
    max-width: calc((100% - 45px) / 4);
    flex-shrink: 0;
    cursor: pointer;
    border-radius: 12px;
    overflow: hidden;
    background: transparent !important;
    display: flex;
    flex-direction: column;
}

.featured-slide-image {
    position: relative;
    padding-top: 60%;
    overflow: hidden;
    flex-shrink: 0;
    background: #f0f0f0 !important;
}

.featured-slide-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    padding: 0;
    margin: 0;
    border: none;
    box-sizing: border-box;
    display: block;
}

.featured-discount-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #ff4444;
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 14px;
    z-index: 10;
}

.featured-slide-content {
    position: relative;
    padding: 12px;
    background: #f9e01f !important;
    display: flex;
    flex-direction: column;
    min-height: 140px;
    height: 150px;
}

.featured-slide-inner {
    position: relative;
    z-index: 2;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.featured-category {
    font-size: 11px;
    color: #666;
    margin-bottom: 4px;
}

.featured-title {
    font-size: 16px;
    font-weight: bold;
    color: #333;
    margin: 0 0 6px 0;
    min-height: 44px;
    max-height: 44px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.4;
}

.featured-discount-item {
    position: relative;
    padding: 8px 10px;
    background: #ffffff !important;
    border-radius: 6px;
    z-index: 2;
    min-height: 54px;
    max-height: 54px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    margin-top: auto;
}

.featured-menu-name {
    font-size: 12px;
    color: #333;
    margin-bottom: 5px;
    font-weight: 500;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 17px;
}

.featured-price-row {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    height: 20px;
}

.featured-original-price {
    text-decoration: line-through;
    color: #999;
    font-size: 11px;
}

.featured-arrow {
    color: #999;
    font-size: 11px;
}

.featured-discount-price {
    color: #ff4444;
    font-weight: bold;
    font-size: 15px;
}

.featured-price-empty {
    min-height: 20px;
}

.featured-slider-dots {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 15px;
    flex-wrap: wrap;
    padding: 0 15px;
}

.featured-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #ddd;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.featured-dot.active {
    width: 24px;
    border-radius: 4px;
    background: #4A90E2;
    transform: scale(1);
    border-color: #4A90E2;
}

.featured-dot:hover:not(.active) {
    background: #4A90E2;
    transform: scale(1.2);
    border-color: #4A90E2;
}

.featured-dot:active {
    transform: scale(0.95);
}

@media (max-width: 768px) {
    .featured-slide {
        min-width: 100%;
        max-width: 100%;
        border-radius: 0;
    }
    
    .featured-slider-wrapper {
        gap: 0;
    }
    
    .featured-slider {
        padding: 0;
        margin: 8px 0;
    }
    
    .featured-slider-container {
        border-radius: 0;
    }
}

/* 다크모드 미디어쿼리 */
@media (prefers-color-scheme: dark) {
    :root {
        --bg-light: #1a1a1a;
        --bg-white: #2d2d2d;
        --text-dark: #f0f0f0;
    }
}

