/*
Theme Name: Astra Child - Compik Me Store
Template: astra
Version: 1.0.0
Description: Сучасний магазин ноутбуків та аксесуарів
Text Domain: astra-child
*/

/* =============================================
   CSS CUSTOM PROPERTIES
   ============================================= */
:root {
  --primary: #6366f1;
  --primary-dark: #4f46e5;
  --primary-light: #818cf8;
  --accent: #a855f7;
  --accent-dark: #9333ea;
  --cyan: #06b6d4;
  --dark: #0d1117;
  --dark-2: #161b22;
  --dark-3: #21262d;
  --dark-card: #1c1f2e;
  --light: #f8fafc;
  --light-2: #f1f5f9;
  --white: #ffffff;
  --text: #0f172a;
  --text-muted: #64748b;
  --text-light: #94a3b8;
  --border: #e2e8f0;
  --border-dark: #30363d;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --gradient: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
  --gradient-blue: linear-gradient(135deg, #06b6d4 0%, #6366f1 100%);
  --gradient-dark: linear-gradient(135deg, #0d1117 0%, #1c1f2e 100%);
  --shadow-sm: 0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.05);
  --shadow: 0 4px 6px -1px rgba(0,0,0,.1), 0 2px 4px -1px rgba(0,0,0,.06);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,.12), 0 4px 6px -2px rgba(0,0,0,.06);
  --shadow-xl: 0 20px 25px -5px rgba(0,0,0,.15), 0 10px 10px -5px rgba(0,0,0,.06);
  --shadow-glow: 0 0 30px rgba(99,102,241,.25);
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --transition: .25s cubic-bezier(.4,0,.2,1);
}

/* =============================================
   GLOBAL RESET & BASE
   ============================================= */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  color: var(--text);
  background: var(--white);
  margin: 0;
  padding: 0;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; transition: color var(--transition); }
button { cursor: pointer; border: none; outline: none; font-family: inherit; }
ul, ol { list-style: none; padding: 0; margin: 0; }

.tn-container {
  max-width: 1300px;
  margin: 0 auto;
  padding: 0 24px;
}

/* =============================================
   TOP BAR
   ============================================= */
.tn-topbar {
  background: var(--dark);
  color: rgba(255,255,255,.75);
  font-size: 13px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border-dark);
}
.tn-topbar .tn-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.tn-topbar-left {
  display: flex;
  align-items: center;
  gap: 20px;
}
.tn-topbar-left span {
  display: flex;
  align-items: center;
  gap: 6px;
}
.tn-topbar-left svg { width: 14px; height: 14px; opacity: .7; }
.tn-topbar-right {
  display: flex;
  align-items: center;
  gap: 16px;
}
.tn-topbar-right a {
  color: rgba(255,255,255,.75);
  transition: color var(--transition);
}
.tn-topbar-right a:hover { color: var(--primary-light); }
.tn-topbar-promo {
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 600;
}

/* =============================================
   HEADER
   ============================================= */
.tn-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255,255,255,.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}
.tn-header-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 14px 0;
}

/* Logo */
.tn-logo {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.5px;
  text-decoration: none;
}
.tn-logo-icon {
  width: 38px;
  height: 38px;
  background: var(--gradient);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.tn-logo-icon svg { width: 22px; height: 22px; fill: white; }
.tn-logo-text {
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Search */
.tn-header-search {
  flex: 1;
  max-width: 520px;
}
.tn-header-search form {
  display: flex;
  align-items: center;
  background: var(--light-2);
  border: 2px solid transparent;
  border-radius: 50px;
  overflow: hidden;
  transition: border-color var(--transition), background var(--transition);
}
.tn-header-search form:focus-within {
  border-color: var(--primary);
  background: var(--white);
  box-shadow: 0 0 0 4px rgba(99,102,241,.12);
}
.tn-header-search input {
  flex: 1;
  border: none;
  background: transparent;
  padding: 11px 18px;
  font-size: 14px;
  font-family: var(--font-sans);
  color: var(--text);
  outline: none;
}
.tn-header-search input::placeholder { color: var(--text-light); }
.tn-header-search button {
  width: 44px;
  height: 44px;
  background: var(--gradient);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border-radius: 50px;
  margin: 2px;
}
.tn-header-search button svg { width: 18px; height: 18px; }

/* Header Actions */
.tn-header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}
.tn-action-btn {
  position: relative;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  transition: background var(--transition), color var(--transition);
  text-decoration: none;
}
.tn-action-btn:hover {
  background: var(--light-2);
  color: var(--primary);
}
.tn-action-btn svg { width: 22px; height: 22px; }
.tn-cart-count {
  position: absolute;
  top: 2px;
  right: 2px;
  background: var(--primary);
  color: white;
  font-size: 10px;
  font-weight: 700;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
.tn-cart-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  background: var(--gradient);
  color: white !important;
  border-radius: 50px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: opacity var(--transition), transform var(--transition);
}
.tn-cart-btn:hover { opacity: .9; transform: translateY(-1px); }
.tn-cart-btn svg { width: 20px; height: 20px; }
.tn-cart-btn-count {
  background: rgba(255,255,255,.25);
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
}

/* Navigation */
.tn-navbar {
  border-top: 1px solid var(--border);
}
.tn-navbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.tn-nav {
  display: flex;
  align-items: center;
  gap: 2px;
}
.tn-nav li { position: relative; }
.tn-nav > li > a {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 14px 16px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  transition: color var(--transition);
  white-space: nowrap;
}
.tn-nav > li > a:hover,
.tn-nav > li.current-menu-item > a { color: var(--primary); }
.tn-nav > li > a .nav-arrow {
  width: 14px;
  height: 14px;
  opacity: .5;
  transition: transform var(--transition);
}
.tn-nav > li:hover > a .nav-arrow { transform: rotate(180deg); }

/* Dropdown */
.tn-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 220px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-xl);
  padding: 8px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: all var(--transition);
  z-index: 100;
}
.tn-nav li:hover .tn-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.tn-dropdown a {
  display: block;
  padding: 10px 14px;
  font-size: 14px;
  color: var(--text);
  border-radius: var(--radius-sm);
  transition: background var(--transition), color var(--transition);
}
.tn-dropdown a:hover { background: var(--light-2); color: var(--primary); }

