/* ============================================================
   SAKURA MUSIC SHOP - Phong cách Anime
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Be+Vietnam+Pro:wght@300;400;500;600;700;800&family=Dancing+Script:wght@600;700&display=swap');

:root {
  --pink: #ff6fa5;
  --pink-deep: #e94584;
  --pink-soft: #ffd6e7;
  --purple: #9b6dff;
  --purple-deep: #6d3df0;
  --cyan: #4dd9e8;
  --gold: #ffc857;
  --ink: #3a2540;
  --ink-soft: #6b5875;
  --cream: #fff7fb;
  --white: #ffffff;
  --glass: rgba(255, 255, 255, 0.72);
  --glass-border: rgba(255, 255, 255, 0.85);
  --shadow: 0 12px 35px rgba(233, 69, 132, 0.16);
  --shadow-soft: 0 6px 22px rgba(155, 109, 255, 0.13);
  --radius: 18px;
  --grad-main: linear-gradient(135deg, #ff8fc7 0%, #b07dff 50%, #5ec9f0 100%);
  --grad-pink: linear-gradient(135deg, #ff8fc7, #ff5f9e);
  --grad-purple: linear-gradient(135deg, #b07dff, #7b4dff);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Be Vietnam Pro', 'Segoe UI', sans-serif;
  color: var(--ink);
  background: linear-gradient(160deg, #ffe9f4 0%, #f3e7ff 38%, #e2f6ff 100%);
  background-attachment: fixed;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Nền phát sáng động */
