/* 약품 상세 모달 스타일 */
.medicine-detail-modal {
    max-width: 1000px;
    width: 95%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding: 0;
    background: white;
    border-radius: 20px;
}

.medicine-detail-scroll {
    overflow-y: auto;
    padding: 40px;
    max-height: 90vh;
}

/* 헤더 섹션 */
.medicine-detail-header {
    text-align: center;
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 2px solid #f0f0f0;
}

.symptom-badge-container {
    margin-bottom: 20px;
}

.symptom-badge-large {
    display: inline-block;
    background: linear-gradient(135deg, #FF8C42 0%, #FFA500 100%);
    color: white;
    padding: 10px 24px;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(255, 140, 66, 0.3);
    letter-spacing: 0.5px;
}

.medicine-title {
    font-size: 2.2rem;
    color: #2c3e50;
    margin: 0 0 16px 0;
    cursor: pointer;
    transition: all 0.3s;
    line-height: 1.3;
    word-break: keep-all;
    font-weight: 700;
    padding: 0 20px;
}

.medicine-title:hover {
    color: #FF8C42;
    transform: scale(1.02);
}

.header-meta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    margin-top: 12px;
}

.copy-hint {
    font-size: 0.9rem;
    color: #999;
    margin: 0;
    font-weight: 500;
}

