@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600;700&display=swap');

:root {
    --primary-color: #002D62;
    --primary-dark: #001A3A;
    --accent-color: #D4AF37;
    --text-color: #333;
    --text-muted: #666;
    --bg-light: #F8F9FA;
    --white: #FFFFFF;
    --transition: all 0.3s ease;
    --shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    --border-radius: 8px;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--white);
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

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

/* Header */
header {
    background: var(--white);
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 150px;
}

.logo img {
    height: 135px;
    display: block;
}

nav ul {
    display: flex;
    gap: 30px;
}

nav ul li a {
    font-weight: 600;
    color: var(--primary-color);
}

nav ul li a:hover {
    color: var(--accent-color);
}

.header-btns {
    display: flex;
    align-items: center;
    gap: 15px;
}

.btn {
    padding: 10px 20px;
    border-radius: var(--border-radius);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border: none;
}

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

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

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

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

.btn-lg {
    padding: 15px 40px;
    font-size: 1.1rem;
}

.hero-btns {
    display: flex;
    justify-content: center;
    gap: 25px;
    margin-bottom: 30px;
}

/* Hero Section */
.hero {
    position: relative;
    height: 80vh;
    display: flex;
    align-items: center;
    background: linear-gradient(rgba(0,45,98,0.8), rgba(0,45,98,0.8)), url('https://images.unsplash.com/photo-1586528116311-ad8dd3c8310d?auto=format&fit=crop&q=80&w=2000') no-repeat center/cover;
    color: var(--white);
    text-align: center;
}

.hero-content {
    max-width: 1000px;
    margin: 0 auto;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 20px;
    line-height: 1.2;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    opacity: 0.9;
}

/* Sections */
section {
    padding: 100px 0;
}

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

.section-title h2 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.section-title p {
    color: var(--text-muted);
}

/* Features Grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.feature-card {
    background: var(--bg-light);
    padding: 40px;
    border-radius: var(--border-radius);
    text-align: center;
    transition: var(--transition);
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow);
    background: var(--white);
}

.feature-card i {
    font-size: 3rem;
    color: var(--accent-color);
    margin-bottom: 20px;
    display: block;
}

/* Form Styles */
.form-container {
    max-width: 600px;
    margin: 0 auto;
    background: var(--bg-light);
    padding: 40px;
    border-radius: var(--border-radius);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
}

.form-group input, .form-group textarea, .form-group select {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
    font-family: inherit;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    z-index: 2000;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: var(--white);
    padding: 40px;
    border-radius: var(--border-radius);
    width: 100%;
    max-width: 400px;
    position: relative;
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 24px;
    cursor: pointer;
}

/* Product Grid */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
}

.product-card {
    border: 1px solid #eee;
    border-radius: var(--border-radius);
    overflow: hidden;
    transition: var(--transition);
}

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

.product-img {
    height: 250px;
    background: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px; /* 4px 여백 */
    margin: 10px; /* 카드 경계와의 간격 */
    border-radius: 12px; /* 그레이 상자 모서리 둥글게 */
}

.product-img img {
    max-width: 100%;
    max-height: 100%;
    border-radius: 8px;
}

.product-info {
    padding: 20px;
}

.product-price-tier {
    margin-top: 15px;
    font-size: 0.9rem;
}

.price-row {
    display: flex;
    justify-content: space-between;
    padding: 5px 0;
    border-bottom: 1px dashed #eee;
}

.price-row:last-child {
    border-bottom: none;
}

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

.price-value {
    font-weight: 700;
    color: var(--primary-color);
}

/* Floating Boxes Animation */
.floating-container {
    position: relative;
    width: 100%;
    height: 150px;
    background: transparent;
    overflow: visible;
    display: flex;
    justify-content: center;
    gap: 40px;
    align-items: center;
    padding: 0 50px;
}

.hero-floating {
    margin-top: 60px;
}

.floating-box {
    width: 100px;
    height: 100px;
    background: var(--white);
    border-radius: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--primary-color);
    font-size: 2.5rem;
    position: relative;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    animation: wave 3s ease-in-out infinite;
}

.floating-box:nth-child(even) {
    background: var(--accent-color);
    color: var(--primary-color);
    animation-delay: 0.5s;
    animation-duration: 3.5s;
}

.floating-box:nth-child(3n) {
    animation-delay: 1s;
    animation-duration: 2.8s;
}

@keyframes wave {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-40px); }
}

.floating-box::after {
    content: '';
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 8px;
    background: rgba(255,255,255,0.3);
    border-radius: 4px;
}

/* Modal sizing for Apply Form */
.modal-content.large {
    max-width: 550px;
}

/* Footer */
footer {
    background: var(--primary-dark);
    color: var(--white);
    padding: 60px 0;
    margin-top: 100px;
}

.footer-inner {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
}
/* My Page Sidebar Layout */
.mypage-container {
    display: flex;
    gap: 40px;
    margin-top: 50px;
    align-items: flex-start;
}