/* Navbar extras */
.tn-navbar-extra {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 13px;
  color: var(--text-muted);
}
.tn-navbar-extra span {
  display: flex;
  align-items: center;
  gap: 6px;
}
.tn-navbar-extra svg { width: 16px; height: 16px; color: var(--success); }

/* Mobile menu toggle */
.tn-mobile-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  align-items: center;
  justify-content: center;
  background: var(--light-2);
  color: var(--text);
}
.tn-mobile-toggle svg { width: 22px; height: 22px; }

/* =============================================
   HERO SECTION
   ============================================= */
.tn-hero {
  background: var(--gradient-dark);
  position: relative;
  overflow: hidden;
  min-height: 580px;
  display: flex;
  align-items: center;
}
.tn-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 60% at 60% 50%, rgba(99,102,241,.15) 0%, transparent 70%),
              radial-gradient(ellipse 50% 40% at 80% 20%, rgba(168,85,247,.1) 0%, transparent 60%);
  pointer-events: none;
}
.tn-hero-grid {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(99,102,241,.05) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(99,102,241,.05) 1px, transparent 1px);
  background-size: 50px 50px;
  pointer-events: none;
}
.tn-hero .tn-container {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 60px;
  padding-top: 60px;
  padding-bottom: 60px;
}
.tn-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(99,102,241,.2);
  border: 1px solid rgba(99,102,241,.4);
  color: var(--primary-light);
  padding: 6px 14px;
  border-radius: 50px;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 20px;
}
.tn-hero-badge::before {
  content: '';
  width: 8px;
  height: 8px;
  background: var(--primary-light);
  border-radius: 50%;
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: .5; transform: scale(1.2); }
}
.tn-hero-title {
  font-size: clamp(36px, 5vw, 62px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -1.5px;
  color: var(--white);
  margin: 0 0 20px;
}
.tn-hero-title span {
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.tn-hero-desc {
  font-size: 17px;
  color: rgba(255,255,255,.65);
  line-height: 1.7;
  margin: 0 0 36px;
  max-width: 480px;
}
.tn-hero-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.tn-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 50px;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  transition: all var(--transition);
  cursor: pointer;
  border: none;
}
.tn-btn-primary {
  background: var(--gradient);
  color: white;
  box-shadow: 0 4px 20px rgba(99,102,241,.4);
}
.tn-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(99,102,241,.5);
  color: white;
}
.tn-btn-outline {
  background: transparent;
  color: white;
  border: 2px solid rgba(255,255,255,.3);
  backdrop-filter: blur(10px);
}
.tn-btn-outline:hover {
  border-color: rgba(255,255,255,.6);
  background: rgba(255,255,255,.1);
  color: white;
}
.tn-btn svg { width: 20px; height: 20px; }
.tn-hero-stats {
  display: flex;
  gap: 28px;
  margin-top: 40px;
}
.tn-hero-stat-num {
  display: block;
  font-size: 26px;
  font-weight: 800;
  color: white;
  line-height: 1;
}
.tn-hero-stat-label {
  font-size: 13px;
  color: rgba(255,255,255,.5);
  margin-top: 4px;
}
.tn-hero-img {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
.tn-hero-img img {
  max-height: 440px;
  width: auto;
  filter: drop-shadow(0 30px 60px rgba(0,0,0,.5));
  animation: float 6s ease-in-out infinite;
  position: relative;
  z-index: 2;
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-16px); }
}
.tn-hero-glow {
  position: absolute;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(99,102,241,.3) 0%, transparent 70%);
  border-radius: 50%;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

/* =============================================
   FEATURES STRIP
   ============================================= */
.tn-features {
  background: var(--dark-2);
  padding: 20px 0;
  border-bottom: 1px solid var(--border-dark);
}
.tn-features-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.tn-feature-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 20px;
  border-right: 1px solid var(--border-dark);
}
.tn-feature-item:last-child { border-right: none; }
.tn-feature-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(99,102,241,.15);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.tn-feature-icon svg { width: 22px; height: 22px; color: var(--primary-light); }
.tn-feature-text strong {
  display: block;
  color: white;
  font-size: 14px;
  font-weight: 600;
}
.tn-feature-text span {
  font-size: 12px;
  color: rgba(255,255,255,.45);
}

/* =============================================
   SECTION STYLES
   ============================================= */