.header-price {
    font-size: 1.4rem;
    color: #FF6B35;
    font-weight: 700;
    margin: 0;
    padding: 6px 16px;
    background: linear-gradient(135deg, #fff0f0 0%, #ffe0e0 100%);
    border-radius: 20px;
    border: 2px solid #FF6B35;
}

.medicine-detail-main {
    margin-bottom: 40px;
}

.medicine-image-container {
    width: 100%;
    max-width: 500px;
    margin: 0 auto 30px;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.medicine-image-container img {
    width: 100%;
    height: auto;
    display: block;
}

/* 정보 섹션 */
.medicine-info-section {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 30px;
}

.info-box {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.3s;
}

.info-box:hover {
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

.info-box-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px 24px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-bottom: 2px solid #e0e0e0;
}

.info-box-icon {
    font-size: 1.8rem;
    flex-shrink: 0;
}

.info-box-header h3 {
    color: #2c3e50;
    font-size: 1.2rem;
    margin: 0;
    font-weight: 700;
}

.info-box-content {
    padding: 24px;
}

/* 주요 성분 박스 */
.ingredients-box .info-box-header {
    background: linear-gradient(135deg, #fff5eb 0%, #ffe4c4 100%);
    border-bottom-color: #FF8C42;
}

.ingredients-text {
    color: #555;
    line-height: 1.8;
    margin: 0;
    font-size: 1rem;
    word-break: keep-all;
}

/* 주의사항 박스 */
.warning-box {
    background: linear-gradient(135deg, #fff8f0 0%, #fff0e0 100%);
}

.warning-box .info-box-header {
    background: linear-gradient(135deg, #ffe4c4 0%, #ffd4a4 100%);
    border-bottom-color: #FFB366;
}

.warning-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.warning-list li {
    color: #555;
    padding: 12px 0;
    padding-left: 32px;
    position: relative;
    line-height: 1.6;
    font-size: 1rem;
    border-bottom: 1px solid rgba(255, 140, 66, 0.1);
}

.warning-list li:last-child {
    border-bottom: none;
}

.warning-list li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #FF8C42;
    font-weight: bold;
    font-size: 1.2rem;
}

/* 관련 약품 섹션 */
.related-medicines {
    margin-top: 40px;
    padding-top: 40px;
    border-top: 2px solid #f0f0f0;
}

.related-title {
    font-size: 1.4rem;
    color: #2c3e50;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 700;
}

.related-icon {
    font-size: 1.6rem;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 16px;
}

.related-card {
    background: white;
    border: 2px solid #f0f0f0;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s;
}

.related-card:hover {
    border-color: #FF8C42;
    box-shadow: 0 6px 20px rgba(255, 140, 66, 0.2);
    transform: translateY(-4px);
}

.related-image {
    width: 100%;
    height: 120px;
    overflow: hidden;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
}

.related-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.related-info {
    padding: 12px;
}

.related-info h4 {
    font-size: 0.9rem;
    color: #2c3e50;
    margin: 0 0 8px 0;
    font-weight: 600;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.related-price {
    font-size: 1rem;
    color: #FF6B35;
    font-weight: 700;
    margin: 0;
}

/* 모바일 반응형 - 태블릿 */
@media (max-width: 768px) {
    .medicine-detail-modal {
        width: 100%;
        max-width: 100%;
        max-height: 95vh;
        border-radius: 20px 20px 0 0;
        margin: 0;
    }

    .medicine-detail-scroll {
        padding: 30px 20px;
        max-height: 95vh;
    }

    .medicine-detail-header {
        margin-bottom: 30px;
        padding-bottom: 24px;
    }

    .medicine-title {
        font-size: 1.8rem;
        padding: 0 10px;
        margin-bottom: 12px;
    }

    .symptom-badge-large {
        font-size: 0.9rem;
        padding: 8px 20px;
    }

    .header-meta {
        flex-direction: column;
        gap: 10px;
    }

    .copy-hint {
        font-size: 0.85rem;
    }

    .header-price {
        font-size: 1.2rem;
        padding: 5px 14px;
    }

    .info-box-header {
        padding: 16px 20px;
    }

    .info-box-icon {
        font-size: 1.5rem;
    }

    .info-box-header h3 {
        font-size: 1.1rem;
    }

    .info-box-content {
        padding: 20px;
    }

    .ingredients-text {
        font-size: 0.95rem;
    }

    .warning-list li {
        font-size: 0.95rem;
        padding: 10px 0 10px 28px;
    }

    .related-title {
        font-size: 1.2rem;
    }

    .related-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .related-image {
        height: 100px;
    }

    .related-info {
        padding: 10px;
    }

    .related-info h4 {
        font-size: 0.85rem;
    }

    .related-price {
        font-size: 0.9rem;
    }
}

/* 모바일 반응형 - 스마트폰 */
@media (max-width: 480px) {
    .medicine-detail-modal {
        width: 100%;
        max-width: 100%;
        height: 100vh;
        max-height: 100vh;
        border-radius: 0;
        margin: 0;
    }

    .medicine-detail-scroll {
        padding: 20px 16px;
        max-height: 100vh;
    }

    .medicine-detail-header {
        margin-bottom: 24px;
        padding-bottom: 20px;
    }

    .medicine-title {
        font-size: 1.5rem;
        padding: 0 5px;
        margin-bottom: 10px;
        line-height: 1.4;
    }

    .symptom-badge-large {
        font-size: 0.85rem;
        padding: 7px 18px;
    }

    .header-meta {
        gap: 8px;
    }

    .copy-hint {
        font-size: 0.8rem;
    }

    .header-price {
        font-size: 1.1rem;
        padding: 4px 12px;
    }

    .medicine-image-container {
        max-width: 100%;
        margin-bottom: 20px;
    }

    .info-box-header {
        padding: 14px 16px;
    }

    .info-box-icon {
        font-size: 1.3rem;
    }

    .info-box-header h3 {
        font-size: 1rem;
    }

    .info-box-content {
        padding: 16px;
    }

    .ingredients-text {
        font-size: 0.9rem;
        line-height: 1.6;
    }

    .warning-list li {
        font-size: 0.9rem;
        padding: 8px 0 8px 26px;
    }

    .warning-list li:before {
        font-size: 1rem;
    }

    .related-medicines {
        margin-top: 30px;
        padding-top: 30px;
    }

    .related-title {
        font-size: 1.1rem;
        margin-bottom: 16px;
    }

    .related-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .related-card {
        display: flex;
        flex-direction: row;
    }

    .related-image {
        width: 100px;
        height: 80px;
        flex-shrink: 0;
    }

    .related-info {
        flex: 1;
        display: flex;
        flex-direction: column;
        justify-content: center;
        padding: 10px;
    }

    .related-info h4 {
        font-size: 0.85rem;
        margin-bottom: 4px;
    }

    .related-price {
        font-size: 0.9rem;
    }

    .modal-close {
        width: 36px;
        height: 36px;
        top: 12px;
        right: 12px;
    }

    .modal-close svg {
        width: 18px;
        height: 18px;
    }
}

/* 아주 작은 모바일 */
@media (max-width: 360px) {
    .medicine-title {
        font-size: 1.3rem;
    }

    .symptom-badge-large {
        font-size: 0.8rem;
        padding: 6px 16px;
    }

    .header-price {
        font-size: 1rem;
    }

    .info-box-header h3 {
        font-size: 0.95rem;
    }

    .ingredients-text,
    .warning-list li {
        font-size: 0.85rem;
    }
}
