/*
Theme Name: SwingWise
Theme URI: https://swingwise.com
Author: SwingWise
Author URI: https://swingwise.com
Description: Lightweight, conversion-optimized golf gear theme. No jQuery, built for Core Web Vitals.
Version: 1.0.0
Requires at least: 6.4
Tested up to: 6.7
Requires PHP: 8.1
License: Proprietary
Text Domain: swingwise

SwingWise — Golf Gear, Wisely Chosen.
*/

/* ============================================
   CSS Variables
   ============================================ */
:root {
    --white:        #FFFFFF;
    --black:        #1A1A1A;
    --green-dark:   #1B5E20;
    --green-mid:    #2E7D32;
    --green-light:  #E8F5E9;
    --gold:         #C8963E;
    --gold-light:   #FDF6ED;
    --gray-bg:      #F5F5F5;
    --gray-border:  #E0E0E0;
    --text:         #333333;
    --text-light:   #666666;
    --text-muted:   #999999;
    --danger:       #D32F2F;
    --success:      #2E7D32;
    --radius:       4px;
    --shadow:       0 2px 8px rgba(0,0,0,0.06);
    --shadow-hover: 0 4px 16px rgba(0,0,0,0.10);
    --font:         -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, sans-serif;
    --font-heading: Georgia, "Times New Roman", serif;
    --max-width:    1200px;
    --header-height: 64px;
}

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

html { scroll-behavior: smooth; font-size: 16px; }

body {
    font-family: var(--font);
    color: var(--text);
    background: var(--white);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

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

a { color: var(--green-dark); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--green-mid); }

h1, h2, h3, h4, h5, h6 { font-family: var(--font-heading); color: var(--black); line-height: 1.3; font-weight: 700; }
h1 { font-size: 2.25rem; margin-bottom: 1rem; }
h2 { font-size: 1.75rem; margin-bottom: 0.75rem; }
h3 { font-size: 1.35rem; margin-bottom: 0.5rem; }

p { margin-bottom: 1rem; }
ul, ol { margin-bottom: 1rem; padding-left: 1.5rem; }

.container { max-width: var(--max-width); margin: 0 auto; padding: 0 1rem; }

/* ============================================
   Header
   ============================================ */
.site-header {
    background: var(--white);
    border-bottom: 1px solid var(--gray-border);
    position: sticky;
    top: 0;
    z-index: 100;
    height: var(--header-height);
}

.header-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 1rem;
    height: var(--header-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.site-logo {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--green-dark);
    letter-spacing: -0.5px;
}
.site-logo span { color: var(--gold); }

.site-logo:hover { opacity: 0.85; }

/* Nav */
.main-nav { display: flex; gap: 1.5rem; align-items: center; list-style: none; margin: 0; padding: 0; }
.main-nav > li { position: relative; }
.main-nav > li > a {
    font-size: 0.9rem;
    color: var(--text);
    font-weight: 500;
    padding: 0.25rem 0;
    border-bottom: 2px solid transparent;
    transition: border-color 0.2s, color 0.2s;
    text-decoration: none;
}
.main-nav > li > a:hover,
.main-nav > li.current-menu-item > a { color: var(--green-dark); border-bottom-color: var(--green-dark); }

/* Dropdown arrow */
.main-nav .menu-item-has-children > a::after {
    content: "▾";
    margin-left: 0.3rem;
    font-size: 0.7rem;
    vertical-align: middle;
    color: var(--text-muted);
}

/* Dropdown */
.main-nav .sub-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: -0.75rem;
    background: var(--white);
    border: 1px solid var(--gray-border);
    border-radius: var(--radius);
    min-width: 180px;
    box-shadow: var(--shadow-hover);
    z-index: 200;
    list-style: none;
    padding: 0.5rem 0;
    margin: 0;
}
.main-nav li:hover > .sub-menu { display: block; }
.main-nav .sub-menu li a {
    display: block;
    padding: 0.5rem 1.25rem;
    font-size: 0.85rem;
    color: var(--text);
    white-space: nowrap;
    text-decoration: none;
    border: none;
}
.main-nav .sub-menu li a:hover {
    background: var(--green-light);
    color: var(--green-dark);
}