.tn-section {
  padding: 72px 0;
}
.tn-section-alt { background: var(--light-2); }
.tn-section-dark {
  background: var(--dark);
}
.tn-section-head {
  text-align: center;
  margin-bottom: 50px;
}
.tn-section-tag {
  display: inline-block;
  background: linear-gradient(135deg, rgba(99,102,241,.1) 0%, rgba(168,85,247,.1) 100%);
  border: 1px solid rgba(99,102,241,.2);
  color: var(--primary);
  padding: 5px 14px;
  border-radius: 50px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 14px;
}
.tn-section-title {
  font-size: clamp(26px, 3.5vw, 42px);
  font-weight: 800;
  letter-spacing: -0.8px;
  color: var(--text);
  margin: 0 0 14px;
  line-height: 1.15;
}
.tn-section-title span {
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.tn-section-sub {
  font-size: 16px;
  color: var(--text-muted);
  max-width: 520px;
  margin: 0 auto;
  line-height: 1.7;
}
.tn-section-head.dark .tn-section-tag {
  background: rgba(99,102,241,.2);
  border-color: rgba(99,102,241,.4);
  color: var(--primary-light);
}
.tn-section-head.dark .tn-section-title { color: var(--white); }
.tn-section-head.dark .tn-section-sub { color: rgba(255,255,255,.5); }

/* Section header with tabs/link */
.tn-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 36px;
  flex-wrap: wrap;
  gap: 16px;
}
.tn-section-header .tn-section-title { margin: 0; text-align: left; }
.tn-view-all {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--primary);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: gap var(--transition);
}
.tn-view-all:hover { gap: 10px; color: var(--primary-dark); }
.tn-view-all svg { width: 16px; height: 16px; }

/* =============================================
   CATEGORIES
   ============================================= */
.tn-cats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.tn-cat-card {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--dark-card);
  cursor: pointer;
  group: true;
  aspect-ratio: 4/3;
  transition: transform var(--transition);
}
.tn-cat-card:hover { transform: translateY(-4px); }
.tn-cat-card-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center right;
  padding: 20px 10px 20px 0;
  transition: transform var(--transition);
}
.tn-cat-card:hover .tn-cat-card-img { transform: scale(1.05) translateX(-8px); }
.tn-cat-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(13,17,23,.9) 0%, rgba(13,17,23,.4) 60%, transparent 100%);
}
.tn-cat-card-body {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 28px;
}
.tn-cat-count {
  font-size: 12px;
  font-weight: 600;
  color: var(--primary-light);
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 6px;
}
.tn-cat-name {
  font-size: 24px;
  font-weight: 800;
  color: white;
  letter-spacing: -0.5px;
  margin: 0 0 14px;
}
.tn-cat-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: white;
  color: var(--text);
  padding: 8px 18px;
  border-radius: 50px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: background var(--transition), transform var(--transition);
}
.tn-cat-link:hover {
  background: var(--primary);
  color: white;
  transform: translateX(4px);
}
.tn-cat-link svg { width: 14px; height: 14px; }

/* =============================================
   PRODUCT CARDS
   ============================================= */
