/* ============== VARIABLES ============== */
:root {
  --cream: #FAF3E7;
  --paper: #F5E9D3;
  --soft: #E8D5B7;
  --primary: #8B2E2E;
  --primary-dark: #6B1F1F;
  --primary-light: #B84545;
  --gold: #C49A3F;
  --gold-light: #E5C572;
  --jade: #2E5D3E;
  --jade-light: #4A8B5C;
  --dark: #2A1810;
  --ink: #3A2418;
  --muted: #7A6450;
  --line: rgba(139, 46, 46, 0.15);
  --shadow-sm: 0 2px 8px rgba(42, 24, 16, 0.08);
  --shadow-md: 0 8px 24px rgba(42, 24, 16, 0.12);
  --shadow-lg: 0 20px 50px rgba(42, 24, 16, 0.18);
  --shadow-xl: 0 30px 80px rgba(42, 24, 16, 0.25);
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --transition: 0.4s cubic-bezier(0.22, 1, 0.36, 1);
  --font-display: 'Playfair Display', 'Be Vietnam Pro', serif;
  --font-body: 'Be Vietnam Pro', system-ui, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: var(--font-body); background: var(--cream); color: var(--ink); line-height: 1.6; overflow-x: hidden; font-size: 16px; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    radial-gradient(circle at 20% 10%, rgba(196, 154, 63, 0.08) 0%, transparent 40%),
    radial-gradient(circle at 80% 70%, rgba(139, 46, 46, 0.06) 0%, transparent 40%),
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='60' height='60' viewBox='0 0 60 60'><g fill='none' stroke='%238B2E2E' stroke-width='0.5' opacity='0.05'><path d='M30 5 L35 25 L55 30 L35 35 L30 55 L25 35 L5 30 L25 25 Z'/></g></svg>");
  background-size: auto, auto, 120px 120px;
  pointer-events: none;
  z-index: -1;
}
.container { width: 100%; max-width: 1280px; margin: 0 auto; padding: 0 28px; }
.container-narrow { width: 100%; max-width: 920px; margin: 0 auto; padding: 0 28px; }

/* ====== NAVBAR ====== */
.navbar {
  position: sticky; top: 0; z-index: 100;
  background: rgba(250, 243, 231, 0.92);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--line);
  padding: 18px 0; transition: var(--transition);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; gap: 32px; }
.brand { display: flex; align-items: center; gap: 14px; font-family: var(--font-display); font-size: 22px; font-weight: 700; color: var(--primary); letter-spacing: 0.5px; }
.brand-icon { width: 44px; height: 44px; background: linear-gradient(135deg, var(--primary), var(--primary-dark)); border-radius: 12px; display: grid; place-items: center; color: var(--gold-light); font-size: 20px; box-shadow: 0 6px 18px rgba(139, 46, 46, 0.3); position: relative; overflow: hidden; }
.brand-icon::after { content: ''; position: absolute; inset: 3px; border: 1px solid rgba(229, 197, 114, 0.4); border-radius: 9px; }
.brand-text small { display: block; font-size: 11px; font-weight: 400; color: var(--muted); letter-spacing: 2px; text-transform: uppercase; font-family: var(--font-body); margin-top: -2px; }

/* Desktop nav links */
.nav-links { display: flex; align-items: center; gap: 36px; list-style: none; }
.nav-links > li { position: relative; }
.nav-links > li > a { font-size: 15px; font-weight: 500; color: var(--ink); position: relative; padding: 6px 0; transition: color var(--transition); display: inline-flex; align-items: center; gap: 5px; }
.nav-links > li > a::after { content: ''; position: absolute; left: 0; bottom: -4px; width: 0; height: 2px; background: var(--primary); transition: width var(--transition); }
.nav-links > li > a:hover, .nav-links > li > a.active { color: var(--primary); }
.nav-links > li > a:hover::after, .nav-links > li > a.active::after { width: 100%; }
.nav-caret { font-size: 10px; transition: transform 0.3s ease; margin-left: 2px; color: var(--muted); }
.has-dropdown:hover > a .nav-caret, .has-dropdown.open > a .nav-caret { transform: rotate(180deg); color: var(--primary); }

/* Level-1 dropdown */
.dropdown-l1 {
  position: absolute; top: calc(100% + 14px); left: 50%;
  transform: translateX(-50%) translateY(-8px);
  background: white; border-radius: var(--radius-md);
  box-shadow: 0 24px 60px rgba(42,24,16,0.16);
  border: 1px solid var(--line); min-width: 230px;
  padding: 8px; list-style: none;
  opacity: 0; pointer-events: none;
  transition: opacity 0.25s ease, transform 0.28s var(--transition);
  z-index: 9000;
}
/* bridge gap so mouse doesnt leave hover zone */
.has-dropdown::after { content:""; position:absolute; top:100%; left:0; width:100%; height:16px; }
.has-dropdown:hover > .dropdown-l1 { opacity: 1; pointer-events: auto; transform: translateX(-50%) translateY(0); }
.dropdown-l1::before {
  content: ''; position: absolute; top: -8px; left: 50%; transform: translateX(-50%);
  width: 16px; height: 8px; background: white;
  clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
}
.dropdown-l1 > li { position: relative; }
.dropdown-l1 > li > a {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 11px 14px; border-radius: 10px;
  font-size: 14.5px; font-weight: 600; color: var(--ink);
  transition: background 0.18s, color 0.18s; white-space: nowrap;
}
.dropdown-l1 > li > a:hover, .dropdown-l1 > li > a.active-sub { background: var(--paper); color: var(--primary); }
.sub-caret { font-size: 10px; color: var(--muted); transition: transform 0.3s ease; flex-shrink: 0; }
.dropdown-l1 > li:hover > a .sub-caret { transform: rotate(90deg); color: var(--primary); }
.sub-label-icon { font-size: 13px; color: var(--primary); width: 20px; text-align: center; }
.dropdown-divider { height: 1px; background: var(--line); margin: 6px 8px; }

