/*
Theme Name: Tactical Scope Hub
Theme URI: https://example.com/tactical-scope-hub
Author: Tactical Scope Hub
Author URI: https://example.com
Description: Dark tactical WooCommerce theme with Elementor-first layout, AJAX search, fixed product grid and classic hero homepage.
Version: 4.3
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: tactical-scope-hub
*/

*,
*::before,
*::after { box-sizing: border-box; }

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
    background-color: #05070b;
    color: #f5f5f5;
    line-height: 1.6;
}

a { color: #e0b43a; text-decoration: none; }
a:hover { text-decoration: underline; }

img { max-width: 100%; height: auto; }

.container { width: 90%; max-width: 1200px; margin: 0 auto; }

.site-header {
    background: #05070b;
    border-bottom: 1px solid #1b1f2a;
    position: sticky;
    top: 0;
    z-index: 50;
}

/* Desktop search bar */
.search-bar-top {
    width: 100%;
    padding: 12px 0;
    background: #05070b;
    border-bottom: 1px solid #1b1f2a;
    text-align: center;
}

.search-bar-top input[type="search"] {
    padding: 10px 18px;
    width: 60%;
    max-width: 520px;
    border-radius: 999px;
    background: #111;
    border: 1px solid #3b4254;
    color: #fff;
}

#live-search-results {
    display: none;
    width: 60%;
    max-width: 520px;
    margin: 8px auto 10px;
    background: #111;
    border: 1px solid #333;
    border-radius: 8px;
    padding: 8px 10px;
    text-align: left;
}

#live-search-results a {
    display: block;
    padding: 7px 4px;
    border-bottom: 1px solid #1e1e1e;
    font-size: 0.9rem;
}

#live-search-results a:last-child { border-bottom: none; }

.header-inner { padding: 0.75rem 0; }

.branding {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
}

.brand-left { display: flex; flex-direction: column; gap: 0.15rem; }

.site-title {
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.site-title span.accent { color: #e0b43a; }

.site-description { font-size: 0.85rem; opacity: 0.75; }

.header-right { display: flex; align-items: center; gap: 1.5rem; }

.main-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 1.25rem;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.main-nav a { color: #f5f5f5; }

.header-cart {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.55rem 1.15rem;
    border-radius: 999px;
    border: 1px solid #3b4254;
    background: rgba(0,0,0,0.55);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.header-cart span.count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.3rem;
    height: 1.3rem;
    border-radius: 999px;
    background: #e0b43a;
    color: #05070b;
    font-size: 0.75rem;
    font-weight: 700;
}

.header-cart:hover { background: rgba(255,255,255,0.04); text-decoration: none; }

.mobile-search-icon{ display:none; font-size:22px; cursor:pointer; color:#fff; margin-left:8px; }
.mobile-search-bar{ display:none; background:#05070b; padding:10px 0 12px; border-top:1px solid #1b1f2a; }
.mobile-search-bar.open{ display:block; }
.mobile-search-bar input[type=search]{
    width:90%;
    max-width:520px;
    padding:10px 18px;
    border-radius:999px;
    background:#111;
    border:1px solid #3b4254;
    color:#fff;
    display:block;
    margin:0 auto;
}

.section { padding: 3rem 0; }
.section-title { font-size: 1.6rem; margin-bottom: 0.75rem; }
.section-subtitle { font-size: 0.95rem; opacity: 0.8; max-width: 32rem; }

.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1.5rem; }

.card {
    background: #0b0f18;
    border-radius: 1rem;
    padding: 1.25rem;
    border: 1px solid #1b2130;
}

.btn-primary,
.button,
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button,
.woocommerce #respond input#submit,
.woocommerce button.button.alt,
.woocommerce a.button.alt {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.8rem 1.7rem;
    border-radius: 999px;
    background: linear-gradient(135deg, #e0b43a, #f2cd4f);
    color: #05070b;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    font-size: 0.85rem;
    border: none;
    cursor: pointer;
}

.btn-primary:hover,
.woocommerce a.button:hover,
.woocommerce button.button:hover,
.woocommerce input.button:hover,
.woocommerce #respond input#submit:hover,
.woocommerce button.button.alt:hover,
.woocommerce a.button.alt:hover {
    filter: brightness(1.05);
    text-decoration: none;
}

.site-footer {
    padding: 2rem 0;
    border-top: 1px solid #1b1f2a;
    font-size: 0.85rem;
    opacity: 0.8;
    margin-top: 3rem;
}

/* WooCommerce grid hard fix */
.woocommerce ul.products,
.woocommerce-page ul.products {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)) !important;
    gap: 24px !important;
    margin: 30px 0 !important;
    padding: 0 !important;
}

.woocommerce ul.products li.product,
.woocommerce-page ul.products li.product {
    width: 100% !important;
    margin: 0 !important;
    float: none !important;
    background: #0d0f15;
    border: 1px solid #1c1f28;
    border-radius: 8px;
    padding: 20px;
    display: flex !important;
    flex-direction: column;
    min-height: 420px;
    text-align:left;
}

.woocommerce ul.products li.product img,
.woocommerce-page ul.products li.product img {
    max-height: 180px;
    object-fit: contain;
    margin-bottom: 10px;
}

.woocommerce ul.products li.product .woocommerce-loop-product__title {
    font-size: 16px;
    line-height: 1.3;
    margin: 10px 0 8px;
    height: 50px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    color:#fff;
}

.woocommerce ul.products li.product .price { color:#e0b43a; font-size:16px; font-weight:bold; margin:10px 0; }

.woocommerce ul.products li.product .button {
    background:#e0b43a !important;
    color:#000 !important;
    padding:10px 12px;
    border-radius:40px;
    margin-top:auto;
}

/* Hero wrapper for classic front page */
.hero {
    padding: 6rem 0 4rem;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.hero-overlay {
    background: linear-gradient(135deg, rgba(5,7,11,0.9), rgba(10,15,25,0.7));
    padding: 3rem 2rem;
    border-radius: 1.5rem;
    border: 1px solid rgba(255,255,255,0.04);
    box-shadow: 0 30px 60px rgba(0,0,0,0.85);
}

.hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 3fr);
    gap: 3rem;
    align-items: center;
}

.hero-title {
    font-size: 2.4rem;
    line-height: 1.2;
    margin-bottom: 1rem;
}

.hero-title span.accent { color:#e0b43a; }

.hero-subtitle {
    font-size: 1rem;
    max-width: 32rem;
    opacity: 0.85;
    margin-bottom: 2rem;
}

.hero-cta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
    margin-bottom: 1.5rem;
}

.hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: 0.9rem;
    opacity: 0.85;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 0.35rem 0.9rem;
    border-radius: 999px;
    border: 1px solid #30374a;
    background: rgba(0, 0, 0, 0.6);
    margin-bottom: 0.75rem;
}

/* Responsive */
@media (max-width: 900px){
  .branding{flex-direction:column;align-items:flex-start;gap:0.75rem;}
  .header-right{width:100%;justify-content:space-between;}
  .main-nav ul{flex-wrap:wrap;gap:0.8rem;}
}
@media (max-width:768px){
  .search-bar-top{display:none;}
  .mobile-search-icon{display:inline-block;}
}
