:root {
    --primary: #FF6A00;
    --primary-dark: #cc5500;
    --secondary: #2C3E50;
    --background: #F9FAFB;
    --surface: #ffffff;
    --text: #111827;
    --text-light: #6B7280;
    --border: #E5E7EB;
    --accent: #10B981;
    --danger: #EF4444;
    
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 16px;
    
    font-family: 'Pretendard', sans-serif;
    -webkit-font-smoothing: antialiased;
}

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

body {
    background-color: var(--background);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.2s ease;
}

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

/* Nav */
.navbar {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid var(--border);
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-links {
    display: flex;
    gap: 30px;
}

.nav-links a {
    font-weight: 500;
    color: var(--text-light);
}

.nav-links a:hover, .nav-links a.active {
    color: var(--primary);
}

.nav-actions {
    display: flex;
    gap: 15px;
    align-items: center;
}

/* Buttons */
.btn-primary {
    background: var(--primary);
    color: white;
    padding: 10px 20px;
    border-radius: var(--radius-md);
    font-weight: 600;
    white-space: nowrap;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}
.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background: var(--surface);
    color: var(--secondary);
    border: 2px solid var(--border);
    padding: 10px 20px;
    border-radius: var(--radius-md);
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.2s ease;
}
.btn-secondary:hover {
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    color: var(--text);
    border: 1px solid var(--border);
    padding: 12px 24px;
    border-radius: var(--radius-lg);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}
.btn-outline:hover {
    background: var(--border);
}

.btn-text {
    color: var(--text);
    font-weight: 600;
}
.btn-text:hover {
    color: var(--primary);
}

.large {
    padding: 14px 30px;
    font-size: 1.1rem;
}

/* Hero */
.hero {
    padding: 100px 0;
    background: linear-gradient(135deg, #fdfbfb 0%, #ebedee 100%);
    position: relative;
    overflow: hidden;
}
.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(255,106,0,0.1) 0%, rgba(255,255,255,0) 70%);
    border-radius: 50%;
    z-index: 0;
}
.hero-content {
    display: flex;
    align-items: center;
    position: relative;
    z-index: 1;
}
.hero-text {
    flex: 1;
}
.badge {
    display: inline-block;
    background: rgba(255, 106, 0, 0.1);
    color: var(--primary);
    padding: 6px 14px;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 20px;
}
.hero h1 {
    font-size: 3.5rem;
    line-height: 1.2;
    margin-bottom: 20px;
    font-weight: 800;
    letter-spacing: -1px;
}
.highlight {
    color: var(--primary);
}
.hero p {
    font-size: 1.2rem;
    color: var(--text-light);
    margin-bottom: 40px;
}
.hero-buttons {
    display: flex;
    gap: 15px;
}

.hero-image {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 20px;
    position: relative;
}

.floating-card {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: var(--shadow-lg);
    animation: float 6s ease-in-out infinite;
    max-width: 300px;
}
.floating-card.sell-card {
    animation-delay: 3s;
    margin-right: 50px;
}
@keyframes float {
    0% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-15px) rotate(1deg); }
    100% { transform: translateY(0px) rotate(0deg); }
}

.floating-card .icon {
    width: 50px;
    height: 50px;
    background: var(--primary);
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
    font-size: 1.2rem;
}
.floating-card.buy-card .icon {
    background: var(--accent);
}

.floating-card .details {
    display: flex;
    flex-direction: column;
}
.floating-card .details small {
    color: var(--text-light);
}
.floating-card .details strong {
    font-size: 1.1rem;
    color: var(--text);
}
.floating-card .details span {
    font-size: 0.9rem;
    color: var(--accent);
    font-weight: 600;
}

/* Features */
.features {
    padding: 80px 0;
    background: white;
}
.section-title {
    text-align: center;
    margin-bottom: 60px;
}
.section-title h2 {
    font-size: 2.5rem;
    margin-bottom: 15px;
}
.section-title p {
    font-size: 1.1rem;
    color: var(--text-light);
}
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}
.feature-card {
    background: var(--background);
    padding: 40px 30px;
    border-radius: var(--radius-lg);
    text-align: center;
    transition: transform 0.3s ease;
}
.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-md);
}
.feature-icon {
    width: 70px;
    height: 70px;
    margin: 0 auto 20px;
    background: rgba(255, 106, 0, 0.1);
    color: var(--primary);
    border-radius: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 2rem;
}
.feature-card h3 {
    margin-bottom: 15px;
    font-size: 1.3rem;
}
.feature-card p {
    color: var(--text-light);
    font-size: 0.95rem;
}

/* Products */
.products {
    padding: 80px 0;
}
.section-flex-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
}
.section-flex-title h2 {
    font-size: 2rem;
}
.filters select {
    padding: 10px 15px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    font-family: inherit;
    font-size: 1rem;
    background: white;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
}
.product-item {
    background: white;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    cursor: pointer;
    border: 1px solid var(--border);
}
.product-item:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-5px);
}
.product-image {
    width: 100%;
    height: 200px;
    background: #eee;
    background-size: cover;
    background-position: center;
    position: relative;
}
.product-tag {
    position: absolute;
    top: 15px;
    left: 15px;
    background: var(--danger);
    color: white;
    padding: 4px 10px;
    border-radius: 5px;
    font-size: 0.8rem;
    font-weight: bold;
}
.product-info {
    padding: 20px;
}
.product-seller {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-bottom: 5px;
    display: flex;
    align-items: center;
    gap: 5px;
}
.product-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 10px;
    line-height: 1.4;
    height: 44px;
    overflow: hidden;
}
.product-qty {
    background: var(--background);
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 0.85rem;
    color: var(--secondary);
    display: inline-block;
    margin-bottom: 15px;
    font-weight: 600;
}
.product-price {
    display: flex;
    flex-direction: column;
    margin-bottom: 15px;
}
.product-price .original {
    text-decoration: line-through;
    color: var(--text-light);
    font-size: 0.9rem;
}
.product-price .current {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary);
}
.product-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 15px;
    border-top: 1px solid var(--border);
    font-size: 0.85rem;
    color: var(--text-light);
}
.load-more {
    text-align: center;
    margin-top: 50px;
}

