/* 기본 스타일 */
:root {
    --primary-color: #3b82f6;
    --primary-hover: #2563eb;
    --background-color: #ffffff;
    --text-color: #111827;
    --text-muted: #6b7280;
    --border-color: #e5e7eb;
    --card-bg: #ffffff;
    --hero-bg: linear-gradient(to right, #eff6ff, #eef2ff);
    --categories-bg: #f9fafb;
    --newsletter-bg: #eff6ff;
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --radius: 0.375rem;
    --container-width: 1200px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: var(--text-color);
    line-height: 1.5;
    background-color: var(--background-color);
}

.container {
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 1rem;
}

.flex {
    display: flex;
}

.flex-1 {
    flex: 1;
}

.min-h-screen {
    min-height: 100vh;
}

.flex-col {
    flex-direction: column;
}

img {
    max-width: 100%;
    height: auto;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

/* 버튼 스타일 */
.btn-primary.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    padding: 0.5rem 1rem;
    border: none;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: var(--primary-hover);
}

.btn-outline {
    background-color: transparent;
    border: 1px solid var(--border-color);
}

.btn-outline:hover {
    background-color: #f9fafb;
}

.btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
}

.btn-lg {
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
}

.btn-full {
    width: 100%;
}

.btn-icon {
    width: 1rem;
    height: 1rem;
    margin-left: 0.5rem;
}

