/* ═══════════════════════════════════════════════════════════════
   K Beauty Premium — Rose Gold / Champagne Theme
   ═══════════════════════════════════════════════════════════════ */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
:root {
  --bg: #FBF6F3;
  --card: #FFFFFF;
  --text: #3D2B1F;
  --text-mid: #7A6558;
  --text-light: #B09A8A;
  --accent: #C4956A;
  --accent-light: #F5E6D8;
  --accent-dark: #A67A50;
  --accent-rose: #D4A08C;
  --accent-rose-light: #FAEAE4;
  --gold: #C9A96E;
  --champagne: #E8D5C4;
  --warm-cream: #F2E6DB;
  --border: #E8DDD5;
  --badge-hot: #C4596A;
  --badge-new: #6BA368;
  --badge-sale: #D4A040;
  --badge-trending: #B07ACC;
  --badge-limited: #E8785E;
  --badge-prime: #2E7EBF;
  --shadow-sm: 0 1px 4px rgba(61,43,31,0.06);
  --shadow-md: 0 4px 20px rgba(61,43,31,0.1);
  --radius: 14px;
}
body { font-family: 'Outfit', sans-serif; background: var(--bg); color: var(--text); line-height: 1.5; -webkit-font-smoothing: antialiased; }

/* ── HEADER ── */
.header { position: relative; text-align: center; overflow: hidden; min-height: 200px; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 30px 0; }
.header-bg { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; }
.header-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: linear-gradient(135deg, rgba(61,43,31,0.6) 0%, rgba(92,64,51,0.45) 50%, rgba(196,149,106,0.3) 100%); z-index: 1; }
.header-inner { max-width: 1200px; margin: 0 auto; padding: 0 16px; position: relative; z-index: 2; }
.header h1 { font-family: 'Noto Serif Display', serif; color: #FFF; font-size: 2.6rem; font-weight: 700; letter-spacing: 2px; text-shadow: 0 2px 8px rgba(0,0,0,0.25); }
.header h1 span { color: var(--champagne); }
.header h1 a { color: inherit; text-decoration: none; }
.header-sub { color: rgba(255,255,255,0.75); font-size: 0.88rem; margin-top: 6px; font-weight: 300; letter-spacing: 3px; text-transform: uppercase; }
.search-wrap { max-width: 500px; margin: 16px auto 0; position: relative; z-index: 2; }
.search-wrap input { width: 100%; padding: 12px 44px 12px 18px; border: 1px solid rgba(255,255,255,0.15); border-radius: 50px; font-size: 0.9rem; font-family: 'Outfit', sans-serif; background: rgba(255,255,255,0.18); backdrop-filter: blur(10px); color: #fff; outline: none; transition: background 0.3s; }
.search-wrap input::placeholder { color: rgba(255,255,255,0.5); }
.search-wrap input:focus { background: rgba(255,255,255,0.3); border-color: rgba(255,255,255,0.3); }
.search-wrap .search-icon { position: absolute; right: 16px; top: 50%; transform: translateY(-50%); color: rgba(255,255,255,0.6); font-size: 1.1rem; }

/* ── NAV ── */
.nav { background: linear-gradient(135deg, #C4956A, #D4A08C); overflow-x: auto; white-space: nowrap; -webkit-overflow-scrolling: touch; scrollbar-width: none; box-shadow: 0 2px 8px rgba(196,149,106,0.2); }
.nav::-webkit-scrollbar { display: none; }
.nav-inner { max-width: 1200px; margin: 0 auto; display: flex; align-items: center; padding: 0 16px; }
.nav a { color: #fff; text-decoration: none; padding: 12px 18px; font-size: 0.85rem; font-weight: 500; transition: background 0.2s; display: inline-block; border-radius: 6px; }
.nav a:hover { background: rgba(255,255,255,0.18); }
.nav a.active { background: rgba(255,255,255,0.25); font-weight: 600; }

/* ── PRODUCT CARD ── */
.product-card { background: var(--card); border-radius: 12px; border: 1px solid var(--border); padding: 12px; transition: transform 0.25s, box-shadow 0.25s; position: relative; cursor: pointer; display: flex; flex-direction: column; }
.product-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.product-badge { position: absolute; top: 8px; left: 8px; padding: 3px 9px; border-radius: 5px; font-size: 0.62rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; color: #fff; z-index: 2; }
.badge-hot { background: var(--badge-hot); }
.badge-new { background: var(--badge-new); }
.badge-sale { background: var(--badge-sale); }
.badge-trending { background: var(--badge-trending); }
.badge-limited { background: var(--badge-limited); }
.badge-prime { background: var(--badge-prime); }

.product-img { width: 100%; height: 220px; background: linear-gradient(135deg, var(--warm-cream) 0%, var(--accent-light) 100%); border-radius: 10px; display: flex; align-items: center; justify-content: center; margin-bottom: 10px; overflow: hidden; }
.product-img img { max-width: 90%; max-height: 90%; object-fit: contain; transition: transform 0.3s; }
.product-card:hover .product-img img { transform: scale(1.06); }
.placeholder-icon { font-size: 3rem; opacity: 0.15; }

.product-name { font-size: 0.82rem; font-weight: 500; color: var(--text); line-height: 1.3; height: 3.9em; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; margin-bottom: 6px; }
.product-rating { display: flex; align-items: center; gap: 4px; margin-bottom: 6px; }
.stars { color: var(--gold); font-size: 0.75rem; letter-spacing: 1px; }
.rating-count { color: var(--text-light); font-size: 0.72rem; }
.product-price { font-size: 1.1rem; font-weight: 700; color: var(--text); margin-bottom: 4px; }
.old-price { font-size: 0.78rem; color: var(--text-light); text-decoration: line-through; font-weight: 400; margin-left: 6px; }
.discount { font-size: 0.72rem; color: var(--badge-hot); font-weight: 600; margin-left: 4px; }
.prime-tag { font-size: 0.68rem; color: #2E7EBF; font-weight: 500; margin-bottom: 8px; }
.buy-btn { display: block; width: 100%; padding: 9px; background: linear-gradient(to bottom, var(--champagne), var(--accent)); border: 1px solid var(--accent-dark); border-radius: 8px; color: #3D2B1F; font-size: 0.78rem; font-weight: 600; font-family: 'Outfit', sans-serif; text-align: center; text-decoration: none; cursor: pointer; transition: all 0.2s; margin-top: auto; }
.buy-btn:hover { background: linear-gradient(to bottom, var(--accent), var(--accent-dark)); color: #fff; }

/* ── FOOTER ── */
.footer { background: linear-gradient(135deg, #3D2B1F, #5C4033); color: #fff; padding: 40px 0 20px; margin-top: 40px; }
.footer-grid { max-width: 1200px; margin: 0 auto; padding: 0 16px; display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 40px; }
.footer h3 { font-family: 'Noto Serif Display', serif; font-size: 1rem; margin-bottom: 14px; color: var(--champagne); }
.footer p { font-size: 0.82rem; color: rgba(255,255,255,0.6); line-height: 1.6; }
.footer-links a { display: block; color: rgba(255,255,255,0.6); text-decoration: none; font-size: 0.82rem; padding: 4px 0; transition: color 0.2s; }
.footer-links a:hover { color: var(--champagne); }
.email-form { display: flex; gap: 8px; margin-top: 10px; }
.email-form input { flex: 1; padding: 10px 14px; border: 1px solid rgba(255,255,255,0.2); background: rgba(255,255,255,0.08); border-radius: 8px; color: #fff; font-size: 0.82rem; font-family: 'Outfit', sans-serif; outline: none; }
.email-form input::placeholder { color: rgba(255,255,255,0.3); }
.email-form button { padding: 10px 20px; background: var(--accent); color: #fff; border: none; border-radius: 8px; font-weight: 600; font-size: 0.82rem; font-family: 'Outfit', sans-serif; cursor: pointer; }
.email-form button:hover { background: var(--accent-dark); }
.footer-bottom { max-width: 1200px; margin: 24px auto 0; padding: 16px 16px 0; border-top: 1px solid rgba(255,255,255,0.1); text-align: center; }
.footer-bottom p { font-size: 0.72rem; color: rgba(255,255,255,0.3); }
.affiliate-disclosure { font-size: 0.68rem; color: rgba(255,255,255,0.25); margin-top: 6px; line-height: 1.5; }

/* ── BACK TO TOP ── */
.back-top { position: fixed; bottom: 24px; right: 24px; width: 46px; height: 46px; background: var(--accent); color: #fff; border: none; border-radius: 50%; font-size: 1.2rem; cursor: pointer; box-shadow: 0 4px 12px rgba(196,149,106,0.4); opacity: 0; transition: opacity 0.3s, transform 0.3s; z-index: 99; }
.back-top.show { opacity: 1; }
.back-top:hover { transform: scale(1.1); background: var(--accent-dark); }

@media (max-width: 768px) {
  .header h1 { font-size: 1.8rem; }
  .header { min-height: 160px; padding: 20px 0; }
  .product-img { height: 170px; }
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
}

/* ── TAG FILTER BUTTONS ── */
.tag-bar { max-width: 1200px; margin: 10px auto 0; padding: 0 16px; display: flex; gap: 6px; flex-wrap: wrap; }
.tag-btn { padding: 5px 14px; border: 1px solid var(--border); border-radius: 16px; background: var(--card); font-size: 0.75rem; font-family: 'Outfit', sans-serif; color: var(--text-mid); cursor: pointer; transition: all 0.2s; }
.tag-btn:hover { border-color: var(--accent-rose); color: var(--accent-rose); background: var(--accent-rose-light); }
.tag-btn.active { background: var(--accent-rose); color: #fff; border-color: var(--accent-rose); }
/* ── BOUGHT TAG ── */
.bought-tag { font-size: 0.7rem; color: #C45500; font-weight: 600; margin-bottom: 6px; }
.product-grid { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; align-items: start; }
.product-card { max-width: 280px; }
