/* General */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+KR:wght@400;700&display=swap');

body {
    font-family: 'Noto Sans KR', sans-serif;
    margin: 0;
    color: #333;
    background-color: #f9f9f9;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.main-header {
    background-color: #fff;
    padding: 15px 0;
    border-bottom: 1px solid #eee;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.main-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo a {
    text-decoration: none;
    color: #0056b3;
    font-size: 24px;
    font-weight: 700;
}

/* ★★★ 햄버거 메뉴 ★★★ */
.menu-toggle {
    display: none; /* PC에서는 숨김 */
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    z-index: 1001;
}

.menu-toggle span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: #333;
    margin: 5px 0;
    transition: all 0.3s ease;
}

.main-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 25px;
}

.main-nav a {
    text-decoration: none;
    color: #555;
    font-size: 16px;
    font-weight: 700;
    padding-bottom: 5px;
    border-bottom: 2px solid transparent;
    transition: all 0.3s;
}

.main-nav a:hover,
.main-nav a.active {
    color: #0056b3;
    border-bottom-color: #0056b3;
}

/* PC에서만 주문조회 표시 */
.header-utils {
    /* PC에서 메뉴와 주문조회를 분리하여 배치 */
    display: block;
}

.header-utils a {
    text-decoration: none;
    color: #555;
    margin-left: 20px;
    font-size: 15px;
    font-weight: 700;
}

/* Hero Section */
.hero-section {
    background: url('../img/hero-background.jpg') no-repeat center center/cover;
    color: #fff;
    text-align: center;
    padding: 100px 0;
    position: relative; /* 오버레이의 기준점 */
    z-index: 1; /* 콘텐츠가 오버레이 위로 나오도록 설정 */
}

/* 오버레이 (반투명한 검은색 레이어) */
.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* 투명도 40%의 검은색 배경 */
    background-color: rgba(0, 0, 0, 0.4); 
    z-index: 0; /* 배경 바로 위에 위치 */
}

/* 텍스트 컨텐츠 */
.hero-content {
    position: relative;
    z-index: 2; /* 오버레이(z-index:0)보다 더 앞에 위치 */
}

.hero-content h1 {
    font-size: 48px;
    margin: 10px 0;
    font-weight: 700;
}

.hero-content h2 {
    font-size: 24px;
    font-weight: 400;
    margin-bottom: 20px;
}

.hero-content p {
    font-size: 18px;
    margin-bottom: 30px;
}

.cta-button {
    background-color: #007bff;
    color: #fff;
    padding: 15px 30px;
    text-decoration: none;
    font-size: 18px;
    font-weight: 700;
}

.cta-button:hover {
    background-color: #0056b3;
}

/* Section Titles */
.section-title {
    text-align: center;
    font-size: 32px;
    margin-bottom: 50px;
    font-weight: 700;
}

/* Product List Section */
.product-list-section {
    padding: 80px 0;
}

/* 상품 목록 PC 4개 / 모바일 2개 반영 */
.product-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr); /* PC: 4개씩 */
    gap: 30px;
}

/* 모바일 상품 2개씩 표시 */
@media (max-width: 768px) {
    .product-grid {
        grid-template-columns: repeat(2, 1fr); 
    }
}

.product-item {
    background-color: #fff;
    border: 1px solid #eee;
    border-radius: 10px;
    overflow: hidden;
    text-align: center;
    transition: box-shadow 0.3s, transform 0.3s;
    display: flex; 
    flex-direction: column;
}

.product-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.08);
}

.product-link {
    text-decoration: none;
    color: inherit;
    flex-grow: 1; 
}

.product-image-box {
    width: 100%;
    padding-top: 100%; 
    position: relative;
    overflow: hidden;
}

.product-image-box img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-name {
    font-size: 18px;
    margin: 15px 0 5px 0; 
    padding: 0 10px;
}

.price {
    font-size: 20px;
    font-weight: 700;
    color: #0056b3;
    margin-bottom: 15px;
}