.tn-products-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
.tn-product-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--transition);
  position: relative;
  display: flex;
  flex-direction: column;
}
.tn-product-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-xl);
  border-color: rgba(99,102,241,.2);
}
.tn-product-img-wrap {
  position: relative;
  background: var(--light-2);
  overflow: hidden;
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.tn-product-img-wrap img {
  max-height: 200px;
  width: auto;
  object-fit: contain;
  transition: transform var(--transition);
}
.tn-product-card:hover .tn-product-img-wrap img { transform: scale(1.08); }
.tn-product-badges {
  position: absolute;
  top: 12px;
  left: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.tn-badge {
  padding: 4px 10px;
  border-radius: 50px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .3px;
  text-transform: uppercase;
}
.tn-badge-sale { background: var(--danger); color: white; }
.tn-badge-new { background: var(--success); color: white; }
.tn-badge-hot { background: var(--warning); color: white; }
.tn-product-wishlist {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  background: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: all var(--transition);
  opacity: 0;
}
.tn-product-card:hover .tn-product-wishlist { opacity: 1; }
.tn-product-wishlist:hover { background: var(--danger); color: white; }
.tn-product-wishlist svg { width: 16px; height: 16px; }
.tn-product-body {
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}
.tn-product-cat {
  font-size: 11px;
  font-weight: 600;
  color: var(--primary);
  letter-spacing: .8px;
  text-transform: uppercase;
}
.tn-product-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.4;
  margin: 0;
}
.tn-product-name a { color: inherit; text-decoration: none; }
.tn-product-name a:hover { color: var(--primary); }
.tn-product-rating {
  display: flex;
  align-items: center;
  gap: 6px;
}
.tn-stars { color: var(--warning); font-size: 13px; letter-spacing: 1px; }
.tn-rating-count { font-size: 12px; color: var(--text-muted); }
.tn-product-price-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
}
.tn-product-price {
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.tn-price-current {
  font-size: 20px;
  font-weight: 800;
  color: var(--text);
}
.tn-price-old {
  font-size: 14px;
  color: var(--text-light);
  text-decoration: line-through;
}
.tn-product-add {
  width: 40px;
  height: 40px;
  background: var(--gradient);
  color: white;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform var(--transition), box-shadow var(--transition);
  flex-shrink: 0;
}
.tn-product-add:hover {
  transform: scale(1.1);
  box-shadow: 0 4px 16px rgba(99,102,241,.4);
}
.tn-product-add svg { width: 18px; height: 18px; }

/* Product card wide layout (for lists) */
.tn-products-grid.col-5 { grid-template-columns: repeat(5, 1fr); }
.tn-products-grid.col-3 { grid-template-columns: repeat(3, 1fr); }

/* =============================================
   PROMO BANNERS
   ============================================= */
.tn-banners-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.tn-banner {
  border-radius: var(--radius-xl);
  overflow: hidden;
  position: relative;
  min-height: 280px;
  display: flex;
  align-items: center;
}
.tn-banner-img {
  position: absolute;
  right: 0;
  bottom: 0;
  height: 100%;
  width: 55%;
  object-fit: contain;
  object-position: right bottom;
  transition: transform var(--transition);
}
.tn-banner:hover .tn-banner-img { transform: scale(1.04) translateX(-5px); }
.tn-banner-dark { background: var(--dark); }
.tn-banner-purple { background: linear-gradient(135deg, #2d1b69 0%, #1a0f3c 100%); }
.tn-banner-blue { background: linear-gradient(135deg, #0c2040 0%, #061020 100%); }
.tn-banner-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, rgba(0,0,0,.7) 0%, transparent 80%);
}
.tn-banner-body {
  position: relative;
  z-index: 2;
  padding: 36px 40px;
  max-width: 55%;
}
.tn-banner-tag {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--primary-light);
  margin-bottom: 10px;
}
.tn-banner-title {
  font-size: clamp(22px, 2.5vw, 30px);
  font-weight: 800;
  color: white;
  line-height: 1.2;
  letter-spacing: -0.5px;
  margin: 0 0 10px;
}
.tn-banner-desc {
  font-size: 14px;
  color: rgba(255,255,255,.6);
  margin-bottom: 24px;
  line-height: 1.6;
}
.tn-btn-sm {
  padding: 10px 22px;
  font-size: 13px;
}

/* =============================================
   SALE BANNER
   ============================================= */
.tn-sale-banner {
  background: var(--gradient-dark);
  border-radius: var(--radius-xl);
  padding: 60px;
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 40px;
  margin: 0 24px;
}
.tn-sale-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 70% 80% at 80% 50%, rgba(99,102,241,.2) 0%, transparent 70%);
}
.tn-sale-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(239,68,68,.15);
  border: 1px solid rgba(239,68,68,.3);
  color: #fca5a5;
  padding: 6px 16px;
  border-radius: 50px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 16px;
}
.tn-sale-title {
  font-size: clamp(30px, 4vw, 52px);
  font-weight: 900;
  color: white;
  letter-spacing: -1px;
  line-height: 1.1;
  margin: 0 0 14px;
}
.tn-sale-title span { background: var(--gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.tn-sale-desc {
  font-size: 16px;
  color: rgba(255,255,255,.6);
  margin-bottom: 32px;
  max-width: 460px;
}
.tn-sale-img {
  max-width: 400px;
  position: relative;
  z-index: 2;
  filter: drop-shadow(0 20px 40px rgba(0,0,0,.5));
}
.tn-countdown {
  display: flex;
  gap: 16px;
  margin-bottom: 32px;
}
.tn-countdown-item {
  text-align: center;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 12px;
  padding: 12px 18px;
  min-width: 72px;
}
.tn-countdown-num {
  display: block;
  font-size: 28px;
  font-weight: 800;
  color: white;
  line-height: 1;
}
.tn-countdown-label {
  font-size: 11px;
  color: rgba(255,255,255,.4);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 4px;
}

/* =============================================
   TABS
   ============================================= */
.tn-tabs {
  display: flex;
  align-items: center;
  gap: 6px;
  border-bottom: 2px solid var(--border);
  margin-bottom: 36px;
}
.tn-tab {
  padding: 12px 22px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  border: none;
  background: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: all var(--transition);
}
.tn-tab.active, .tn-tab:hover { color: var(--primary); border-bottom-color: var(--primary); }

/* =============================================
   BRANDS
   ============================================= */
.tn-brands-strip {
  padding: 32px 0;
  background: var(--white);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.tn-brands-grid {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.tn-brand-item {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--text-muted);
  transition: all var(--transition);
  min-width: 120px;
}
.tn-brand-item:hover {
  color: var(--primary);
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(99,102,241,.08);
}

/* =============================================
   NEWSLETTER
   ============================================= */
.tn-newsletter {
  background: var(--gradient);
  padding: 72px 0;
}
.tn-newsletter .tn-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 60px;
}
.tn-newsletter-title {
  font-size: clamp(24px, 3vw, 38px);
  font-weight: 800;
  color: white;
  letter-spacing: -0.8px;
  margin: 0 0 12px;
}
.tn-newsletter-desc {
  font-size: 16px;
  color: rgba(255,255,255,.7);
  margin: 0;
  line-height: 1.7;
}
.tn-newsletter-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.tn-newsletter-input-row {
  display: flex;
  background: white;
  border-radius: 50px;
  overflow: hidden;
  padding: 5px;
}
.tn-newsletter-input-row input {
  flex: 1;
  border: none;
  outline: none;
  padding: 12px 18px;
  font-size: 15px;
  font-family: var(--font-sans);
}
.tn-newsletter-input-row button {
  background: var(--gradient);
  color: white;
  border: none;
  padding: 12px 28px;
  border-radius: 50px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: opacity var(--transition);
}
.tn-newsletter-input-row button:hover { opacity: .9; }
.tn-newsletter-note {
  font-size: 13px;
  color: rgba(255,255,255,.6);
}
.tn-newsletter-note a { color: rgba(255,255,255,.9); }

/* =============================================
   FOOTER
   ============================================= */
.tn-footer {
  background: var(--dark);
  color: rgba(255,255,255,.75);
}
.tn-footer-top {
  padding: 64px 0 48px;
  border-bottom: 1px solid var(--border-dark);
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
  gap: 48px;
}
.tn-footer-logo {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.5px;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  text-decoration: none;
}
.tn-footer-logo-icon {
  width: 36px;
  height: 36px;
  background: var(--gradient);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.tn-footer-logo-icon svg { width: 20px; height: 20px; fill: white; }
.tn-footer-logo-text {
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.tn-footer-about {
  font-size: 14px;
  line-height: 1.8;
  color: rgba(255,255,255,.5);
  margin: 0 0 24px;
}
.tn-footer-social {
  display: flex;
  gap: 10px;
}
.tn-social-link {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: rgba(255,255,255,.08);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,.6);
  transition: all var(--transition);
  text-decoration: none;
}
.tn-social-link:hover {
  background: var(--primary);
  color: white;
  transform: translateY(-2px);
}
.tn-social-link svg { width: 17px; height: 17px; }
.tn-footer-col-title {
  font-size: 14px;
  font-weight: 700;
  color: white;
  letter-spacing: .5px;
  text-transform: uppercase;
  margin-bottom: 20px;
}
.tn-footer-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.tn-footer-links a {
  font-size: 14px;
  color: rgba(255,255,255,.5);
  transition: color var(--transition), transform var(--transition);
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}
.tn-footer-links a::before {
  content: '';
  width: 4px;
  height: 4px;
  background: var(--primary);
  border-radius: 50%;
  flex-shrink: 0;
  opacity: 0;
  transition: opacity var(--transition);
}
.tn-footer-links a:hover {
  color: white;
}
.tn-footer-links a:hover::before { opacity: 1; }
.tn-footer-contact-item {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
  font-size: 14px;
  color: rgba(255,255,255,.5);
}
.tn-footer-contact-item svg {
  width: 18px;
  height: 18px;
  color: var(--primary-light);
  flex-shrink: 0;
  margin-top: 2px;
}
.tn-footer-contact-item strong {
  display: block;
  color: rgba(255,255,255,.8);
  margin-bottom: 2px;
}
.tn-footer-bottom {
  padding: 20px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  color: rgba(255,255,255,.35);
  flex-wrap: wrap;
  gap: 12px;
}
.tn-footer-bottom a { color: rgba(255,255,255,.5); }
.tn-footer-bottom a:hover { color: white; }
.tn-payment-icons {
  display: flex;
  gap: 10px;
  align-items: center;
}
.tn-payment-icon {
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 700;
  color: rgba(255,255,255,.5);
}

/* =============================================
   WOOCOMMERCE OVERRIDES
   ============================================= */
/* Shop page */
.woocommerce .woocommerce-notices-wrapper { max-width: 1300px; margin: 0 auto; padding: 0 24px; }
body.woocommerce .ast-container,
body.woocommerce-page .ast-container { max-width: 1300px; }

/* Product archive */
.woocommerce ul.products {
  display: grid !important;
  grid-template-columns: repeat(4, 1fr) !important;
  gap: 24px !important;
  list-style: none;
  margin: 0 !important;
}
.woocommerce ul.products li.product {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--transition);
  padding: 0 !important;
  margin: 0 !important;
  float: none !important;
  width: auto !important;
}
.woocommerce ul.products li.product:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-xl);
  border-color: rgba(99,102,241,.2);
}
.woocommerce ul.products li.product a img {
  background: var(--light-2);
  padding: 20px;
  width: 100%;
  aspect-ratio: 1;
  object-fit: contain;
  margin: 0;
}
.woocommerce ul.products li.product .woocommerce-loop-product__title {
  font-size: 15px;
  font-weight: 600;
  padding: 0 18px 8px;
  color: var(--text);
}
.woocommerce ul.products li.product .price {
  font-size: 18px;
  font-weight: 800;
  color: var(--text);
  padding: 0 18px;
}
.woocommerce ul.products li.product .price del { color: var(--text-muted); font-size: 14px; }
.woocommerce ul.products li.product .price ins { text-decoration: none; color: var(--primary); }
.woocommerce ul.products li.product a.button,
.woocommerce ul.products li.product .add_to_cart_button {
  display: block;
  margin: 14px 18px 18px;
  padding: 12px;
  background: var(--gradient) !important;
  color: white !important;
  border-radius: 50px;
  font-size: 13px;
  font-weight: 700;
  text-align: center;
  border: none !important;
  transition: all var(--transition);
}
.woocommerce ul.products li.product a.button:hover { opacity: .9; transform: none; }
.woocommerce span.onsale {
  background: var(--danger);
  border-radius: 50px;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  top: 12px;
  left: 12px;
  min-width: auto;
  min-height: auto;
  line-height: 1.4;
}

