/* ═══════════════════════════════════════════
   MAGENTO LAYOUT — 2026 UPGRADED HEADER
   TSSCCTV.com — Sticky + USP + Mega Menu + Cart + Search + Icons
   ═══════════════════════════════════════════ */

:root {
  --brand-teal: #13607c;
  --brand-teal-dark: #0a3f52;
  --brand-teal-light: #e6f3f8;
  --white: #ffffff;
  --bg: #f5f5f5;
  --border: #e2e8f0;
  --text: #1e293b;
  --text-muted: #64748b;
  --sale: #e02b27;
  --star: #f59e0b;
}

/* ═══ 1. STICKY HEADER ═══ */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  background: var(--white);
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
  transition: box-shadow 0.3s;
}
.site-header.scrolled {
  box-shadow: 0 2px 16px rgba(0,0,0,0.10);
}

/* ═══ 2. USP TRUST STRIP ═══ */
.usp-strip {
  background: var(--brand-teal);
  color: rgba(255,255,255,0.92);
  font-size: 11px; font-weight: 500;
  padding: 5px 0; text-align: center;
  letter-spacing: 0.02em;
  transition: all 0.3s;
  overflow: hidden;
}
.usp-strip span { margin: 0 16px; white-space: nowrap; }
.usp-strip i { margin-right: 4px; font-size: 10px; opacity: 0.8; }
.header-shrunk .usp-strip { max-height: 0; padding: 0; opacity: 0; }

/* ═══ 3. TOP BAR ═══ */
.topbar {
  background: var(--brand-teal-dark);
  color: rgba(255,255,255,0.85);
  font-size: 12px; padding: 6px 0;
  transition: all 0.3s;
}
.header-shrunk .topbar { padding: 3px 0; font-size: 11px; }
.topbar .container { display: flex; justify-content: space-between; align-items: center; }
.topbar a { color: rgba(255,255,255,0.9); text-decoration: none; margin-left: 20px; font-weight: 500; transition: color 0.2s; }
.topbar a:hover { color: #fff; }

/* ═══ 4. MAIN HEADER ═══ */
.main-header {
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
  transition: padding 0.3s;
}
.header-shrunk .main-header { padding: 8px 0; }
.main-header .row { align-items: center; }

/* Logo */
#hdr-img img {
  height: 48px !important; width: auto !important; max-width: 200px !important;
  transition: height 0.3s;
}
.header-shrunk #hdr-img img { height: 36px !important; }
.header-tagline {
  font-size: 11px; color: var(--text-muted); margin-top: 2px;
  transition: all 0.3s;
}
.header-shrunk .header-tagline { font-size: 0; opacity: 0; margin: 0; }

/* ═══ 5. SEARCH + AUTOCOMPLETE ═══ */
.search-wrap { position: relative; transition: all 0.3s; }
.header-shrunk .search-wrap { max-width: 440px; }
.search-wrap form { width: 100%; }

.search-wrap input[type="text"],
.search-wrap input[type="search"] {
  width: 100% !important; height: 44px !important;
  padding: 0 50px 0 18px !important;
  border: 2px solid var(--border) !important;
  border-radius: 24px !important;
  font-size: 14px !important; font-family: 'Inter', system-ui, sans-serif !important;
  background: var(--bg) !important; color: var(--text) !important;
  outline: none !important; transition: all 0.25s !important;
}
.search-wrap input:focus {
  border-color: var(--brand-teal) !important;
  background: #fff !important;
  box-shadow: 0 0 0 3px rgba(19,96,124,0.12) !important;
}
.search-wrap input::placeholder { color: #94a3b8 !important; }

.search-wrap input[type="image"],
.search-wrap .btn {
  position: absolute !important; right: 4px !important; top: 4px !important;
  width: 36px !important; height: 36px !important;
  border-radius: 50% !important; border: none !important;
  background: var(--brand-teal) !important; color: #fff !important;
  cursor: pointer !important; font-size: 14px !important;
  padding: 0 !important;
}
.search-wrap input[type="image"]:hover,
.search-wrap .btn:hover { background: var(--brand-teal-dark) !important; }

/* Popular searches */
.popular-searches {
  font-size: 11px; color: #94a3b8; padding: 4px 0 0 18px;
}
.popular-searches a {
  color: var(--brand-teal); text-decoration: none;
  margin-right: 10px; font-weight: 500;
}
.popular-searches a:hover { text-decoration: underline; }

/* ═══ 6. HEADER ICONS ═══ */
.header-icons { display: flex; align-items: center; justify-content: flex-end; gap: 6px; }
.header-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 42px; height: 42px;
  font-size: 19px; color: var(--text);
  text-decoration: none; border-radius: 50%;
  transition: all 0.2s; position: relative;
  border: none; background: none; cursor: pointer;
}
.header-icon:hover { background: var(--brand-teal-light); color: var(--brand-teal); }

