:root {
    --accent: #2563eb;
    --accent-dark: #1d4ed8;
    --mall-accent: #e11d48;
    --mall-accent-dark: #be123c;
    --ink: #0f172a;
    --ink-soft: #475569;
    --line: #e5e7eb;
    --bg: #f4f6f8;
}
* { box-sizing: border-box; }
body {
    font-family: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Segoe UI", "Malgun Gothic", sans-serif;
    background: var(--bg);
    color: var(--ink);
    margin: 0;
    padding: 0;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}
.wrap { max-width: 880px; margin: 0 auto; padding: 24px 20px; }
h1 { font-size: 22px; margin-bottom: 4px; letter-spacing: -0.02em; }
h2 { font-size: 17px; margin: 28px 0 10px; letter-spacing: -0.01em; }
.sub { color: var(--ink-soft); font-size: 14px; margin-bottom: 20px; }
.card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 16px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

/* ---- 쇼핑몰형 홈페이지 전용 (index.php) ---- */
.top-strip {
    background: #f8f9fa;
    border-bottom: 1px solid var(--line);
    font-size: 12px;
    color: #868e96;
}
.top-strip-inner {
    max-width: 1180px;
    margin: 0 auto;
    padding: 6px 20px;
    display: flex;
    justify-content: flex-end;
}
.top-strip a { color: #868e96; text-decoration: none; margin-left: 14px; }
.top-strip a:hover { color: var(--mall-accent); }

.main-header { background: #fff; border-bottom: 2px solid var(--mall-accent); }
.main-header-inner {
    max-width: 1180px;
    margin: 0 auto;
    padding: 18px 20px;
    display: flex;
    align-items: center;
    gap: 28px;
}
.logo { font-size: 24px; font-weight: 900; color: var(--ink); text-decoration: none; letter-spacing: -0.03em; white-space: nowrap; }
.logo span { color: var(--mall-accent); }
.search-bar { flex: 1; display: flex; max-width: 560px; }
.search-bar input {
    flex: 1;
    border: 2px solid var(--mall-accent);
    border-right: none;
    border-radius: 999px 0 0 999px;
    padding: 10px 18px;
    font-size: 14px;
    outline: none;
}
.search-bar button {
    border-radius: 0 999px 999px 0;
    background: var(--mall-accent);
    padding: 0 22px;
    font-size: 14px;
}
.search-bar button:hover { background: var(--mall-accent-dark); }
.header-actions { margin-left: auto; white-space: nowrap; }
.header-actions .btn { background: var(--mall-accent); box-shadow: none; }
.header-actions .btn:hover { background: var(--mall-accent-dark); }

.shop-layout {
    max-width: 1180px;
    margin: 0 auto;
    padding: 24px 20px 0;
    display: flex;
    align-items: flex-start;
    gap: 24px;
}
.sidebar-nav {
    width: 200px;
    flex-shrink: 0;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    overflow: hidden;
    position: sticky;
    top: 16px;
}
.sidebar-nav a {
    display: block;
    color: var(--ink-soft);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    padding: 13px 18px;
    border-bottom: 1px solid var(--line);
}
.sidebar-nav a:last-child { border-bottom: none; }
.sidebar-nav a:hover { background: #f9fafb; color: var(--ink); }
.sidebar-nav a.active { color: var(--mall-accent); background: #fff1f2; }
.sidebar-nav a.home-link {
    background: var(--ink);
    color: #fff;
    font-weight: 700;
}
.sidebar-nav a.home-link:hover { background: #111827; color: #fff; }
.catalog-main { flex: 1; min-width: 0; }

.tagline-banner {
    background: var(--ink);
    text-align: center;
    padding: 26px 20px;
}
.tagline-text {
    display: inline-block;
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -0.02em;
    background: linear-gradient(90deg, #60a5fa, #f472b6, #60a5fa);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: tagline-shine 4s linear infinite, tagline-in 0.7s ease both;
}
@keyframes tagline-shine {
    to { background-position: 200% center; }
}
@keyframes tagline-in {
    from { opacity: 0; transform: translateY(14px); }
    to { opacity: 1; transform: translateY(0); }
}
@media (max-width: 640px) {
    .tagline-text { font-size: 19px; }
}

.section-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 20px; }
.section-head h2 { font-size: 20px; margin: 0; }
.section-head p { color: var(--ink-soft); font-size: 13px; margin: 0; }

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
}
.product-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    display: block;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    position: relative;
}
.product-card:hover { transform: translateY(-3px); box-shadow: 0 10px 22px rgba(15, 23, 42, 0.1); }
.product-card .thumb {
    aspect-ratio: 1 / 1;
    background: linear-gradient(135deg, #eef2ff 0%, #e0e7ff 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    font-weight: 900;
    color: var(--mall-accent);
    position: relative;
}
.product-card .body { padding: 12px 14px 16px; }
.product-card .cat { font-size: 11px; color: #9ca3af; margin: 0 0 4px; }
.product-card h3 { font-size: 14px; margin: 0 0 6px; line-height: 1.35; }
.product-card h3 a { color: inherit; text-decoration: none; }
.product-card .spec { font-size: 12px; color: var(--ink-soft); margin: 0 0 10px; min-height: 32px; }
.product-card .desc {
    font-size: 12px;
    color: #9ca3af;
    margin: -4px 0 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.product-card .price-tag { font-size: 14px; font-weight: 800; color: var(--mall-accent-dark); margin-bottom: 10px; }
.product-card .price-tag small { font-size: 11px; color: #9ca3af; font-weight: 600; margin-left: 4px; }
.product-card .quote-btn { display: block; text-align: center; font-size: 13px; padding: 8px; }

/* 상품 카드 사진 슬라이드 */
.thumb-slider {
    position: relative;
    aspect-ratio: 1 / 1;
    background: linear-gradient(135deg, #eef2ff 0%, #e0e7ff 100%);
    overflow: hidden;
}
.thumb-slider .icon-fallback {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    font-weight: 900;
    color: var(--mall-accent);
}
.thumb-slider img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.25s ease;
}
.thumb-slider img.active { opacity: 1; }
.slide-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: rgba(15, 23, 42, 0.55);
    color: #fff;
    border: none;
    font-size: 14px;
    line-height: 1;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.15s ease, background 0.15s ease;
    z-index: 2;
}
.thumb-slider:hover .slide-nav-btn { opacity: 1; }
.slide-nav-btn:hover { background: rgba(15, 23, 42, 0.8); }
.slide-prev { left: 6px; }
.slide-next { right: 6px; }
.slide-dots {
    position: absolute;
    bottom: 8px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 5px;
    z-index: 2;
}
.slide-dots .dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255,255,255,0.6);
    border: 1px solid rgba(15,23,42,0.2);
    padding: 0;
    cursor: pointer;
}
.slide-dots .dot.active { background: var(--mall-accent); border-color: var(--mall-accent); }

.site-footer {
    background: #1f2937;
    color: #9ca3af;
    padding: 32px 20px;
    font-size: 12px;
}
.site-footer-inner { max-width: 1180px; margin: 0 auto; text-align: center; }
.site-footer a { color: #cbd5e1; text-decoration: none; }
label { display: block; font-size: 13px; font-weight: 600; margin: 12px 0 4px; }
input[type=text], input[type=email], input[type=tel], input[type=number], input[type=date], input[type=password], textarea, select {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
}
textarea { resize: vertical; min-height: 70px; }
button, .btn {
    display: inline-block;
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: 7px;
    padding: 9px 16px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.15s ease, transform 0.1s ease;
}
button:hover, .btn:hover { background: var(--accent-dark); }
button:active, .btn:active { transform: translateY(1px); }
button.secondary, .btn.secondary { background: #6b7280; }
button.secondary:hover, .btn.secondary:hover { background: #4b5563; }
button.danger, .btn.danger { background: #dc2626; }
button.danger:hover, .btn.danger:hover { background: #b91c1c; }
.item-row { border: 1px dashed #d1d5db; border-radius: 6px; padding: 12px; margin-bottom: 10px; }
.error { background: #fee2e2; color: #991b1b; padding: 10px 14px; border-radius: 6px; margin-bottom: 16px; font-size: 14px; }
.notice { background: #dbeafe; color: #1e3a8a; padding: 10px 14px; border-radius: 6px; margin-bottom: 16px; font-size: 14px; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid #e5e7eb; }
th { color: #6b7280; font-weight: 600; font-size: 12px; }
tr:hover td { background: #f9fafb; }
.badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    background: #e5e7eb;
    color: #374151;
}
.badge.active { background: #dbeafe; color: #1e40af; }
.badge.done { background: #dcfce7; color: #166534; }
.topbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.topbar a { color: #2563eb; text-decoration: none; font-size: 14px; }
.filters { margin-bottom: 14px; }
.filters a { margin-right: 10px; font-size: 13px; color: #4b5563; text-decoration: none; }
.filters a.active { color: #2563eb; font-weight: 700; }
.remove-item { color: #dc2626; background: none; border: none; font-size: 12px; cursor: pointer; padding: 0; }