/* Level-2 dropdown */
.dropdown-l2 {
  position: absolute; top: 0; left: calc(100% + 6px);
  background: white; border-radius: var(--radius-md);
  box-shadow: 0 20px 50px rgba(42,24,16,0.14);
  border: 1px solid var(--line); min-width: 210px;
  padding: 8px; list-style: none;
  opacity: 0; pointer-events: none;
  transition: opacity 0.22s ease, transform 0.25s var(--transition);
  transform: translateX(-6px); z-index: 9001;
}
.dropdown-l1 > li:hover > .dropdown-l2 { opacity: 1; pointer-events: auto; transform: translateX(0); }
.dropdown-l2 > li > a {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; border-radius: 10px;
  font-size: 14px; font-weight: 500; color: var(--ink);
  transition: background 0.18s, color 0.18s; white-space: nowrap;
}
.dropdown-l2 > li > a:hover { background: var(--paper); color: var(--primary); }
.sub2-icon { font-size: 12px; color: var(--gold); width: 18px; text-align: center; }

.nav-toggle { display: none; font-size: 22px; color: var(--primary); }

/* ====== HERO ====== */
.hero { position: relative; padding: 50px 0 50px; overflow: hidden; }
.hero-bg { position: absolute; inset: 0; background: linear-gradient(180deg, transparent 60%, var(--cream) 100%), radial-gradient(ellipse at top, rgba(196,154,63,0.18), transparent 70%); z-index: -1; }
.hero-decoration { position: absolute; top: 50px; right: -100px; width: 500px; height: 500px; opacity: 0.08; z-index: -1; animation: rotate-slow 60s linear infinite; }
@keyframes rotate-slow { from { transform: rotate(0); } to { transform: rotate(360deg); } }
.hero-content { text-align: center; max-width: 880px; margin: 0 auto; }
.hero-tag { display: inline-flex; align-items: center; gap: 10px; background: rgba(139,46,46,0.08); color: var(--primary); padding: 8px 18px; border-radius: 100px; font-size: 13px; font-weight: 600; letter-spacing: 1px; text-transform: uppercase; margin-bottom: 28px; animation: slideDown 0.8s var(--transition) both; }
.hero-tag i { font-size: 12px; }
.hero-title { font-family: var(--font-display); font-size: clamp(44px,7vw,84px); font-weight: 800; line-height: 1.05; color: var(--dark); margin-bottom: 24px; animation: fadeUp 1s var(--transition) 0.1s both; }
.hero-title .accent { color: var(--primary); font-style: italic; position: relative; display: inline-block; }
.hero-title .accent::after { content: ''; position: absolute; left: -4px; right: -4px; bottom: 8px; height: 12px; background: var(--gold-light); opacity: 0.4; z-index: -1; border-radius: 4px; transform: skewX(-8deg); }
.hero-sub { font-size: 19px; color: var(--muted); line-height: 1.7; max-width: 680px; margin: 0 auto 44px; animation: fadeUp 1s var(--transition) 0.2s both; }

/* Search */
.search-wrap { max-width: 720px; margin: 0 auto; position: relative; animation: fadeUp 1s var(--transition) 0.3s both; }
.search-bar { display: flex; align-items: center; background: white; border-radius: 100px; padding: 8px 8px 8px 28px; box-shadow: var(--shadow-md); border: 2px solid transparent; transition: var(--transition); }
.search-bar:focus-within { border-color: var(--primary); box-shadow: 0 12px 40px rgba(139,46,46,0.18); transform: translateY(-2px); }
.search-bar i.search-icon { color: var(--primary); font-size: 18px; margin-right: 14px; }
.search-bar input { flex: 1; border: none; outline: none; font-size: 16px; font-family: inherit; background: transparent; color: var(--ink); padding: 14px 0; }
.search-bar input::placeholder { color: var(--muted); }
.search-btn { background: linear-gradient(135deg, var(--primary), var(--primary-dark)); color: var(--gold-light); padding: 14px 32px; border-radius: 100px; font-weight: 600; font-size: 15px; display: inline-flex; align-items: center; gap: 10px; transition: var(--transition); box-shadow: 0 4px 16px rgba(139,46,46,0.25); }
.search-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(139,46,46,0.4); }
.search-tags { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 22px; animation: fadeUp 1s var(--transition) 0.4s both; }
.search-tag { padding: 6px 14px; background: rgba(196,154,63,0.15); color: var(--ink); border-radius: 100px; font-size: 13px; font-weight: 500; transition: var(--transition); cursor: pointer; }
.search-tag:hover { background: var(--primary); color: var(--gold-light); transform: translateY(-2px); }

/* Intro */
.intro { padding: 60px 0; position: relative; }
.intro-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 80px; align-items: center; }
.intro-img { position: relative; border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-xl); aspect-ratio: 4/5; }
.intro-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s ease; }
.intro-img:hover img { transform: scale(1.05); }
.intro-img::before { content: ''; position: absolute; inset: 18px; border: 1px solid rgba(229,197,114,0.6); border-radius: calc(var(--radius-lg) - 8px); z-index: 2; pointer-events: none; }
.intro-img::after { content: ''; position: absolute; bottom: -30px; right: -30px; width: 200px; height: 200px; background: var(--gold); border-radius: 50%; z-index: -1; opacity: 0.6; filter: blur(40px); }
.intro-content .section-eyebrow { display: inline-block; font-size: 13px; font-weight: 700; letter-spacing: 3px; text-transform: uppercase; color: var(--primary); margin-bottom: 20px; position: relative; padding-left: 50px; }
.intro-content .section-eyebrow::before { content: ''; position: absolute; left: 0; top: 50%; width: 36px; height: 2px; background: var(--primary); }
.intro-content h2 { font-family: var(--font-display); font-size: clamp(34px,4vw,52px); line-height: 1.15; color: var(--dark); margin-bottom: 24px; font-weight: 700; }
.intro-content h2 em { color: var(--primary); font-style: italic; }
.intro-content p { font-size: 16.5px; color: var(--muted); line-height: 1.85; margin-bottom: 18px; }
.intro-stats { display: grid; grid-template-columns: repeat(3,1fr); gap: 24px; margin-top: 36px; padding-top: 36px; border-top: 1px solid var(--line); }
.stat-item { text-align: center; }
.stat-num { font-family: var(--font-display); font-size: 38px; font-weight: 800; color: var(--primary); line-height: 1; margin-bottom: 4px; }
.stat-label { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: 1.5px; font-weight: 600; }

