:root { 
    --primary: #2a7fff; 
    --primary-grad: linear-gradient(135deg, #2a7fff 0%, #4dabff 100%);
    --bg: #f5f5f7;
    --card: #ffffff;
}

body { 
    background: radial-gradient(circle at top right, #e8f1ff, #f5f5f7);
    color: #1d1d1f; 
    font-family: -apple-system, sans-serif; 
    margin: 0; min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.mobile-container { 
    max-width: 550px; margin: 0 auto; 
    min-height: 100vh; position: relative;
    background: rgba(255,255,255,0.98);
}

@media (min-width: 768px) {
    html { font-size: 14px; }
    body { 
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        padding: 0;
        display: block;
    }
    .mobile-container { 
        width: 100%;
        max-width: none;
        min-height: 100vh;
        border-radius: 0;
        overflow: auto;
        box-shadow: none;
        background: rgba(255,255,255,0.98);
    }
    .pc-layout { 
        display: flex;
        min-height: calc(100vh - 70px);
        height: auto;
        max-height: none;
        padding: 30px 40px;
        gap: 30px;
        max-width: 1200px;
        margin: 0 auto;
        align-items: flex-start;
    }
    .pc-left { 
        flex: 1; 
        padding: 0;
        border-right: none;
        background: transparent;
        display: flex;
        flex-direction: column;
    }
    .pc-right { 
        flex: 1; 
        padding: 0;
        max-width: 600px;
        display: flex;
        flex-direction: column;
    }
    .pc-desc-scroll { 
        flex: 1; 
        overflow-y: auto; 
        margin-top: 20px;
        padding-right: 20px;
        margin-bottom: 0;
    }
    .pc-desc-scroll::-webkit-scrollbar { width: 6px; }
    .pc-desc-scroll::-webkit-scrollbar-track { background: #f1f1f1; border-radius: 3px; }
    .pc-desc-scroll::-webkit-scrollbar-thumb { background: #ccc; border-radius: 3px; }
    .bottom-nav { display: none; }
    .pc-form-footer { 
        margin-top: 40px; 
        padding-top: 30px; 
        border-top: 1px solid rgba(0,0,0,0.1); 
    }
    .pc-bottom-buttons { 
        display: flex !important; 
        gap: 20px; 
        margin-bottom: 30px; 
    }
    .pc-btn-pay { 
        flex: 1; 
        height: 54px; 
        background: var(--primary-grad); 
        color: #fff; 
        border: none; 
        border-radius: 12px; 
        font-weight: 600; 
        font-size: 17px; 
        cursor: pointer; 
        transition: 0.2s; 
        box-shadow: 0 4px 15px rgba(42,127,255,0.3); 
    }
    .pc-btn-pay:hover { 
        transform: translateY(-2px); 
        box-shadow: 0 8px 25px rgba(42,127,255,0.4); 
    }
    .pc-btn-back { 
        height: 54px; 
        background: rgba(255,255,255,0.9); 
        color: #666; 
        border: 1px solid rgba(0,0,0,0.1); 
        border-radius: 12px; 
        font-weight: 600; 
        font-size: 17px; 
        padding: 0 30px; 
        cursor: pointer; 
        transition: 0.2s; 
    }
    .pc-btn-back:hover { 
        background: rgba(255,255,255,1); 
        border-color: var(--primary);
        color: var(--primary);
    }
    .pc-helper-links { 
        display: flex !important; 
        gap: 30px; 
        margin-top: 25px; 
        padding-top: 25px; 
        border-top: 1px solid rgba(0,0,0,0.05); 
    }
    .pc-helper-link { 
        display: flex; 
        align-items: center; 
        gap: 10px; 
        color: #666; 
        text-decoration: none; 
        font-size: 16px; 
        font-weight: 500; 
        transition: 0.2s; 
    }
    .pc-helper-link:hover { 
        color: var(--primary); 
    }
    .content { 
        padding: 0; 
    }
    .header { 
        background: rgba(255,255,255,1); 
        padding: 0 40px; 
        height: 70px;
        border-bottom: 1px solid rgba(0,0,0,0.08);
        box-shadow: 0 2px 10px rgba(0,0,0,0.05);
        position: sticky;
        top: 0;
        z-index: 1000;
    }
    .back-link { 
        font-size: 24px;
        width: 50px;
        height: 50px;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 50%;
        transition: background-color 0.2s;
    }
    .back-link:hover { background-color: rgba(0,0,0,0.05); }
    .title { 
        font-size: 20px;
        font-weight: 600;
        letter-spacing: 0.5px;
    }
    .product-name { font-size: 24px; }
    .price-tag { font-size: 36px; }
    .price-tag small { font-size: 20px; }
    .daily-hint { font-size: 14px; padding: 5px 10px; }
    .desc-text { font-size: 15px; line-height: 1.7; }
    .pay-option { padding: 20px 8px; }
    .pay-option i { font-size: 32px; margin-bottom: 12px; }
    .pay-option img { width: 36px; height: 36px; margin-bottom: 12px; }
    .pay-option span { font-size: 15px; }
    .input-group-custom input { height: 54px; font-size: 16px; }
    .section-title { font-size: 15px; margin: 25px 0 15px 5px; }
    .pc-right .section-title:first-of-type { margin-top: 10px; }
}

@media (min-width: 1400px) {
    html { font-size: 15px; }
    .pc-layout { max-width: 1300px; padding: 40px; }
}

.header { 
    background: rgba(255,255,255,0.9); 
    backdrop-filter: blur(10px);
    height: 60px; 
    display: flex; 
    align-items: center; 
    padding: 0 20px; 
    border-bottom: 1px solid rgba(0,0,0,0.05); 
    position: relative; 
}
.back-link { color: var(--primary); font-size: 20px; width: 40px; text-decoration: none; position: absolute; left: 20px; }
.title { flex: 1; text-align: center; font-weight: 700; font-size: 18px; }

@media (max-width: 767px) { 
    .content { 
        padding: 20px; 
        padding-bottom: 100px; 
    } 
}

.product-card { 
    background: #fff; 
    border-radius: 20px; 
    padding: 25px; 
    margin-bottom: 20px; 
    border: 1px solid rgba(0,0,0,0.03);
    box-shadow: 0 8px 30px rgba(0,0,0,0.05);
}

.product-card.with-image {
    display: flex;
    gap: 25px;
    align-items: center;
}

.product-image-container {
    flex-shrink: 0;
    width: 120px;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 12px;
    cursor: pointer;
    transition: transform 0.3s ease;
    background-color: transparent;
}

.product-image:hover {
    transform: scale(1.03);
}

.product-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.product-name { 
    font-size: 28px; 
    font-weight: 700; 
    margin-bottom: 10px;
    line-height: 1.3;
}

.price-container {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 8px;
}

.price-tag { 
    color: #ff3b30; 
    font-size: 42px; 
    font-weight: 800; 
    display: flex; 
    align-items: baseline; 
}

.price-tag small { 
    font-size: 24px; 
    margin-right: 4px; 
}

.daily-hint { 
    font-size: 14px; 
    color: var(--primary); 
    background: rgba(42,127,255,0.1); 
    padding: 5px 10px; 
    border-radius: 8px; 
    font-weight: 600; 
    white-space: nowrap;
}

.stock-info { 
    font-size: 16px; 
    color: #86868b; 
    margin-top: 5px;
}

@media (max-width: 767px) {
    .product-card { 
        padding: 20px; 
        margin-bottom: 18px; 
        border-radius: 18px; 
    }
    
    .product-card.with-image {
        gap: 18px;
        padding: 18px;
    }
    
    .product-image-container {
        width: 90px;
        height: 90px;
    }
    
    .product-name { 
        font-size: 20px; 
        margin-bottom: 8px;
    }
    
    .price-container {
        gap: 6px;
        margin-bottom: 6px;
    }
    
    .price-tag { 
        font-size: 28px;
    }
    
    .price-tag small { 
        font-size: 18px; 
    }
    
    .daily-hint { 
        font-size: 12px; 
        padding: 4px 8px; 
        border-radius: 6px;
    }
    
    .stock-info { 
        font-size: 13px; 
        margin-top: 4px;
    }
}

@media (min-width: 768px) {
    .product-card.with-image {
        gap: 30px;
        padding: 25px 30px;
    }
    
    .product-image-container {
        width: 140px;
        height: 140px;
    }
    
    .product-name { 
        font-size: 24px; 
    }
    
    .price-tag { 
        font-size: 36px; 
    }
    
    .price-tag small { 
        font-size: 20px; 
    }
}

.section-title { 
    font-size: 16px; 
    color: #86868b; 
    font-weight: 600; 
    margin: 25px 0 15px 5px;
    display: flex; 
    align-items: center; 
    letter-spacing: 0.5px;
}
.section-title::after { 
    content: ""; 
    flex: 1; 
    height: 1px; 
    background: linear-gradient(90deg, rgba(0,0,0,0.05) 0%, transparent 100%); 
    margin-left: 15px; 
}

.pay-list { 
    display: grid; 
    gap: 12px;
}

.pay-list-1 { grid-template-columns: 1fr; max-width: 200px; margin: 0 auto; }
.pay-list-2 { grid-template-columns: repeat(2, 1fr); }
.pay-list-3 { grid-template-columns: repeat(3, 1fr); }
.pay-list-4 { grid-template-columns: repeat(2, 1fr); }
.pay-list-5, .pay-list-6 { grid-template-columns: repeat(3, 1fr); }

@media (min-width: 768px) {
    .pay-list-4, .pay-list-5, .pay-list-6 { 
        grid-template-columns: repeat(3, 1fr); 
    }
    .pay-list { 
        gap: 15px;
    }
}

.pay-option { 
    background: #fff; 
    border: 2px solid #f2f2f7; 
    border-radius: 18px; 
    padding: 20px 8px; 
    text-align: center; 
    cursor: pointer; 
    position: relative;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); 
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
}

.pay-option:hover { 
    transform: translateY(-4px); 
    box-shadow: 0 12px 30px rgba(0,0,0,0.08); 
}

.pay-option img { 
    width: 36px; 
    height: 36px; 
    object-fit: contain; 
    margin-bottom: 10px; 
    display: block; 
    margin: 0 auto 10px; 
}

.pay-option i { 
    font-size: 32px;
    display: block; 
    margin-bottom: 12px; 
}

.pay-option span { 
    font-size: 15px; 
    font-weight: 600; 
}

.pay-option.active { 
    border-color: var(--primary); 
    background: rgba(42,127,255,0.04); 
    box-shadow: 0 6px 20px rgba(42,127,255,0.2);
}

.pay-option.active::before { 
    content: ""; 
    position: absolute; 
    right: 10px; 
    top: 10px; 
    background: var(--primary); 
    width: 20px; 
    height: 20px; 
    border-radius: 50%; 
    border: 2px solid white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.pay-option.active::after { 
    content: "✓"; 
    position: absolute; 
    right: 10px; 
    top: 10px; 
    color: white; 
    width: 20px; 
    height: 20px; 
    display: flex; 
    align-items: center; 
    justify-content: center;
    font-size: 12px; 
    font-weight: bold;
    z-index: 2;
}

.input-group-custom { 
    background: rgba(245,245,247,0.8); 
    border: 1.5px solid transparent; 
    border-radius: 16px; 
    padding: 8px 20px; 
    display: flex; 
    align-items: center; 
    margin-bottom: 20px; 
    transition: all 0.2s;
}
.input-group-custom:focus-within { 
    background: #fff; 
    border-color: var(--primary); 
    box-shadow: 0 0 0 4px rgba(42,127,255,0.1); 
}
.input-group-custom i { color: #86868b; width: 30px; font-size: 20px; }
.input-group-custom input { border: none; background: transparent; height: 60px; flex: 1; font-size: 18px; outline: none; font-weight: 500; }

.qty-box { display: flex; align-items: center; background: #f2f2f7; border-radius: 24px; padding: 6px; }
.qty-btn { width: 44px; height: 44px; border-radius: 22px; border: none; background: #fff; font-size: 22px; box-shadow: 0 4px 10px rgba(0,0,0,0.06); font-weight: bold; cursor: pointer; transition: 0.2s; }
.qty-btn:hover { box-shadow: 0 6px 15px rgba(0,0,0,0.1); }
.qty-num { font-weight: 800; font-size: 22px; width: 60px; text-align: center; border: none; background: transparent; padding: 0; line-height: 44px; }

@media (max-width: 767px) {
    .mobile-container { max-width: 550px; }
    .pay-option { padding: 16px 5px; }
    .pay-option img { width: 30px; height: 30px; }
    .pay-option i { font-size: 26px; }
    .pay-option span { font-size: 13px; }
    .pay-option.active::before,
    .pay-option.active::after {
        width: 18px;
        height: 18px;
        right: 8px;
        top: 8px;
        font-size: 11px;
    }
    .input-group-custom { padding: 5px 18px; margin-bottom: 15px; }
    .input-group-custom input { height: 50px; font-size: 16px; }
    .qty-box { border-radius: 20px; padding: 4px; }
    .qty-btn { width: 36px; height: 36px; font-size: 18px; }
    .qty-num { font-size: 18px; width: 50px; line-height: 36px; }
}

.bottom-nav { 
    position: fixed; 
    bottom: 15px; 
    width: calc(100% - 32px); 
    left: 50%; 
    transform: translateX(-50%); 
    background: rgba(255, 255, 255, 0.98); 
    backdrop-filter: blur(15px); 
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255,255,255,0.8); 
    padding: 12px 16px; 
    display: flex; 
    align-items: center; 
    justify-content: space-between;
    flex-wrap: nowrap;
    z-index: 1000; 
    max-width: 520px; 
    border-radius: 16px; 
    box-shadow: 0 10px 30px rgba(0,0,0,0.12);
    box-sizing: border-box;
}

.nav-left { 
    display: flex; 
    gap: 20px; 
    margin-right: 15px; 
    align-items: center;
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.nav-item { 
    display: flex; 
    align-items: center; 
    gap: 6px; 
    color: #1d1d1f; 
    text-decoration: none; 
    font-size: 15px; 
    font-weight: 600; 
    transition: 0.2s; 
    white-space: nowrap;
    overflow: visible;
    flex-shrink: 0;
}

.nav-item i { 
    font-size: 20px; 
    flex-shrink: 0;
}

.nav-item:hover { 
    color: var(--primary); 
}

.nav-item span {
    display: inline;
}

.btn-pay { 
    height: 46px; 
    min-width: 130px; 
    max-width: 160px; 
    background: var(--primary-grad); 
    color: #fff; 
    border: none; 
    border-radius: 23px; 
    font-weight: 700; 
    font-size: 15px; 
    box-shadow: 0 6px 20px rgba(42,127,255,0.3); 
    padding: 0 16px; 
    cursor: pointer; 
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.btn-pay:hover { 
    transform: translateY(-2px); 
    box-shadow: 0 10px 25px rgba(42,127,255,0.4); 
}

.btn-pay:active { 
    transform: scale(0.96); 
}

@media (max-width: 767px) {
    .bottom-nav {
        padding: 10px 14px;
        width: calc(100% - 28px);
        bottom: 12px;
        max-width: 500px;
    }
    
    .nav-left {
        gap: 18px;
        margin-right: 12px;
    }
    
    .nav-item {
        font-size: 14px;
        gap: 5px;
    }
    
    .nav-item i {
        font-size: 18px;
    }
    
    .btn-pay {
        height: 44px;
        min-width: 120px;
        max-width: 150px;
        font-size: 14px;
        padding: 0 14px;
        border-radius: 22px;
    }
    
    @media (max-width: 420px) {
        .bottom-nav {
            padding: 8px 12px;
            width: calc(100% - 24px);
        }
        
        .nav-left {
            gap: 15px;
            margin-right: 10px;
        }
        
        .nav-item {
            font-size: 13px;
        }
        
        .nav-item i {
            font-size: 17px;
        }
        
        .btn-pay {
            min-width: 110px;
            font-size: 13px;
            padding: 0 12px;
        }
    }
    
    @media (max-width: 360px) {
        .nav-left {
            gap: 10px;
        }
        
        .nav-item {
            font-size: 12px;
            gap: 4px;
        }
        
        .nav-item i {
            font-size: 16px;
        }
        
        .btn-pay {
            min-width: 100px;
            font-size: 13px;
            padding: 0 10px;
        }
    }
}

.overlay { 
    display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0; 
    background: rgba(0,0,0,0.5); backdrop-filter: blur(5px); -webkit-backdrop-filter: blur(5px);
    z-index: 2000; align-items: center; justify-content: center; animation: fadeIn 0.2s ease;
}

@keyframes fadeIn { 
    from { opacity: 0; } 
    to { opacity: 1; } 
}

.overlay.active { 
    display: flex; 
}

.alert-box { 
    background: #fff; width: 85%; max-width: 320px; border-radius: 20px; padding: 25px; 
    box-shadow: 0 20px 40px rgba(0,0,0,0.15); animation: slideUp 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes slideUp { 
    from { opacity: 0; transform: translateY(20px); } 
    to { opacity: 1; transform: translateY(0); } 
}

.alert-btn { 
    background: var(--primary-grad); color: #fff; border: none; width: 100%; padding: 14px; 
    border-radius: 12px; margin-top: 20px; font-weight: 700; cursor: pointer; font-size: 16px; transition: 0.2s;
}

.alert-btn:hover { 
    transform: translateY(-2px); 
    box-shadow: 0 6px 15px rgba(42,127,255,0.3); 
}

.image-preview-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.9);
    z-index: 3000;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.image-preview-box {
    max-width: 90%;
    max-height: 90%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-preview-box img {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 0 30px rgba(0,0,0,0.5);
}

.close-preview {
    position: absolute;
    top: 20px;
    right: 20px;
    color: white;
    font-size: 30px;
    cursor: pointer;
    z-index: 3001;
    background: rgba(0,0,0,0.5);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.desc-text { 
    font-size: 16px; 
    color: #515154; 
    line-height: 1.7;
    padding: 0 5px; 
}

.desc-image {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    margin: 8px 0;
    cursor: pointer;
    transition: transform 0.3s ease;
    background-color: transparent !important;
}

.desc-image:hover {
    transform: scale(1.02);
}

.notice-content { 
    font-size:15px; 
    color:#666; 
    line-height:1.5; 
    text-align:left; 
    max-height: 300px; 
    overflow-y: auto; 
    padding: 10px 0;
}

a, a:hover, a:focus, a:active { 
    text-decoration: none !important; 
    outline: none !important; 
}

.content .desc-text:last-child {
    margin-bottom: 80px;
}

.promo-hints-container {
    background: #ffffff;
    border: 1px solid rgba(0,0,0,0.03);
    border-radius: 18px;
    padding: 18px 20px;
    margin-bottom: 20px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.05);
}

.promo-hints-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 16px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 12px;
    letter-spacing: 0.5px;
}

.promo-hints-title i {
    font-size: 18px;
}

.promo-hints-list {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.promo-hint-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #1d1d1f;
    font-weight: 500;
    padding: 6px 12px;
    background: rgba(42,127,255,0.05);
    border-radius: 12px;
    white-space: nowrap;
}

.promo-hint-item i {
    color: #07c160;
    font-size: 14px;
    flex-shrink: 0;
}

@media (max-width: 767px) {
    .promo-hints-container {
        padding: 15px 18px;
        margin-bottom: 18px;
        border-radius: 16px;
    }
    
    .promo-hints-title {
        font-size: 15px;
        margin-bottom: 10px;
    }
    
    .promo-hints-list {
        gap: 8px;
    }
    
    .promo-hint-item {
        font-size: 13px;
        gap: 6px;
        padding: 5px 10px;
    }
}

#couponCheckBtn.loading {
    background: #ccc !important;
    pointer-events: none;
}

#couponCheckBtn.loading::after {
    content: '';
    display: inline-block;
    width: 12px;
    height: 12px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 0.8s linear infinite;
    margin-left: 6px;
    vertical-align: middle;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}