/* Single product */
.woocommerce div.product div.images .woocommerce-product-gallery__image {
  background: var(--light-2);
  border-radius: var(--radius-lg);
  overflow: hidden;
  padding: 20px;
}
.woocommerce div.product .product_title {
  font-size: 28px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.5px;
}
.woocommerce div.product p.price {
  font-size: 28px;
  font-weight: 800;
  color: var(--primary);
}
.woocommerce div.product p.price del { color: var(--text-muted); }
.woocommerce #respond input#submit,
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button,
.woocommerce div.product form.cart .button {
  background: var(--gradient) !important;
  color: white !important;
  border-radius: 50px !important;
  font-weight: 700 !important;
  border: none !important;
  transition: all var(--transition) !important;
}
.woocommerce div.product form.cart .button {
  padding: 16px 36px !important;
  font-size: 16px !important;
}
.woocommerce-breadcrumb {
  font-size: 13px;
  color: var(--text-muted);
  padding: 16px 0;
}
.woocommerce-breadcrumb a { color: var(--primary); }

/* Widget product title */
.widget_price_filter .price_slider_wrapper .ui-widget-content { background: var(--border); }
.widget_price_filter .ui-slider .ui-slider-handle { background: var(--primary); border-color: var(--primary); }
.widget_price_filter .ui-slider .ui-slider-range { background: var(--primary); }