/* Section header */
.section-header { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 56px; gap: 32px; flex-wrap: wrap; }
.section-header .left { max-width: 640px; }
.section-eyebrow { display: inline-block; font-size: 13px; font-weight: 700; letter-spacing: 3px; text-transform: uppercase; color: var(--primary); margin-bottom: 16px; position: relative; padding-left: 50px; }
.section-eyebrow::before { content: ''; position: absolute; left: 0; top: 50%; width: 36px; height: 2px; background: var(--primary); }
.section-title { font-family: var(--font-display); font-size: clamp(34px,4.5vw,56px); line-height: 1.1; color: var(--dark); font-weight: 800; }
.section-title em { color: var(--primary); font-style: italic; }
.section-desc { margin-top: 14px; color: var(--muted); font-size: 17px; line-height: 1.7; }
.btn-view-all { display: inline-flex; align-items: center; gap: 12px; padding: 14px 26px; background: white; color: var(--primary); border: 2px solid var(--primary); border-radius: 100px; font-weight: 600; font-size: 14px; letter-spacing: 0.5px; transition: var(--transition); }
.btn-view-all i { transition: transform var(--transition); }
.btn-view-all:hover { background: var(--primary); color: var(--gold-light); transform: translateY(-2px); box-shadow: 0 10px 30px rgba(139,46,46,0.3); }
.btn-view-all:hover i { transform: translateX(4px); }

/* Featured / card grid */
.featured { padding: 60px 0 60px; position: relative; }
.works-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 32px; }
.work-card { background: white; border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-sm); transition: var(--transition); position: relative; display: flex; flex-direction: column; }
.work-card:hover { transform: translateY(-10px); box-shadow: var(--shadow-lg); }
.work-card-img { position: relative; aspect-ratio: 4/3; overflow: hidden; background: var(--soft); }
.work-card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 1s ease; }
.work-card:hover .work-card-img img { transform: scale(1.08); }
.work-card-badge { position: absolute; top: 16px; left: 16px; background: rgba(255,255,255,0.95); backdrop-filter: blur(8px); color: var(--primary); padding: 6px 14px; border-radius: 100px; font-size: 12px; font-weight: 700; letter-spacing: 0.5px; display: inline-flex; align-items: center; gap: 6px; box-shadow: var(--shadow-sm); }
.work-card-badge i { font-size: 11px; }
.work-card-overlay { position: absolute; inset: 0; background: linear-gradient(180deg, transparent 50%, rgba(42,24,16,0.7)); opacity: 0; transition: var(--transition); display: flex; align-items: flex-end; justify-content: center; padding: 20px; }
.work-card:hover .work-card-overlay { opacity: 1; }
.work-card-overlay span { color: white; background: var(--primary); padding: 10px 20px; border-radius: 100px; font-size: 13px; font-weight: 600; display: inline-flex; align-items: center; gap: 8px; transform: translateY(20px); transition: var(--transition); }
.work-card:hover .work-card-overlay span { transform: translateY(0); }
.work-card-body { padding: 24px 24px 28px; flex: 1; display: flex; flex-direction: column; }
.work-card-meta { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; font-size: 12px; color: var(--muted); font-weight: 500; }
.work-card-meta span { display: inline-flex; align-items: center; gap: 6px; }
.work-card h3 { font-family: var(--font-display); font-size: 22px; font-weight: 700; color: var(--dark); margin-bottom: 12px; line-height: 1.3; transition: color var(--transition); }
.work-card:hover h3 { color: var(--primary); }
.work-card p { color: var(--muted); font-size: 14.5px; line-height: 1.65; margin-bottom: 18px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; flex: 1; }
.work-card-desc { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; text-overflow: ellipsis; }
.work-card-foot { display: flex; align-items: center; justify-content: space-between; padding-top: 18px; border-top: 1px solid var(--line); }
.work-card-foot .theme-tag { font-size: 12px; color: var(--gold); font-weight: 600; display: inline-flex; align-items: center; gap: 6px; }
.work-card-arrow { width: 36px; height: 36px; border-radius: 50%; background: var(--paper); display: grid; place-items: center; color: var(--primary); transition: var(--transition); }
.work-card:hover .work-card-arrow { background: var(--primary); color: var(--gold-light); transform: rotate(-45deg); }

/* Categories */
.categories { padding: 60px 0; background: linear-gradient(180deg, transparent, rgba(196,154,63,0.06), transparent); position: relative; }
.cat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px,1fr)); gap: 22px; margin-top: 48px; }
.cat-item { background: white; padding: 36px 24px; border-radius: var(--radius-md); text-align: center; transition: var(--transition); box-shadow: var(--shadow-sm); position: relative; overflow: hidden; }
.cat-item::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: linear-gradient(90deg, var(--primary), var(--gold)); transform: scaleX(0); transform-origin: left; transition: transform var(--transition); }
.cat-item:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); }
.cat-item:hover::before { transform: scaleX(1); }
.cat-icon { width: 64px; height: 64px; margin: 0 auto 18px; border-radius: 18px; background: linear-gradient(135deg, var(--paper), var(--soft)); display: grid; place-items: center; color: var(--primary); font-size: 26px; transition: var(--transition); }
.cat-item:hover .cat-icon { background: linear-gradient(135deg, var(--primary), var(--primary-dark)); color: var(--gold-light); transform: rotate(-8deg) scale(1.05); }
.cat-item h4 { font-family: var(--font-display); font-size: 20px; font-weight: 700; margin-bottom: 6px; color: var(--dark); }
.cat-item .count { font-size: 13px; color: var(--muted); }

