/* =====================================================
   TrendyWeave – Main Stylesheet
   ===================================================== */

/* ---- Reset & Variables ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --primary: #7c3aed;
  --primary-dark: #5b21b6;
  --accent: #f59e0b;
  --bg: #0f0f1a;
  --bg2: #1a1a2e;
  --bg3: #16213e;
  --card: #1e1e35;
  --border: rgba(124,58,237,0.2);
  --text: #e2e8f0;
  --text-muted: #94a3b8;
  --success: #10b981;
  --danger: #ef4444;
  --radius: 14px;
  --shadow: 0 4px 24px rgba(0,0,0,0.4);
  --transition: 0.25s ease;
  --gradient: linear-gradient(135deg, #7c3aed, #f59e0b);
  --header-h: 70px;
}

[data-theme="light"] {
  --bg: #f8f9ff;
  --bg2: #eef0ff;
  --bg3: #e8eaff;
  --card: #ffffff;
  --text: #1e1b4b;
  --text-muted: #64748b;
  --border: rgba(124,58,237,0.15);
  --shadow: 0 4px 24px rgba(0,0,0,0.1);
}

html { scroll-behavior: smooth; }
body { font-family: 'Sora', sans-serif; background: var(--bg); color: var(--text); line-height: 1.7; transition: background var(--transition), color var(--transition); }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
img { max-width: 100%; display: block; }

/* ---- Utilities ---- */
.container { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }
.section { padding: 5rem 0; }
.bg-alt { background: var(--bg2); }
.gradient-text { background: var(--gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }

/* ---- Buttons ---- */
.btn-primary, .btn-outline, .btn-secondary {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.75rem 1.75rem; border-radius: 50px; font-weight: 600;
  font-size: 0.95rem; cursor: pointer; border: 2px solid transparent;
  transition: all var(--transition); font-family: inherit;
}
.btn-primary { background: var(--gradient); color: #fff; }
.btn-primary:hover { opacity: 0.88; transform: translateY(-2px); box-shadow: 0 8px 24px rgba(124,58,237,0.4); }
.btn-outline { border-color: var(--primary); color: var(--primary); background: transparent; }
.btn-outline:hover { background: var(--primary); color: #fff; transform: translateY(-2px); }
.btn-secondary { background: var(--card); color: var(--text); border-color: var(--border); }
.btn-secondary:hover { border-color: var(--primary); color: var(--primary); }

/* ---- Topbar ---- */
.topbar {
  background: var(--gradient); color: #fff; text-align: center;
  padding: 0.55rem 1rem; font-size: 0.85rem; font-weight: 600;
  display: flex; justify-content: center; align-items: center; gap: 1rem;
  position: relative;
}
.topbar-close { cursor: pointer; font-size: 1rem; opacity: 0.8; position: absolute; right: 1rem; }
.topbar-close:hover { opacity: 1; }

/* ---- Header ---- */
.header {
  position: sticky; top: 0; z-index: 1000;
  background: rgba(15,15,26,0.92); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border); transition: all var(--transition);
}
[data-theme="light"] .header { background: rgba(248,249,255,0.92); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: var(--header-h); }

/* Logo */
.logo {
  display: flex; align-items: center; gap: 0.4rem;
  font-size: 1.4rem; font-weight: 800; letter-spacing: -0.5px;
}
.logo img { height: 40px; width: auto; }
.logo-text { font-size: 1.4rem; font-weight: 800; }
.logo-text span { background: var(--gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.logo-placeholder { font-size: 1.5rem; font-weight: 900; letter-spacing: -1px; }
.logo-placeholder .tw { background: var(--gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }

/* Nav */
.nav { display: flex; align-items: center; gap: 0.25rem; }
.nav-link {
  padding: 0.5rem 1rem; border-radius: 8px; font-size: 0.9rem;
  font-weight: 500; color: var(--text-muted); transition: all var(--transition);
}
.nav-link:hover, .nav-link.active { color: var(--primary); background: rgba(124,58,237,0.1); }

/* Header actions */
.header-actions { display: flex; align-items: center; gap: 0.5rem; }
.btn-search, .btn-theme, .hamburger {
  width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--border);
  background: var(--card); color: var(--text); cursor: pointer;
  display: flex; align-items: center; justify-content: center; font-size: 1rem;
  transition: all var(--transition);
}
.btn-search:hover, .btn-theme:hover, .hamburger:hover { border-color: var(--primary); color: var(--primary); }
.hamburger { display: none; flex-direction: column; gap: 5px; padding: 10px; }
.hamburger span { display: block; width: 20px; height: 2px; background: var(--text); border-radius: 2px; transition: all var(--transition); }

/* Search bar */
.search-bar { display: none; padding: 1rem 0; border-top: 1px solid var(--border); background: var(--bg2); }
.search-bar.open { display: block; }
.search-bar .container { display: flex; gap: 0.5rem; }
.search-bar input { flex: 1; padding: 0.65rem 1rem; border-radius: 10px; border: 1px solid var(--border); background: var(--card); color: var(--text); font-family: inherit; font-size: 0.95rem; outline: none; }
.search-bar input:focus { border-color: var(--primary); }
.search-bar button { padding: 0.65rem 1.25rem; border-radius: 10px; background: var(--primary); color: #fff; border: none; cursor: pointer; font-family: inherit; font-weight: 600; }

/* ---- Section Head ---- */
.section-head { text-align: center; margin-bottom: 3rem; }
.section-head h2 { font-size: clamp(1.75rem, 4vw, 2.5rem); font-weight: 800; margin-bottom: 0.75rem; }
.section-head p { color: var(--text-muted); font-size: 1.05rem; max-width: 500px; margin: 0 auto; }

/* ---- Hero ---- */
.hero { position: relative; padding: 7rem 0 5rem; overflow: hidden; }
.hero-bg-grid {
  position: absolute; inset: 0; opacity: 0.06;
  background-image: linear-gradient(rgba(124,58,237,.8) 1px, transparent 1px),
    linear-gradient(90deg, rgba(124,58,237,.8) 1px, transparent 1px);
  background-size: 40px 40px;
}
.hero::before {
  content: ''; position: absolute; top: -200px; right: -100px;
  width: 600px; height: 600px; border-radius: 50%;
  background: radial-gradient(circle, rgba(124,58,237,0.15) 0%, transparent 70%);
}
.hero-inner { position: relative; z-index: 1; max-width: 700px; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 0.5rem;
  background: rgba(124,58,237,0.15); border: 1px solid rgba(124,58,237,0.3);
  color: var(--primary); padding: 0.4rem 1rem; border-radius: 50px;
  font-size: 0.85rem; font-weight: 600; margin-bottom: 1.5rem;
}
.hero-title { font-size: clamp(2.2rem, 6vw, 3.8rem); font-weight: 900; line-height: 1.1; margin-bottom: 1.25rem; letter-spacing: -1px; }
.hero-sub { font-size: 1.1rem; color: var(--text-muted); margin-bottom: 2rem; max-width: 540px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 1rem; margin-bottom: 3rem; }
.hero-stats { display: flex; flex-wrap: wrap; gap: 2rem; }
.stat strong { display: block; font-size: 1.75rem; font-weight: 800; background: var(--gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.stat span { font-size: 0.85rem; color: var(--text-muted); }
.hero-floating { position: absolute; right: 5%; top: 50%; transform: translateY(-50%); display: flex; flex-direction: column; gap: 1rem; }
.float-card {
  background: var(--card); border: 1px solid var(--border); border-radius: 14px;
  padding: 0.75rem 1.25rem; font-size: 0.85rem; font-weight: 600;
  display: flex; align-items: center; gap: 0.5rem;
  box-shadow: var(--shadow); animation: float 3s ease-in-out infinite;
}
.float-card.f2 { animation-delay: 0.5s; }
.float-card.f3 { animation-delay: 1s; }
.float-card i { color: var(--primary); }
@keyframes float { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-10px)} }

/* ---- Category Cards ---- */
.categories-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 1.25rem; }
.cat-card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.75rem 1rem; text-align: center; cursor: pointer;
  transition: all var(--transition);
}
.cat-card:hover { border-color: var(--primary); transform: translateY(-4px); box-shadow: 0 8px 30px rgba(124,58,237,0.2); }
.cat-icon { font-size: 2rem; margin-bottom: 0.75rem; }
.cat-name { font-weight: 700; font-size: 0.9rem; margin-bottom: 0.25rem; }
.cat-count { font-size: 0.8rem; color: var(--text-muted); }

/* ---- Product Cards ---- */
.products-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1.5rem; }
.product-card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; transition: all var(--transition);
  display: flex; flex-direction: column;
}
.product-card:hover { border-color: var(--primary); transform: translateY(-5px); box-shadow: 0 12px 40px rgba(124,58,237,0.2); }
.product-img { position: relative; padding-top: 62%; background: var(--bg2); overflow: hidden; }
.product-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.product-card:hover .product-img img { transform: scale(1.05); }
.product-badge {
  position: absolute; top: 10px; left: 10px;
  background: var(--danger); color: #fff; padding: 0.2rem 0.65rem;
  border-radius: 50px; font-size: 0.75rem; font-weight: 700;
}
.product-badge.new { background: var(--success); }
.product-body { padding: 1.25rem; flex: 1; display: flex; flex-direction: column; }
.product-cat { font-size: 0.75rem; color: var(--primary); font-weight: 600; margin-bottom: 0.4rem; text-transform: uppercase; letter-spacing: 0.5px; }
.product-title { font-size: 1rem; font-weight: 700; margin-bottom: 0.5rem; line-height: 1.4; }
.product-rating { display: flex; align-items: center; gap: 0.4rem; margin-bottom: 0.75rem; }
.stars { color: var(--accent); font-size: 0.85rem; }
.rating-count { font-size: 0.8rem; color: var(--text-muted); }
.product-price { display: flex; align-items: baseline; gap: 0.6rem; margin-bottom: 1rem; }
.price-now { font-size: 1.3rem; font-weight: 800; background: var(--gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.price-was { font-size: 0.85rem; color: var(--text-muted); text-decoration: line-through; }
.price-save { font-size: 0.8rem; color: var(--success); font-weight: 600; }
.product-actions { display: flex; gap: 0.6rem; margin-top: auto; }
.product-actions .btn-primary { flex: 1; justify-content: center; font-size: 0.88rem; padding: 0.6rem 1rem; }

/* ---- Filter Tabs ---- */
.filter-tabs { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.5rem; margin-top: 1.5rem; }
.tab {
  padding: 0.45rem 1.1rem; border-radius: 50px; border: 1px solid var(--border);
  background: var(--card); color: var(--text-muted); cursor: pointer;
  font-family: inherit; font-size: 0.85rem; font-weight: 500; transition: all var(--transition);
}
.tab:hover, .tab.active { background: var(--primary); color: #fff; border-color: var(--primary); }

/* ---- Deals Banner ---- */
.deals-banner { background: linear-gradient(135deg, var(--bg3), var(--bg2)); }
.deals-inner { display: flex; align-items: center; justify-content: space-between; gap: 2rem; flex-wrap: wrap; }
.deals-label { font-size: 0.85rem; font-weight: 700; color: var(--accent); text-transform: uppercase; letter-spacing: 1px; }
.deals-text h2 { font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 800; margin: 0.5rem 0; }
.deals-text p { color: var(--text-muted); margin-bottom: 1.5rem; }
.countdown { display: flex; align-items: center; gap: 0.75rem; }
.count-box { background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 1.25rem 1.5rem; text-align: center; min-width: 90px; }
.count-box span { display: block; font-size: 2.5rem; font-weight: 900; font-family: 'Space Mono', monospace; background: var(--gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.count-box label { font-size: 0.75rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; }
.count-sep { font-size: 2rem; font-weight: 900; color: var(--primary); }

/* ---- Top Picks ---- */
.picks-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1.25rem; }
.pick-card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.25rem; display: flex; align-items: center; gap: 1rem;
  transition: all var(--transition); cursor: pointer;
}
.pick-card:hover { border-color: var(--primary); transform: translateY(-3px); }
.pick-rank { width: 36px; height: 36px; border-radius: 50%; background: var(--gradient); display: flex; align-items: center; justify-content: center; font-weight: 800; color: #fff; font-size: 0.9rem; flex-shrink: 0; }
.pick-info h4 { font-size: 0.9rem; font-weight: 700; margin-bottom: 0.2rem; }
.pick-info p { font-size: 0.8rem; color: var(--primary); font-weight: 700; }

/* ---- Newsletter ---- */
.newsletter-inner { text-align: center; max-width: 600px; margin: 0 auto; }
.nl-icon { font-size: 3rem; margin-bottom: 1rem; color: var(--primary); }
.newsletter-inner h2 { font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 800; margin-bottom: 0.75rem; }
.newsletter-inner p { color: var(--text-muted); margin-bottom: 2rem; }
.nl-form { display: flex; gap: 0.5rem; flex-wrap: wrap; justify-content: center; margin-bottom: 1rem; }
.nl-form input { flex: 1; min-width: 220px; padding: 0.75rem 1.25rem; border-radius: 50px; border: 1px solid var(--border); background: var(--card); color: var(--text); font-family: inherit; font-size: 0.95rem; outline: none; }
.nl-form input:focus { border-color: var(--primary); }
.nl-form button { padding: 0.75rem 1.75rem; border-radius: 50px; background: var(--gradient); color: #fff; border: none; cursor: pointer; font-family: inherit; font-weight: 700; font-size: 0.95rem; white-space: nowrap; }
.nl-note { font-size: 0.8rem; color: var(--text-muted); }

/* ---- Footer ---- */
.footer { background: var(--bg3); border-top: 1px solid var(--border); padding: 4rem 0 0; }
.footer-inner { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 2.5rem; margin-bottom: 3rem; }
.footer-col h4 { font-size: 0.95rem; font-weight: 700; margin-bottom: 1.25rem; color: var(--text); }
.footer-col p { color: var(--text-muted); font-size: 0.9rem; line-height: 1.7; margin-bottom: 1.5rem; }
.footer-col ul li { margin-bottom: 0.65rem; }
.footer-col ul li a { color: var(--text-muted); font-size: 0.9rem; transition: color var(--transition); }
.footer-col ul li a:hover { color: var(--primary); }
.social-links { display: flex; gap: 0.75rem; }
.social-links a { width: 38px; height: 38px; border-radius: 10px; background: var(--card); border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; color: var(--text-muted); font-size: 0.9rem; transition: all var(--transition); }
.social-links a:hover { border-color: var(--primary); color: var(--primary); background: rgba(124,58,237,0.1); }
.amazon-badge { display: inline-flex; align-items: center; gap: 0.5rem; background: rgba(245,158,11,0.1); border: 1px solid rgba(245,158,11,0.3); color: var(--accent); padding: 0.4rem 0.9rem; border-radius: 8px; font-size: 0.8rem; font-weight: 600; margin-top: 1rem; }
.footer-bottom { border-top: 1px solid var(--border); padding: 1.5rem 0; text-align: center; }
.footer-bottom p { font-size: 0.85rem; color: var(--text-muted); }

/* ---- Back to Top ---- */
.back-top {
  position: fixed; bottom: 2rem; right: 2rem; width: 44px; height: 44px;
  border-radius: 50%; background: var(--gradient); color: #fff; border: none;
  cursor: pointer; font-size: 1.1rem; display: none; align-items: center;
  justify-content: center; box-shadow: 0 4px 16px rgba(124,58,237,0.5);
  transition: all var(--transition); z-index: 999;
}
.back-top.visible { display: flex; }
.back-top:hover { transform: translateY(-3px); }

/* ---- Toast ---- */
.toast {
  position: fixed; bottom: 5rem; right: 2rem; background: var(--card);
  border: 1px solid var(--border); padding: 0.85rem 1.5rem; border-radius: 12px;
  font-size: 0.9rem; font-weight: 600; box-shadow: var(--shadow);
  transform: translateY(20px); opacity: 0; transition: all 0.3s ease;
  z-index: 9999; max-width: 320px;
}
.toast.show { transform: translateY(0); opacity: 1; }
.toast.success { border-left: 4px solid var(--success); }
.toast.error { border-left: 4px solid var(--danger); }

/* ---- Page Hero (inner pages) ---- */
.page-hero { background: linear-gradient(135deg, var(--bg2), var(--bg3)); padding: 4rem 0; text-align: center; border-bottom: 1px solid var(--border); }
.page-hero h1 { font-size: clamp(2rem, 5vw, 3rem); font-weight: 900; margin-bottom: 0.75rem; }
.page-hero p { color: var(--text-muted); font-size: 1.05rem; max-width: 500px; margin: 0 auto; }
.breadcrumb { display: flex; justify-content: center; align-items: center; gap: 0.5rem; margin-bottom: 1rem; font-size: 0.85rem; color: var(--text-muted); }
.breadcrumb a { color: var(--primary); }

/* ---- Categories Page ---- */
.cats-full-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 1.5rem; }
.cat-full-card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 2rem 1.5rem; text-align: center; cursor: pointer; transition: all var(--transition);
  text-decoration: none; color: var(--text); display: block;
}
.cat-full-card:hover { border-color: var(--primary); transform: translateY(-6px); box-shadow: 0 12px 40px rgba(124,58,237,0.25); }
.cat-full-icon { font-size: 3rem; margin-bottom: 1rem; }
.cat-full-name { font-size: 1.1rem; font-weight: 700; margin-bottom: 0.35rem; }
.cat-full-desc { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 0.75rem; }
.cat-full-count { display: inline-block; background: rgba(124,58,237,0.1); color: var(--primary); padding: 0.2rem 0.75rem; border-radius: 50px; font-size: 0.8rem; font-weight: 600; }

/* ---- Contact Page ---- */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; }
.contact-info h3 { font-size: 1.5rem; font-weight: 800; margin-bottom: 1rem; }
.contact-info p { color: var(--text-muted); margin-bottom: 2rem; }
.info-item { display: flex; align-items: flex-start; gap: 1rem; margin-bottom: 1.5rem; }
.info-icon { width: 44px; height: 44px; border-radius: 12px; background: rgba(124,58,237,0.1); border: 1px solid rgba(124,58,237,0.2); display: flex; align-items: center; justify-content: center; color: var(--primary); font-size: 1rem; flex-shrink: 0; }
.info-text strong { display: block; font-weight: 700; margin-bottom: 0.2rem; }
.info-text span { font-size: 0.9rem; color: var(--text-muted); }
.contact-form-wrap { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 2rem; }
.form-group { margin-bottom: 1.25rem; }
.form-group label { display: block; font-size: 0.9rem; font-weight: 600; margin-bottom: 0.5rem; }
.form-group input, .form-group textarea, .form-group select {
  width: 100%; padding: 0.75rem 1rem; border-radius: 10px;
  border: 1px solid var(--border); background: var(--bg);
  color: var(--text); font-family: inherit; font-size: 0.95rem; outline: none;
  transition: border-color var(--transition);
}
.form-group input:focus, .form-group textarea:focus, .form-group select:focus { border-color: var(--primary); }
.form-group textarea { resize: vertical; min-height: 120px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

/* ---- Products Page Extras ---- */
.products-toolbar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 1rem; margin-bottom: 2rem; }
.toolbar-left { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.results-count { font-size: 0.9rem; color: var(--text-muted); }
.sort-select { padding: 0.5rem 1rem; border-radius: 8px; border: 1px solid var(--border); background: var(--card); color: var(--text); font-family: inherit; cursor: pointer; outline: none; font-size: 0.9rem; }
.filter-sidebar { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.5rem; }
.filter-sidebar h3 { font-size: 1rem; font-weight: 700; margin-bottom: 1.25rem; }
.filter-group { margin-bottom: 1.5rem; }
.filter-group h4 { font-size: 0.85rem; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 0.75rem; }
.filter-option { display: flex; align-items: center; gap: 0.6rem; margin-bottom: 0.5rem; cursor: pointer; font-size: 0.9rem; color: var(--text-muted); transition: color var(--transition); }
.filter-option:hover { color: var(--primary); }
.filter-option input[type=checkbox] { accent-color: var(--primary); width: 15px; height: 15px; }
.products-layout { display: grid; grid-template-columns: 250px 1fr; gap: 2rem; align-items: start; }

/* ---- Admin ---- */
.admin-body { background: var(--bg); min-height: 100vh; padding: 2rem; font-family: 'Sora', sans-serif; }

/* ---- Responsive ---- */
@media (max-width: 900px) {
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .hero-floating { display: none; }
  .hero-inner { max-width: 100%; }
  .contact-grid { grid-template-columns: 1fr; }
  .products-layout { grid-template-columns: 1fr; }
  .filter-sidebar { display: none; }
  .filter-sidebar.open { display: block; }
  .filter-toggle-btn { display: flex; }
}

@media (max-width: 700px) {
  .nav { display: none; position: fixed; inset: 0; top: var(--header-h); background: var(--bg); flex-direction: column; padding: 2rem 1.5rem; align-items: flex-start; gap: 0; z-index: 999; overflow-y: auto; }
  .nav.open { display: flex; }
  .nav-link { width: 100%; padding: 1rem; font-size: 1rem; border-bottom: 1px solid var(--border); border-radius: 0; }
  .hamburger { display: flex; }
  .footer-inner { grid-template-columns: 1fr; }
  .countdown { flex-wrap: wrap; }
  .deals-inner { flex-direction: column; }
  .form-row { grid-template-columns: 1fr; }
}

/* ---- Subcategory Chips (categories page) ---- */
.cat-subcats { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0.75rem 0 0.5rem; }
.subcat-chip {
  display: inline-flex; align-items: center; gap: 0.3rem;
  padding: 0.25rem 0.65rem; border-radius: 50px;
  background: var(--bg); border: 1px solid var(--border);
  color: var(--text-muted); font-size: 0.78rem; font-weight: 600;
  text-decoration: none; transition: all 0.2s; cursor: pointer;
}
.subcat-chip:hover { background: var(--primary); color: #fff; border-color: var(--primary); }

/* ---- Subcategory radio filter (products sidebar) ---- */
.filter-option input[type=radio] { accent-color: var(--primary); width: 15px; height: 15px; }

/* ---- Filter Toggle Button (mobile) ---- */
.filter-toggle-btn {
  display: none;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
  font-family: inherit;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 600;
  transition: all 0.2s;
  margin-bottom: 1rem;
  width: 100%;
  justify-content: center;
}
.filter-toggle-btn.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

/* =====================================================
   PRODUCT CARD UPDATES
   ===================================================== */
.product-img-link { display: block; text-decoration: none; }
.product-title-link { color: inherit; text-decoration: none; transition: color var(--transition); }
.product-title-link:hover { color: var(--primary); }

/* Card action buttons — compact size */
.product-actions { display: flex; gap: 0.4rem; flex-wrap: wrap; margin-top: 0.5rem; }

.btn-outline-sm {
  display: inline-flex; align-items: center; gap: 0.3rem;
  padding: 0.38rem 0.75rem;
  border-radius: 7px;
  border: 1.5px solid var(--primary);
  background: transparent;
  color: var(--primary);
  font-size: 0.78rem; font-weight: 600;
  text-decoration: none; cursor: pointer;
  transition: all var(--transition); white-space: nowrap;
  line-height: 1.4;
}
.btn-outline-sm:hover { background: var(--primary); color: #fff; }

.btn-sm-card {
  padding: 0.38rem 0.75rem !important;
  font-size: 0.78rem !important;
  border-radius: 7px !important;
  line-height: 1.4 !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 0.3rem !important;
}

/* =====================================================
   PRODUCT DETAIL PAGE — 2-COLUMN LAYOUT
   ===================================================== */
.pd-layout {
  display: grid;
  grid-template-columns: 420px 1fr;
  gap: 3.5rem;
  align-items: flex-start;
  padding: 1rem 0 2rem;
}

/* Left column — image */
.pd-image-col { position: sticky; top: calc(var(--header-h, 70px) + 1.5rem); }
.pd-img-wrap {
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--card);
  padding: 1.5rem;
  text-align: center;
}
.pd-img-wrap img {
  width: 100%;
  max-width: 320px;
  height: 300px;
  object-fit: contain;
  border-radius: 10px;
  display: block;
  margin: 0 auto;
}
.pd-badge {
  position: absolute; top: 14px; left: 14px;
  padding: 0.3rem 0.75rem; border-radius: 50px;
  font-size: 0.75rem; font-weight: 800; letter-spacing: 0.5px;
}
.pd-badge-new { background: #10b981; color: #fff; }
.pd-badge-hot { background: #ef4444; color: #fff; }
.pd-badge-sale { background: #f59e0b; color: #fff; }

/* Right column — info */
.pd-info-col { padding-top: 0.5rem; }
.pd-category-tag {
  display: inline-block;
  padding: 0.3rem 0.9rem; border-radius: 50px;
  background: rgba(124,58,237,0.1); border: 1px solid rgba(124,58,237,0.25);
  color: var(--primary); font-size: 0.78rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.5px;
  margin-bottom: 1rem;
}
.pd-title {
  font-size: 1.6rem; font-weight: 800; line-height: 1.35;
  margin-bottom: 1rem; color: var(--text);
}
.pd-rating-row {
  display: flex; align-items: center; gap: 0.6rem;
  flex-wrap: wrap; margin-bottom: 1.25rem;
}
.pd-stars { color: #f59e0b; font-size: 1.1rem; }
.pd-rating-num { font-weight: 800; font-size: 1rem; }
.pd-reviews { color: var(--text-muted); font-size: 0.85rem; }

.pd-price-block {
  display: flex; align-items: center; gap: 1rem;
  flex-wrap: wrap; margin-bottom: 1.25rem;
}
.pd-price-now {
  font-size: 2rem; font-weight: 800;
  background: linear-gradient(135deg, var(--primary), #a855f7);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.pd-price-was {
  font-size: 1.1rem; color: var(--text-muted);
  text-decoration: line-through; font-weight: 500;
}
.pd-discount-badge {
  padding: 0.25rem 0.7rem; border-radius: 50px;
  background: rgba(16,185,129,0.15); color: #10b981;
  border: 1px solid rgba(16,185,129,0.3);
  font-size: 0.85rem; font-weight: 700;
}
.pd-divider {
  height: 1px; background: var(--border); margin: 1.25rem 0;
}
.pd-description {
  font-size: 0.97rem; color: var(--text-muted);
  line-height: 1.75; margin-bottom: 1.5rem;
}
.pd-features { margin-bottom: 1.5rem; }
.pd-features h4 {
  font-size: 0.95rem; font-weight: 700;
  margin-bottom: 0.75rem; color: var(--text);
}
.pd-features ul { list-style: none; padding: 0; margin: 0; }
.pd-features ul li {
  display: flex; align-items: center; gap: 0.6rem;
  font-size: 0.9rem; color: var(--text-muted);
  margin-bottom: 0.5rem;
}
.pd-features ul li i { color: #10b981; font-size: 0.85rem; flex-shrink: 0; }

.pd-actions {
  display: flex; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.5rem;
}
.pd-btn-buy {
  display: inline-flex; align-items: center; gap: 0.6rem;
  padding: 0.9rem 2rem; border-radius: 12px;
  background: linear-gradient(135deg, #f59e0b, #f97316);
  color: #fff; font-size: 1rem; font-weight: 700;
  text-decoration: none; border: none; cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 4px 16px rgba(245,158,11,0.35);
}
.pd-btn-buy:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(245,158,11,0.45); }
.pd-btn-wish {
  display: inline-flex; align-items: center; gap: 0.6rem;
  padding: 0.9rem 1.5rem; border-radius: 12px;
  background: transparent; color: var(--text);
  font-size: 0.95rem; font-weight: 700;
  border: 1.5px solid var(--border); cursor: pointer;
  transition: all 0.2s; font-family: inherit;
}
.pd-btn-wish:hover { border-color: #ef4444; color: #ef4444; }
.pd-btn-wish.wishlisted { background: rgba(239,68,68,0.1); border-color: #ef4444; color: #ef4444; }
.pd-affiliate-note {
  display: flex; align-items: flex-start; gap: 0.6rem;
  background: rgba(124,58,237,0.06); border: 1px solid rgba(124,58,237,0.15);
  border-radius: 10px; padding: 0.85rem 1.1rem;
  font-size: 0.82rem; color: var(--text-muted); line-height: 1.6;
}
.pd-affiliate-note i { color: var(--primary); margin-top: 2px; flex-shrink: 0; }

/* =====================================================
   PRODUCT DETAIL — RESPONSIVE
   ===================================================== */
@media (max-width: 900px) {
  .pd-layout {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .pd-image-col { position: static; }
  .pd-img-wrap img { max-width: 260px; height: 240px; }
  .pd-title { font-size: 1.3rem; }
  .pd-price-now { font-size: 1.6rem; }
}
@media (max-width: 500px) {
  .pd-actions { flex-direction: column; }
  .pd-btn-buy, .pd-btn-wish { justify-content: center; width: 100%; }
}
