/**
 * Market2571 랜딩페이지 스타일
 * 식료품 마켓 소개 페이지 - 갤러리 중심
 */

/* ========================================
   기본 변수 및 리셋
======================================== */
.market-landing-page {
    --market-primary: #059669;
    --market-primary-dark: #047857;
    --market-primary-light: #d1fae5;
    --market-secondary: #10b981;
    --market-dark: #1a1a1a;
    --market-gray: #6b7280;
    --market-light: #f9fafb;
    --market-border: #e5e7eb;

    font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
    color: var(--market-dark);
    line-height: 1.6;
    overflow-x: hidden;
}

.market-landing-page * {
    box-sizing: border-box;
}

/* ========================================
   컨테이너
======================================== */
.market-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ========================================
   팝업 공지
======================================== */
.market-notice-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.market-notice-popup.active {
    opacity: 1;
    visibility: visible;
}

.market-notice-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
}

.market-notice-modal {
    position: relative;
    background: #fff;
    border-radius: 16px;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow: hidden;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.market-notice-popup.active .market-notice-modal {
    transform: translateY(0);
}

.market-notice-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    background: rgba(0, 0, 0, 0.5);
    border: none;
    border-radius: 50%;
    color: #fff;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    z-index: 10;
    transition: background 0.2s;
}

.market-notice-close:hover {
    background: rgba(0, 0, 0, 0.7);
}

/* 슬라이더 */
.market-notice-slides {
    position: relative;
}

.market-notice-slide {
    display: none;
}

.market-notice-slide.active {
    display: block;
}

.market-notice-slide img {
    width: 100%;
    height: auto;
    display: block;
}

.market-notice-slide a {
    display: block;
}

/* 공지 내용 (이미지가 없을 때) */
.market-notice-content {
    padding: 40px 30px;
}

.market-notice-content h3 {
    font-size: 22px;
    font-weight: 700;
    color: var(--market-dark);
    margin: 0 0 16px;
}

.market-notice-text {
    font-size: 15px;
    color: var(--market-gray);
    line-height: 1.7;
}

.market-notice-text p {
    margin: 0 0 12px;
}

/* 슬라이더 네비게이션 */
.market-notice-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 12px;
    background: #f9fafb;
}

.market-notice-prev,
.market-notice-next {
    width: 32px;
    height: 32px;
    background: #fff;
    border: 1px solid var(--market-border);
    border-radius: 50%;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.2s;
}

.market-notice-prev:hover,
.market-notice-next:hover {
    background: var(--market-primary);
    border-color: var(--market-primary);
    color: #fff;
}

.market-notice-counter {
    font-size: 13px;
    color: var(--market-gray);
}

/* 푸터 */
.market-notice-footer {
    padding: 12px 20px;
    background: #f9fafb;
    border-top: 1px solid var(--market-border);
}

.market-notice-footer label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--market-gray);
    cursor: pointer;
}

.market-notice-footer input[type="checkbox"] {
    width: 16px;
    height: 16px;
}

/* ========================================
   히어로 섹션
======================================== */
.market-hero {
    position: relative;
    height: 100vh;
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background-color: #1a1a1a;
    overflow: hidden;
}

/* 히어로 배경 이미지 - Zoom 효과 */
.market-hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    animation: marketHeroZoom 7s ease-out forwards;
}

@keyframes marketHeroZoom {
    from {
        transform: scale(1);
    }
    to {
        transform: scale(1.03);
    }
}

.market-hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, rgba(0,0,0,0.3) 0%, rgba(0,0,0,0.5) 100%);
}

.market-hero-content {
    position: relative;
    z-index: 1;
    padding: 0 24px;
}

.market-hero-title {
    font-size: clamp(48px, 10vw, 96px);
    font-weight: 800;
    color: #fff;
    margin: 0 0 20px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.market-hero-subtitle {
    font-size: clamp(16px, 2.5vw, 22px);
    color: rgba(255, 255, 255, 0.9);
    margin: 0;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.8;
}

.market-hero-scroll {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.7);
    text-align: center;
    font-size: 12px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

.market-hero-scroll-line {
    width: 1px;
    height: 60px;
    background: rgba(255, 255, 255, 0.3);
    margin: 15px auto 0;
    animation: market-scroll-line 1.5s ease-in-out infinite;
}

@keyframes market-scroll-line {
    0%, 100% { transform: scaleY(0); transform-origin: top; }
    50% { transform: scaleY(1); transform-origin: top; }
    51% { transform: scaleY(1); transform-origin: bottom; }
    100% { transform: scaleY(0); transform-origin: bottom; }
}

/* ========================================
   섹션 공통 스타일
======================================== */
.market-section {
    padding: 100px 0;
}

.market-section-label {
    display: inline-block;
    font-size: 13px;
    font-weight: 600;
    color: var(--market-primary);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin-bottom: 12px;
}

.market-section-title {
    font-size: clamp(28px, 4vw, 42px);
    font-weight: 700;
    color: var(--market-dark);
    margin: 0 0 16px;
    line-height: 1.3;
}

.market-section-header {
    text-align: center;
    margin-bottom: 60px;
}

.market-section-desc {
    font-size: 16px;
    color: var(--market-gray);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.8;
}

/* AOS 애니메이션 */
[data-aos] {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

[data-aos="fade-left"] {
    transform: translateX(30px);
}

[data-aos="fade-right"] {
    transform: translateX(-30px);
}

[data-aos].aos-animate {
    opacity: 1;
    transform: translateY(0) translateX(0);
}

/* ========================================
   소개 섹션
======================================== */
.market-intro {
    background: #fff;
}

.market-intro-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.market-intro-text {
    font-size: 16px;
    color: #444;
    line-height: 2;
}

.market-intro-text p {
    margin: 0 0 16px;
}

.market-intro-text p:last-child {
    margin-bottom: 0;
}

.market-intro-text strong {
    color: var(--market-primary);
    font-weight: 600;
}

.market-intro-image img {
    width: 100%;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
}

/* ========================================
   갤러리 섹션
======================================== */
.market-gallery {
    background: var(--market-light);
}

.market-gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: 200px;
    gap: 16px;
}

.market-gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    cursor: pointer;
}