/* 구매하기 버튼 스타일 */
.btn-buy-now {
    /* 1. 글자를 정중앙에 배치하기 위한 핵심 속성 추가 */
    display: flex; /* Flexbox 활성화 */
    justify-content: center; /* 가로 중앙 정렬 (좌우) */
    align-items: center;   /* 세로 중앙 정렬 (상하) */
    
    /* 2. 기존 속성 유지 */
    background-color: #4169e1; /* Royal Blue */
    color: #fff;
    border: none;
    width: 100%;
    font-size: 16px;
    font-weight: 700;
    text-decoration: none; 
    
    /* 4. (선택 사항) 높이 지정 및 줄바꿈 방지 */
    height: 50px; /* 버튼의 높이를 명확하게 지정 */
    white-space: nowrap; /* 글자가 줄바꿈되지 않도록 하여 중앙 정렬 유지 */
}

.btn-buy-now:hover {
    background-color: #375ab8;
}

/* 기존 장바구니 버튼 삭제 */
.btn-add-to-cart {
    display: none; 
}


.no-data-message {
    grid-column: 1 / -1;
    text-align: center;
    font-size: 18px;
    color: #888;
}

/* Info & Shipping Section */
.info-shipping-section {
    background-color: #e9ecef;
    padding: 80px 0;
}

.info-shipping-section .container {
    display: flex;
    gap: 30px;
    justify-content: center;
}

.info-box {
    background-color: #fff;
    padding: 30px;
    border-radius: 10px;
    flex: 1;
    max-width: 500px;
}

.info-box h3 {
    margin-top: 0;
    font-size: 22px;
    border-bottom: 2px solid #0056b3;
    padding-bottom: 10px;
    margin-bottom: 20px;
}

/* Footer */
.main-footer {
    background-color: #343a40;
    color: #fff;
    padding: 60px 0 20px;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    margin-bottom: 40px;
}

.footer-col {
    flex: 1;
    max-width: 300px;
}

.footer-title {
    font-size: 18px;
    margin-bottom: 20px;
    border-bottom: 1px solid #555;
    padding-bottom: 10px;
}

.footer-col ul {
    list-style: none;
    padding: 0;
}

.footer-col li {
    margin-bottom: 10px;
}

.footer-col a {
    text-decoration: none;
    color: #ccc;
    transition: color 0.3s;
}

.footer-col a:hover {
    color: #fff;
}

.copyright {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #555;
    font-size: 14px;
    color: #ccc;
}


/* --- 복원된 섹션 스타일 --- */
.details-section {
    padding: 80px 0;
}

.info-content p {
    line-height: 1.8;
    margin-bottom: 20px;
    font-size: 16px;
}

.info-content ul {
    list-style: disc;
    margin-left: 20px;
    padding-left: 0;
    line-height: 1.8;
    margin-bottom: 20px;
}

/* Video Section */
.video-container {
    position: relative;
    max-width: 100%; 
    margin: 30px auto;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.video-container video {
    display: block;
}

.video-caption {
    text-align: center;
    font-size: 14px;
    color: #6c757d;
    margin-top: 10px;
}

/* Info Section (어린이 멀미약) */
.info-section {
    padding: 80px 0;
    background-color: #fff; 
}

.info-title.sub-title {
    font-size: 26px;
    margin-bottom: 20px;
    color: #007bff;
}

.caution-text {
    padding: 15px;
    border-radius: 5px;
    font-size: 16px;
}

/* 어린이 멀미약 상품 2개씩만 보이도록 수정 (PC/모바일 공통) */
.kids-product-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr); 
    gap: 30px;
    max-width: 600px; /* 상품 2개에 맞게 중앙 정렬 폭 조정 */
    margin: 0 auto;
}

.product-details-text {
    font-size: 14px;
    color: #666;
    margin: -10px 0 15px 0; 
}

/* 중간 배너 CTA 버튼 스타일 조정 */
.middle-image-banner-section .cta-button {
    margin-top: 20px;
    display: inline-block;
    background-color: #e74c3c;
}
.middle-image-banner-section .cta-button:hover {
    background-color: #c0392b;
}