/* Sidebar filters */
.widget_product_categories ul li a { font-size: 14px; color: var(--text-muted); }
.widget_product_categories ul li a:hover { color: var(--primary); }

/* Cart page */
.woocommerce table.shop_table { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); }
.woocommerce table.shop_table th { background: var(--light-2); color: var(--text); font-weight: 700; }
.woocommerce table.cart td.product-name a { font-weight: 600; color: var(--text); }
.woocommerce table.cart td.product-name a:hover { color: var(--primary); }

/* =============================================
   WOOCOMMERCE SHOP PAGE HEADER
   ============================================= */
.woocommerce-products-header {
  background: var(--gradient-dark);
  padding: 48px 0;
  margin-bottom: 0;
}
.woocommerce-products-header .page-title {
  color: white;
  font-size: 36px;
  font-weight: 800;
}

/* =============================================
   PAGE SPECIFIC
   ============================================= */
/* About page */
.tn-about-hero {
  background: var(--gradient-dark);
  padding: 80px 0;
  text-align: center;
}
.tn-team-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; }
.tn-team-card {
  text-align: center;
  padding: 32px 24px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  transition: all var(--transition);
}
.tn-team-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: rgba(99,102,241,.2); }
.tn-team-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--gradient);
  margin: 0 auto 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  font-weight: 800;
  color: white;
}

/* Contact page */
.tn-contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: start; }
.tn-contact-form { display: flex; flex-direction: column; gap: 18px; }
.tn-form-group { display: flex; flex-direction: column; gap: 8px; }
.tn-form-label { font-size: 14px; font-weight: 600; color: var(--text); }
.tn-form-input,
.tn-form-textarea {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  font-size: 15px;
  font-family: var(--font-sans);
  color: var(--text);
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
  background: var(--white);
}
.tn-form-input:focus, .tn-form-textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(99,102,241,.1);
}
.tn-form-textarea { min-height: 140px; resize: vertical; }
.tn-contact-info-item {
  display: flex;
  gap: 16px;
  padding: 20px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  margin-bottom: 16px;
  transition: all var(--transition);
}
.tn-contact-info-item:hover { border-color: var(--primary); background: rgba(99,102,241,.02); }
.tn-contact-info-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.tn-contact-info-icon svg { width: 22px; height: 22px; color: white; }
.tn-contact-info-title { font-weight: 700; margin-bottom: 4px; color: var(--text); }
.tn-contact-info-text { font-size: 14px; color: var(--text-muted); line-height: 1.6; }

/* =============================================
   UTILITIES
   ============================================= */
.tn-text-center { text-align: center; }
.tn-mt-8 { margin-top: 8px; }
.tn-mt-16 { margin-top: 16px; }
.tn-mt-24 { margin-top: 24px; }
.tn-mt-48 { margin-top: 48px; }

/* No top padding for homepage (full-bleed hero) */
body.home .ast-site-content-wrap { padding: 0 !important; }
body.home .ast-container { max-width: 100% !important; padding: 0 !important; }
body.home #content { padding: 0 !important; }
body.home .entry-content { margin: 0 !important; }
body.home .ast-article-post { padding: 0 !important; }

/* Hide Astra page title on homepage */
body.home .ast-archive-description,
body.home .page-header { display: none; }

/* Remove Astra default margins on homepage */
.home .site-content { padding: 0 !important; }
.home #primary { margin: 0; padding: 0; }

/* Fix WooCommerce shop columns */
.woocommerce-page ul.products[class*="columns-"] { grid-template-columns: repeat(4, 1fr) !important; }
.woocommerce-page ul.products.columns-3 { grid-template-columns: repeat(3, 1fr) !important; }

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 1100px) {
  .tn-products-grid { grid-template-columns: repeat(3, 1fr); }
  .woocommerce ul.products { grid-template-columns: repeat(3, 1fr) !important; }
}

