/* =============================================================
   TASVOL — Main Stylesheet
   Mobile-first, SEO-friendly, high-performance
   ============================================================= */

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

:root {
  --black:    #0a0a0a;
  --dark:     #1a1a1a;
  --mid:      #2d2d2d;
  --silver:   #c8c8c8;
  --gold:     #e8b84b;
  --gold-dk:  #c49a2e;
  --white:    #ffffff;
  --off-white:#f8f8f6;
  --border:   #e8e8e4;
  --muted:    #666;
  --price:    #b12704;
  --green:    #2e7d32;
  --blue:     #1a5fa0;
  --radius:   8px;
  --radius-lg:14px;
  --shadow:   0 2px 12px rgba(0,0,0,0.08);
  --shadow-lg:0 8px 32px rgba(0,0,0,0.14);
  --header-h: 56px;
  --cat-h:    44px;
  --font-disp:'Playfair Display', Georgia, serif;
  --font-body:'DM Sans', system-ui, -apple-system, sans-serif;
  --transition: 0.18s ease;
}

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.6;
  color: var(--dark);
  background: var(--off-white);
  -webkit-font-smoothing: antialiased;
}

/* --- Accessibility --- */
.skip-nav {
  position: absolute; top: -100px; left: 1rem; z-index: 9999;
  background: var(--gold); color: var(--black); padding: 8px 16px;
  border-radius: 4px; font-weight: 600; text-decoration: none;
  transition: top 0.1s;
}
.skip-nav:focus { top: 0.5rem; }

/* --- Container --- */
.container {
  width: 100%; max-width: 1280px;
  margin: 0 auto;
  padding: 0 16px;
}

/* ═══════════════════════════════════════════════════════════
   HEADER
   ═══════════════════════════════════════════════════════════ */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: var(--black);
  box-shadow: 0 2px 16px rgba(0,0,0,0.4);
}

.header-top { padding: 10px 0; }