.sidebar {
    width: 250px;
    background: var(--bg-light);
    border-radius: var(--border-radius);
    padding: 20px;
    position: sticky;
    top: 100px;
}

.sidebar h3 {
    font-size: 1.2rem;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary-color);
}

.sidebar-menu li {
    margin-bottom: 10px;
}

.sidebar-menu li a {
    display: block;
    padding: 12px 15px;
    border-radius: var(--border-radius);
    font-weight: 600;
}

.sidebar-menu li a:hover {
    background: rgba(0,45,98,0.05);
    color: var(--primary-color);
}

.sidebar-menu li a.active {
    background: var(--primary-color);
    color: var(--white);
}

.mypage-content {
    flex: 1;
    background: var(--white);
    padding: 40px;
    border: 1px solid #eee;
    border-radius: var(--border-radius);
}

/* Floating Quick Menu */
.quick-menu {
    position: fixed;
    right: 30px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 1000;
}

.quick-btn {
    width: 60px;
    height: 60px;
    background: var(--white);
    border: 1px solid #ddd;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--primary-color);
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.quick-btn i { font-size: 1.2rem; margin-bottom: 3px; }
.quick-btn:hover { background: var(--primary-color); color: var(--white); border-color: var(--primary-color); }

/* My Page Icon Enhancement */
.mypage-link {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--primary-color);
    padding: 5px 12px;
    border: 1px solid var(--primary-color);
    border-radius: 20px;
}

.mypage-link:hover {
    background: var(--primary-color);
    color: var(--white);
}

@media (max-width: 768px) {
    .quick-menu { bottom: 20px; top: auto; right: 20px; transform: none; flex-direction: row; }
}

.footer-logo img {
    height: 40px;
    margin-bottom: 20px;
}

/* Responsive */
@media (max-width: 768px) {
    .hero h1 { font-size: 2.2rem; }
    nav { display: none; }
    .header-inner { padding: 0 10px; }
}

/* Cart Badge */
.cart-link {
    position: relative;
    font-size: 1.4rem;
    color: var(--primary-color);
    margin-right: 15px;
    display: flex;
    align-items: center;
}

.cart-badge {
    position: absolute;
    top: -5px;
    right: -10px;
    background: var(--accent-color);
    color: white;
    font-size: 0.7rem;
    font-weight: 800;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: none; /* Shown by JS */
    align-items: center;
    justify-content: center;
}

/* Cart Page Styles */
.cart-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 30px;
}

.cart-table th, .cart-table td {
    padding: 20px;
    border-bottom: 1px solid #eee;
    text-align: center;
}

.cart-table th {
    background: var(--bg-light);
    color: var(--primary-color);
    font-weight: 700;
}

.cart-product {
    display: flex;
    align-items: center;
    gap: 15px;
    text-align: left;
}

.cart-product img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
}

.delete-btn {
    color: #ff4d4d;
    cursor: pointer;
    font-size: 1.2rem;
    transition: var(--transition);
}

.delete-btn:hover {
    transform: scale(1.2);
}

.cart-summary {
    background: var(--bg-light);
    padding: 30px;
    border-radius: var(--border-radius);
    margin-top: 40px;
    text-align: right;
}

.cart-summary h3 {
    font-size: 1.5rem;
    color: var(--primary-color);
}
/* Featured Slider */
.slider-container {
    position: relative;
    overflow: hidden;
    padding: 20px 0;
}

.slider-track {
    display: flex;
    gap: 30px;
    transition: transform 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.slider-track .product-card {
    flex: 0 0 calc(33.333% - 20px);
    min-width: 300px;
}

.slider-nav {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 30px;
}

.slider-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #ddd;
    cursor: pointer;
    transition: var(--transition);
}

.slider-dot.active {
    background: var(--accent-color);
    width: 30px;
    border-radius: 10px;
}

@media (max-width: 1024px) {
    .slider-track .product-card {
        flex: 0 0 calc(50% - 15px);
    }
}

@media (max-width: 768px) {
    .slider-track .product-card {
        flex: 0 0 100%;
    }
}

/* Interactive Background */
#bg-pattern {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    background: #fdfdfd;
    pointer-events: none;
}

.bg-icon {
    position: absolute;
    color: #e8e8e8;
    font-size: 1.5rem;
    transition: transform 0.1s linear;
    opacity: 0.5;
}
/* Search Bar in Header */
.search-container {
    position: relative;
}

.search-input {
    padding: 8px 15px 8px 35px;
    border: 1px solid #ddd;
    border-radius: 20px;
    font-size: 0.9rem;
    width: 180px;
    transition: var(--transition);
}

.search-input:focus {
    width: 250px;
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 5px rgba(0,45,98,0.1);
}

.search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
    font-size: 0.8rem;
}

/* Search Page Styles */
.search-result-header {
    margin: 40px 0;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.no-results {
    text-align: center;
    padding: 100px 0;
}

.no-results img {
    width: 200px;
    margin-bottom: 30px;
    opacity: 0.6;
}