/* FAQ 아코디언 스타일 (이전 답변 코드 유지) */
.faq-question {
    background-color: #fff;
    color: #333;
    cursor: pointer;
    padding: 18px;
    width: 100%;
    border: none;
    text-align: left;
    outline: none;
    font-size: 18px;
    transition: 0.4s;
    border-bottom: 1px solid #eee;
    font-weight: 700;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.faq-question:hover {
    background-color: #f7f7f7;
}

.faq-question.is-closed::after {
    content: '\002B'; /* Plus sign */
    font-size: 20px;
    color: #0056B3;
    font-weight: bold;
}

.faq-question:not(.is-closed)::after {
    content: "\2212"; /* Minus sign */
    font-size: 20px;
    color: #0056B3;
    font-weight: bold;
}

.faq-answer {
    padding: 0 18px;
    background-color: #fff;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out;
    border-bottom: 1px solid #eee;
}

.faq-answer p {
    padding: 15px 0;
    line-height: 1.6;
    color: #555;
}

/* ★★★ 모바일 반응형 메뉴 스타일 (우측 슬라이드 및 주문조회 포함) ★★★ */
.mobile-only-link {
    display: none; /* PC에서는 햄버거 메뉴 속 주문조회 숨김 */
}

@media (max-width: 992px) {
    /* 모바일에서 직구 및 배송 안내 레이아웃 변경 */
    .info-shipping-section .container {
        flex-direction: column;
        gap: 20px;
    }
    
    .info-box {
        max-width: none; /* 너비 제한 해제 */
    }

    /* 햄버거 메뉴 보이기 */
    .menu-toggle {
        display: block;
        order: 3; /* 헤더 우측 끝으로 이동 */
    }
    
    /* PC용 주문조회는 숨김 */
    .header-utils {
        display: none; 
    }

    /* 햄버거 메뉴 X 모양 애니메이션 */
    .menu-toggle.active span:nth-child(1) {
        transform: rotate(-45deg) translate(-5px, 6px);
    }
    .menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }
    .menu-toggle.active span:nth-child(3) {
        transform: rotate(45deg) translate(-5px, -6px);
    }

    /* ★★★ 메인 네비게이션: 우측에서 슬라이드 인/아웃 스타일 ★★★ */
    .main-nav {
        position: fixed;
        top: 0;
        right: -200px; /* 기본 숨김 위치 */
        width: 200px; /* 메뉴 패널 너비 */
        height: 100%;
        background-color: #fff;
        box-shadow: -5px 0 15px rgba(0,0,0,0.1);
        z-index: 999;
        transition: right 0.3s ease-in-out; /* 우측으로 애니메이션 */
        display: block; /* Flex-box 대신 block으로 설정하여 fixed 위치 조정 */
    }

    .main-nav.active {
        right: 0; /* 활성화 시 화면 안으로 이동 */
    }

    .main-nav ul {
        flex-direction: column;
        padding-top: 80px; /* 헤더 공간 확보 */
        gap: 0;
    }

    .main-nav li {
        border-bottom: 1px solid #f8f8f8;
    }

    .main-nav a {
        display: block;
        padding: 15px 20px;
        border-bottom: none;
    }

    /* 모바일에서 햄버거 메뉴 속 주문조회 표시 */
    .mobile-only-link {
        display: block; 
        border-top: 1px solid #eee; /* 주문조회와 메뉴 구분 */
    }
}
/* --- FAQ 아코디언 스타일 (qna.html 및 index.php) --- */

.faq-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 40px 20px 80px 20px;
}

.faq-main-title {
    text-align: center;
    font-size: 32px;
    margin-bottom: 50px;
    font-weight: 700;
}

.accordion-list {
    border-top: 2px solid #0056B3; /* 아네론 시그니처 컬러 테두리 */
}

.faq-item {
    border-bottom: 1px solid #eee;
}