.out-stock{background-color: #ccc !important; color: #333;}

/* 헤더 스타일 */
.sticky-header {
    position: fixed;
    top: 0;
    z-index: 50;
    width: 100%;
    border-bottom: 1px solid var(--border-color);
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
}

.header-content {
    display: flex;
    height: 5rem;
    align-items: center;
    justify-content: space-between;
}

.header-left, .header-right {
    display: flex;
    align-items: center;
    gap: 6rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    font-size: 1.5rem;
    width: 160px; aspect-ratio: 74/25; background-image: url("/img/user/key/logo/logo.png"); transition-duration: .5s; position: relative; top: 0; bottom: 0; margin: auto 0; cursor: pointer;
}

.main-nav {
    display: none;
}

.nav-link {
    font-size: 1.3rem;
    font-weight: 500;
}

.nav-link:hover {
    text-decoration: underline;
    text-underline-offset: 4px;
}

.search-container {
    position: relative;
    display: none;
}

.search-icon {
    position: absolute;
    left: 0.625rem;
    top: 50%;
    transform: translateY(-50%);
    width: 1rem;
    height: 1rem;
    color: var(--text-muted);
}

.search-input {
    width: 200px;
    padding: 0.5rem 0.5rem 0.5rem 2rem;
    border-radius: 9999px;
    border: none;
    background-color: #f3f4f6;
}

.user-nav {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.divider {
    color: var(--text-muted);
}

.mypage-btn {
    display: none;
}

/* 히어로 섹션 */
.hero-section {
    width: 100%;
    padding: 3rem 0;
    background: var(--hero-bg);
}

.hero-grid {
    display: grid;
    gap: 1.5rem;
    align-items: center;
}

.hero-content {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1.2;
}

.hero-description {
    color: var(--text-muted);
    font-size: 1.2rem;
}

.hero-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.hero-image-container {
    display: flex;
    justify-content: center;
}

.hero-image {
    border-radius: var(--radius);
    object-fit: cover;
    width: 100%;
    max-width: 600px;
}

/* 인기 상품권 섹션 */
.popular-section {
    width: 100%;
    padding: 8rem 0;
    background-color: white;
}

.section-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    margin-bottom: 2rem;
}

.section-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.section-description {
    color: var(--text-muted);
    max-width: 900px;
}

.product-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

.product-card {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
    background-color: var(--card-bg);
    padding: 0.5rem;
    transition: all 0.2s;
}

.product-card:hover {
    box-shadow: var(--shadow-md);
}

.discount-badge {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background-color: #ef4444;
    color: white;
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: 9999px;
    z-index: 10;
}

.product-content {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.product-content button{height: 35px; font-size: 1.2em;}

.product-image {
    border-radius: var(--radius);
    object-fit: cover;
    width: 60%; margin: 0 auto;
}

.product-info {
    padding: 0.5rem;
}

.product-title {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.product-price-original {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.line-through {
    text-decoration: line-through;
}

.product-price-discount {
    font-weight: 700;
    font-size: 1.25rem;
    color: #2563eb;
}

.more-products {
    display: flex;
    justify-content: center;
    margin-top: 2rem;
}

/* 카테고리 섹션 */
.categories-section {
    width: 100%;
    padding: 3rem 0;
    background-color: var(--categories-bg);
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.category-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    border-radius: var(--radius);
    background-color: white;
    border: 1px solid var(--border-color);
    transition: all 0.2s;
}

.category-card:hover {
    background-color: #eff6ff;
    border-color: #bfdbfe;
}

.category-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.category-name {
    font-weight: 500;
}

/* 특징 섹션 */
.features-section {
    width: 100%;
    padding: 8rem 0;
    background: var(--hero-bg);
}

.features-grid {
    display: grid;
    gap: 1.5rem;
    align-items: center;
}

.features-content {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.features-title {
    font-size: 3rem;
    font-weight: 700;
}

.features-description {
    color: var(--text-muted);
}

.features-list {
    display: grid;
    gap: 1rem;
    margin-top: 1rem;
}

.feature-item {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
}

.feature-item i {
    font-size: 1.8rem;
    color: #16a34a;
    flex-shrink: 0;
}

.feature-item-title {
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.feature-item-description {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.features-image-container {
    display: flex;
    justify-content: right;
}

.features-image {
    border-radius: var(--radius);
    object-fit: cover;
    width: 60%;
    max-width: 600px;
    box-shadow: var(--shadow-md);
}

/* 뉴스레터 섹션 */
.newsletter-section {
    width: 100%;
    padding: 3rem 0;
    background-color: var(--newsletter-bg);
}

.newsletter-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 1rem;
}

.newsletter-title {
    font-size: 2rem;
    font-weight: 700;
}

.newsletter-description {
    color: var(--text-muted);
    max-width: 600px;
}

.newsletter-form-container {
    width: 100%;
    max-width: 28rem;
    margin-top: 0.5rem;
}

.newsletter-form {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.newsletter-input {
    flex: 1;
    padding: 0.5rem 1rem;
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
}

.newsletter-disclaimer {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.newsletter-link {
    text-decoration: underline;
    text-underline-offset: 2px;
}

/* 푸터 */
.site-footer {
    width: 100%;
    padding: 1.5rem 0;
}

.footer-content {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.footer-info {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.footer-description {
    font-size: 0.875rem;
    color: var(--text-muted);
    max-width: 28rem;
}

.footer-copyright {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
}

.footer-links {
    display: block; overflow: hidden;
}
.footer-links > div{
    float: left; margin: 0 20px;
}

.footer-links-title {
    font-size: 1.2rem;
    font-weight: 500;
    margin-bottom: 0.75rem;
}

.footer-links-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.footer-link {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.footer-link:hover {
    text-decoration: underline;
}

.footer-text {
    font-size: 0.875rem;
    color: var(--text-muted);
}

@media (max-width: 480px) {
    .wrap{padding-bottom: 250px;}
    .popular-section, .features-section{padding: 4rem 0;}
    .product-grid{grid-template-columns: repeat(2, 1fr); gap: 0.5rem;}
    .hero-content{text-align: center;}
    .features-title{text-align: center; font-size: 2rem;}
    .features-image-container{width: 100%; justify-content: center;}
    .footer-links-column{margin-top: 20px !important;}
    .hero-title{font-size: 2rem;}
}

/* 반응형 스타일 */
@media (min-width: 480px) {
    .hero-buttons {
        flex-direction: row;
    }
}

@media (min-width: 640px) {
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .categories-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 768px) {
    .main-nav {
        display: flex;
        gap: 2em;
    }

    .search-container {
        display: flex;
        align-items: center;
    }

    .mypage-btn {
        display: flex;
        margin-left: 1rem;
    }

    .hero-section {
        padding: 0;
    }

    .hero-title {
        font-size: 3rem;
    }

    .categories-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .site-footer {
        padding: 0;
    }

    .footer-content {
        flex-direction: row;
        justify-content: space-between;
        padding: 2.5rem 0;
    }

    .footer-links {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 1024px) {
    .hero-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .hero-title {
        font-size: 3.5rem;
    }

    .product-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .categories-grid {
        grid-template-columns: repeat(6, 1fr);
    }
}