.header-inner {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Logo */
.logo {
  flex-shrink: 0;
  display: block;
  text-decoration: none;
  line-height: 1;
}
.logo img { height: 38px; width: auto; display: block; }
.logo-fallback {
  display: flex; flex-direction: column; align-items: flex-start;
  color: var(--white);
}
.logo-text {
  font-family: var(--font-disp);
  font-size: 22px;
  background: linear-gradient(135deg, #f0f0f0, #888, #fff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.logo-fallback small {
  font-size: 9px; letter-spacing: 2px; color: #888; margin-top: -2px;
}

/* Search */
.search-form { flex: 1; max-width: 580px; }
.search-wrap { display: flex; position: relative; }
.search-input {
  width: 100%; padding: 9px 44px 9px 14px;
  border: 1px solid #333; border-radius: var(--radius);
  background: #1a1a1a; color: var(--white);
  font-family: var(--font-body); font-size: 14px;
  transition: border-color var(--transition), background var(--transition);
  -webkit-appearance: none;
}
.search-input::placeholder { color: #777; }
.search-input:focus {
  outline: none; border-color: var(--gold);
  background: #222;
}
.search-btn {
  position: absolute; right: 0; top: 0; bottom: 0;
  padding: 0 14px;
  background: var(--gold); border: none; border-radius: 0 var(--radius) var(--radius) 0;
  color: var(--black); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background var(--transition);
}
.search-btn:hover { background: var(--gold-dk); }

/* Nav Right */
.nav-right { display: flex; align-items: center; gap: 16px; flex-shrink: 0; }
.nav-link { color: #bbb; text-decoration: none; font-size: 13px; white-space: nowrap; }
.nav-link:hover { color: var(--white); }

/* Hamburger */
.menu-toggle {
  display: none; flex-direction: column; gap: 5px;
  background: none; border: none; cursor: pointer; padding: 4px;
}
.menu-toggle span {
  display: block; width: 22px; height: 2px;
  background: var(--silver); border-radius: 2px;
  transition: var(--transition);
}

/* Category Nav */
.cat-nav {
  background: #141414;
  border-top: 1px solid #222;
  position: relative;
}
.cat-nav .container {
  display: flex; align-items: center; position: relative;
}
.cat-list {
  display: flex; list-style: none; gap: 0;
  overflow-x: auto; scrollbar-width: none;
  padding: 0; -webkit-overflow-scrolling: touch;
}
.cat-list::-webkit-scrollbar { display: none; }
.cat-link {
  display: block; padding: 11px 16px;
  color: #aaa; text-decoration: none;
  font-size: 13px; font-weight: 500; white-space: nowrap;
  border-bottom: 2px solid transparent;
  transition: color var(--transition), border-color var(--transition);
}
.cat-link:hover, .cat-link.active {
  color: var(--gold); border-bottom-color: var(--gold);
}
.cat-scroll-btn {
  display: none; background: none; border: none;
  color: #777; font-size: 20px; cursor: pointer;
  padding: 0 6px; flex-shrink: 0; line-height: 1;
  transition: color var(--transition);
}
.cat-scroll-btn:hover { color: var(--gold); }

/* ═══════════════════════════════════════════════════════════
   MOBILE MENU
   ═══════════════════════════════════════════════════════════ */
.mobile-menu {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(0,0,0,0.97);
  transform: translateX(-100%);
  transition: transform 0.25s ease;
  overflow-y: auto;
}
.mobile-menu.open { transform: translateX(0); }
.mobile-menu-inner { padding: 24px 20px; }
.mobile-close {
  display: block; margin-bottom: 24px; background: none;
  border: none; color: #fff; font-size: 22px; cursor: pointer;
  margin-left: auto;
}
.mobile-nav-link {
  display: block; padding: 12px 0;
  color: #ddd; text-decoration: none; font-size: 16px;
  border-bottom: 1px solid #222;
  transition: color var(--transition);
}
.mobile-nav-link:hover { color: var(--gold); }
.mobile-cats strong {
  display: block; margin: 20px 0 8px;
  font-size: 11px; letter-spacing: 1.5px;
  text-transform: uppercase; color: #666;
}

/* ═══════════════════════════════════════════════════════════
   ALERTS
   ═══════════════════════════════════════════════════════════ */
.alert {
  padding: 12px 16px; margin: 0 0 1px;
  display: flex; align-items: center; justify-content: space-between;
  font-size: 14px; font-weight: 500;
}
.alert button { background: none; border: none; cursor: pointer; font-size: 16px; }
.alert-success { background: #e8f5e9; color: #1b5e20; }
.alert-error   { background: #ffebee; color: #b71c1c; }
.alert-info    { background: #e3f2fd; color: #0d47a1; }
.alert-warning { background: #fff8e1; color: #e65100; }

/* ═══════════════════════════════════════════════════════════
   HERO / BANNER
   ═══════════════════════════════════════════════════════════ */
.hero {
  background: var(--black);
  color: var(--white);
  padding: 40px 0;
  text-align: center;
  border-bottom: 3px solid var(--gold);
}
.hero h1 {
  font-family: var(--font-disp);
  font-size: clamp(24px, 5vw, 42px);
  line-height: 1.2; margin-bottom: 12px;
}
.hero h1 span { color: var(--gold); }
.hero p { color: #aaa; font-size: 16px; margin-bottom: 20px; }
.hero-tags { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.hero-tag {
  padding: 7px 16px;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 24px;
  color: #ddd; text-decoration: none; font-size: 13px;
  transition: all var(--transition);
}
.hero-tag:hover {
  background: var(--gold); color: var(--black);
  border-color: var(--gold);
}

/* ═══════════════════════════════════════════════════════════
   PRODUCT GRID
   ═══════════════════════════════════════════════════════════ */
.section { padding: 24px 0; }
.section-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px;
}
.section-title {
  font-family: var(--font-disp);
  font-size: 22px; font-weight: 700;
  position: relative;
}
.section-title::after {
  content: ''; position: absolute; bottom: -4px; left: 0;
  width: 40px; height: 3px; background: var(--gold);
  border-radius: 2px;
}
.see-all {
  font-size: 13px; color: var(--blue); text-decoration: none;
  font-weight: 500; white-space: nowrap;
}
.see-all:hover { text-decoration: underline; }

.prod-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

/* Product Card */
.prod-card {
  background: var(--white);
  border: 0.5px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  text-decoration: none; color: inherit;
  display: flex; flex-direction: column;
  transition: box-shadow var(--transition), transform var(--transition);
  position: relative;
}
.prod-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}
.prod-card:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

.prod-img-wrap {
  aspect-ratio: 1 / 1;
  background: #f9f9f7;
  overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
}
.prod-img {
  max-width: 100%; max-height: 100%;
  object-fit: contain;
  transition: transform 0.3s ease;
}
.prod-card:hover .prod-img { transform: scale(1.05); }

.prod-badge {
  position: absolute; top: 10px; left: 10px;
  background: var(--price); color: #fff;
  font-size: 11px; font-weight: 700;
  padding: 3px 7px; border-radius: 4px;
}
.prod-badge.new { background: var(--green); }

.prod-info { padding: 12px; flex: 1; display: flex; flex-direction: column; }
.prod-brand { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 3px; }
.prod-title {
  font-size: 13px; line-height: 1.4; margin-bottom: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-weight: 500;
}
.stars { color: var(--gold); font-size: 13px; letter-spacing: -1px; }
.s-half { opacity: 0.6; }
.s-empty { opacity: 0.25; }
.review-count { font-size: 11px; color: var(--muted); }

.prod-pricing { margin: 6px 0; display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.prod-price { font-size: 16px; font-weight: 700; color: var(--price); }
.prod-orig  { font-size: 12px; color: #999; text-decoration: line-through; }
.prod-save  { font-size: 11px; color: var(--green); font-weight: 600; }

.prod-cat-tag {
  font-size: 10px; color: #888;
  background: #f5f5f2;
  padding: 2px 8px; border-radius: 4px;
  display: inline-block; margin-top: auto;
  align-self: flex-start; margin-top: 6px;
}

.buy-btn {
  display: block; width: 100%;
  padding: 10px;
  background: #f0c14b;
  border: 1px solid #a88734;
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  color: var(--black); font-family: var(--font-body);
  font-size: 13px; font-weight: 700;
  text-align: center; cursor: pointer;
  text-decoration: none;
  transition: background var(--transition);
}
.buy-btn:hover { background: #e8b838; }

/* ═══════════════════════════════════════════════════════════
   PRODUCT DETAIL PAGE
   ═══════════════════════════════════════════════════════════ */
.product-page { padding: 20px 0 40px; }

.breadcrumb {
  font-size: 12px; color: var(--muted);
  display: flex; flex-wrap: wrap; gap: 4px;
  align-items: center; margin-bottom: 20px;
  list-style: none;
}
.breadcrumb li + li::before { content: '›'; margin-right: 4px; color: #ccc; }
.breadcrumb a { color: var(--blue); text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }

.product-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

/* Gallery */
.gallery-main {
  position: relative;
  background: var(--white);
  border: 0.5px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.gallery-main-img {
  width: 100%; aspect-ratio: 1/1;
  object-fit: contain;
  padding: 24px;
  display: block;
}
.gallery-thumbs {
  display: flex; gap: 8px; padding: 12px;
  overflow-x: auto; scrollbar-width: none;
  border-top: 0.5px solid var(--border);
}
.gallery-thumbs::-webkit-scrollbar { display: none; }
.gallery-thumb {
  flex-shrink: 0;
  width: 60px; height: 60px;
  object-fit: contain;
  border: 2px solid transparent;
  border-radius: 6px; cursor: pointer;
  padding: 4px; background: #fafaf8;
  transition: border-color var(--transition);
}
.gallery-thumb.active,
.gallery-thumb:hover { border-color: var(--gold); }

/* Product Detail */
.product-detail {
  background: var(--white);
  border: 0.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
}
.product-detail .prod-badge { position: static; margin-bottom: 10px; }
.product-name {
  font-family: var(--font-disp);
  font-size: clamp(18px, 4vw, 26px);
  line-height: 1.3; margin-bottom: 10px; font-weight: 700;
}
.product-meta {
  display: flex; flex-wrap: wrap; gap: 8px;
  align-items: center; margin-bottom: 14px; font-size: 13px;
}
.product-brand { color: var(--blue); font-weight: 500; }
.product-asin { color: var(--muted); }

.price-card {
  background: #fffbf0;
  border: 1px solid #f0d888;
  border-radius: var(--radius);
  padding: 14px 16px; margin-bottom: 16px;
}
.price-main { font-size: 28px; font-weight: 700; color: var(--price); }
.price-row { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.price-original { font-size: 15px; color: #999; text-decoration: line-through; }
.price-save-badge {
  background: var(--green); color: #fff;
  font-size: 12px; font-weight: 700;
  padding: 2px 8px; border-radius: 4px;
}
.price-note { font-size: 11px; color: var(--muted); margin-top: 4px; }

.affiliate-btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; padding: 14px;
  background: #f0c14b;
  border: 1px solid #a88734;
  border-radius: var(--radius);
  color: var(--black); text-decoration: none;
  font-size: 16px; font-weight: 700;
  transition: background var(--transition), transform 0.1s;
  cursor: pointer; font-family: var(--font-body);
  margin-bottom: 8px;
}
.affiliate-btn:hover { background: #daa52e; }
.affiliate-btn:active { transform: scale(0.99); }
.affiliate-note {
  text-align: center; font-size: 11px; color: var(--muted);
  margin-bottom: 16px;
}

.features-list {
  list-style: none; padding: 0; margin: 0 0 16px;
}
.features-list li {
  padding: 8px 0 8px 24px; position: relative;
  border-bottom: 0.5px solid #f5f5f2; font-size: 14px; line-height: 1.5;
}
.features-list li::before {
  content: '✓'; position: absolute; left: 0;
  color: var(--green); font-weight: 700;
}
.features-list li:last-child { border-bottom: none; }

/* Specs Table */
.specs-section { padding: 20px; background: var(--white); border-radius: var(--radius-lg); border: 0.5px solid var(--border); margin-top: 16px; }
.specs-section h2 { font-size: 18px; margin-bottom: 14px; }
.specs-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.specs-table tr:nth-child(even) { background: #fafaf8; }
.specs-table td { padding: 9px 12px; border: 0.5px solid var(--border); }
.specs-table td:first-child { font-weight: 500; color: #555; width: 40%; }

/* Description */
.desc-section { margin-top: 16px; padding: 20px; background: var(--white); border-radius: var(--radius-lg); border: 0.5px solid var(--border); }
.desc-section h2 { font-size: 18px; margin-bottom: 12px; }
.desc-section p { font-size: 14px; line-height: 1.7; color: #444; }

/* SEO Disclosure box */
.seo-meta-box {
  margin-top: 16px; padding: 14px; background: #f0f7ff;
  border: 0.5px solid #b3d0f0; border-radius: var(--radius);
  font-size: 12px; color: #2c5282;
}
.seo-meta-box strong { display: block; margin-bottom: 4px; }

/* ═══════════════════════════════════════════════════════════
   CATEGORY PAGE
   ═══════════════════════════════════════════════════════════ */
.cat-header { background: var(--black); color: var(--white); padding: 28px 0; margin-bottom: 24px; }
.cat-header h1 { font-family: var(--font-disp); font-size: clamp(22px,4vw,36px); margin-bottom: 6px; }
.cat-header p { color: #aaa; font-size: 14px; }

.filter-bar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; margin-bottom: 16px; flex-wrap: wrap;
}
.filter-select {
  padding: 8px 12px; border: 0.5px solid var(--border);
  border-radius: var(--radius); font-family: var(--font-body);
  font-size: 13px; background: var(--white); cursor: pointer;
}
.results-count { font-size: 13px; color: var(--muted); }

/* Pagination */
.pagination {
  display: flex; gap: 6px; justify-content: center;
  margin-top: 32px; flex-wrap: wrap;
}
.page-link {
  padding: 8px 14px; border: 0.5px solid var(--border);
  border-radius: 6px; font-size: 14px; text-decoration: none;
  color: var(--dark); background: var(--white);
  transition: all var(--transition);
}
.page-link:hover { border-color: var(--gold); color: var(--gold); }
.page-link.active { background: var(--black); color: var(--gold); border-color: var(--black); }
.page-link.disabled { opacity: 0.4; pointer-events: none; }

/* ═══════════════════════════════════════════════════════════
   SEARCH PAGE
   ═══════════════════════════════════════════════════════════ */
.search-header { padding: 24px 0 0; }
.search-header h1 { font-size: 20px; margin-bottom: 4px; }
.search-header p { font-size: 13px; color: var(--muted); }
.no-results { text-align: center; padding: 60px 20px; }
.no-results h2 { font-size: 22px; margin-bottom: 10px; }
.no-results p { color: var(--muted); }

/* ═══════════════════════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════════════════════ */
.site-footer {
  background: var(--black); color: #aaa;
  padding: 48px 0 24px; margin-top: 48px;
  border-top: 3px solid var(--gold);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px; margin-bottom: 32px;
}
.footer-brand img { margin-bottom: 12px; filter: brightness(0) invert(1); }
.footer-tagline { color: var(--silver); font-size: 12px; letter-spacing: 2px; margin-bottom: 10px; }
.footer-about { font-size: 13px; line-height: 1.6; color: #888; margin-bottom: 10px; }
.footer-disclaimer { font-size: 11px; color: #555; line-height: 1.5; }
.footer-heading { color: var(--white); font-size: 14px; font-weight: 600; margin-bottom: 12px; }
.footer-links { list-style: none; padding: 0; }
.footer-links li { margin-bottom: 8px; }
.footer-links a { color: #888; text-decoration: none; font-size: 13px; transition: color var(--transition); }
.footer-links a:hover { color: var(--gold); }
.footer-badges { display: flex; gap: 8px; margin-top: 16px; flex-wrap: wrap; }
.badge-item {
  background: #1a1a1a; border: 1px solid #333; color: #aaa;
  font-size: 11px; padding: 4px 10px; border-radius: 4px;
}
.footer-bottom {
  border-top: 1px solid #1a1a1a; padding-top: 20px;
  display: flex; justify-content: space-between; flex-wrap: wrap;
  gap: 8px; font-size: 12px; color: #555;
}
.footer-bottom a { color: #888; text-decoration: none; }
.footer-bottom a:hover { color: var(--gold); }

/* ═══════════════════════════════════════════════════════════
   LOADING SPINNER
   ═══════════════════════════════════════════════════════════ */
.spinner {
  width: 40px; height: 40px;
  border: 3px solid #f0f0f0; border-top-color: var(--gold);
  border-radius: 50%; animation: spin 0.8s linear infinite;
  margin: 40px auto;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ═══════════════════════════════════════════════════════════
   UTILITY
   ═══════════════════════════════════════════════════════════ */
.text-center { text-align: center; }
.mt-4 { margin-top: 1rem; }
.mb-4 { margin-bottom: 1rem; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }

/* ═══════════════════════════════════════════════════════════
   RESPONSIVE — Tablet 600px+
   ═══════════════════════════════════════════════════════════ */
@media (min-width: 600px) {
  .prod-grid { grid-template-columns: repeat(3, 1fr); gap: 14px; }
  .product-layout { grid-template-columns: 1fr 1fr; align-items: start; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .cat-scroll-btn { display: block; }
}

/* ═══════════════════════════════════════════════════════════
   RESPONSIVE — Desktop 960px+
   ═══════════════════════════════════════════════════════════ */
@media (min-width: 960px) {
  .prod-grid { grid-template-columns: repeat(4, 1fr); gap: 16px; }
  .product-layout { grid-template-columns: 5fr 4fr; }
  .footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr; }
  .menu-toggle { display: none; }
  .nav-right .nav-link { display: block; }
}

@media (min-width: 1200px) {
  .prod-grid { grid-template-columns: repeat(5, 1fr); }
}

/* ═══════════════════════════════════════════════════════════
   MOBILE — max 600px
   ═══════════════════════════════════════════════════════════ */
@media (max-width: 600px) {
  .nav-link { display: none; }
  .menu-toggle { display: flex; }
  .search-form { flex: 1; }
  .hero { padding: 28px 0; }
  .affiliate-btn { font-size: 15px; padding: 13px; }
  .price-main { font-size: 24px; }
  .product-name { font-size: 19px; }
  .section { padding: 16px 0; }
}

/* ═══════════════════════════════════════════════════════════
   PRINT
   ═══════════════════════════════════════════════════════════ */
@media print {
  .site-header, .site-footer, .affiliate-btn, .cat-nav { display: none; }
  .product-layout { grid-template-columns: 1fr; }
  body { background: white; }
}