body::before {
  content: '';
  position: fixed; inset: 0; z-index: -2;
  background:
    radial-gradient(circle at 12% 18%, rgba(255, 143, 199, .35), transparent 38%),
    radial-gradient(circle at 88% 12%, rgba(93, 201, 240, .30), transparent 40%),
    radial-gradient(circle at 75% 88%, rgba(176, 125, 255, .30), transparent 42%);
  animation: bgFloat 16s ease-in-out infinite alternate;
}
@keyframes bgFloat {
  from { transform: scale(1) translateY(0); }
  to   { transform: scale(1.12) translateY(-18px); }
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
input, select, textarea { font-family: inherit; font-size: 15px; }

.container { width: min(1200px, 92vw); margin: 0 auto; }
.section { padding: 64px 0; }
.section-title {
  text-align: center; margin-bottom: 38px;
}
.section-title h2 {
  font-size: 34px; font-weight: 800;
  background: var(--grad-purple);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.section-title .sub { color: var(--ink-soft); margin-top: 6px; font-size: 15px; }
.section-title h2 .sakura { -webkit-text-fill-color: initial; }

/* ============================================================
   HIỆU ỨNG HOA ANH ĐÀO & NỐT NHẠC BAY
   ============================================================ */
.fx-layer { position: fixed; inset: 0; pointer-events: none; z-index: 60; overflow: hidden; }
.petal {
  position: absolute; top: -40px;
  font-size: 18px;
  animation: petalFall linear infinite;
  filter: drop-shadow(0 2px 3px rgba(233, 69, 132, .25));
  user-select: none;
}
@keyframes petalFall {
  0%   { transform: translateY(-40px) translateX(0) rotate(0deg); opacity: 0; }
  8%   { opacity: .9; }
  50%  { transform: translateY(50vh) translateX(60px) rotate(200deg); }
  100% { transform: translateY(108vh) translateX(-50px) rotate(420deg); opacity: .2; }
}
.note-float {
  position: absolute; bottom: -30px;
  font-size: 20px; opacity: 0;
  animation: noteRise linear infinite;
}
@keyframes noteRise {
  0%   { transform: translateY(0) rotate(-8deg); opacity: 0; }
  12%  { opacity: .55; }
  88%  { opacity: .4; }
  100% { transform: translateY(-108vh) rotate(12deg); opacity: 0; }
}

/* ============================================================
   TOP BAR
   ============================================================ */
.topbar {
  background: var(--grad-purple);
  color: #fff; font-size: 13px;
  position: relative; z-index: 50;
}
.topbar .container { display: flex; justify-content: space-between; align-items: center; height: 36px; gap: 12px; }
.topbar a { display: inline-flex; align-items: center; gap: 5px; opacity: .95; transition: .2s; }
.topbar a:hover { opacity: 1; text-shadow: 0 0 10px #fff; }
.topbar .tb-social { display: flex; gap: 14px; }

/* ============================================================
   HEADER / NAV
   ============================================================ */
.site-header {
  position: sticky; top: 0; z-index: 45;
  background: rgba(255, 255, 255, .82);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 2px solid rgba(255, 143, 199, .25);
  box-shadow: 0 4px 24px rgba(155, 109, 255, .08);
}
.nav { display: flex; align-items: center; gap: 22px; height: 74px; }
.logo { display: flex; align-items: center; gap: 10px; font-family: 'Dancing Script', cursive; font-size: 30px; font-weight: 700; }
.logo .logo-icon {
  width: 46px; height: 46px; border-radius: 50%;
  background: var(--grad-main);
  display: grid; place-items: center; font-size: 24px;
  box-shadow: 0 6px 16px rgba(233, 69, 132, .4);
  animation: logoSpin 6s ease-in-out infinite;
}
@keyframes logoSpin { 0%,100% { transform: rotate(-8deg) scale(1);} 50% { transform: rotate(8deg) scale(1.06);} }
.logo b {
  background: var(--grad-pink);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.nav-links .mobile-search { display: none; }
.nav-links { display: flex; gap: 4px; margin-left: 8px; }
.nav-links a {
  padding: 9px 15px; border-radius: 999px; font-weight: 600; font-size: 15px;
  color: var(--ink-soft); transition: .25s; position: relative;
}
.nav-links a:hover, .nav-links a.active {
  color: var(--pink-deep); background: var(--pink-soft);
  box-shadow: 0 4px 12px rgba(233, 69, 132, .18);
}
.nav-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.search-box {
  display: flex; align-items: center; gap: 8px;
  background: #fff; border: 2px solid #f2d6e6; border-radius: 999px;
  padding: 7px 14px; transition: .25s; min-width: 190px;
}
.search-box:focus-within { border-color: var(--pink); box-shadow: 0 0 0 4px rgba(255,111,165,.14); }
.search-box input { border: none; outline: none; background: none; width: 100%; color: var(--ink); }
.icon-btn {
  position: relative; width: 42px; height: 42px; border-radius: 50%;
  background: #fff; border: 2px solid #f2d6e6;
  display: grid; place-items: center; font-size: 18px; transition: .25s;
}
.icon-btn:hover { transform: translateY(-3px); border-color: var(--pink); box-shadow: var(--shadow); }
.cart-badge {
  position: absolute; top: -6px; right: -6px;
  min-width: 20px; height: 20px; padding: 0 5px;
  background: var(--grad-pink); color: #fff;
  border-radius: 999px; font-size: 11px; font-weight: 700;
  display: grid; place-items: center; border: 2px solid #fff;
}
.user-chip {
  display: flex; align-items: center; gap: 8px; padding: 6px 14px 6px 7px;
  background: #fff; border: 2px solid #e7d9ff; border-radius: 999px; font-weight: 600; font-size: 14px;
  transition: .25s;
}
.user-chip:hover { border-color: var(--purple); box-shadow: var(--shadow-soft); }
.user-chip .avt { width: 30px; height: 30px; border-radius: 50%; background: var(--grad-purple); color: #fff; display: grid; place-items: center; font-size: 14px; }
.menu-toggle { display: none; }

/* ============================================================
   NÚT
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 26px; border-radius: 999px; font-weight: 700; font-size: 15px;
  transition: .28s; position: relative; overflow: hidden;
}
.btn-primary { background: var(--grad-pink); color: #fff; box-shadow: 0 8px 22px rgba(233,69,132,.35); }
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 14px 30px rgba(233,69,132,.45); }
.btn-purple { background: var(--grad-purple); color: #fff; box-shadow: 0 8px 22px rgba(123,77,255,.32); }
.btn-purple:hover { transform: translateY(-3px); box-shadow: 0 14px 30px rgba(123,77,255,.42); }
.btn-ghost { background: rgba(255,255,255,.8); border: 2px solid var(--pink-soft); color: var(--pink-deep); }
.btn-ghost:hover { background: #fff; border-color: var(--pink); transform: translateY(-2px); }
.btn-danger { background: linear-gradient(135deg,#ff7a7a,#ef476f); color: #fff; }
.btn-block { width: 100%; }
.btn-sm { padding: 7px 15px; font-size: 13px; }
.btn::after {
  content: ''; position: absolute; top: 0; left: -80%; width: 60%; height: 100%;
  background: linear-gradient(120deg, transparent, rgba(255,255,255,.5), transparent);
  transform: skewX(-20deg); transition: .6s;
}
.btn:hover::after { left: 130%; }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative; border-radius: 0 0 36px 36px; overflow: hidden;
  min-height: 560px; display: flex; align-items: center;
}
.hero-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.hero::after {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(90deg, rgba(70,30,90,.72) 0%, rgba(120,50,140,.45) 45%, rgba(255,120,180,.15) 100%);
}
.hero-inner { padding: 90px 0; color: #fff; max-width: 620px; animation: heroIn 1s ease both; }
@keyframes heroIn { from { opacity: 0; transform: translateY(40px);} to { opacity: 1; transform: none;} }
.hero .tag {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,.18); border: 1px solid rgba(255,255,255,.4);
  backdrop-filter: blur(8px); padding: 8px 18px; border-radius: 999px;
  font-size: 13px; font-weight: 600; margin-bottom: 20px;
}
.hero h1 { font-size: 52px; line-height: 1.15; font-weight: 800; text-shadow: 0 4px 24px rgba(0,0,0,.3); }
.hero h1 .grad {
  background: linear-gradient(90deg, #ffd9ec, #ffe28a, #b6f4ff);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero p { margin: 18px 0 30px; font-size: 17px; line-height: 1.7; color: #ffeef8; text-shadow: 0 2px 10px rgba(0,0,0,.25); }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-stats { display: flex; gap: 34px; margin-top: 42px; }
.hero-stats .n { font-size: 28px; font-weight: 800; color: #fff; }
.hero-stats .l { font-size: 13px; color: #ffd9ec; }

/* Marquee */
.marquee {
  background: var(--grad-pink); color: #fff; overflow: hidden; white-space: nowrap;
  padding: 11px 0; font-weight: 600; font-size: 14px;
}
.marquee-track { display: inline-block; animation: marquee 26s linear infinite; }
.marquee-track span { margin: 0 26px; }
@keyframes marquee { from { transform: translateX(0);} to { transform: translateX(-50%);} }

/* ============================================================
   DANH MỤC
   ============================================================ */
.cat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 18px; }
.cat-card {
  background: var(--glass); border: 1px solid var(--glass-border);
  border-radius: var(--radius); padding: 28px 12px; text-align: center;
  backdrop-filter: blur(10px); transition: .3s; cursor: pointer;
  box-shadow: var(--shadow-soft);
}
.cat-card:hover { transform: translateY(-8px) rotate(-1.5deg); box-shadow: var(--shadow); }
.cat-card .emoji {
  width: 70px; height: 70px; margin: 0 auto 12px; border-radius: 22px;
  display: grid; place-items: center; font-size: 34px;
  background: var(--grad-main); box-shadow: 0 8px 18px rgba(233,69,132,.3);
  transition: .3s;
}
.cat-card:hover .emoji { transform: scale(1.12) rotate(8deg); }
.cat-card b { display: block; font-size: 14.5px; }
.cat-card small { color: var(--ink-soft); }

/* ============================================================
   THẺ SẢN PHẨM
   ============================================================ */
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(245px, 1fr)); gap: 24px; }
.product-card {
  background: rgba(255,255,255,.86); border-radius: 22px; overflow: hidden;
  border: 1.5px solid rgba(255, 205, 228, .8);
  box-shadow: var(--shadow-soft); transition: .32s; position: relative;
  display: flex; flex-direction: column;
}
.product-card:hover { transform: translateY(-9px); box-shadow: 0 22px 45px rgba(233,69,132,.25); border-color: var(--pink); }
.product-thumb { position: relative; aspect-ratio: 1/1; overflow: hidden; background: linear-gradient(135deg,#fff0f7,#f0e7ff); }
.product-thumb img { width: 100%; height: 100%; object-fit: contain; padding: 14px; transition: .5s; }
.product-card:hover .product-thumb img { transform: scale(1.12) rotate(1.5deg); }
.product-badge {
  position: absolute; top: 12px; left: 12px; z-index: 2;
  background: var(--grad-pink); color: #fff; font-size: 11.5px; font-weight: 700;
  padding: 5px 11px; border-radius: 999px; box-shadow: 0 4px 10px rgba(233,69,132,.4);
}
.product-badge.hot { background: linear-gradient(135deg,#ffb347,#ff5f9e); }
.product-badge.new { background: linear-gradient(135deg,#5ec9f0,#7b4dff); }
.product-fav {
  position: absolute; top: 10px; right: 10px; z-index: 2;
  width: 34px; height: 34px; border-radius: 50%; background: rgba(255,255,255,.9);
  display: grid; place-items: center; font-size: 15px; opacity: 0; transition: .3s;
}
.product-card:hover .product-fav { opacity: 1; }
.product-fav:hover { transform: scale(1.2); }
.product-info { padding: 15px 16px 18px; display: flex; flex-direction: column; gap: 7px; flex: 1; }
.product-brand { font-size: 11.5px; font-weight: 700; color: var(--purple); text-transform: uppercase; letter-spacing: .5px; }
.product-name { font-size: 15px; font-weight: 700; line-height: 1.4; height: 42px; overflow: hidden;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.product-name:hover { color: var(--pink-deep); }
.product-stars { color: var(--gold); font-size: 13px; letter-spacing: 1px; }
.product-stars small { color: var(--ink-soft); margin-left: 4px; }
.product-price-row { display: flex; align-items: baseline; gap: 8px; margin-top: auto; flex-wrap: wrap; }
.price { color: var(--pink-deep); font-size: 18px; font-weight: 800; }
.old-price { color: #b3a3b8; text-decoration: line-through; font-size: 13px; }
.product-info .btn { margin-top: 6px; padding: 9px; font-size: 13.5px; }

/* ============================================================
   PROMO BANNER
   ============================================================ */
.promo-banner {
  position: relative; border-radius: 28px; overflow: hidden;
  min-height: 320px; display: flex; align-items: center;
  box-shadow: var(--shadow);
}
.promo-banner img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.promo-banner::after { content:''; position:absolute; inset:0; background: linear-gradient(90deg, rgba(80,35,110,.82), rgba(150,70,170,.45) 60%, transparent); }
.promo-content { position: relative; z-index: 2; color: #fff; padding: 48px; max-width: 560px; }
.promo-content h3 { font-size: 32px; font-weight: 800; line-height: 1.25; text-shadow: 0 3px 14px rgba(0,0,0,.3); }
.promo-content p { margin: 12px 0 24px; color: #f6e6ff; line-height: 1.7; }

/* Tính năng */
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; }
.feature {
  background: var(--glass); border: 1px solid var(--glass-border); border-radius: var(--radius);
  padding: 26px 20px; text-align: center; backdrop-filter: blur(10px); transition: .3s;
}
.feature:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.feature .ico { font-size: 38px; margin-bottom: 12px; display: inline-block; animation: bob 2.6s ease-in-out infinite; }
@keyframes bob { 0%,100%{ transform: translateY(0);} 50%{ transform: translateY(-8px);} }
.feature h4 { font-size: 16px; margin-bottom: 5px; }
.feature p { font-size: 13.5px; color: var(--ink-soft); line-height: 1.6; }

/* ============================================================
   TRANG SẢN PHẨM
   ============================================================ */
.page-banner {
  background: var(--grad-purple); color: #fff; padding: 46px 0;
  border-radius: 0 0 32px 32px; position: relative; overflow: hidden;
}
.page-banner::before { content:'🎵🎶🎸🎹🥁🎻'; position: absolute; right: 4%; top: 50%; transform: translateY(-50%);
  font-size: 90px; letter-spacing: 14px; opacity: .14; }
.page-banner h1 { font-size: 34px; font-weight: 800; }
.page-banner .crumbs { font-size: 13.5px; color: #e9d8ff; margin-top: 6px; }
.page-banner .crumbs a:hover { color: #fff; }

.shop-layout { display: grid; grid-template-columns: 260px 1fr; gap: 28px; align-items: start; }
.shop-sidebar {
  background: var(--glass); border: 1px solid var(--glass-border); border-radius: var(--radius);
  padding: 22px; backdrop-filter: blur(10px); position: sticky; top: 96px;
}
.shop-sidebar h4 { font-size: 15px; margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
.cat-filter { list-style: none; display: flex; flex-direction: column; gap: 4px; }
.cat-filter button {
  text-align: left; width: 100%; padding: 9px 14px; border-radius: 12px;
  font-size: 14px; font-weight: 500; color: var(--ink-soft); transition: .2s;
}
.cat-filter button:hover { background: #fdeaf4; color: var(--pink-deep); }
.cat-filter button.active { background: var(--grad-pink); color: #fff; font-weight: 700; box-shadow: 0 5px 14px rgba(233,69,132,.3); }
.shop-toolbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; gap: 10px; flex-wrap: wrap; }
.shop-toolbar .count { font-weight: 600; color: var(--ink-soft); font-size: 14px; }
.select-cute {
  border: 2px solid #f2d6e6; border-radius: 999px; padding: 9px 16px; background: #fff;
  color: var(--ink); font-weight: 600; font-size: 14px; outline: none; cursor: pointer;
}
.select-cute:focus { border-color: var(--pink); }
.empty-state { text-align: center; padding: 70px 20px; color: var(--ink-soft); }
.empty-state .big { font-size: 64px; margin-bottom: 14px; }

/* ============================================================
   CHI TIẾT SẢN PHẨM
   ============================================================ */
.pd-wrap { display: grid; grid-template-columns: 1fr 1.05fr; gap: 44px; background: rgba(255,255,255,.85);
  border-radius: 26px; padding: 34px; box-shadow: var(--shadow-soft); border: 1.5px solid #ffe0ee; }
.pd-gallery { border-radius: 20px; overflow: hidden; background: linear-gradient(135deg,#fff3f9,#efe7ff); position: relative; }
.pd-gallery img { width: 100%; aspect-ratio: 1/1; object-fit: contain; padding: 30px; }
.pd-info h1 { font-size: 28px; line-height: 1.3; margin: 8px 0 12px; }
.pd-meta { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; margin-bottom: 16px; font-size: 14px; color: var(--ink-soft); }
.pd-price-box { background: linear-gradient(135deg,#fff0f7,#f4ecff); border-radius: 18px; padding: 20px 22px; margin: 18px 0; }
.pd-price-box .price { font-size: 34px; }
.pd-price-box .old-price { font-size: 17px; }
.pd-price-box .save { color: #27ae60; font-weight: 700; font-size: 13.5px; margin-left: 10px; }
.pd-desc { color: var(--ink-soft); line-height: 1.75; font-size: 14.5px; }
.pd-specs { margin: 18px 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pd-specs div { background: #fdf4fa; border-radius: 12px; padding: 10px 14px; font-size: 13.5px; }
.pd-specs b { color: var(--purple-deep); }
.stock-pill { font-weight: 700; color: #16a34a; }
.stock-pill.low { color: #ea580c; }
.qty-stepper { display: inline-flex; align-items: center; border: 2px solid #f2d6e6; border-radius: 999px; overflow: hidden; background: #fff; }
.qty-stepper button { width: 42px; height: 42px; font-size: 18px; color: var(--pink-deep); font-weight: 700; }
.qty-stepper button:hover { background: var(--pink-soft); }
.qty-stepper input { width: 52px; text-align: center; border: none; outline: none; font-weight: 700; }
.pd-actions { display: flex; gap: 12px; margin-top: 20px; flex-wrap: wrap; }
.pd-actions .btn { flex: 1; min-width: 180px; }

/* ============================================================
   GIỎ HÀNG & THANH TOÁN
   ============================================================ */
.glass-card {
  background: rgba(255,255,255,.88); border: 1.5px solid #ffe0ee;
  border-radius: 22px; padding: 26px; box-shadow: var(--shadow-soft);
}
.cart-table { width: 100%; border-collapse: collapse; }
.cart-table th { text-align: left; font-size: 13px; text-transform: uppercase; letter-spacing: .5px;
  color: var(--ink-soft); padding: 0 12px 14px; border-bottom: 2px dashed #ffd6e7; }
.cart-table td { padding: 16px 12px; border-bottom: 1px dashed #ffe8f2; vertical-align: middle; }
.cart-prod { display: flex; align-items: center; gap: 14px; }
.cart-prod img { width: 72px; height: 72px; object-fit: contain; border-radius: 14px; background: #fff3f9; padding: 6px; }
.cart-prod b { font-size: 14.5px; display: block; }
.cart-prod small { color: var(--ink-soft); }
.cart-summary { margin-top: 22px; display: flex; justify-content: flex-end; }
.summary-box { width: min(380px, 100%); }
.summary-row { display: flex; justify-content: space-between; padding: 9px 0; font-size: 14.5px; color: var(--ink-soft); }
.summary-row.total { border-top: 2px dashed #ffd6e7; margin-top: 8px; padding-top: 16px; font-size: 18px; font-weight: 800; color: var(--pink-deep); }
.summary-row .free { color: #16a34a; font-weight: 700; }

.checkout-layout { display: grid; grid-template-columns: 1.15fr .85fr; gap: 28px; align-items: start; }
.field { margin-bottom: 16px; }
.field label { display: block; font-weight: 600; font-size: 13.5px; margin-bottom: 6px; }
.field input, .field select, .field textarea {
  width: 100%; border: 2px solid #f2d6e6; border-radius: 13px; padding: 12px 15px;
  background: #fff; outline: none; transition: .2s; color: var(--ink);
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--pink); box-shadow: 0 0 0 4px rgba(255,111,165,.13); }
.field-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.pay-method {
  display: flex; gap: 12px; align-items: flex-start; border: 2px solid #f2d6e6; border-radius: 16px;
  padding: 15px 17px; margin-bottom: 12px; cursor: pointer; transition: .2s; background: #fff;
}
.pay-method:hover { border-color: var(--pink); }
.pay-method.active { border-color: var(--pink); background: #fff4fa; box-shadow: 0 6px 16px rgba(233,69,132,.15); }
.pay-method input { margin-top: 3px; accent-color: var(--pink-deep); }
.pay-method b { display: block; font-size: 15px; }
.pay-method small { color: var(--ink-soft); line-height: 1.5; }
.qr-box { text-align: center; background: linear-gradient(135deg,#f0f9ff,#fdf2ff); border: 2px dashed #b9a3ff;
  border-radius: 18px; padding: 22px; margin-top: 14px; }
.qr-box img { width: 250px; height: 250px; margin: 0 auto 14px; border-radius: 12px; background: #fff; padding: 8px; }
.copy-line { display: flex; align-items: center; gap: 8px; justify-content: center; flex-wrap: wrap; margin-top: 8px; font-size: 14px; }
.copy-line code { background: #fff; border: 1.5px solid #e7d9ff; padding: 5px 12px; border-radius: 8px; font-weight: 700; color: var(--purple-deep); }
.mini-copy { padding: 3px 10px; font-size: 12px; border-radius: 999px; background: var(--grad-purple); color: #fff; font-weight: 700; }

.order-success { text-align: center; padding: 40px 20px; }
.order-success .check {
  width: 92px; height: 92px; margin: 0 auto 20px; border-radius: 50%;
  background: linear-gradient(135deg,#4ade80,#22c55e); display: grid; place-items: center;
  font-size: 46px; color: #fff; animation: pop .6s cubic-bezier(.2,1.4,.5,1) both;
  box-shadow: 0 12px 30px rgba(34,197,94,.4);
}
@keyframes pop { from{ transform: scale(0);} to{ transform: scale(1);} }

/* ============================================================
   AUTH
   ============================================================ */
.auth-wrap { min-height: calc(100vh - 110px); display: grid; place-items: center; padding: 50px 16px; }
.auth-card {
  display: grid; grid-template-columns: 1fr 1fr; width: min(900px, 100%);
  border-radius: 28px; overflow: hidden; box-shadow: 0 25px 60px rgba(123,77,255,.28);
  background: #fff; border: 1.5px solid #ffe0ee;
}
.auth-side {
  background: linear-gradient(150deg, rgba(233,69,132,.85), rgba(123,77,255,.88)),
    url('../assets/img/hero-bg.jpg') center/cover;
  color: #fff; padding: 48px 38px; display: flex; flex-direction: column; justify-content: center; gap: 16px;
}
.auth-side h2 { font-size: 30px; line-height: 1.3; }
.auth-side p { line-height: 1.7; color: #ffe3f2; font-size: 14.5px; }
.auth-side .perk { display: flex; gap: 10px; align-items: center; font-size: 14px; }
.auth-form { padding: 44px 40px; }
.auth-form h3 { font-size: 25px; margin-bottom: 6px; }
.auth-form .muted { color: var(--ink-soft); font-size: 14px; margin-bottom: 22px; }
.auth-switch { text-align: center; margin-top: 18px; font-size: 14px; color: var(--ink-soft); }
.auth-switch a { color: var(--pink-deep); font-weight: 700; }

/* ============================================================
   TÀI KHOẢN / ĐƠN HÀNG
   ============================================================ */
.tabs { display: flex; gap: 8px; margin-bottom: 24px; flex-wrap: wrap; }
.tab-btn { padding: 11px 22px; border-radius: 999px; font-weight: 700; font-size: 14px; color: var(--ink-soft);
  background: #fff; border: 2px solid #f2d6e6; transition: .2s; }
.tab-btn.active { background: var(--grad-pink); color: #fff; border-color: transparent; box-shadow: 0 6px 16px rgba(233,69,132,.3); }
.order-card { border: 1.5px solid #ffe0ee; border-radius: 18px; padding: 20px 22px; margin-bottom: 16px; background: #fff; transition: .25s; }
.order-card:hover { box-shadow: var(--shadow-soft); }
.order-head { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; margin-bottom: 12px;
  padding-bottom: 12px; border-bottom: 1px dashed #ffd6e7; font-size: 14px; }
.order-head b { color: var(--purple-deep); }
.status-pill { padding: 5px 14px; border-radius: 999px; font-size: 12.5px; font-weight: 700; }
.st-pending { background: #fff4d6; color: #b7791f; }
.st-confirmed { background: #e0f2fe; color: #0369a1; }
.st-paid { background: #dcfce7; color: #15803d; }
.st-shipping { background: #ede9fe; color: #6d28d9; }
.st-done { background: #d1fae5; color: #047857; }
.st-cancelled { background: #fee2e2; color: #b91c1c; }
.order-line { display: flex; align-items: center; gap: 12px; padding: 6px 0; font-size: 14px; }
.order-line img { width: 46px; height: 46px; object-fit: contain; background: #fff3f9; border-radius: 10px; padding: 3px; }
.order-foot { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; margin-top: 12px; }

/* ============================================================
   ADMIN
   ============================================================ */
.admin-body { display: grid; grid-template-columns: 248px 1fr; min-height: 100vh; }
.admin-side {
  background: linear-gradient(180deg, #4c2a6e 0%, #7b4dff 55%, #e94584 130%);
  color: #fff; padding: 26px 18px; position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.admin-side .logo { color: #fff; font-size: 25px; margin-bottom: 26px; padding-left: 6px; }
.admin-side .logo b { color: #ffe3f2; -webkit-text-fill-color: #ffe3f2; }
.admin-nav button {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left;
  padding: 12px 16px; border-radius: 13px; color: rgba(255,255,255,.82);
  font-weight: 600; font-size: 14.5px; margin-bottom: 5px; transition: .2s;
}
.admin-nav button:hover { background: rgba(255,255,255,.13); color: #fff; }
.admin-nav button.active { background: rgba(255,255,255,.95); color: var(--purple-deep); box-shadow: 0 6px 18px rgba(0,0,0,.18); }
.admin-side .admin-foot { margin-top: 26px; border-top: 1px solid rgba(255,255,255,.2); padding-top: 16px; font-size: 13px; }
.admin-main { padding: 28px 32px; min-width: 0; }
.admin-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; flex-wrap: wrap; gap: 12px; }
.admin-head h1 { font-size: 25px; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(195px, 1fr)); gap: 18px; margin-bottom: 26px; }
.stat-card { border-radius: 18px; padding: 22px; color: #fff; position: relative; overflow: hidden; box-shadow: 0 10px 26px rgba(0,0,0,.12); }
.stat-card .ic { position: absolute; right: 14px; top: 12px; font-size: 42px; opacity: .35; }
.stat-card .v { font-size: 27px; font-weight: 800; }
.stat-card .k { font-size: 13.5px; opacity: .92; margin-top: 4px; }
.bg-pink { background: linear-gradient(135deg,#ff8fc7,#e94584); }
.bg-purple { background: linear-gradient(135deg,#b07dff,#6d3df0); }
.bg-cyan { background: linear-gradient(135deg,#5ec9f0,#2b8fd9); }
.bg-gold { background: linear-gradient(135deg,#ffd166,#f08a24); }
.bg-green { background: linear-gradient(135deg,#4ade80,#16a34a); }
.bg-red { background: linear-gradient(135deg,#fb7185,#e11d48); }
.panel { background: #fff; border-radius: 18px; padding: 22px; box-shadow: 0 8px 24px rgba(123,77,255,.09); margin-bottom: 22px; border: 1px solid #f2e9ff; }
.panel h3 { font-size: 17px; margin-bottom: 16px; display: flex; align-items: center; gap: 8px; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.admin-table th { background: #faf3ff; text-align: left; padding: 12px 13px; font-size: 12px; text-transform: uppercase;
  letter-spacing: .4px; color: var(--purple-deep); white-space: nowrap; }
.admin-table td { padding: 11px 13px; border-bottom: 1px solid #f6edf9; vertical-align: middle; }
.admin-table tr:hover td { background: #fdf8ff; }
.admin-table .thumb { width: 44px; height: 44px; object-fit: contain; background: #fdf4fa; border-radius: 9px; padding: 3px; }
.table-wrap { overflow-x: auto; }
.admin-login-wrap { min-height: 100vh; display: grid; place-items: center;
  background: linear-gradient(160deg,#ffe9f4,#e2f6ff); padding: 20px; }

/* Modal */
.modal-mask { position: fixed; inset: 0; background: rgba(60,30,80,.5); backdrop-filter: blur(4px);
  z-index: 100; display: none; place-items: center; padding: 20px; }
.modal-mask.show { display: grid; animation: fadeIn .2s; }
@keyframes fadeIn { from { opacity: 0;} to { opacity: 1;} }
.modal { background: #fff; border-radius: 22px; padding: 28px; width: min(640px, 100%);
  max-height: 88vh; overflow-y: auto; animation: pop .35s cubic-bezier(.2,1.3,.5,1) both; }
.modal h3 { margin-bottom: 18px; font-size: 20px; }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 20px; }
.detail-items { margin: 12px 0; }
.detail-line { display: flex; gap: 12px; align-items: center; padding: 8px 0; border-bottom: 1px dashed #f2e0ee; font-size: 14px; }
.detail-line img { width: 48px; height: 48px; object-fit: contain; background: #fdf4fa; border-radius: 10px; padding: 4px; }
.detail-info { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 18px; font-size: 14px; }
.detail-info div { padding: 6px 0; }
.detail-info b { color: var(--purple-deep); }

/* ============================================================
   FOOTER & MẠNG XÃ HỘI
   ============================================================ */
.site-footer { margin-top: 70px; background: linear-gradient(160deg, #4c2a6e, #7b4dff 70%, #e94584);
  color: #f3e8ff; border-radius: 36px 36px 0 0; position: relative; overflow: hidden; }
.site-footer::before { content: '🌸🎵🌸🎶🌸🎵🌸'; position: absolute; top: 8px; left: 0; right: 0;
  text-align: center; font-size: 14px; letter-spacing: 30px; opacity: .5; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 34px; padding: 58px 0 34px; }
.footer-grid h4 { color: #fff; font-size: 16px; margin-bottom: 16px; }
.footer-grid p, .footer-grid li { font-size: 13.5px; line-height: 2; color: #e6d8f7; list-style: none; }
.footer-grid a:hover { color: #ffd9ec; text-shadow: 0 0 10px rgba(255,217,236,.6); }
.footer-brand .logo { color: #fff; margin-bottom: 14px; }
.footer-brand .logo b { color: #ffd9ec; -webkit-text-fill-color: #ffd9ec; }
.social-row { display: flex; gap: 10px; margin-top: 14px; flex-wrap: wrap; }
.social-btn {
  width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(255,255,255,.15); font-size: 17px; transition: .3s; border: 1px solid rgba(255,255,255,.25);
}
.social-btn:hover { transform: translateY(-5px) rotate(-8deg); background: #fff; }
.social-btn:hover .fa-emoji { filter: none; }
.s-fb:hover { color: #1877f2; }
.s-zalo:hover { color: #0068ff; }
.s-tiktok:hover { color: #111; }
.s-yt:hover { color: #ff0000; }
.s-ins:hover { color: #e1306c; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.18); padding: 18px 0; text-align: center; font-size: 13px; color: #d9c5f3; }

/* Nổi social cạnh màn hình */
.floating-social { position: fixed; right: 14px; bottom: 26px; z-index: 55; display: flex; flex-direction: column; gap: 10px; }
.floating-social a {
  width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; font-size: 21px;
  color: #fff; box-shadow: 0 8px 20px rgba(0,0,0,.22); transition: .25s;
  animation: bob 3s ease-in-out infinite;
}
.floating-social a:nth-child(2){ animation-delay: .3s; }
.floating-social a:nth-child(3){ animation-delay: .6s; }
.floating-social a:nth-child(4){ animation-delay: .9s; }
.floating-social a:hover { transform: scale(1.18); }
.fs-mess { background: linear-gradient(135deg,#5ec9f0,#7b4dff); }
.fs-zalo { background: linear-gradient(135deg,#29a1e8,#0068ff); }
.fs-tiktok { background: linear-gradient(135deg,#25f4ee,#fe2c55); }
.fs-call { background: linear-gradient(135deg,#4ade80,#16a34a); }

/* Toast */
.toast-wrap { position: fixed; top: 84px; right: 18px; z-index: 200; display: flex; flex-direction: column; gap: 10px; }
.toast {
  background: #fff; border-radius: 14px; padding: 14px 20px; min-width: 260px;
  box-shadow: 0 14px 36px rgba(123,77,255,.25); border-left: 5px solid var(--pink);
  font-size: 14px; font-weight: 600; animation: toastIn .35s cubic-bezier(.2,1.3,.5,1) both;
  display: flex; gap: 10px; align-items: center;
}
.toast.success { border-color: #22c55e; }
.toast.error { border-color: #ef476f; }
.toast.info { border-color: var(--purple); }
@keyframes toastIn { from{ transform: translateX(120%); opacity:0;} to{ transform:none; opacity:1;} }
.toast.out { animation: toastOut .3s forwards; }
@keyframes toastOut { to { transform: translateX(120%); opacity: 0; } }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 980px) {
  .shop-layout, .checkout-layout, .pd-wrap, .auth-card, .admin-body, .footer-grid { grid-template-columns: 1fr; }
  .shop-sidebar { position: static; }
  .auth-side { padding: 34px 28px; }
  .admin-side { position: static; height: auto; }
  .admin-body { display: block; }
  .admin-nav { display: flex; flex-wrap: wrap; gap: 6px; }
  .admin-nav button { width: auto; }
  .footer-grid { padding: 46px 24px 26px; gap: 24px; }
  .hero h1 { font-size: 38px; }
  .nav-links { display: none; position: absolute; top: 74px; left: 0; right: 0; background: rgba(255,255,255,.97);
    flex-direction: column; padding: 14px; box-shadow: 0 16px 30px rgba(123,77,255,.15); }
  .nav-links.open { display: flex; }
  .menu-toggle { display: grid; }
  .search-box { min-width: 0; width: 130px; }
}
@media (max-width: 620px) {
  .nav { gap: 6px; }
  .nav .logo { font-size: 18px; gap: 5px; white-space: nowrap; }
  .nav .logo-icon { width: 32px; height: 32px; font-size: 18px; flex-shrink: 0; }
  .nav-right { gap: 3px; }
  .nav-right .icon-btn { width: 36px; height: 36px; }
  .nav-right .user-chip { padding: 2px; }
  .nav-right a[title="Trang quản trị"] { display: none; }
  .nav-right .search-box { display: none; }
  .nav-links .mobile-search { display: flex; width: 100%; }
  .nav-right .user-chip .tb-hide { display: none; }
  .hero h1 { font-size: 31px; }
  .section { padding: 44px 0; }
  .section-title h2 { font-size: 26px; }
  .promo-content { padding: 30px 24px; }
  .promo-content h3 { font-size: 24px; }
  .auth-form { padding: 32px 24px; }
  .field-2, .pd-specs, .detail-info { grid-template-columns: 1fr; }
  .cart-table thead { display: none; }
  .cart-table, .cart-table tbody, .cart-table tr, .cart-table td { display: block; width: 100%; }
  .cart-table tr { border: 1px solid #ffe0ee; border-radius: 16px; padding: 10px; margin-bottom: 12px; }
  .admin-main { padding: 18px 14px; }
  .floating-social a { width: 42px; height: 42px; }
  .topbar .tb-hide { display: none; }
}
@media (max-width: 360px) {
  .nav .logo b { display: none; }
}

/* Bố cục tinh gọn và dễ thao tác trên mọi kích thước màn hình */
#header { position: sticky; top: -36px; z-index: 45; }
.site-header { position: relative; }
:where(a, button, input, select, textarea):focus-visible { outline: 3px solid #7040d9; outline-offset: 3px; }
.hero { min-height: 610px; }
.hero::after { background: linear-gradient(90deg, rgba(40,20,55,.88) 0%, rgba(69,28,80,.72) 38%, rgba(83,35,91,.2) 100%); }
.hero-inner { max-width: 1200px; padding: 90px 0; }
.hero h1 { max-width: 650px; font-size: clamp(38px, 4.2vw, 60px); letter-spacing: -.035em; }
.hero p { max-width: 530px; }
.hero-secondary { color: #fff; border: 1px solid rgba(255,255,255,.7); background: rgba(255,255,255,.12); backdrop-filter: blur(8px); }
.hero-secondary:hover { background: rgba(255,255,255,.24); transform: translateY(-2px); }
.hero-stats { gap: 0; }
.hero-stats > div { padding: 0 24px; border-left: 1px solid rgba(255,255,255,.32); }
.hero-stats > div:first-child { padding-left: 0; border-left: 0; }
.hero-stats .n { font-size: 22px; }
.cat-card { padding: 24px 12px; }
.product-card { transition: transform .25s, box-shadow .25s, border-color .25s; }
.product-card:hover { transform: translateY(-5px); }
.product-card:hover .product-thumb img { transform: scale(1.05); }
.shop-toolbar { min-height: 44px; }
#grid[aria-busy="true"] { opacity: .65; }
@media (max-width: 980px) {
  .shop-layout { gap: 18px; }
  .shop-sidebar { padding: 16px; }
  .shop-sidebar h4 { margin-bottom: 8px; }
  .cat-filter { flex-direction: row; overflow-x: auto; overscroll-behavior-x: contain; padding: 2px 2px 10px; }
  .cat-filter button { white-space: nowrap; width: auto; flex: 0 0 auto; border: 1px solid #f2d6e6; background: rgba(255,255,255,.7); }
  .shop-sidebar h4[style] { display: none !important; }
  .shop-sidebar #resetBtn { width: auto; margin-top: 2px !important; }
}
@media (max-width: 620px) {
  .hero { min-height: 580px; }
  .hero-inner { padding: 60px 0; }
  .hero h1 { font-size: clamp(30px, 9vw, 40px); }
  .hero p { font-size: 15px; }
  .hero-stats { margin-top: 30px; }
  .hero-stats > div { padding: 0 12px; }
  .hero-stats .l { font-size: 11px; }
  .cat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .product-thumb img { padding: 8px; }
  .product-info { padding: 12px; }
  .product-info .btn { font-size: 12px; }
  .product-name { font-size: 13px; height: 38px; }
  .price { font-size: 15px; }
  .floating-social { right: 10px; bottom: 12px; }
  .floating-social a:not(:first-child) { display: none; }
  .cart-table td { border: 0; padding: 7px 6px; }
  .cart-table td:nth-child(2)::before { content: 'Đơn giá: '; color: var(--ink-soft); }
  .cart-table td:nth-child(4)::before { content: 'Thành tiền: '; color: var(--ink-soft); font-weight: 500; }
  .cart-summary > .summary-box > div:last-child { flex-wrap: wrap; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; transition-duration: .01ms !important; }
}
@media (hover: none) {
  html { scroll-behavior: auto; }
  .product-card:hover, .btn:hover, .icon-btn:hover { transform: none; }
  .product-card:hover .product-thumb img { transform: none; }
}
@media (max-width: 980px) {
  .shop-layout { grid-template-columns: minmax(0, 1fr); }
  .shop-sidebar, .shop-layout > div { min-width: 0; }
}
@media (max-width: 980px) {
  .admin-side { padding: 16px; overflow: hidden; }
  .admin-side .logo { margin-bottom: 14px; font-size: 22px; }
  .admin-nav { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 6px; }
  .admin-nav button { flex: 0 0 auto; white-space: nowrap; margin-bottom: 0; }
  .admin-side .admin-foot { margin-top: 12px; padding-top: 12px; }
}
@media (max-width: 620px) {
  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .stat-card { padding: 16px; }
  .stat-card .v { font-size: 22px; }
  .stat-card .k { font-size: 12px; }
  .panel { padding: 16px; }
}
