/* style.css */
:root {
    --primary-color: #d9480f;
    --primary-hover: #f06529;
    --text-main: #212529;
    --text-muted: #868e96;
    --bg-main: #f8f9fa;
    --bg-white: #ffffff;
    --border-color: #e9ecef;
    --radius: 12px;
    --shadow: 0 4px 16px rgba(0,0,0,0.06);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Pretendard', sans-serif; background-color: var(--bg-main); color: var(--text-main); line-height: 1.5; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
button { cursor: pointer; font-family: inherit; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.hidden { display: none !important; }

/* Header */
.site-header { background: var(--bg-white); border-bottom: 1px solid var(--border-color); position: sticky; top: 0; z-index: 100; }
.header-top { display: flex; align-items: center; justify-content: space-between; height: 80px; }
.logo { font-size: 28px; font-weight: 800; letter-spacing: -1px; }
.logo span { color: var(--primary-color); }
.search-wrapper { display: flex; flex: 1; max-width: 480px; position: relative; margin: 0 40px; }
.search-input { width: 100%; padding: 12px 45px 12px 20px; border: 2px solid var(--primary-color); border-radius: 30px; outline: none; font-size: 15px; }
.search-btn { position: absolute; right: 15px; top: 50%; transform: translateY(-50%); background: none; border: none; color: var(--primary-color); display: flex; align-items: center; }
.user-actions { display: flex; align-items: center; gap: 20px; }
.action-btn { background: none; border: none; font-size: 15px; font-weight: 600; display: flex; align-items: center; }
.cart-icon-btn { position: relative; }
.badge { position: absolute; top: -8px; right: -8px; background: var(--primary-color); color: #fff; font-size: 11px; font-weight: bold; width: 18px; height: 18px; display: flex; align-items: center; justify-content: center; border-radius: 50%; }

.gnb-menu { border-top: 1px solid #f1f3f5; }
.gnb-list { display: flex; gap: 30px; height: 50px; align-items: center; font-weight: 600; }
.all-category { display: flex; align-items: center; gap: 5px; color: var(--primary-color); }

/* Hero Section */
.hero { position: relative; height: 500px; display: flex; align-items: center; overflow: hidden; }
.hero-bg { position: absolute; inset: 0; background: url('https://images.unsplash.com/photo-1555939594-58d7cb561ad1?ixlib=rb-4.0.3&auto=format&fit=crop&w=1920&q=80') center/cover; z-index: 1; }
.hero-overlay { position: absolute; inset: 0; background: linear-gradient(to right, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.3) 100%); z-index: 2; }
.hero-content { position: relative; z-index: 3; color: #fff; }
.hero-subtitle { font-size: 18px; font-weight: 500; color: #ffd8a8; margin-bottom: 10px; display: block; }
.hero-title { font-size: 48px; font-weight: 800; line-height: 1.3; margin-bottom: 20px; }
.hero-desc { font-size: 18px; margin-bottom: 30px; opacity: 0.9; }
.btn-primary { background: var(--primary-color); color: #fff; padding: 14px 32px; border: none; border-radius: 30px; font-size: 16px; font-weight: bold; transition: background 0.3s; }
.btn-primary:hover { background: var(--primary-hover); }
.btn-primary:disabled { background: #ced4da; cursor: not-allowed; }
.slider-indicators { position: absolute; bottom: 30px; left: 50%; transform: translateX(-50%); display: flex; gap: 10px; z-index: 3; }
.indicator { width: 10px; height: 10px; background: rgba(255,255,255,0.4); border-radius: 50%; cursor: pointer; transition: 0.3s; }
.indicator.active { background: #fff; width: 24px; border-radius: 10px; }

/* Product Showcase */
.product-showcase { padding: 80px 20px; }
.section-header { text-align: center; margin-bottom: 40px; }
.section-header h2 { font-size: 32px; font-weight: 800; margin-bottom: 10px; }
.section-header p { color: var(--text-muted); font-size: 16px; }
.list-header-toolbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; padding-bottom: 15px; border-bottom: 1px solid var(--border-color); }
.total-count { font-weight: 600; font-size: 15px; }
.sort-menu { display: flex; gap: 15px; font-size: 14px; color: var(--text-muted); }
.sort-menu li { cursor: pointer; }
.sort-menu .active { color: var(--text-main); font-weight: 700; }

.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 30px; }
.product-card { background: var(--bg-white); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); transition: transform 0.3s, box-shadow 0.3s; }
.product-card:hover { transform: translateY(-6px); box-shadow: 0 10px 25px rgba(0,0,0,0.1); }
.card-image-wrapper { position: relative; padding-top: 100%; overflow: hidden; }
.product-img { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s; }
.product-card:hover .product-img { transform: scale(1.05); }
.add-to-cart-quick { position: absolute; bottom: 15px; right: 15px; width: 44px; height: 44px; border-radius: 50%; background: rgba(255,255,255,0.95); border: none; display: flex; align-items: center; justify-content: center; color: var(--text-main); box-shadow: 0 4px 10px rgba(0,0,0,0.15); transition: 0.2s; }
.add-to-cart-quick:hover { background: var(--primary-color); color: #fff; }

.card-content { padding: 24px; }
.category-label { font-size: 12px; color: var(--primary-color); font-weight: 700; margin-bottom: 6px; display: inline-block; background: #fff4e6; padding: 4px 8px; border-radius: 4px; }
.product-title { font-size: 18px; font-weight: 700; margin-bottom: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.product-desc { font-size: 14px; color: var(--text-muted); margin-bottom: 16px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; height: 42px; }
.price-box { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.discount-rate { color: #f03e3e; font-weight: 800; font-size: 18px; }
.final-price { font-weight: 800; font-size: 18px; }
.original-price { color: var(--text-muted); text-decoration: line-through; font-size: 14px; }

/* Cart Sidebar & Overlay */
.overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.6); z-index: 999; backdrop-filter: blur(2px); transition: opacity 0.3s; opacity: 1; }
.overlay.hidden { display: block !important; opacity: 0; pointer-events: none; }

.cart-sidebar { position: fixed; top: 0; right: 0; width: 420px; height: 100vh; background: #1a1b1e; color: #fff; z-index: 1000; box-shadow: -4px 0 25px rgba(0,0,0,0.3); transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1); display: flex; flex-direction: column; transform: translateX(0); }
.cart-sidebar.hidden { display: flex !important; transform: translateX(100%); }

.cart-header { padding: 24px; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid rgba(255,255,255,0.08); }
.cart-header h2 { font-size: 20px; font-weight: 700; }
.close-btn { background: none; border: none; color: rgba(255,255,255,0.6); display: flex; align-items: center; transition: 0.2s; }
.close-btn:hover { color: #fff; transform: rotate(90deg); }

.cart-items-container { flex: 1; overflow-y: auto; padding: 24px; }
.empty-cart-msg { text-align: center; color: rgba(255,255,255,0.4); margin-top: 60px; font-size: 15px; }

.cart-footer { padding: 24px; border-top: 1px solid rgba(255,255,255,0.08); background: #141517; }
.summary-row { display: flex; justify-content: space-between; margin-bottom: 12px; font-size: 14px; color: rgba(255,255,255,0.7); }
.summary-row.highlight { color: #ff6b6b; }
.summary-row.total { font-size: 18px; font-weight: 700; color: #fff; margin-top: 16px; padding-top: 16px; border-top: 1px dashed rgba(255,255,255,0.2); margin-bottom: 24px; }
.checkout-btn { width: 100%; border-radius: 8px; padding: 16px; font-weight: bold; }

/* Footer */
.main-footer { background: #141517; color: #fff; padding: 60px 0 20px; margin-top: 80px; }
.footer-container { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 40px; border-bottom: 1px solid rgba(255,255,255,0.1); padding-bottom: 40px; margin-bottom: 24px; }
.brand-info h2 { font-size: 24px; font-weight: 800; margin-bottom: 12px; color: var(--primary-color); }
.brand-info p { color: rgba(255,255,255,0.6); font-size: 14px; margin-bottom: 6px; }
.footer-links { display: flex; gap: 60px; }
.link-group h3 { font-size: 16px; font-weight: 600; margin-bottom: 16px; }
.link-group a { display: block; color: rgba(255,255,255,0.6); margin-bottom: 10px; font-size: 14px; transition: 0.2s; }
.link-group a:hover { color: #fff; }
.footer-bottom p { text-align: center; color: rgba(255,255,255,0.4); font-size: 13px; }

/* Responsive */
@media (max-width: 768px) {
    .header-top { flex-wrap: wrap; height: auto; padding: 16px 20px; gap: 16px; }
    .search-wrapper { order: 3; margin: 0; max-width: 100%; flex-basis: 100%; }
    .gnb-list { gap: 15px; font-size: 14px; overflow-x: auto; white-space: nowrap; padding-bottom: 8px; scrollbar-width: none; }
    .hero-title { font-size: 32px; }
    .cart-sidebar { width: 100%; }
    .footer-links { flex-direction: column; gap: 30px; }
}