/* Footer */
.footer { background: var(--dark); color: var(--soft); padding: 80px 0 32px; position: relative; overflow: hidden; }
.footer::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 4px; background: linear-gradient(90deg, var(--primary), var(--gold), var(--jade)); }
.footer-decor { position: absolute; right: -100px; bottom: -100px; width: 400px; height: 400px; border: 1px solid rgba(229,197,114,0.08); border-radius: 50%; }
.footer-decor::after { content: ''; position: absolute; inset: 30px; border: 1px solid rgba(229,197,114,0.06); border-radius: 50%; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 48px; margin-bottom: 56px; position: relative; }
.footer h5 { font-family: var(--font-display); font-size: 18px; color: var(--gold-light); margin-bottom: 22px; font-weight: 600; }
.footer p { color: rgba(232,213,183,0.7); line-height: 1.8; font-size: 14.5px; margin-bottom: 18px; }
.footer .brand { color: var(--gold-light); margin-bottom: 18px; }
.footer ul { list-style: none; }
.footer ul li { margin-bottom: 12px; }
.footer ul a { color: rgba(232,213,183,0.7); font-size: 14px; transition: color var(--transition); display: inline-flex; align-items: center; gap: 8px; }
.footer ul a::before { content: ''; width: 6px; height: 1px; background: var(--gold); transition: width var(--transition); }
.footer ul a:hover { color: var(--gold-light); }
.footer ul a:hover::before { width: 14px; }
.footer-social { display: flex; gap: 12px; margin-top: 16px; }
.footer-social a { width: 42px; height: 42px; border-radius: 50%; background: rgba(229,197,114,0.08); border: 1px solid rgba(229,197,114,0.15); display: grid; place-items: center; color: var(--gold-light); transition: var(--transition); }
.footer-social a:hover { background: var(--primary); border-color: var(--primary); transform: translateY(-3px); color: var(--gold-light); }
.footer-bottom { border-top: 1px solid rgba(229,197,114,0.1); padding-top: 28px; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px; font-size: 13px; color: rgba(232,213,183,0.5); }

/* All works page */
.page-header { padding: 80px 0 60px; text-align: center; position: relative; }
.page-header h1 { font-family: var(--font-display); font-size: clamp(40px,6vw,72px); font-weight: 800; color: var(--dark); margin-bottom: 18px; animation: fadeUp 0.8s var(--transition) both; }
.page-header h1 em { color: var(--primary); font-style: italic; }
.page-header .breadcrumb { display: inline-flex; align-items: center; gap: 10px; margin-bottom: 24px; font-size: 13px; color: var(--muted); letter-spacing: 1px; text-transform: uppercase; font-weight: 600; }
.page-header .breadcrumb i { font-size: 10px; }
.page-header p { font-size: 17px; color: var(--muted); max-width: 640px; margin: 0 auto; animation: fadeUp 0.8s var(--transition) 0.1s both; }
.works-layout { display: grid; gap: 48px; padding-bottom: 100px; }
.filter-sidebar { position: sticky; top: 100px; align-self: start; background: white; border-radius: var(--radius-lg); padding: 32px 28px; box-shadow: var(--shadow-sm); max-height: calc(100vh - 130px); overflow-y: auto; }
.filter-group { margin-bottom: 28px; }
.filter-group-title { font-size: 11px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; color: var(--muted); margin-bottom: 14px; display: flex; align-items: center; gap: 8px; }
.filter-group-title::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.filter-item { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px; border-radius: 10px; cursor: pointer; transition: background 0.2s, color 0.2s; margin-bottom: 4px; font-size: 14px; font-weight: 500; }
.filter-item:hover { background: var(--paper); color: var(--primary); }
.filter-item.active { background: var(--primary); color: var(--gold-light); }
.filter-item .count-badge { font-size: 11px; font-weight: 700; background: var(--paper); color: var(--muted); padding: 2px 8px; border-radius: 10px; }
.filter-item.active .count-badge { background: rgba(229,197,114,0.2); color: var(--gold-light); }
.filter-item .item-icon { color: var(--primary); font-size: 13px; width: 18px; text-align: center; margin-right: 6px; }
.filter-item.active .item-icon { color: var(--gold-light); }
.filter-clear-btn { width: 100%; padding: 12px; border-radius: 10px; border: 1.5px dashed var(--line); color: var(--muted); font-size: 13px; font-weight: 600; cursor: pointer; transition: var(--transition); display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 8px; }
.filter-clear-btn:hover { border-color: var(--primary); color: var(--primary); background: rgba(139,46,46,0.04); }
.works-main { min-width: 0; }
.works-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; flex-wrap: wrap; gap: 14px; }
.result-info { font-size: 14px; color: var(--muted); }
.result-info strong { color: var(--primary); font-weight: 700; font-size: 16px; }
.search-mini { position: relative; width: 320px; max-width: 100%; }
.search-mini input { width: 100%; padding: 10px 14px 10px 38px; border: 1px solid var(--line); border-radius: 100px; font-family: inherit; font-size: 14px; background: var(--cream); color: var(--ink); outline: none; transition: var(--transition); }
.search-mini input:focus { border-color: var(--primary); background: white; }
.search-mini i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 13px; }
.no-results { text-align: center; padding: 80px 20px; background: white; border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); display: none; }
.no-results.show { display: block; }
.no-results i { font-size: 56px; color: var(--gold); margin-bottom: 18px; opacity: 0.5; }
.no-results h3 { font-family: var(--font-display); font-size: 24px; color: var(--dark); margin-bottom: 8px; }
.no-results p { color: var(--muted); }