/* Header Icons */
.header-icons { display: flex; gap: 1rem; align-items: center; }
.header-icons a { font-size: 0.85rem; color: var(--text); display: flex; align-items: center; gap: 0.35rem; }

.cart-count {
    background: var(--gold);
    color: var(--white);
    font-size: 0.7rem;
    padding: 1px 6px;
    border-radius: 10px;
    font-weight: 700;
}

/* Mobile Menu */
.hamburger { display: none; background: none; border: none; cursor: pointer; padding: 0.5rem; }
.hamburger span { display: block; width: 22px; height: 2px; background: var(--black); margin: 5px 0; transition: 0.3s; }

@media (max-width: 768px) {
    .main-nav { display: none; }
    .hamburger { display: block; }
    .main-nav.open {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: var(--header-height);
        left: 0;
        right: 0;
        background: var(--white);
        border-bottom: 1px solid var(--gray-border);
        padding: 1rem;
        gap: 0.75rem;
    }
}

/* ============================================
   Buttons
   ============================================ */
.btn {
    display: inline-block;
    padding: 0.7rem 1.5rem;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    border: none;
    text-align: center;
    transition: all 0.2s;
    text-decoration: none;
}

.btn-primary {
    background: var(--gold);
    color: var(--white);
}
.btn-primary:hover { background: #B8862D; color: var(--white); }

.btn-secondary {
    background: var(--green-dark);
    color: var(--white);
}
.btn-secondary:hover { background: #14481A; color: var(--white); }

.btn-outline {
    background: transparent;
    color: var(--green-dark);
    border: 1px solid var(--green-dark);
}
.btn-outline:hover { background: var(--green-light); }

.btn-large { padding: 0.9rem 2rem; font-size: 1rem; }

/* ============================================
   Hero / Home Sections
   ============================================ */
.hero {
    background: linear-gradient(135deg, var(--green-dark) 0%, #0D3B12 100%);
    color: var(--white);
    padding: 4rem 1rem;
    text-align: center;
}
.hero h1 { color: var(--white); font-size: 2.5rem; margin-bottom: 0.75rem; }
.hero p { font-size: 1.1rem; opacity: 0.9; max-width: 600px; margin: 0 auto 1.5rem; }
.hero .btn-primary { font-size: 1.05rem; padding: 0.85rem 2.2rem; }

/* Content Sections */
.section { padding: 3rem 1rem; }
.section-title { text-align: center; margin-bottom: 2rem; }
.section-title h2 { margin-bottom: 0.5rem; }
.section-title p { color: var(--text-light); max-width: 600px; margin: 0 auto; }

/* ============================================
   Product Cards
   ============================================ */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.5rem;
}

.product-card {
    background: var(--white);
    border: 1px solid var(--gray-border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: box-shadow 0.2s;
}
.product-card:hover { box-shadow: var(--shadow-hover); }

.product-card img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    background: var(--gray-bg);
}

.product-card-body { padding: 1rem; }

.product-card-title {
    font-family: var(--font);
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--black);
    margin-bottom: 0.35rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-card-vendor {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.product-card-price {
    display: flex;
    gap: 0.5rem;
    align-items: baseline;
    margin-bottom: 0.75rem;
}
.price-current { font-size: 1.1rem; font-weight: 700; color: var(--black); }
.price-compare { font-size: 0.85rem; color: var(--text-muted); text-decoration: line-through; }
.price-save { font-size: 0.75rem; color: var(--success); font-weight: 600; }

/* ============================================
   Single Product Page
   ============================================ */
.product-single {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
    padding: 2rem 0;
}
@media (max-width: 768px) { .product-single { grid-template-columns: 1fr; } }

.product-gallery img {
    border-radius: var(--radius);
    background: var(--gray-bg);
}

.product-info .product_title { font-size: 1.75rem; margin-bottom: 0.5rem; }
.product-info .woocommerce-product-details__short-description { margin-bottom: 1.5rem; }

.woocommerce-variation-price .price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--black);
}

/* WooCommerce Overrides */
.woocommerce div.product form.cart .variations select {
    padding: 0.5rem;
    border: 1px solid var(--gray-border);
    border-radius: var(--radius);
    font-size: 0.9rem;
}

.woocommerce div.product form.cart .button {
    background: var(--gold);
    color: var(--white);
    padding: 0.8rem 2rem;
    font-weight: 600;
    border-radius: var(--radius);
    border: none;
    cursor: pointer;
    width: 100%;
}

/* Tabs */
.woocommerce-tabs { margin-top: 3rem; }
.woocommerce-Tabs-panel { padding: 1.5rem 0; }

.woocommerce-Tabs-panel h2 { font-size: 1.3rem; margin-bottom: 1rem; }

/* ============================================
   Content Pages (Blog / Guide / Comparison)
   ============================================ */
.content-page {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.content-page h1 { font-size: 2rem; }
.content-page h2 { font-size: 1.5rem; margin-top: 2rem; border-bottom: 2px solid var(--green-light); padding-bottom: 0.4rem; }
.content-page h3 { font-size: 1.2rem; margin-top: 1.5rem; }

.content-page img {
    border-radius: var(--radius);
    margin: 1.5rem 0;
}

.content-page blockquote {
    border-left: 3px solid var(--gold);
    background: var(--gold-light);
    padding: 1rem 1.5rem;
    margin: 1.5rem 0;
    border-radius: 0 var(--radius) var(--radius) 0;
    font-style: italic;
}

.content-page ul, .content-page ol { margin: 1rem 0; padding-left: 1.5rem; }
.content-page li { margin-bottom: 0.4rem; }

/* Comparison Table */
.compare-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    font-size: 0.9rem;
}
.compare-table th {
    background: var(--green-dark);
    color: var(--white);
    padding: 0.75rem;
    text-align: left;
    font-weight: 600;
}
.compare-table td {
    padding: 0.75rem;
    border-bottom: 1px solid var(--gray-border);
}
.compare-table tr:nth-child(even) td { background: var(--gray-bg); }
.compare-table .winner { background: var(--green-light); font-weight: 600; }

/* Decision Tree */
.decision-tree {
    background: var(--gray-bg);
    border: 1px solid var(--gray-border);
    border-radius: var(--radius);
    padding: 1.5rem;
    margin: 1.5rem 0;
}
.decision-tree .question { font-weight: 600; color: var(--black); margin-bottom: 0.5rem; }
.decision-tree .choice {
    display: flex;
    gap: 1rem;
    margin-bottom: 0.75rem;
    padding: 0.6rem 0.75rem;
    border-left: 3px solid var(--green-dark);
    background: var(--white);
    border-radius: 0 var(--radius) var(--radius) 0;
}
.decision-tree .choice:hover { border-left-color: var(--gold); }

/* FAQ Section */
.faq-item {
    border-bottom: 1px solid var(--gray-border);
    padding: 1rem 0;
}
.faq-question {
    font-weight: 600;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.faq-question::after { content: "▾"; font-size: 0.8rem; color: var(--text-muted); transition: transform 0.2s; }
.faq-question.open::after { transform: rotate(180deg); }
.faq-answer { padding-top: 0.75rem; color: var(--text-light); display: none; }
.faq-answer.open { display: block; }

/* ============================================
   Footer
   ============================================ */
.site-footer {
    background: var(--black);
    color: #bbb;
    padding: 3rem 1rem 1.5rem;
    margin-top: 4rem;
}

.footer-grid {
    max-width: var(--max-width);
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #333;
}

.footer-col h4 {
    color: var(--white);
    font-family: var(--font);
    font-size: 0.95rem;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.footer-col a { color: #bbb; font-size: 0.85rem; display: block; margin-bottom: 0.4rem; }
.footer-col a:hover { color: var(--gold); }

.footer-bottom {
    max-width: var(--max-width);
    margin: 0 auto;
    padding-top: 1.5rem;
    text-align: center;
    font-size: 0.8rem;
    color: #666;
}

/* ============================================
   Content Cards (Blog / Guides listing)
   ============================================ */
.content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.content-card {
    border: 1px solid var(--gray-border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: box-shadow 0.2s;
}
.content-card:hover { box-shadow: var(--shadow-hover); }

.content-card img {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
    background: var(--gray-bg);
}

.content-card-body { padding: 1.25rem; }

.content-card-title {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: var(--black);
}

.content-card-excerpt {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-bottom: 0.75rem;
}

.content-card-meta {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* ============================================
   Category / Shop Page
   ============================================ */
.category-header {
    background: var(--gray-bg);
    padding: 2rem 1rem;
    text-align: center;
    margin-bottom: 2rem;
}

.category-description {
    max-width: 700px;
    margin: 0.5rem auto 0;
    color: var(--text-light);
    font-size: 0.95rem;
}

/* Breadcrumb */
.breadcrumb {
    font-size: 0.8rem;
    color: var(--text-muted);
    padding: 0.75rem 0;
    margin-bottom: 0.5rem;
}
.breadcrumb a { color: var(--text-light); }
.breadcrumb span { color: var(--text); }

/* Filter Bar */
.filter-bar {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--gray-border);
}
.filter-bar select {
    padding: 0.45rem 0.75rem;
    border: 1px solid var(--gray-border);
    border-radius: var(--radius);
    font-size: 0.85rem;
    color: var(--text);
}
.result-count { font-size: 0.85rem; color: var(--text-light); }

/* ============================================
   Trust Signals Bar
   ============================================ */
.trust-bar {
    background: var(--gray-bg);
    padding: 1.5rem 1rem;
    text-align: center;
}

.trust-items {
    display: flex;
    justify-content: center;
    gap: 3rem;
    flex-wrap: wrap;
}

.trust-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--text);
}
.trust-icon { color: var(--green-dark); font-size: 1.2rem; }

/* ============================================
   Promo Banner
   ============================================ */
.promo-banner {
    background: var(--green-dark);
    color: var(--white);
    text-align: center;
    padding: 0.6rem 1rem;
    font-size: 0.85rem;
}
.promo-banner a { color: var(--gold); text-decoration: underline; }

/* ============================================
   Search Form
   ============================================ */
.search-form {
    display: flex;
    gap: 0.5rem;
    max-width: 500px;
}

.search-form input[type="search"] {
    flex: 1;
    padding: 0.6rem 0.75rem;
    border: 1px solid var(--gray-border);
    border-radius: var(--radius);
    font-size: 0.9rem;
    font-family: var(--font);
}

/* ============================================
   Accessibility & Utility
   ============================================ */
.screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }

.text-center { text-align: center; }
.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mb-2 { margin-bottom: 2rem; }
.pull-right { float: right; }

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 768px) {
    h1 { font-size: 1.75rem; }
    h2 { font-size: 1.4rem; }
    h3 { font-size: 1.15rem; }
    .hero { padding: 2.5rem 1rem; }
    .hero h1 { font-size: 1.8rem; }
    .section { padding: 2rem 1rem; }
    .products-grid { grid-template-columns: repeat(2, 1fr); gap: 0.75rem; }
    .content-grid { grid-template-columns: 1fr; }
    .content-page { padding: 1.5rem 1rem; }
    .trust-items { gap: 1.5rem; }
    .footer-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 480px) {
    .products-grid { grid-template-columns: 1fr 1fr; gap: 0.5rem; }
    .product-card-body { padding: 0.75rem; }
    .product-card-title { font-size: 0.85rem; }
}