/* Cart badge */
.cart-badge {
  position: absolute; top: 0; right: -2px;
  background: var(--sale); color: #fff;
  font-size: 10px; font-weight: 700;
  min-width: 18px; height: 18px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  line-height: 1;
}

/* ═══ 7. CART MINI DROPDOWN ═══ */
.cart-icon-wrap { position: relative; }
.cart-dropdown {
  display: none;
  position: absolute; top: 50px; right: 0;
  width: 320px; background: var(--white);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.12);
  z-index: 100; padding: 16px;
}
.cart-icon-wrap:hover .cart-dropdown { display: block; }
.cart-dropdown .cart-item {
  display: flex; gap: 12px; align-items: center;
  padding: 10px 0; border-bottom: 1px solid var(--border);
}
.cart-dropdown .cart-item img { width: 48px; height: 48px; object-fit: contain; border-radius: 6px; background: #f8fafc; }
.cart-item-info { flex: 1; }
.cart-item-name { font-size: 12px; font-weight: 600; line-height: 1.3; }
.cart-item-qty { font-size: 11px; color: var(--text-muted); }
.cart-total { display: flex; justify-content: space-between; padding: 12px 0; font-weight: 700; font-size: 14px; }
.cart-actions { display: flex; gap: 8px; }
.cart-actions a {
  flex: 1; text-align: center; padding: 10px;
  border-radius: 8px; font-size: 13px; font-weight: 600;
  text-decoration: none; transition: all 0.2s;
}
.btn-cart { background: var(--brand-teal); color: #fff; }
.btn-cart:hover { background: var(--brand-teal-dark); color: #fff; }
.btn-checkout { background: var(--star); color: #0f172a; }
.btn-checkout:hover { background: #e8900b; color: #0f172a; }

/* ═══ 8. MEGA MENU ═══ */
.cat-navbar {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  transition: all 0.3s;
}
.cat-nav { display: flex; margin: 0; padding: 0; list-style: none; }
.cat-nav > li { list-style: none; position: relative; }
.cat-nav-link {
  display: inline-block; padding: 14px 18px;
  color: var(--text); text-decoration: none;
  font-size: 13px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.02em;
  border-bottom: 3px solid transparent;
  margin-bottom: -1px; transition: all 0.2s;
  white-space: nowrap; cursor: pointer;
}
.cat-nav-link:hover, .cat-nav-link.active {
  color: var(--brand-teal) !important;
  border-bottom-color: var(--brand-teal);
}
.cat-nav-link.sale-link { color: var(--sale) !important; }
.cat-nav-link.sale-link:hover { border-bottom-color: var(--sale) !important; }

/* Mega dropdown */
.mega-dropdown {
  display: none;
  position: absolute; top: 100%; left: 0;
  min-width: 720px; background: var(--white);
  border: 1px solid var(--border);
  border-radius: 0 0 16px 16px;
  box-shadow: 0 16px 48px rgba(0,0,0,0.12);
  z-index: 200; padding: 24px;
  grid-template-columns: 2fr 1fr;
  gap: 24px;
}
.cat-nav > li:hover .mega-dropdown { display: grid; }
.mega-categories { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px 20px; }
.mega-cat-title {
  font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.08em; color: #94a3b8;
  padding-bottom: 6px; margin-bottom: 6px;
  border-bottom: 1px solid var(--border);
  grid-column: 1 / -1;
}
.mega-categories a {
  display: block; padding: 5px 0;
  font-size: 13px; color: var(--text); text-decoration: none;
  font-weight: 500; transition: all 0.15s;
}
.mega-categories a:hover { color: var(--brand-teal); padding-left: 4px; }
.mega-featured {
  background: #f8fafc; border-radius: 12px; padding: 20px;
  display: flex; flex-direction: column; gap: 14px;
}
.feat-product {
  display: flex; gap: 10px; align-items: center;
  text-decoration: none; color: inherit;
  padding: 8px; border-radius: 8px; transition: background 0.15s;
}
.feat-product:hover { background: #fff; }
.feat-product img { width: 56px; height: 56px; object-fit: contain; border-radius: 8px; background: #fff; }
.feat-info { flex: 1; }
.feat-name { font-size: 12px; font-weight: 600; line-height: 1.3; }
.feat-price { font-size: 13px; font-weight: 700; color: var(--brand-teal); margin-top: 2px; }

/* ═══ 9. MOBILE NAV ═══ */
#mobileNavMenu { background: #fff; border-bottom: 3px solid var(--brand-teal); }
.mobile-nav-list { list-style: none; margin: 0; padding: 0; }
.mobile-nav-list li { border-bottom: 1px solid var(--border); }
.mobile-nav-list li a {
  display: block; padding: 14px 20px;
  color: var(--text); text-decoration: none;
  font-size: 14px; font-weight: 500;
}
.mobile-nav-list li a:hover { background: var(--brand-teal-light); color: var(--brand-teal); }

/* ═══ 10. CATEGORY PILLS ═══ */
#navCatTabs {
  background: #fff; border-bottom: 1px solid var(--border);
  padding: 7px 16px; flex-wrap: wrap; justify-content: center; gap: 4px;
}
#navCatTabs a {
  display: inline-flex !important; align-items: center; gap: 4px;
  color: var(--text) !important; font-size: 11.5px; font-weight: 500;
  padding: 5px 13px !important; white-space: nowrap; border-radius: 12px;
  text-decoration: none !important; transition: all 0.15s;
  border: 1px solid transparent !important; background: var(--bg) !important;
  line-height: 1.6 !important;
}
#navCatTabs a .cat-icon { font-size: 12px; width: 15px; text-align: center; line-height: 1; }
#navCatTabs a .cat-count {
  font-size: 9px; color: var(--text-muted); background: rgba(0,0,0,0.06);
  padding: 1px 5px; border-radius: 6px; font-weight: 600; line-height: 1.5;
}
#navCatTabs a:hover {
  color: var(--brand-teal) !important; background: var(--brand-teal-light) !important;
  border-color: var(--brand-teal-light) !important;
}
#navCatTabs a:hover .cat-count { background: var(--brand-teal); color: #fff; }
#navCatTabs a.activeLink {
  color: var(--brand-teal) !important; background: var(--brand-teal-light) !important;
  font-weight: 600; border-color: var(--brand-teal) !important;
}
#navCatTabs a.activeLink .cat-count { background: var(--brand-teal); color: #fff; }

/* Featured category highlight */
#navCatTabs a.cat-featured {
  background: linear-gradient(135deg, #fef3c7, #fde68a) !important;
  border-color: #fcd34d !important; font-weight: 600;
}
#navCatTabs a.cat-featured:hover {
  background: linear-gradient(135deg, #fde68a, #fcd34d) !important;
  border-color: #f59e0b !important;
}
#navCatTabs a.cat-featured .cat-count { background: rgba(0,0,0,0.08); }

/* ═══ 11. MOBILE CAT PILLS ═══ */
.mobile-cat-scroll { display: flex; flex-wrap: wrap; gap: 6px; padding: 10px 0; justify-content: center; }
.cat-pill { padding: 6px 14px; border-radius: 20px; font-size: 12px; font-weight: 600; color: var(--text); background: var(--bg); text-decoration: none; white-space: nowrap; transition: all 0.2s; }
.cat-pill:hover { background: var(--brand-teal); color: #fff; }
.cat-pill-sale { background: #fce4e4; color: var(--sale); }

/* ═══ 12. NEWSLETTER ═══ */
#newsletter-section {
  background: linear-gradient(135deg, var(--brand-teal), var(--brand-teal-dark)) !important;
  color: #fff !important; padding: 40px 0 !important;
  margin: 32px 0 !important; border-radius: 12px !important;
}
#newsletter-section h3 { color: #fff !important; font-size: 1.3rem; margin-bottom: 6px; }
#newsletter-section p { color: rgba(255,255,255,0.8); font-size: 14px; margin: 0; }
.newsletter-form { display: flex; gap: 10px; }
.newsletter-form input[type="email"] { flex: 1; height: 46px; padding: 0 18px; border: none; border-radius: 24px; font-size: 14px; outline: none; font-family: inherit; }
.newsletter-form button { height: 46px; padding: 0 28px; background: #fff; color: var(--brand-teal); border: none; border-radius: 24px; font-weight: 700; font-size: 14px; cursor: pointer; white-space: nowrap; font-family: inherit; }
.newsletter-form button:hover { background: var(--brand-teal-light); }
.newsletter-disclaimer { color: rgba(255,255,255,0.6); font-size: 11px; margin-top: 6px; display: block; }

/* ═══ 13. MEGA FOOTER ═══ */
#footer-wrapper { background: var(--brand-teal-dark) !important; }
#footerWrapper { background: transparent !important; color: rgba(255,255,255,0.8) !important; padding: 50px 0 30px !important; }
.magento-footer-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 30px; }
.magento-footer-col h4 { color: #fff; font-size: 0.95rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 18px; padding-bottom: 10px; border-bottom: 2px solid rgba(255,255,255,0.15); }
.magento-footer-col ul { list-style: none; margin: 0; padding: 0; }
.magento-footer-col ul li { margin-bottom: 8px; }
.magento-footer-col ul li a { color: rgba(255,255,255,0.7); text-decoration: none; font-size: 13px; transition: all 0.2s; }
.magento-footer-col ul li a:hover { color: #fff; padding-left: 6px; }
.magento-footer-col p { font-size: 13px; line-height: 1.6; color: rgba(255,255,255,0.7); margin-bottom: 6px; }
.magento-footer-col p a { color: rgba(255,255,255,0.7); text-decoration: none; }
.footer-social { display: flex; gap: 10px; margin-top: 14px; }
.footer-social a { display: flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 50%; background: rgba(255,255,255,0.1); color: #fff; font-size: 16px; text-decoration: none; transition: all 0.2s; }
.footer-social a:hover { background: #1877f2; transform: translateY(-2px); }
.footer-payment { display: flex; gap: 8px; margin-top: 14px; flex-wrap: wrap; }
.footer-payment i { font-size: 28px; color: rgba(255,255,255,0.5); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); margin-top: 30px; padding-top: 20px; text-align: center; font-size: 12px; color: rgba(255,255,255,0.5); }

/* ═══ 14. BACK TO TOP ═══ */
#back-to-top {
  position: fixed; bottom: 24px; right: 24px;
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--brand-teal); color: #fff !important;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; z-index: 1000; text-decoration: none !important;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2); transition: all 0.3s;
}
#back-to-top:hover { background: var(--brand-teal-dark); transform: translateY(-2px); }

/* ═══ 15. HIDE OLD ELEMENTS ═══ */
#navMainWrapper { display: none !important; }
#navbar-spacer { display: none !important; }
nav.navbar { display: none !important; }
#logoWrapper { background: transparent; border-bottom: none; }

/* ═══ 16. BODY OFFSET FOR STICKY HEADER ═══ */
body { padding-top: 215px !important; }
.header-shrunk ~ body,
body:has(.header-shrunk) { padding-top: 130px !important; }

/* ═══ 17. RESPONSIVE ═══ */
@media (max-width: 991px) {
  .usp-strip span { margin: 0 8px; font-size: 10px; }
  .magento-footer-grid { grid-template-columns: repeat(2, 1fr); }
  .mega-dropdown { min-width: 500px; grid-template-columns: 1fr; }
  body { padding-top: 215px !important; }
}

@media (max-width: 767px) {
  .usp-strip { font-size: 9px; }
  .usp-strip span { margin: 0 6px; }
  #hdr-img img { height: 36px !important; }
  .magento-footer-grid { grid-template-columns: 1fr; gap: 20px; }
  .newsletter-form { flex-direction: column; }
  .cart-dropdown { width: 280px; right: -60px; }
  body { padding-top: 190px !important; }
  .header-shrunk ~ body,
  body:has(.header-shrunk) { padding-top: 100px !important; }
}

/* ═══ HERO SEARCH BANNER (Proposal B) ═══ */
.hero-search-banner {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  padding: 50px 40px;
  margin-bottom: 24px;
  background: linear-gradient(135deg, #0a1628 0%, #112240 40%, #1a3a4a 100%);
  text-align: center;
}
.hero-search-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 80%, rgba(19,96,124,0.15) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(14,165,233,0.10) 0%, transparent 50%),
    radial-gradient(circle at 50% 50%, rgba(255,255,255,0.02) 0%, transparent 70%);
  pointer-events: none;
}
.hero-search-content {
  position: relative;
  z-index: 1;
  max-width: 620px;
  margin: 0 auto;
}
.hero-trust-badge {
  display: inline-block;
  background: rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.9);
  padding: 5px 16px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 16px;
}
.hero-trust-badge i {
  margin-right: 5px;
  color: #f59e0b;
}
.hero-headline {
  font-size: 2rem !important;
  font-weight: 800 !important;
  color: #fff !important;
  margin: 0 0 10px !important;
  letter-spacing: -0.03em !important;
  background: none !important;
  padding: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  line-height: 1.2 !important;
}
.hero-subtitle {
  font-size: 15px;
  color: rgba(255,255,255,0.7);
  margin: 0 0 24px;
  line-height: 1.5;
}
.hero-search-bar {
  max-width: 540px;
  margin: 0 auto;
}
.hero-search-bar form {
  display: flex;
  background: #fff;
  border-radius: 50px;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}
.hero-search-bar input[type=text],
.hero-search-bar input[type=search] {
  flex: 1 !important;
  border: none !important;
  padding: 15px 22px !important;
  font-size: 15px !important;
  outline: none !important;
  font-family: 'Inter', system-ui, sans-serif !important;
  background: #fff !important;
  border-radius: 50px 0 0 50px !important;
  height: auto !important;
  width: auto !important;
  min-width: 0 !important;
}
.hero-search-bar input[type=image] {
  display: none !important;
}
.hero-search-bar .btn,
.hero-search-bar button,
.hero-search-btn {
  padding: 15px 24px !important;
  background: #13607c !important;
  color: #fff !important;
  border: none !important;
  font-weight: 700 !important;
  font-size: 14px !important;
  cursor: pointer !important;
  white-space: nowrap !important;
  border-radius: 0 50px 50px 0 !important;
  position: static !important;
  height: auto !important;
  width: auto !important;
}
.hero-search-bar .btn:hover,
.hero-search-bar button:hover {
  background: #0a3f52 !important;
}
.hero-popular {
  margin-top: 14px;
  font-size: 12px;
  color: rgba(255,255,255,0.5);
}
.hero-popular span {
  margin-right: 4px;
}
.hero-popular a {
  color: rgba(255,255,255,0.7);
  text-decoration: none;
  margin: 0 6px;
  font-weight: 500;
  transition: color 0.2s;
}
.hero-popular a:hover {
  color: #fff;
  text-decoration: underline;
}

@media (max-width: 767px) {
  .hero-search-banner {
    padding: 32px 20px;
    border-radius: 12px;
  }
  .hero-headline {
    font-size: 1.4rem !important;
  }
  .hero-subtitle {
    font-size: 13px;
  }
  .hero-search-bar input[type=text] {
    padding: 12px 16px !important;
    font-size: 13px !important;
  }
  .hero-search-bar button {
    padding: 12px 18px !important;
    font-size: 13px !important;
  }
}