@media (max-width: 900px) {
  .tn-cats-grid { grid-template-columns: 1fr 1fr; }
  .tn-banners-grid { grid-template-columns: 1fr; }
  .tn-hero .tn-container { grid-template-columns: 1fr; text-align: center; }
  .tn-hero-img { display: none; }
  .tn-hero-actions { justify-content: center; }
  .tn-hero-stats { justify-content: center; }
  .tn-hero-desc { margin: 0 auto 36px; }
  .tn-features-grid { grid-template-columns: repeat(2, 1fr); }
  .tn-feature-item { border-right: none; border-bottom: 1px solid var(--border-dark); }
  .tn-feature-item:nth-child(2n) { border-bottom: none; }
  .tn-footer-top { grid-template-columns: 1fr 1fr; gap: 32px; }
  .tn-newsletter .tn-container { grid-template-columns: 1fr; }
  .tn-contact-grid { grid-template-columns: 1fr; }
  .tn-team-grid { grid-template-columns: repeat(2, 1fr); }
  .tn-sale-banner { grid-template-columns: 1fr; }
  .tn-sale-img { display: none; }
}

@media (max-width: 768px) {
  .tn-topbar-left { display: none; }
  .tn-products-grid { grid-template-columns: repeat(2, 1fr); }
  .woocommerce ul.products { grid-template-columns: repeat(2, 1fr) !important; }
  .tn-mobile-toggle { display: none !important; }
  .tn-header-search { display: none; }
  /* Mobile nav: horizontal scroll instead of hamburger */
  .tn-navbar-inner { overflow-x: auto; }
  .tn-nav {
    display: flex !important;
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    gap: 2px;
    padding: 6px 0;
  }
  .tn-nav::-webkit-scrollbar { display: none; }
  .tn-nav > li > a { font-size: 13px; padding: 6px 12px; white-space: nowrap; }
  .tn-dropdown { display: none !important; }
  .nav-arrow { display: none !important; }
  .tn-navbar-extra { display: none; }
}

@media (max-width: 480px) {
  .tn-cats-grid { grid-template-columns: 1fr; }
  .tn-products-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .tn-footer-top { grid-template-columns: 1fr; }
  .tn-sale-banner { padding: 36px 24px; }
  .tn-countdown { gap: 8px; }
  .tn-countdown-item { min-width: 60px; padding: 10px 12px; }
}

/* =============================================
   FIXES — PATCH 2
   ============================================= */

/* FIX 1: Search button — explicit icon visibility */
.tn-header-search button {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.tn-header-search button svg {
  width: 20px !important;
  height: 20px !important;
  display: block;
  flex-shrink: 0;
  stroke: #ffffff !important;
  fill: none !important;
}

/* FIX 2: WooCommerce category/archive page header — add left indent to title */
.woocommerce-products-header {
  background: var(--gradient-dark);
  padding: 48px 0;
  margin-bottom: 0;
}
.woocommerce-products-header .page-title {
  max-width: 1300px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 24px;
  padding-right: 24px;
  color: white;
  font-size: clamp(26px, 3.5vw, 40px);
  font-weight: 800;
  letter-spacing: -0.5px;
}

/* FIX 3a: WooCommerce product card — category label spacing & alignment */
/* Astra renders category via .ast-woo-product-category or wc posted_in area */
.woocommerce ul.products li.product .ast-woo-product-category,
.woocommerce ul.products li.product .woocommerce-loop-category__title,
.woocommerce ul.products li.product .product-category-link {
  display: block;
  padding: 12px 18px 0;
  font-size: 11px;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: 1px;
  text-transform: uppercase;
  line-height: 1;
  margin: 0;
}
/* Ensure title has top breathing room if category sits above it */
.woocommerce ul.products li.product .woocommerce-loop-product__title {
  padding-top: 6px !important;
}

/* FIX 3b: Add to Cart button — prevent touching card edges */
.woocommerce ul.products li.product .button,
.woocommerce ul.products li.product .add_to_cart_button,
.woocommerce ul.products li.product a.add_to_cart_button {
  margin: 12px 14px 14px !important;
  width: auto !important;
  display: block !important;
  box-sizing: border-box !important;
}

/* FIX 4a: "Why choose us" grid — desktop 4col, tablet 2col, mobile 1col */
.tn-why-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
.tn-why-grid > div {
  padding: 32px;
  border: 1px solid var(--border);
  border-radius: 20px;
  text-align: center;
  transition: all .25s;
  cursor: default;
}
.tn-why-grid > div:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
}

/* FIX 4b: Testimonials grid — desktop 3col, mobile 1col */
.tn-reviews-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

/* FIX 4c: Scroll-to-top button — keep well inside viewport */
.ast-scroll-top,
.back-to-top,
#scroll-to-top,
.scrolltop,
[class*="scroll-top"] {
  right: 20px !important;
  bottom: 20px !important;
  left: auto !important;
  position: fixed !important;
  max-width: 48px !important;
  max-height: 48px !important;
  transform: none !important;
  margin: 0 !important;
  box-sizing: border-box !important;
}
@media (max-width: 600px) {
  .ast-scroll-top,
  .back-to-top,
  #scroll-to-top,
  .scrolltop,
  [class*="scroll-top"] {
    right: 12px !important;
    bottom: 12px !important;
  }
}