.faq-question {
    background-color: #fff;
    color: #333;
    cursor: pointer;
    padding: 18px;
    width: 100%;
    border: none;
    text-align: left;
    outline: none;
    font-size: 18px;
    transition: background-color 0.4s;
    font-weight: 700;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.faq-question:hover {
    background-color: #f7f7f7;
}

.q-label {
    color: #007bff; /* 로얄 블루 */
    font-size: 20px;
    font-weight: 900;
    margin-right: 15px;
}

.question-text {
    flex-grow: 1;
    font-size: 17px;
}

/* 닫힘/열림 상태 아이콘 (+/-) */
.faq-question::after {
    margin-left: 10px;
    font-size: 20px;
    color: #0056B3;
    font-weight: bold;
    transition: transform 0.4s;
}

.faq-question.is-closed::after {
    content: '\002B'; /* Plus sign (+) */
    transform: rotate(0deg);
}

.faq-question:not(.is-closed)::after {
    content: "\2212"; /* Minus sign (-) */
    transform: rotate(180deg);
}

/* 답변 영역 */
.faq-answer {
    padding: 0 20px;
    background-color: #fcfcfc; /* 답변 배경색 연하게 */
    max-height: 0; /* 초기 높이 0으로 설정하여 숨김 */
    overflow: hidden;
    transition: max-height 0.4s ease-out;
    display: flex;
}

.a-label {
    color: #007bff;
    font-weight: 900;
    margin-right: 15px;
    padding: 15px 0;
}

.answer-text {
    padding: 15px 0;
    line-height: 1.6;
    color: #555;
    font-size: 16px;
}

/* --- 주문 조회 페이지 전용 스타일 (myorder.php) --- */

/* Hero 섹션 타이틀 조정 */
.order-inquiry-page .hero-section {
    padding: 70px 0;
}

/* 1. 주문 조회 폼 섹션 */
.order-inquiry-form-section {
    max-width: 500px;
    margin: 60px auto 40px auto;
    padding: 30px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.order-inquiry-form-section .section-title {
    font-size: 24px;
    text-align: center;
    margin-bottom: 30px;
    color: #0056b3;
}

/* 폼 그룹 스타일 */
.form-group-inquiry {
    margin-bottom: 20px;
    text-align: left;
}

.form-group-inquiry label {
    display: block;
    font-weight: 700;
    margin-bottom: 8px;
    color: #555;
}

.inquiry-form input[type="text"],
.inquiry-form input[type="tel"] {
    width: 100%;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 16px;
    box-sizing: border-box;
    height: 44px;
}

.inquiry-button-area {
    margin-top: 30px;
    text-align: center;
}

.cta-button.inquiry-btn {
    background-color: #007bff;
    color: #fff;
    padding: 12px 30px;
    font-size: 18px;
    font-weight: 700;
    border-radius: 6px;
    transition: background-color 0.2s;
    width: 100%;
    max-width: 250px;
}

.cta-button.inquiry-btn:hover {
    background-color: #0056b3;
}

.search-error-message {
    font-size: 16px;
    font-weight: 700;
    padding: 15px;
    background-color: #ffeaea;
    border: 1px solid #e74c3c;
    border-radius: 6px;
    margin-top: 20px;
    text-align: center;
}

/* --- 2. 주문 조회 결과 섹션 (카드/테이블) --- */

.order-inquiry-result-section {
    max-width: 1200px;
    margin: 40px auto 80px auto;
    padding: 20px;
    text-align: center;
}

.order-item-card {
    background-color: #fff;
    border: 1px solid #e0e0e0; /* 얇은 테두리 */
    border-radius: 8px;
    margin-bottom: 25px;
    padding: 25px;
    text-align: left;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.order-item-card .card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
    margin-bottom: 20px;
}

.order-item-card .order-id-link {
    font-weight: 700;
    color: #007bff;
    text-decoration: none;
}

.order-item-card .order-id-link:hover {
    text-decoration: underline;
}

/* --- 3. 주문 상태 Progress Bar --- */

.progress-container {
    padding: 10px 0 20px 0;
    position: relative;
    text-align: center;
    margin-bottom: 30px;
    background-color: #f8f8f8; 
    border-radius: 4px;
    max-width: 100%; 
}

.progress-bar-rail {
    height: 3px;
    background-color: #e0e0e0;
    position: absolute;
    top: 5px; 
    /* Step Label의 중앙에 위치하도록 너비 및 위치 조정 */
    width: calc(100% - 120px); 
    left: 60px; 
    right: 60px;
    z-index: 1;
    margin: 0; 
}

.progress-bar-fill {
    height: 100%;
    background-color: #007bff;
    border-radius: 3px;
    transition: width 0.5s ease-in-out;
}

.progress-steps-list {
    display: flex;
    justify-content: space-between;
    max-width: 100%; 
    margin: 10px auto 0 auto;
    font-size: 14px;
    font-weight: 500;
    color: #777;
    padding: 0 10px; /* 좌우 여백 추가 */
    position: relative;
    z-index: 2;
}

.progress-steps-list .step-label {
    flex: 1;
    text-align: center;
    position: relative;
    padding-top: 20px; 
    color: #999;
}

/* 단계별 점 스타일 */
.progress-steps-list .step-label::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 10px;
    height: 10px;
    background-color: #ccc;
    border-radius: 50%;
    border: 2px solid #fff; 
    z-index: 3;
}

/* 활성화된 단계 */
.progress-steps-list .step-label.active {
    color: #0056b3; 
    font-weight: 700;
}

.progress-steps-list .step-label.active::before {
    background-color: #007bff; 
    border-color: #007bff;
}

/* --- 4. 주문 상품 요약 및 송장 정보 (Flex 레이아웃) --- */

.order-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-top: 1px solid #eee;
    gap: 20px; 
}