/* 첫 번째 이미지 크게 */
.market-gallery-item.large {
    grid-column: span 2;
    grid-row: span 2;
}

.market-gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.market-gallery-item:hover img {
    transform: scale(1.05);
}

.market-gallery-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px 16px;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
    color: #fff;
    font-size: 14px;
    font-weight: 500;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.market-gallery-item:hover .market-gallery-caption {
    opacity: 1;
    transform: translateY(0);
}

/* 라이트박스 */
.market-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.market-lightbox.active {
    opacity: 1;
}

.market-lightbox-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
}

.market-lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
}

.market-lightbox-content img {
    max-width: 100%;
    max-height: 85vh;
    border-radius: 8px;
}

.market-lightbox-close {
    position: absolute;
    top: -50px;
    right: -10px;
    background: none;
    border: none;
    color: #fff;
    font-size: 32px;
    cursor: pointer;
    line-height: 1;
    transition: opacity 0.2s;
}

.market-lightbox-close:hover {
    opacity: 0.7;
    background: none;
}

/* ========================================
   운영시간 & 오시는 길 섹션
======================================== */
.market-info {
    background: #fff;
}

.market-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
}

.market-hours-content {
    font-size: 15px;
    color: #444;
    line-height: 1.8;
    margin-bottom: 24px;
}

.market-hours-content strong {
    color: var(--market-dark);
}

.market-contact-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.market-contact-phone {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 28px;
    background: var(--market-primary);
    color: #fff;
    text-decoration: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    transition: background 0.2s;
}

.market-contact-phone:hover {
    background: var(--market-primary-dark);
    color: #fff;
}

.market-contact-instagram {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 28px;
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
    color: #fff;
    text-decoration: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    transition: opacity 0.2s, transform 0.2s;
}

.market-contact-instagram:hover {
    opacity: 0.9;
    transform: translateY(-2px);
    color: #fff;
}

.market-location-address {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 15px;
    color: #444;
    margin: 0 0 24px;
    line-height: 1.7;
}

.market-location-address svg {
    flex-shrink: 0;
    margin-top: 3px;
    color: var(--market-primary);
}

.market-map-container {
    border-radius: 12px;
    overflow: hidden;
    height: 300px;
    background: var(--market-border);
}

.market-map-container iframe {
    width: 100%;
    height: 100%;
    border: 0;
}

/* ========================================
   푸터 로고 섹션
======================================== */
.market-footer-logo {
    background: var(--market-dark);
    padding: 80px 0;
    text-align: center;
}

.market-footer-title {
    font-size: clamp(36px, 6vw, 56px);
    font-weight: 800;
    color: #fff;
    margin: 0 0 16px;
    letter-spacing: 0.1em;
}

.market-footer-tagline {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.7);
    margin: 0;
}

/* ========================================
   반응형 스타일
======================================== */
@media (max-width: 1024px) {
    .market-gallery-grid {
        grid-template-columns: repeat(3, 1fr);
        grid-auto-rows: 180px;
    }

    .market-gallery-item.large {
        grid-column: span 2;
        grid-row: span 2;
    }
}

@media (max-width: 768px) {
    .market-section {
        padding: 60px 0;
    }

    .market-hero {
        min-height: 500px;
    }

    .market-intro-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .market-intro-image {
        order: -1;
    }

    .market-gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-auto-rows: 150px;
    }

    .market-gallery-item.large {
        grid-column: span 2;
        grid-row: span 2;
    }

    .market-info-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .market-contact-buttons {
        flex-direction: column;
    }

    .market-contact-phone,
    .market-contact-instagram {
        justify-content: center;
    }

    .market-section-header {
        margin-bottom: 40px;
    }

    /* 팝업 */
    .market-notice-modal {
        width: 95%;
        max-height: 85vh;
    }
}

@media (max-width: 480px) {
    .market-container {
        padding: 0 16px;
    }

    .market-hero-title {
        letter-spacing: 0.05em;
    }

    .market-gallery-grid {
        grid-template-columns: 1fr 1fr;
        grid-auto-rows: 130px;
    }

    .market-gallery-item.large {
        grid-column: span 2;
        grid-row: span 1;
        height: 200px;
    }

    .market-gallery-item.large img {
        height: 200px;
    }
}