/* CTA */
.cta-section {
    background: var(--secondary);
    color: white;
    padding: 80px 0;
    text-align: center;
}
.cta-content h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
}
.cta-content p {
    font-size: 1.2rem;
    margin-bottom: 40px;
    opacity: 0.9;
}

/* Footer */
.footer {
    background: #1F2937;
    color: #9CA3AF;
    padding: 60px 0 20px;
}
.footer-content {
    display: flex;
    justify-content: space-between;
    margin-bottom: 40px;
    flex-wrap: wrap;
    gap: 40px;
}
.footer-brand h3 {
    color: white;
    font-size: 1.5rem;
    margin-bottom: 10px;
}
.social-links {
    margin-top: 20px;
    display: flex;
    gap: 15px;
}
.social-links a {
    color: white;
    font-size: 1.2rem;
    background: rgba(255,255,255,0.1);
    width: 40px;
    height: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
}
.social-links a:hover {
    background: var(--primary);
}
.footer-links {
    display: flex;
    gap: 50px;
}
.link-group h4 {
    color: white;
    margin-bottom: 15px;
}
.link-group a {
    display: block;
    margin-bottom: 10px;
}
.link-group a:hover {
    color: white;
}
.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 20px;
    text-align: center;
    font-size: 0.9rem;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.6);
    backdrop-filter: blur(5px);
    opacity: 0;
    transition: opacity 0.3s ease;
}
.modal.show {
    display: block;
    opacity: 1;
}
.modal-content {
    background-color: #fff;
    margin: 5% auto;
    padding: 0;
    border-radius: var(--radius-lg);
    width: 90%;
    max-width: 900px;
    box-shadow: var(--shadow-lg);
    position: relative;
    transform: translateY(20px);
    transition: transform 0.3s ease;
    display: flex;
    overflow: hidden;
}
.modal.show .modal-content {
    transform: translateY(0);
}
.close-modal {
    color: #aaa;
    position: absolute;
    right: 20px;
    top: 15px;
    font-size: 28px;
    font-weight: bold;
    z-index: 10;
    cursor: pointer;
}
.close-modal:hover {
    color: #333;
}
.modal-body {
    display: flex;
    width: 100%;
}
.modal-img {
    flex: 1;
    background: #f4f4f4;
    background-size: cover;
    background-position: center;
    min-height: 400px;
}
.modal-info {
    flex: 1;
    padding: 40px;
    display: flex;
    flex-direction: column;
}
.modal-tag {
    display: inline-block;
    background: var(--danger);
    color: white;
    padding: 5px 12px;
    border-radius: 5px;
    font-size: 0.85rem;
    font-weight: bold;
    align-self: flex-start;
    margin-bottom: 15px;
}
.modal-title {
    font-size: 1.8rem;
    margin-bottom: 15px;
    line-height: 1.3;
}
.modal-seller {
    color: var(--text-light);
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.exp-date {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
    padding: 8px 15px;
    border-radius: 8px;
    font-weight: 600;
    margin-bottom: 20px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.modal-price-box {
    background: var(--background);
    padding: 20px;
    border-radius: var(--radius-lg);
    margin-bottom: 25px;
}
.modal-price-box .qty {
    font-weight: 600;
    color: var(--secondary);
    margin-bottom: 10px;
    font-size: 1.1rem;
}
.modal-price-box .price {
    display: flex;
    align-items: baseline;
    gap: 15px;
}
.modal-price-box .price strong {
    font-size: 2rem;
    color: var(--primary);
}
.modal-price-box .price del {
    color: var(--text-light);
}

.shipping-qna {
    margin-top: auto;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 15px;
    background: #fefcfb;
}
.shipping-qna h4 {
    color: var(--primary);
    margin-bottom: 10px;
}
.shipping-qna p {
    font-size: 0.9rem;
    color: var(--text-light);
}
.action-buttons {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

@media (max-width: 768px) {
    .nav-links { display: none; }
    .nav-content { flex-direction: column; height: auto; padding: 15px 0; gap: 12px; }
    .nav-actions { flex-wrap: wrap; justify-content: center; gap: 8px; width: 100%; }
    .nav-actions a { font-size: 0.85rem; padding: 8px 12px; white-space: nowrap; }
    .logo { margin-bottom: 5px; font-size: 1.3rem; }
    
    .hero { padding: 60px 0; }
    .hero-content { flex-direction: column; text-align: center; }
    .hero-buttons { flex-direction: column; gap: 10px; width: 100%; }
    .hero-buttons a { width: 100%; text-align: center; }
    
    .hero-image { align-items: center; margin-top: 40px; }
    .hero h1 { font-size: 2.2rem; word-break: keep-all; }
    .hero p { font-size: 1rem; word-break: keep-all; margin-bottom: 30px; }
    
    .floating-card { max-width: 100%; width: 100%; }
    .floating-card.sell-card { margin-right: 0; margin-bottom: 15px; }
    
    .section-flex-title { flex-direction: column; align-items: flex-start; gap: 15px; }
    .product-grid { grid-template-columns: 1fr; }
    
    .modal-body { flex-direction: column; }
    .modal-img { min-height: 250px; }
    .modal-info { padding: 20px; }
    .action-buttons { flex-direction: column; }
    .action-buttons button { width: 100%; }
}