/* Detail page */
.detail-hero { padding: 60px 0 50px; position: relative; }
.detail-hero .breadcrumb { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--muted); margin-bottom: 24px; flex-wrap: wrap; }
.detail-hero .breadcrumb a { color: var(--primary); }
.detail-hero .breadcrumb a:hover { text-decoration: underline; }
.detail-hero .breadcrumb i { font-size: 9px; }
.detail-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 60px; align-items: start; }
.detail-meta-tags { display: flex; align-items: center; gap: 12px; margin-bottom: 22px; flex-wrap: wrap; }
.meta-tag { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 100px; font-size: 12px; font-weight: 700; letter-spacing: 0.5px; text-transform: uppercase; }
.meta-tag.primary { background: var(--primary); color: var(--gold-light); }
.meta-tag.gold { background: rgba(196,154,63,0.18); color: var(--gold); }
.meta-tag.jade { background: rgba(46,93,62,0.12); color: var(--jade); }
.detail-title { font-family: var(--font-display); font-size: clamp(38px,5vw,60px); line-height: 1.1; color: var(--dark); font-weight: 800; margin-bottom: 22px; animation: fadeUp 0.8s var(--transition) both; }
.detail-summary { font-size: 18px; color: var(--muted); line-height: 1.8; border-left: 4px solid var(--gold); padding: 6px 0 6px 22px; margin-bottom: 32px; font-style: italic; animation: fadeUp 0.8s var(--transition) 0.1s both; }
.detail-author-row { display: flex; align-items: center; gap: 24px; padding: 18px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); font-size: 14px; color: var(--muted); flex-wrap: wrap; }
.detail-author-row .item { display: inline-flex; align-items: center; gap: 8px; }
.detail-author-row .item i { color: var(--primary); }
.detail-cover { position: relative; border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-xl); aspect-ratio: 4/5; animation: fadeUp 0.8s var(--transition) 0.2s both; }
.detail-cover img { width: 100%; height: 100%; object-fit: cover; }
.detail-cover::before { content: ''; position: absolute; inset: 16px; border: 1px solid rgba(229,197,114,0.5); border-radius: calc(var(--radius-lg) - 8px); z-index: 2; pointer-events: none; }
.detail-cover-deco { position: absolute; bottom: -40px; left: -40px; width: 180px; height: 180px; background: var(--primary); opacity: 0.4; filter: blur(50px); z-index: -1; }
.detail-body { padding: 50px 0 50px; }
.detail-body-grid { display: grid; grid-template-columns: 1fr 320px; gap: 60px; }
.content-block { background: white; border-radius: var(--radius-lg); padding: 48px; box-shadow: var(--shadow-sm); margin-bottom: 32px; position: relative; }
.content-block::before { content: ''; position: absolute; top: 28px; left: 0; width: 4px; height: 60px; background: linear-gradient(180deg, var(--primary), var(--gold)); border-radius: 0 4px 4px 0; }
.content-block h2 { font-family: var(--font-display); font-size: 30px; font-weight: 700; color: var(--dark); margin-bottom: 24px; display: flex; align-items: center; gap: 14px; }
.content-block h2 .icon-wrap { width: 44px; height: 44px; border-radius: 12px; background: linear-gradient(135deg, var(--paper), var(--soft)); display: grid; place-items: center; color: var(--primary); font-size: 18px; }
.content-block h3 { font-family: var(--font-display); font-size: 22px; color: var(--primary); margin: 28px 0 14px; font-weight: 700; }
.content-block p { font-size: 16.5px; line-height: 1.9; color: var(--ink); margin-bottom: 18px; }
.content-block .text-quote { background: linear-gradient(135deg, var(--paper), var(--cream)); border-left: 4px solid var(--primary); padding: 24px 28px; border-radius: 0 var(--radius-md) var(--radius-md) 0; font-family: var(--font-display); font-style: italic; color: var(--dark); font-size: 18px; line-height: 1.8; margin: 24px 0; position: relative; }
.content-block .text-quote::before { content: '\201C'; position: absolute; top: -10px; left: 16px; font-size: 80px; color: var(--gold); opacity: 0.3; font-family: serif; line-height: 1; }
.content-block ul { list-style: none; padding: 0; margin: 16px 0; }
.content-block ul li { padding: 10px 0 10px 32px; position: relative; line-height: 1.7; color: var(--ink); }
.content-block ul li::before { content: '\2756'; position: absolute; left: 0; top: 12px; color: var(--gold); font-size: 14px; }
.detail-sidebar { position: sticky; top: 100px; align-self: start; }
.sidebar-card { background: white; border-radius: var(--radius-lg); padding: 28px; box-shadow: var(--shadow-sm); margin-bottom: 24px; }
.sidebar-card h4 { font-family: var(--font-display); font-size: 18px; font-weight: 700; color: var(--dark); margin-bottom: 18px; padding-bottom: 14px; border-bottom: 2px solid var(--paper); display: flex; align-items: center; gap: 10px; }
.sidebar-card h4 i { color: var(--primary); }
.attachment-list { display: flex; flex-direction: column; gap: 10px; }
.attachment-item { display: flex; align-items: center; gap: 14px; padding: 14px; background: var(--cream); border-radius: var(--radius-md); transition: var(--transition); color: var(--ink); }
.attachment-item:hover { background: var(--paper); transform: translateX(4px); }
.attachment-icon { width: 42px; height: 42px; border-radius: 10px; background: var(--primary); color: var(--gold-light); display: grid; place-items: center; font-size: 18px; flex-shrink: 0; }
.attachment-info { flex: 1 1 0; min-width: 0; width: 0; overflow: hidden; }
.attachment-info .name { font-weight: 600; font-size: 14px; color: var(--dark); display: block; width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.attachment-info .size { font-size: 12px; color: var(--muted); }
.attachment-action { color: var(--primary); font-size: 14px; flex-shrink: 0; }
.image-gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.gallery-thumb { aspect-ratio: 1/1; border-radius: var(--radius-md); overflow: hidden; cursor: pointer; position: relative; background: var(--paper); box-shadow: var(--shadow-sm); transition: var(--transition); }
.gallery-thumb:hover { transform: scale(1.04); box-shadow: var(--shadow-md); }
.gallery-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s ease; }
.gallery-thumb:hover img { transform: scale(1.1); }
.gallery-thumb::after { content: '\f00e'; font-family: 'Font Awesome 6 Free'; font-weight: 900; position: absolute; inset: 0; background: rgba(42,24,16,0.5); color: white; display: grid; place-items: center; font-size: 22px; opacity: 0; transition: opacity var(--transition); }
.gallery-thumb:hover::after { opacity: 1; }
.lightbox { position: fixed; inset: 0; background: rgba(15,8,4,0.95); backdrop-filter: blur(12px); z-index: 200; display: none; align-items: center; justify-content: center; padding: 40px; opacity: 0; transition: opacity 0.3s ease; }
.lightbox.show { display: flex; opacity: 1; }
.lightbox-img-wrap { position: relative; max-width: 90vw; max-height: 85vh; display: flex; align-items: center; justify-content: center; }
.lightbox-img-wrap img { max-width: 100%; max-height: 85vh; object-fit: contain; border-radius: var(--radius-md); box-shadow: 0 30px 80px rgba(0,0,0,0.6); animation: zoomIn 0.4s var(--transition); }
.lightbox-close, .lightbox-prev, .lightbox-next { position: absolute; background: rgba(255,255,255,0.1); backdrop-filter: blur(10px); border: 1px solid rgba(255,255,255,0.2); color: white; width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; font-size: 18px; transition: var(--transition); z-index: 2; }
.lightbox-close { top: 30px; right: 30px; }
.lightbox-prev { left: 30px; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: 30px; top: 50%; transform: translateY(-50%); }
.lightbox-close:hover, .lightbox-prev:hover, .lightbox-next:hover { background: var(--primary); border-color: var(--primary); transform: scale(1.08); }
.lightbox-prev:hover { transform: translateY(-50%) scale(1.08); }
.lightbox-next:hover { transform: translateY(-50%) scale(1.08); }
.lightbox-counter { position: absolute; bottom: 30px; left: 50%; transform: translateX(-50%); background: rgba(255,255,255,0.1); backdrop-filter: blur(10px); color: white; padding: 8px 18px; border-radius: 100px; font-size: 14px; font-weight: 600; border: 1px solid rgba(255,255,255,0.2); }
.related { padding: 50px 0 50px; background: linear-gradient(180deg, transparent, rgba(196,154,63,0.06)); }