.product-info-summary {
    display: flex;
    align-items: center;
    flex-grow: 1;
    max-width: 70%;
    min-width: 300px; 
}

.product-thumb-summary {
    width: 80px; 
    height: 80px;
    object-fit: contain;
    border: 1px solid #eee;
    border-radius: 4px;
    margin-right: 15px;
}

.summary-text {
    font-size: 15px;
}

.total-amount-summary {
    display: block;
    font-size: 16px;
    color: #e74c3c;
    margin-top: 5px;
}

.tracking-info-area {
    text-align: right;
    max-width: 30%;
}

.tracking-link {
    color: #007bff;
    font-weight: 700;
    text-decoration: underline;
    display: block;
    margin-top: 5px;
}

.delivery-status {
    font-weight: 700;
    color: #007bff;
}

.status-배송중 { color: #f39c12; } 
.status-배송완료 { color: #28a745; } 
.status-결제완료, .status-주문확인, .status-배송준비 { color: #007bff; }
.status-송장미등록 { color: #777; } 

.detail-view-btn {
    background-color: #007bff;
    padding: 8px 15px;
    font-size: 14px;
    border-radius: 4px;
    margin-top: 10px;
}

.other-inquiry-btn {
    background-color: #555; 
    width: auto;
    max-width: 300px;
    padding: 12px 30px;
    margin-top: 20px;
}

/* --- 5. 상세 내역 모달 스타일 --- */

.order-detail-modal {
    background-color: #fff;
    padding: 0;
    border-radius: 8px;
    max-width: 900px;
    width: 90%;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden; 
}

.order-detail-modal .modal-header {
    background-color: #0056b3; 
    color: #fff;
    padding: 15px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: none;
}

.order-detail-modal h2 {
    font-size: 18px;
    margin: 0;
    color: #fff;
}

.order-detail-modal .modal-close-btn {
    color: #fff;
    font-size: 24px;
}

.order-detail-modal .modal-content {
    padding: 20px;
}

.order-detail-modal .product-thumb {
    width: 40px;
    height: 40px;
    object-fit: contain;
    border: 1px solid #eee;
    border-radius: 4px;
}

.order-detail-modal tfoot td {
    border-top: 2px solid #0056b3;
    font-weight: 700;
    background-color: #fcfcfc;
}

/* --- 모바일 반응형 --- */
@media (max-width: 768px) {
    .order-inquiry-result-section {
        padding: 0 10px;
    }
    
    .order-summary-row {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .product-info-summary, .tracking-info-area {
        max-width: 100%;
        width: 100%;
        min-width: 0;
    }
    
    .tracking-info-area {
        text-align: left;
    }
    
    .other-inquiry-btn {
        width: 100%;
        max-width: none;
    }

    /* 상세 테이블 압축 */
    .order-detail-modal .data-list-table th, .order-detail-modal .data-list-table td {
        padding: 8px 5px;
        font-size: 11px;
    }
    
    /* PC 테이블 칼럼 숨기기 (총 수량, 가격, 결제일시 등) */
    .order-detail-modal .data-list-table th:nth-child(4),
    .order-detail-modal .data-list-table td:nth-child(4) { display: none; } /* 가격 숨김 */
    .order-detail-modal .data-list-table th:nth-child(1),
    .order-detail-modal .data-list-table td:nth-child(1) { width: 10%; } /* 이미지 */
}