/* ---- Responsive overrides for Fix 4 ---- */
@media (max-width: 900px) {
  .tn-why-grid { grid-template-columns: repeat(2, 1fr); }
  .tn-reviews-grid { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .tn-why-grid { grid-template-columns: 1fr; gap: 16px; }
  .tn-why-grid > div { padding: 24px; }
  .tn-reviews-grid { grid-template-columns: 1fr; }
}

/* ============================================
   PATCH 3 — Mobile fixes (6 issues)
   ============================================ */

/* Global: prevent horizontal overflow */
html, body {
  overflow-x: hidden;
  max-width: 100%;
}

/* Fix 1: Cart button — hide label on small screens so it doesn't overflow */
@media (max-width: 520px) {
  .tn-cart-label {
    display: none;
  }
  .tn-cart-btn {
    padding: 8px 10px;
    gap: 4px;
  }
}

/* Fix 2: Features strip — single column so text doesn't overflow right */
@media (max-width: 560px) {
  .tn-features-grid {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }
  .tn-feature-item {
    justify-content: flex-start;
  }
}

/* Fix 3: Tabs — horizontally scrollable, no wrap so all tabs are reachable */
@media (max-width: 640px) {
  .tn-tabs {
    overflow-x: auto !important;
    flex-wrap: nowrap !important;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding-bottom: 4px;
  }
  .tn-tabs::-webkit-scrollbar {
    display: none;
  }
  .tn-tab {
    white-space: nowrap;
    flex-shrink: 0;
  }
}

/* Fix 4: Banner — hide image on mobile so text isn't cramped */
@media (max-width: 600px) {
  .tn-banner-img {
    display: none !important;
  }
  .tn-banner-body {
    max-width: 100% !important;
    padding: 32px 20px !important;
  }
}

/* Fix 5: Countdown — reduce item size so all 4 fit on narrow screens */
@media (max-width: 520px) {
  .tn-countdown {
    gap: 8px !important;
  }
  .tn-countdown-item {
    min-width: 52px !important;
    padding: 8px 6px !important;
  }
  .tn-countdown-item .num {
    font-size: 20px !important;
    line-height: 1.2;
  }
  .tn-countdown-item .label {
    font-size: 9px !important;
  }
  .tn-countdown-sep {
    font-size: 18px !important;
  }
}

/* Fix 6: Scroll-to-top button — hide on mobile to avoid viewport bleed */
@media (max-width: 768px) {
  .ast-scroll-top,
  .back-to-top,
  #scroll-to-top,
  .scrolltop,
  [class*="scroll-top"] {
    display: none !important;
  }
}

/* Fix 7: Header actions compact on narrow screens */
@media (max-width: 420px) {
  .tn-header-inner { gap: 8px; }
  .tn-header-actions { gap: 4px; flex-shrink: 0; }
  .tn-action-btn { width: 36px !important; height: 36px !important; }
}

/* Fix 8: Sale banner — remove side margins on mobile so it fills full width and countdown fits */
@media (max-width: 600px) {
  .tn-sale-banner {
    margin: 0 !important;
    border-radius: var(--radius-lg) !important;
    padding: 32px 20px !important;
  }
}
@media (max-width: 420px) {
  .tn-sale-banner {
    padding: 28px 16px !important;
    border-radius: 12px !important;
  }
}

/* ============================================
   PATCH 4 — WooCommerce product grid mobile fix
   2 columns instead of 4 on narrow screens
   ============================================ */
@media (max-width: 768px) {
  /* Force 2-column grid — target all WC column variants */
  .woocommerce ul.products,
  .woocommerce ul.products.columns-4,
  .woocommerce ul.products.columns-3,
  .woocommerce .related ul.products,
  .woocommerce .upsells ul.products,
  .woocommerce .cross-sells ul.products {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    float: none !important;
    width: 100% !important;
  }
  /* Each card takes full cell width */
  .woocommerce ul.products li.product {
    width: 100% !important;
    float: none !important;
    clear: none !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }
  /* Product title — allow wrap, fix font size */
  .woocommerce ul.products li.product .woocommerce-loop-product__title {
    font-size: 13px !important;
    padding: 8px 14px 4px !important;
    white-space: normal !important;
    word-break: break-word;
  }
  /* Price */
  .woocommerce ul.products li.product .price {
    font-size: 15px !important;
    padding: 0 14px !important;
  }
  .woocommerce ul.products li.product .price del {
    font-size: 12px !important;
  }
  /* Add to cart button — proper margins on narrow cards */
  .woocommerce ul.products li.product a.button,
  .woocommerce ul.products li.product .add_to_cart_button {
    margin: 10px 14px 14px !important;
    padding: 10px 8px !important;
    font-size: 12px !important;
    white-space: normal !important;
    line-height: 1.3 !important;
  }
  /* Category label */
  .woocommerce ul.products li.product .ast-woo-product-category {
    font-size: 10px !important;
    padding: 0 14px !important;
  }
}

@media (max-width: 480px) {
  /* Extra small: keep 2 columns but tighten padding */
  .woocommerce ul.products li.product a img {
    padding: 12px !important;
  }
  .woocommerce ul.products li.product .woocommerce-loop-product__title {
    font-size: 12px !important;
    padding: 6px 10px 2px !important;
  }
  .woocommerce ul.products li.product .price {
    font-size: 14px !important;
    padding: 0 10px !important;
  }
  .woocommerce ul.products li.product a.button,
  .woocommerce ul.products li.product .add_to_cart_button {
    margin: 8px 10px 10px !important;
    padding: 9px 6px !important;
    font-size: 11px !important;
  }
  /* One-click button in loop — match add-to-cart on small screens */
  .compik-oc-btn--loop {
    margin: 0 10px 10px !important;
    padding: 9px 6px !important;
    font-size: 11px !important;
  }
}