/* Animations */
@keyframes fadeUp { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }
@keyframes slideDown { from { opacity: 0; transform: translateY(-20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes zoomIn { from { opacity: 0; transform: scale(0.9); } to { opacity: 1; transform: scale(1); } }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
.reveal { opacity: 0; transform: translateY(40px); transition: opacity 0.9s ease, transform 0.9s var(--transition); }
.reveal.in-view { opacity: 1; transform: translateY(0); }
.reveal-stagger > * { opacity: 0; transform: translateY(40px); transition: opacity 0.7s ease, transform 0.7s var(--transition); }
.reveal-stagger.in-view > * { opacity: 1; transform: translateY(0); }
.reveal-stagger.in-view > *:nth-child(1) { transition-delay: 0.05s; }
.reveal-stagger.in-view > *:nth-child(2) { transition-delay: 0.12s; }
.reveal-stagger.in-view > *:nth-child(3) { transition-delay: 0.19s; }
.reveal-stagger.in-view > *:nth-child(4) { transition-delay: 0.26s; }
.reveal-stagger.in-view > *:nth-child(5) { transition-delay: 0.33s; }
.reveal-stagger.in-view > *:nth-child(6) { transition-delay: 0.4s; }
.reveal-stagger.in-view > *:nth-child(7) { transition-delay: 0.47s; }
.reveal-stagger.in-view > *:nth-child(8) { transition-delay: 0.54s; }
.reveal-stagger.in-view > *:nth-child(9) { transition-delay: 0.61s; }
.reveal-stagger.in-view > *:nth-child(10) { transition-delay: 0.68s; }

/* Mobile filter toolbar */
.filter-toolbar { display: flex; gap: 10px; margin-bottom: 24px; align-items: stretch; }
.custom-select { position: relative; flex: 1; min-width: 0; }
.cs-trigger { width: 100%; display: flex; align-items: center; gap: 10px; padding: 13px 14px; background: white; border: 1.5px solid var(--line); border-radius: 14px; color: var(--ink); font-size: 14px; font-weight: 600; font-family: inherit; cursor: pointer; transition: var(--transition); text-align: left; box-shadow: var(--shadow-sm); }
.cs-trigger:hover { border-color: var(--gold); }
.cs-trigger.has-value { border-color: var(--primary); background: var(--paper); }
.cs-trigger > i:first-child { color: var(--primary); font-size: 14px; flex-shrink: 0; }
.cs-trigger .cs-label { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cs-trigger .cs-caret { font-size: 11px; color: var(--muted); transition: transform 0.3s ease; flex-shrink: 0; }
.custom-select.open .cs-caret { transform: rotate(180deg); color: var(--primary); }
.cs-menu { position: absolute; top: calc(100% + 6px); left: 0; right: 0; background: white; border-radius: 14px; box-shadow: 0 16px 50px rgba(42,24,16,0.18); border: 1px solid var(--line); list-style: none; padding: 6px; margin: 0; max-height: 320px; overflow-y: auto; z-index: 50; opacity: 0; transform: translateY(-8px) scale(0.98); pointer-events: none; transition: opacity 0.2s ease, transform 0.25s var(--transition); }
.custom-select.open .cs-menu { opacity: 1; transform: translateY(0) scale(1); pointer-events: auto; }
.cs-option { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px; border-radius: 10px; cursor: pointer; font-size: 14px; font-weight: 500; color: var(--ink); transition: background 0.18s, color 0.18s; }
.cs-option:hover { background: var(--paper); color: var(--primary); }
.cs-option.active { background: var(--primary); color: var(--gold-light); }
.cs-option .cs-count { font-size: 11px; background: var(--paper); color: var(--muted); padding: 2px 8px; border-radius: 10px; font-weight: 600; }
.cs-option.active .cs-count { background: rgba(229,197,114,0.2); color: var(--gold-light); }
.filter-icon-btn { width: 50px; flex-shrink: 0; background: linear-gradient(135deg, var(--primary), var(--primary-dark)); color: var(--gold-light); border: none; border-radius: 14px; font-size: 17px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; position: relative; box-shadow: 0 4px 14px rgba(139,46,46,0.28); transition: var(--transition); }
.filter-icon-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 22px rgba(139,46,46,0.4); }
.filter-icon-btn:active { transform: translateY(0); }
.filter-icon-btn .filter-badge { position: absolute; top: -6px; right: -6px; background: var(--gold); color: var(--dark); font-size: 10px; font-weight: 700; width: 20px; height: 20px; border-radius: 50%; display: none; align-items: center; justify-content: center; border: 2px solid var(--cream); animation: pop 0.3s var(--transition); }
.filter-icon-btn.has-active .filter-badge { display: inline-flex; }
@keyframes pop { from { transform: scale(0); } to { transform: scale(1); } }

/* Mobile nav overlay */
.nav-overlay { position: fixed; inset: 0; background: rgba(42,24,16,0.5); opacity: 0; pointer-events: none; transition: opacity 0.35s ease; z-index: 19; }
.nav-overlay.show { opacity: 1; pointer-events: auto; }
.nav-close { display: none; position: absolute; top: 16px; right: 16px; width: 38px; height: 38px; border-radius: 50%; border: none; background: var(--paper); color: var(--primary); font-size: 16px; cursor: pointer; align-items: center; justify-content: center; transition: var(--transition); }
.nav-close:hover { background: var(--primary); color: var(--gold-light); transform: rotate(90deg); }

/* ====== MOBILE DROPDOWN ACCORDION ====== */
/* Toggle arrow button next to dropdown parent item */
.mobile-dd-btn {
  display: none;
  background: none;
  border: none;
  color: var(--muted);
  font-size: 12px;
  padding: 4px 8px;
  cursor: pointer;
  transition: transform 0.3s ease, color 0.3s ease;
  margin-left: auto;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
}
.mobile-dd-btn.open { transform: rotate(180deg); color: var(--primary); }

/* Mobile L1 accordion panel */
.mobile-l1 {
  display: none;
  flex-direction: column;
  background: var(--paper);
  border-radius: 10px;
  margin: 2px 0 4px 0;
  overflow: hidden;
  border-left: 3px solid var(--primary);
}
.mobile-l1.open { display: flex; }
.mobile-l1 > li { width: 100%; }
.mobile-l1-row {
  display: flex !important;
  align-items: center;
  width: 100%;
}
.mobile-l1-row > a {
  flex: 1;
  display: block !important;
  padding: 12px 16px !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  border-radius: 0 !important;
  border-bottom: 1px solid rgba(196,154,63,0.15) !important;
  color: var(--ink) !important;
  gap: 0 !important;
}
.mobile-l1-row > a:hover { color: var(--primary) !important; background: rgba(139,46,46,0.05) !important; }
.mobile-l1-sub-btn {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 12px;
  padding: 12px 12px;
  cursor: pointer;
  transition: transform 0.3s ease, color 0.3s ease;
  flex-shrink: 0;
  border-bottom: 1px solid rgba(196,154,63,0.15);
}
.mobile-l1-sub-btn.open { transform: rotate(90deg); color: var(--primary); }

/* Mobile L2 accordion panel */
.mobile-l2 {
  display: none;
  flex-direction: column;
  background: white;
  border-left: 3px solid var(--gold);
  margin: 0 0 0 16px;
}
.mobile-l2.open { display: flex; }
.mobile-l2 > li > a {
  display: flex !important;
  align-items: center;
  gap: 8px;
  padding: 10px 16px !important;
  font-size: 13.5px !important;
  font-weight: 500 !important;
  color: var(--ink) !important;
  border-radius: 0 !important;
  border-bottom: 1px solid rgba(196,154,63,0.1) !important;
  background: none !important;
}
.mobile-l2 > li > a:hover { color: var(--primary) !important; background: var(--cream) !important; }
.mobile-l2 > li > a .sub2-icon { font-size: 11px; color: var(--gold); }

/* ====== RESPONSIVE ====== */
@media (max-width: 980px) {
  .nav-toggle { display: block; }
  .nav-close { display: inline-flex; }
  .dropdown-l1, .dropdown-l2 { display: none !important; }
  .mobile-dd-btn { display: inline-flex; }
  .nav-caret { display: none; }
  .nav-links {
    position: fixed; top: 0; left: 0; height: 100vh;
    width: 310px; max-width: 90vw;
    background: var(--cream); flex-direction: column; align-items: stretch;
    padding: 76px 14px 32px; gap: 2px;
    box-shadow: 6px 0 40px rgba(42,24,16,0.18);
    z-index: 9999999999999999999;
    transform: translateX(-100%);
    transition: transform 0.4s var(--transition);
    display: flex; overflow-y: auto;
    border-right: 3px solid var(--gold);
  }
  .nav-links.open { transform: translateX(0); }
  .nav-links > li { width: 100%; flex-direction: column; }
  .nav-links > li > .nav-item-row { display: flex; align-items: center; width: 100%; }
  .nav-links > li > a {
    flex: 1;
    display: block !important;
    padding: 14px 16px;
    border-radius: 12px;
    font-weight: 600;
    border-bottom: 1px solid rgba(196,154,63,0.12);
  }
  .nav-links > li > a:hover, .nav-links > li > a.active { background: var(--paper); color: var(--primary); }
  .nav-links > li > a::after { display: none; }
  .intro-grid { grid-template-columns: 1fr; gap: 50px; }
  .intro-img { max-width: 480px; margin: 0 auto; }
  .works-layout { grid-template-columns: 1fr; gap: 0; }
  .filter-sidebar { display: none; }
  .filter-toolbar { display: flex; }
  .detail-grid { grid-template-columns: 1fr; gap: 40px; }
  .detail-cover { max-width: 460px; margin: 0 auto; }
  .detail-body-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .container { padding: 0 20px; }
  .hero { padding: 40px 0 40px; }
  .search-bar { padding: 6px 6px 6px 14px; flex-wrap: nowrap; gap: 6px; border-radius: 999px; }
  .search-bar i.search-icon { display: inline-flex; margin-right: 8px; font-size: 15px; flex-shrink: 0; }
  .search-bar input { flex: 1; min-width: 0; padding: 12px 0; width: auto; font-size: 14px; }
  .search-btn { width: 44px; height: 44px; padding: 0; border-radius: 50%; flex-shrink: 0; justify-content: center; align-items: center; display: inline-flex; gap: 0; }
  .search-btn .search-btn-text { display: none; }
  .search-btn i { margin: 0; }
  .intro { padding: 40px 0; }
  .featured { padding: 40px 0 40px; }
  .categories { padding: 40px 0; }
  .content-block { padding: 28px 22px; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .footer-bottom { flex-direction: column; text-align: center; }
  .lightbox-prev { left: 12px; }
  .lightbox-next { right: 12px; }
  .lightbox-close { top: 18px; right: 18px; }
  .filter-toolbar { gap: 8px; }
  .cs-trigger { padding: 12px; font-size: 13.5px; }
  .filter-icon-btn { width: 46px; }
  .attachment-item { min-width: 0; }
  .attachment-info { min-width: 0; }
  .attachment-info .name { max-width: 100%; }
}

/* ====== PC DROPDOWN GAP FIX ====== */
/* Transparent bridge so mouse can travel from link to dropdown */
.has-dropdown > a::after { display:none; }  /* disable the underline pseudo */
.has-dropdown { padding-bottom: 0; }
.dropdown-l1 { margin-top: 0; top: calc(100% + 2px); }
/* Add an invisible hover bridge */
.has-dropdown::before {
  content: '';
  position: absolute;
  bottom: -16px;
  left: 0;
  width: 100%;
  height: 16px;
  z-index: 8999;
}

/* ====== MOBILE: HAS-DROPDOWN ROW FIX ====== */
@media (max-width: 980px) {
  /* Make the li a flex-row so <a> and toggle button sit side by side */
  .nav-links > li.has-dropdown {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
  }
  .nav-links > li.has-dropdown > a {
    flex: 1 !important;
    border-radius: 12px 0 0 12px !important;
  }
  .mobile-dd-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 44px !important;
    background: var(--paper) !important;
    border: none !important;
    border-left: 1px solid rgba(196,154,63,0.2) !important;
    border-radius: 0 12px 12px 0 !important;
    border-bottom: 1px solid rgba(196,154,63,0.12) !important;
    color: var(--primary) !important;
    font-size: 13px !important;
    cursor: pointer !important;
    padding: 0 12px !important;
    transition: background 0.2s, color 0.2s !important;
    flex-shrink: 0 !important;
    height: auto !important;
    margin: 0 !important;
  }
  .mobile-dd-btn:hover, .mobile-dd-btn.open {
    background: var(--primary) !important;
    color: var(--gold-light) !important;
  }
  .mobile-dd-btn i {
    transition: transform 0.3s ease !important;
  }
  .mobile-dd-btn.open i {
    transform: rotate(180deg) !important;
  }
  /* Mobile L1 panel takes full width */
  .mobile-l1 {
    width: 100%;
    flex-basis: 100%;
  }
}

/* ====== HIDE nav-caret in <a> on mobile (mobile-dd-btn is the toggle) ====== */
@media (max-width: 980px) {
  .has-dropdown > a .nav-caret { display: none !important; }
}

/* ====== PC: ensure has-dropdown is relative for the bridge pseudo ====== */
.has-dropdown { position: relative; }

/* ====== PC: transparent bridge between nav link and dropdown-l1 ====== */
.has-dropdown > .dropdown-l1 {
  top: calc(100% + 0px) !important;
  margin-top: 0 !important;
}
/* Extend the hover zone downward so the gap is bridged */
.has-dropdown > a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -18px;
  width: 100%;
  height: 18px;
  z-index: 8990;
}

/* ╔══════════════════════════════════════════════╗
   ║       KHO TƯ LIỆU — DROPDOWN STYLES         ║
   ╚══════════════════════════════════════════════╝ */

/* ── Desktop: show khotulieu-link, hide mobile trigger ── */
.khotulieu-link { display: inline-flex; align-items: center; gap: 6px; }
.mob-ktl-row    { display: none; }
.mob-ktl-panel  { display: none; }

/* ── Desktop: flat L1 dropdown on hover ── */
.has-dropdown { position: relative; }
/* Bridge so mouse can travel from link into dropdown */
.has-dropdown::after {
  content: '';
  position: absolute;
  bottom: -14px;
  left: 0;
  width: 100%;
  height: 14px;
  z-index: 9000;
}
.dropdown-l1 {
  display: none;
  position: absolute;
  top: calc(100% + 14px);
  left: 0;
  min-width: 220px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(42,24,16,0.14);
  padding: 8px 0;
  z-index: 9100;
  list-style: none;
  margin: 0;
}
.has-dropdown:hover .dropdown-l1 { display: block; }
.dropdown-l1 li a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  color: #3d1f0f;
  text-decoration: none;
  font-size: 14.5px;
  font-weight: 500;
  transition: background 0.18s, color 0.18s;
  white-space: nowrap;
}
.dropdown-l1 li a:hover {
  background: var(--paper, #faf6f0);
  color: var(--primary, #8B1A1A);
}
.search-mini{
  margin-bottom: 20px;
  margin-top: 10px;
}
.dropdown-l1 li a i { font-size: 13px; color: var(--primary, #8B1A1A); width: 18px; text-align: center; }

/* ── Mobile: hide desktop elements, show mobile row ── */
@media (max-width: 980px) {
  .khotulieu-link { display: none !important; }
  .dropdown-l1    { display: none !important; }
  .has-dropdown::after { display: none !important; }

  /* The whole li becomes a column container */
  .nav-links > li.has-dropdown {
    display: flex !important;
    flex-direction: column;
    padding: 0;
    background: transparent !important;
    border-bottom: 1px solid rgba(196,154,63,0.13);
  }

  /* Single row: text + chevron button */
  .mob-ktl-row {
    display: flex !important;
    align-items: center;
    border-radius: 12px;
    margin: 2px 0;
    overflow: hidden;
    cursor: pointer;
    border-bottom: 1px solid rgba(196,154,63,0.12);
  }
  .mob-ktl-link {
    flex: 1;
    padding: 14px 16px;
    color: var(--primary, #8B1A1A) !important;
    font-weight: 600;
    font-size: 15px;
    text-decoration: none;
  }
  .mob-ktl-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 100%;
    min-height: 48px;
    background: none;
    border: none;
    border-left: 1px solid rgba(196,154,63,0.2);
    color: var(--primary, #8B1A1A);
    font-size: 14px;
    cursor: pointer;
    padding: 0;
    transition: background 0.2s, color 0.2s;
  }
  .mob-ktl-btn i { transition: transform 0.28s ease; }
  .mob-ktl-btn.open { background: var(--primary, #8B1A1A); color: #fff; }
  .mob-ktl-btn.open i { transform: rotate(180deg); }

  /* Collapsible panel */
  .mob-ktl-panel {
    display: block !important;
    list-style: none;
    margin: 0;
    padding: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease;
  }
  .mob-ktl-panel.open { max-height: 300px; }
  .mob-ktl-panel li a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px 12px 28px;
    color: #3d1f0f;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    border-top: 1px solid rgba(196,154,63,0.1);
    transition: background 0.15s;
  }
  .mob-ktl-panel li a:hover { background: rgba(196,154,63,0.08); }
  .mob-ktl-panel li a i { font-size: 13px; color: var(--primary, #8B1A1A); width: 18px; text-align: center; }
}

/* ── Mobile: khotulieu-link takes zero space ── */
@media (max-width: 980px) {
  .khotulieu-link {
    display: none !important;
    visibility: hidden !important;
    width: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
    position: absolute !important;
  }
  /* Ensure has-dropdown li doesn't add extra borders/padding from original nav styles */
  .nav-links > li.has-dropdown {
    border-bottom: none !important;
    padding: 0 !important;
  }
  .mob-ktl-row {
    border-radius: 12px !important;
    margin: 4px 0 !important;
  }
}

/* ── Parent category option style ── */
.cs-option.cs-group-label {
  font-weight: 600;
  color: var(--primary, #8B1A1A) !important;
  border-top: 1px solid rgba(196,154,63,0.15);
  margin-top: 2px;
  padding-top: 10px;
}
.cs-divider {
  display: none;
}
