:root {
    /* === ECO GREEN THEME === */
    --primary: #2D8A4E;          /* 진한 에코 그린 */
    --primary-dark: #1e6b3a;
    --primary-light: #E8F5E9;
    --primary-mid: #52B788;      /* 중간 민트그린 */
    --accent: #95D5B2;           /* 연한 라임민트 */
    --secondary: #1B4332;        /* 딥 포레스트 그린 */

    --text-main: #1B2E20;
    --text-muted: #6B8F71;
    --bg-main: #FAFFF9;
    --bg-alt: #F1F8F2;
    --gray-100: #EAF3EC;
    --gray-200: #D4E8D8;

    --radius-sm: 8px;
    --radius-lg: 12px;
    --shadow-sm: 0 1px 3px rgba(45,138,78,0.1);
    --transition: all 0.2s ease;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Gothic A1', sans-serif; color: var(--text-main); line-height: 1.5; background-color: var(--bg-main); overflow-x: hidden; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img { max-width: 100%; display: block; }
.container { max-width: 1040px; margin: 0 auto; padding: 0 20px; }

/* === Navigation === */
nav {
    height: 64px;
    border-bottom: 1px solid var(--gray-200);
    position: fixed;
    width: 100%;
    background: rgba(250, 255, 249, 0.92);
    backdrop-filter: blur(12px);
    z-index: 1000;
    display: flex;
    align-items: center;
}

.nav-container { display: flex; justify-content: space-between; align-items: center; width: 100%; }

.logo-text {
    font-family: 'Outfit', sans-serif;
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--primary);
    letter-spacing: -1px;
}

.logo-text span { color: var(--accent); }

.nav-search { flex: 1; max-width: 400px; margin: 0 40px; }

.search-input-wrapper {
    display: flex;
    align-items: center;
    background: var(--gray-100);
    padding: 9px 16px;
    border-radius: 24px;
    border: 1.5px solid var(--gray-200);
    transition: var(--transition);
}

.search-input-wrapper:focus-within {
    border-color: var(--primary);
    background: white;
    box-shadow: 0 0 0 3px rgba(45,138,78,0.1);
}

.search-input-wrapper i { color: var(--primary); width: 18px; height: 18px; flex-shrink: 0; }

.search-input-wrapper input {
    background: none;
    border: none;
    outline: none;
    flex: 1;
    padding-left: 10px;
    font-size: 0.9rem;
    color: var(--text-main);
}

.search-input-wrapper input::placeholder { color: var(--text-muted); }

.nav-actions { display: flex; gap: 24px; font-weight: 600; font-size: 0.9rem; color: var(--text-main); align-items: center; }
.nav-actions a:hover { color: var(--primary); }

/* === Hero Banner === */
#hero {
    padding: 100px 0 60px;
    position: relative;
    overflow: hidden;
    background:
        linear-gradient(135deg, rgba(232,245,233,0.97) 0%, rgba(212,232,215,0.85) 100%);
    min-height: 320px;
    display: flex;
    align-items: center;
}

#hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url('https://images.unsplash.com/photo-1518531933037-91b2f5f229cc?auto=format&fit=crop&q=80&w=1400');
    background-size: cover;
    background-position: center;
    opacity: 0.18;
    z-index: 0;
}

#hero::after {
    content: '🌿';
    font-size: 120px;
    position: absolute;
    right: 6%;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0.3;
    z-index: 0;
}

.hero-content { position: relative; z-index: 1; text-align: left; }

#hero h1 {
    font-size: 2.6rem;
    font-weight: 800;
    margin-bottom: 10px;
    color: var(--secondary);
    line-height: 1.2;
}

#hero h1 span {
    color: var(--primary);
}

#hero p {
    color: var(--text-muted);
    font-size: 1.05rem;
    margin-top: 6px;
}

#hero b { color: var(--primary); }

/* Badge pill */
.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--primary);
    color: white;
    font-size: 0.8rem;
    font-weight: 700;
    padding: 5px 14px;
    border-radius: 50px;
    margin-bottom: 16px;
}

/* === Section Title === */
.section-title {
    font-size: 1.45rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--secondary);
}

.section-title span { color: var(--primary); }

.section-desc {
    color: var(--text-muted);
    margin-bottom: 30px;
    font-size: 0.92rem;
}

/* === Section wrapping === */
#mat-refurb, #etc-refurb { padding: 60px 0; }
#etc-refurb { background-color: var(--bg-alt); }

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

.product-card { display: flex; flex-direction: column; cursor: pointer; }

.product-image {
    position: relative;
    width: 100%;
    aspect-ratio: 1/1;
    border-radius: 12px;
    overflow: hidden;
    background-color: var(--gray-100);
    border: 1px solid var(--gray-200);
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}

.product-card:hover .product-image img { transform: scale(1.06); }

/* === Grade Tags === */
.grade-tag {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.72rem;
    font-weight: 700;
    z-index: 10;
    color: white;
}

.grade-a { background-color: #2D8A4E; }
.grade-b { background-color: #52B788; }
.grade-c { background-color: #95D5B2; color: #1B4332; }

/* === Product Info === */
.product-info { padding: 12px 0; }

.product-info h3 {
    font-size: 0.97rem;
    font-weight: 400;
    color: var(--text-main);
    margin-bottom: 4px;
    line-height: 1.45;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-info .meta { font-size: 0.82rem; color: var(--text-muted); margin-bottom: 4px; }

.product-info .price-row { display: flex; align-items: center; gap: 6px; margin-top: 2px; }
.price-row .discount { color: var(--primary); font-weight: 700; font-size: 1.05rem; }
.price-row .price { font-size: 1.05rem; font-weight: 700; color: var(--text-main); }

.product-stats { margin-top: 6px; font-size: 0.78rem; color: var(--text-muted); }

/* === View More Button === */
.btn-more {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 13px 40px;
    border: 1.5px solid var(--gray-200);
    border-radius: 8px;
    background-color: white;
    color: var(--text-main);
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    transition: var(--transition);
    margin: 0 auto;
}

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

/* === Floating Buttons === */
.float-buttons {
    position: fixed;
    bottom: 24px;
    right: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    z-index: 9999;
}

.float-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 18px;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 4px 18px rgba(0,0,0,0.16);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    white-space: nowrap;
}

.float-btn:hover { transform: translateY(-3px); box-shadow: 0 8px 24px rgba(0,0,0,0.2); }
.float-kakao { background-color: #FEE500; color: #3C1E1E; }
.float-mathub { background-color: var(--primary); color: #fff; }
.float-icon { font-size: 1.2rem; }
.float-label { line-height: 1.3; }

/* === Footer === */
footer {
    border-top: 1px solid var(--gray-200);
    padding: 40px 0;
    color: var(--text-muted);
    font-size: 0.88rem;
    background: white;
}

.footer-links { margin-bottom: 16px; display: flex; gap: 20px; }
.footer-links a:hover { color: var(--primary); }

/* === Animations === */
@keyframes fadeInUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
.animate-up { animation: fadeInUp 0.5s ease forwards; }

/* === Responsive === */
@media (max-width: 768px) {
    .nav-search { display: none; }
    #hero { padding: 100px 0 40px; }
    #hero h1 { font-size: 1.7rem; }
    #hero::after { font-size: 60px; right: 2%; }
    .product-grid { grid-template-columns: repeat(2, 1fr); gap: 24px 12px; }
    .float-btn .float-label { display: none; }
    .float-btn { padding: 12px; border-radius: 50%; }
}
