/*
Theme Name: JerseyDo
Theme URI: https://jerseydo.com
Author: JerseyDo
Author URI: https://jerseydo.com
Description: Minimal, fast WooCommerce theme for Print-on-Demand store. SEO optimized, Google Merchant Center compliant, mobile-first design.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: jerseydo
Tags: e-commerce, woocommerce, minimal, custom-logo, custom-menu, featured-images, full-width-template, threaded-comments

WooCommerce tested up to: 9.6
*/

/* ============================================================
   JerseyDo Design System
   Minimal · Clean · Fast · SEO-Ready
   ============================================================ */

/* === CSS Custom Properties === */
:root {
    /* Colors */
    --jd-black: #111111;
    --jd-white: #ffffff;
    --jd-gray-50: #fafafa;
    --jd-gray-100: #f5f5f5;
    --jd-gray-200: #e5e5e5;
    --jd-gray-300: #d4d4d4;
    --jd-gray-400: #a3a3a3;
    --jd-gray-500: #737373;
    --jd-gray-600: #525252;
    --jd-gray-700: #404040;
    --jd-gray-800: #262626;
    --jd-gray-900: #171717;

    /* Accent - neutral for now, easy to change later */
    --jd-accent: #111111;
    --jd-accent-hover: #333333;

    /* Functional */
    --jd-success: #16a34a;
    --jd-error: #dc2626;
    --jd-warning: #f59e0b;
    --jd-info: #2563eb;

    /* Typography */
    --jd-font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --jd-font-mono: 'JetBrains Mono', 'Fira Code', monospace;

    /* Font sizes - fluid */
    --jd-text-xs: clamp(0.7rem, 0.65rem + 0.25vw, 0.75rem);
    --jd-text-sm: clamp(0.8rem, 0.75rem + 0.25vw, 0.875rem);
    --jd-text-base: clamp(0.9rem, 0.85rem + 0.25vw, 1rem);
    --jd-text-lg: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
    --jd-text-xl: clamp(1.15rem, 1rem + 0.5vw, 1.25rem);
    --jd-text-2xl: clamp(1.4rem, 1.2rem + 0.75vw, 1.5rem);
    --jd-text-3xl: clamp(1.7rem, 1.4rem + 1vw, 1.875rem);
    --jd-text-4xl: clamp(2rem, 1.5rem + 1.5vw, 2.25rem);
    --jd-text-5xl: clamp(2.5rem, 1.8rem + 2vw, 3rem);

    /* Spacing */
    --jd-space-xs: 0.25rem;
    --jd-space-sm: 0.5rem;
    --jd-space-md: 1rem;
    --jd-space-lg: 1.5rem;
    --jd-space-xl: 2rem;
    --jd-space-2xl: 3rem;
    --jd-space-3xl: 4rem;
    --jd-space-4xl: 6rem;

    /* Layout */
    --jd-container: 1280px;
    --jd-container-narrow: 960px;
    --jd-container-wide: 1440px;
    --jd-gutter: clamp(1rem, 3vw, 2rem);

    /* Borders */
    --jd-radius-sm: 4px;
    --jd-radius-md: 8px;
    --jd-radius-lg: 12px;
    --jd-radius-full: 9999px;

    /* Shadows */
    --jd-shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --jd-shadow-md: 0 4px 6px -1px rgba(0,0,0,0.07), 0 2px 4px -2px rgba(0,0,0,0.05);
    --jd-shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.08), 0 4px 6px -4px rgba(0,0,0,0.05);

    /* Transitions */
    --jd-transition: 200ms cubic-bezier(0.4, 0, 0.2, 1);
    --jd-transition-slow: 400ms cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    font-family: var(--jd-font-sans);
    font-size: var(--jd-text-base);
    line-height: 1.6;
    color: var(--jd-black);
    background: var(--jd-white);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

a {
    color: inherit;
    text-decoration: none;
    transition: color var(--jd-transition);
}

a:hover {
    color: var(--jd-gray-600);
}

ul, ol {
    list-style: none;
}

button, input, select, textarea {
    font: inherit;
    color: inherit;
}

button {
    cursor: pointer;
    border: none;
    background: none;
}

/* === Typography === */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

h1 { font-size: var(--jd-text-5xl); }
h2 { font-size: var(--jd-text-4xl); }
h3 { font-size: var(--jd-text-3xl); }
h4 { font-size: var(--jd-text-2xl); }
h5 { font-size: var(--jd-text-xl); }
h6 { font-size: var(--jd-text-lg); }

p {
    margin-bottom: var(--jd-space-md);
    color: var(--jd-gray-700);
}

/* === Layout === */
.jd-container {
    width: 100%;
    max-width: var(--jd-container);
    margin: 0 auto;
    padding: 0 var(--jd-gutter);
}

.jd-container--narrow {
    max-width: var(--jd-container-narrow);
}

.jd-container--wide {
    max-width: var(--jd-container-wide);
}

.jd-section {
    padding: var(--jd-space-4xl) 0;
}

.jd-grid {
    display: grid;
    gap: var(--jd-space-lg);
}

/* === Header === */
.jd-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--jd-white);
    border-bottom: 1px solid var(--jd-gray-200);
    transition: box-shadow var(--jd-transition);
}

.jd-header.scrolled {
    box-shadow: var(--jd-shadow-md);
}

.jd-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
    gap: var(--jd-space-xl);
}

.jd-header__logo {
    font-size: var(--jd-text-xl);
    font-weight: 700;
    letter-spacing: -0.03em;
    color: var(--jd-black);
    flex-shrink: 0;
}

.jd-header__logo img {
    height: 32px;
    width: auto;
}

.jd-header__logo:hover {
    color: var(--jd-black);
}

/* Navigation */
.jd-nav {
    display: flex;
    align-items: center;
    gap: var(--jd-space-lg);
}

.jd-nav__link {
    font-size: var(--jd-text-sm);
    font-weight: 500;
    color: var(--jd-gray-700);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: var(--jd-space-xs) 0;
    position: relative;
}

.jd-nav__link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--jd-black);
    transition: width var(--jd-transition);
}

.jd-nav__link:hover::after,
.jd-nav__link.active::after {
    width: 100%;
}

.jd-nav__link:hover {
    color: var(--jd-black);
}

/* Header actions */
.jd-header__actions {
    display: flex;
    align-items: center;
    gap: var(--jd-space-md);
}

.jd-header__action {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    color: var(--jd-gray-700);
    transition: color var(--jd-transition);
}

.jd-header__action:hover {
    color: var(--jd-black);
}

.jd-header__action svg {
    width: 20px;
    height: 20px;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.5;
}

.jd-cart-count {
    position: absolute;
    top: 2px;
    right: 2px;
    background: var(--jd-black);
    color: var(--jd-white);
    font-size: 10px;
    font-weight: 600;
    width: 16px;
    height: 16px;
    border-radius: var(--jd-radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Mobile menu toggle */
.jd-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    width: 24px;
    padding: 4px 0;
}

.jd-menu-toggle span {
    display: block;
    width: 100%;
    height: 1.5px;
    background: var(--jd-black);
    transition: var(--jd-transition);
}

/* Announcement bar */
.jd-announcement {
    background: var(--jd-black);
    color: var(--jd-white);
    text-align: center;
    padding: var(--jd-space-sm) var(--jd-gutter);
    font-size: var(--jd-text-xs);
    font-weight: 500;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

/* === Footer === */
.jd-footer {
    background: var(--jd-gray-50);
    border-top: 1px solid var(--jd-gray-200);
    padding: var(--jd-space-3xl) 0 var(--jd-space-xl);
}

.jd-footer__grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: var(--jd-space-2xl);
    margin-bottom: var(--jd-space-2xl);
}

.jd-footer__brand {
    font-size: var(--jd-text-lg);
    font-weight: 700;
    margin-bottom: var(--jd-space-md);
}

.jd-footer__desc {
    font-size: var(--jd-text-sm);
    color: var(--jd-gray-500);
    line-height: 1.7;
    max-width: 300px;
}

.jd-footer__heading {
    font-size: var(--jd-text-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--jd-gray-400);
    margin-bottom: var(--jd-space-md);
}

.jd-footer__links {
    display: flex;
    flex-direction: column;
    gap: var(--jd-space-sm);
}

.jd-footer__links a {
    font-size: var(--jd-text-sm);
    color: var(--jd-gray-600);
}

.jd-footer__links a:hover {
    color: var(--jd-black);
}

.jd-footer__bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: var(--jd-space-xl);
    border-top: 1px solid var(--jd-gray-200);
    font-size: var(--jd-text-xs);
    color: var(--jd-gray-400);
}

.jd-footer__payments {
    display: flex;
    gap: var(--jd-space-sm);
    align-items: center;
}

.jd-footer__payments svg {
    width: 36px;
    height: 24px;
    fill: var(--jd-gray-400);
}

/* === Buttons === */
.jd-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--jd-space-sm);
    padding: 12px 28px;
    font-size: var(--jd-text-sm);
    font-weight: 600;
    letter-spacing: 0.02em;
    border-radius: var(--jd-radius-sm);
    transition: all var(--jd-transition);
    white-space: nowrap;
}

.jd-btn--primary {
    background: var(--jd-black);
    color: var(--jd-white);
}

.jd-btn--primary:hover {
    background: var(--jd-gray-800);
    color: var(--jd-white);
}

.jd-btn--outline {
    background: transparent;
    color: var(--jd-black);
    border: 1.5px solid var(--jd-black);
}

.jd-btn--outline:hover {
    background: var(--jd-black);
    color: var(--jd-white);
}

.jd-btn--sm {
    padding: 8px 18px;
    font-size: var(--jd-text-xs);
}

.jd-btn--lg {
    padding: 16px 36px;
    font-size: var(--jd-text-base);
}

.jd-btn--full {
    width: 100%;
}

/* === Product Grid === */
.jd-products {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--jd-space-lg);
}

.jd-product-card {
    position: relative;
    display: flex;
    flex-direction: column;
}

.jd-product-card__image {
    position: relative;
    aspect-ratio: 1;
    overflow: hidden;
    background: var(--jd-gray-100);
    border-radius: var(--jd-radius-md);
    margin-bottom: var(--jd-space-md);
}

.jd-product-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--jd-transition-slow);
}

.jd-product-card:hover .jd-product-card__image img {
    transform: scale(1.04);
}

.jd-product-card__badge {
    position: absolute;
    top: var(--jd-space-sm);
    left: var(--jd-space-sm);
    background: var(--jd-black);
    color: var(--jd-white);
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 4px 10px;
    border-radius: var(--jd-radius-sm);
}

.jd-product-card__quick-add {
    position: absolute;
    bottom: var(--jd-space-sm);
    left: var(--jd-space-sm);
    right: var(--jd-space-sm);
    opacity: 0;
    transform: translateY(8px);
    transition: all var(--jd-transition);
}

.jd-product-card:hover .jd-product-card__quick-add {
    opacity: 1;
    transform: translateY(0);
}

.jd-product-card__title {
    font-size: var(--jd-text-sm);
    font-weight: 500;
    margin-bottom: var(--jd-space-xs);
    line-height: 1.4;
}

.jd-product-card__title a:hover {
    color: var(--jd-gray-600);
}

.jd-product-card__price {
    font-size: var(--jd-text-sm);
    font-weight: 600;
    color: var(--jd-black);
}

.jd-product-card__price del {
    color: var(--jd-gray-400);
    font-weight: 400;
    margin-right: var(--jd-space-xs);
}

.jd-product-card__price ins {
    text-decoration: none;
    color: var(--jd-error);
}

/* === Single Product === */
.jd-single-product {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--jd-space-3xl);
    padding: var(--jd-space-2xl) 0 var(--jd-space-4xl);
}

.jd-single-product__gallery {
    display: flex;
    flex-direction: column;
    gap: var(--jd-space-md);
}

.jd-single-product__main-image {
    aspect-ratio: 1;
    overflow: hidden;
    background: var(--jd-gray-100);
    border-radius: var(--jd-radius-md);
}

.jd-single-product__main-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.jd-single-product__thumbs {
    display: flex;
    gap: var(--jd-space-sm);
}

.jd-single-product__thumb {
    width: 72px;
    height: 72px;
    overflow: hidden;
    background: var(--jd-gray-100);
    border-radius: var(--jd-radius-sm);
    border: 2px solid transparent;
    cursor: pointer;
    transition: border-color var(--jd-transition);
}

.jd-single-product__thumb.active,
.jd-single-product__thumb:hover {
    border-color: var(--jd-black);
}

.jd-single-product__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.jd-single-product__info {
    display: flex;
    flex-direction: column;
    gap: var(--jd-space-lg);
}

.jd-single-product__title {
    font-size: var(--jd-text-3xl);
    font-weight: 600;
}

.jd-single-product__price {
    font-size: var(--jd-text-2xl);
    font-weight: 600;
}

.jd-single-product__desc {
    font-size: var(--jd-text-base);
    color: var(--jd-gray-600);
    line-height: 1.7;
}

.jd-single-product__meta {
    display: flex;
    flex-direction: column;
    gap: var(--jd-space-sm);
    font-size: var(--jd-text-sm);
    color: var(--jd-gray-500);
    padding-top: var(--jd-space-lg);
    border-top: 1px solid var(--jd-gray-200);
}

/* === Breadcrumbs (SEO) === */
.jd-breadcrumbs {
    padding: var(--jd-space-md) 0;
    font-size: var(--jd-text-xs);
    color: var(--jd-gray-400);
}

.jd-breadcrumbs a {
    color: var(--jd-gray-500);
}

.jd-breadcrumbs a:hover {
    color: var(--jd-black);
}

.jd-breadcrumbs span.separator {
    margin: 0 var(--jd-space-sm);
}

/* === Homepage Hero === */
.jd-hero {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 60vh;
    padding: var(--jd-space-4xl) var(--jd-gutter);
    background: var(--jd-gray-50);
}

.jd-hero__content {
    max-width: 640px;
}

.jd-hero__title {
    font-size: var(--jd-text-5xl);
    font-weight: 700;
    margin-bottom: var(--jd-space-lg);
    letter-spacing: -0.03em;
}

.jd-hero__subtitle {
    font-size: var(--jd-text-lg);
    color: var(--jd-gray-500);
    margin-bottom: var(--jd-space-xl);
    line-height: 1.7;
}

.jd-hero__actions {
    display: flex;
    gap: var(--jd-space-md);
    justify-content: center;
}

/* === Collections Grid === */
.jd-collections {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--jd-space-lg);
}

.jd-collection-card {
    position: relative;
    aspect-ratio: 4/5;
    overflow: hidden;
    border-radius: var(--jd-radius-md);
    background: var(--jd-gray-100);
}

.jd-collection-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--jd-transition-slow);
}

.jd-collection-card:hover img {
    transform: scale(1.04);
}

.jd-collection-card__overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: flex-end;
    padding: var(--jd-space-xl);
    background: linear-gradient(to top, rgba(0,0,0,0.6), transparent 60%);
}

.jd-collection-card__title {
    color: var(--jd-white);
    font-size: var(--jd-text-xl);
    font-weight: 600;
}

/* === Page Content === */
.jd-page {
    padding: var(--jd-space-3xl) 0;
}

.jd-page__title {
    font-size: var(--jd-text-4xl);
    margin-bottom: var(--jd-space-xl);
}

.jd-page__content {
    max-width: var(--jd-container-narrow);
    line-height: 1.8;
    color: var(--jd-gray-700);
}

.jd-page__content h2 {
    margin: var(--jd-space-2xl) 0 var(--jd-space-md);
    font-size: var(--jd-text-2xl);
}

.jd-page__content h3 {
    margin: var(--jd-space-xl) 0 var(--jd-space-md);
    font-size: var(--jd-text-xl);
}

.jd-page__content ul, .jd-page__content ol {
    margin: var(--jd-space-md) 0;
    padding-left: var(--jd-space-xl);
}

.jd-page__content ul { list-style: disc; }
.jd-page__content ol { list-style: decimal; }

.jd-page__content li {
    margin-bottom: var(--jd-space-sm);
}

/* === 404 === */
.jd-404 {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 60vh;
}

.jd-404__code {
    font-size: 8rem;
    font-weight: 700;
    color: var(--jd-gray-200);
    line-height: 1;
}

/* === Search === */
.jd-search-form {
    display: flex;
    gap: var(--jd-space-sm);
    max-width: 480px;
}

.jd-search-form__input {
    flex: 1;
    padding: 12px 16px;
    border: 1.5px solid var(--jd-gray-300);
    border-radius: var(--jd-radius-sm);
    font-size: var(--jd-text-sm);
    transition: border-color var(--jd-transition);
}

.jd-search-form__input:focus {
    outline: none;
    border-color: var(--jd-black);
}

/* === Pagination === */
.jd-pagination {
    display: flex;
    justify-content: center;
    gap: var(--jd-space-sm);
    padding: var(--jd-space-2xl) 0;
}

.jd-pagination a,
.jd-pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    font-size: var(--jd-text-sm);
    font-weight: 500;
    border: 1px solid var(--jd-gray-200);
    border-radius: var(--jd-radius-sm);
    transition: all var(--jd-transition);
}

.jd-pagination a:hover {
    border-color: var(--jd-black);
    color: var(--jd-black);
}

.jd-pagination span.current {
    background: var(--jd-black);
    color: var(--jd-white);
    border-color: var(--jd-black);
}

/* === WooCommerce Overrides === */
.woocommerce-notices-wrapper .woocommerce-message {
    background: var(--jd-gray-50);
    border: 1px solid var(--jd-gray-200);
    border-left: 3px solid var(--jd-success);
    padding: var(--jd-space-md) var(--jd-space-lg);
    font-size: var(--jd-text-sm);
    border-radius: var(--jd-radius-sm);
}

.woocommerce-notices-wrapper .woocommerce-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-left: 3px solid var(--jd-error);
}

/* Star rating */
.star-rating {
    display: inline-flex;
    color: #fbbf24;
    font-size: var(--jd-text-sm);
}

/* Sale badge */
.onsale {
    background: var(--jd-black) !important;
    color: var(--jd-white) !important;
    font-size: 10px !important;
    font-weight: 600 !important;
    padding: 4px 10px !important;
    border-radius: var(--jd-radius-sm) !important;
    min-height: auto !important;
    line-height: 1.4 !important;
}

/* === Responsive === */
@media (max-width: 1024px) {
    .jd-products {
        grid-template-columns: repeat(3, 1fr);
    }

    .jd-footer__grid {
        grid-template-columns: 1fr 1fr;
        gap: var(--jd-space-xl);
    }

    .jd-single-product {
        gap: var(--jd-space-2xl);
    }
}

@media (max-width: 768px) {
    .jd-header__inner {
        height: 56px;
    }

    .jd-nav {
        display: none;
    }

    .jd-nav.active {
        display: flex;
        flex-direction: column;
        position: fixed;
        top: 56px;
        left: 0;
        right: 0;
        bottom: 0;
        background: var(--jd-white);
        padding: var(--jd-space-xl) var(--jd-gutter);
        gap: var(--jd-space-lg);
        z-index: 999;
    }

    .jd-menu-toggle {
        display: flex;
    }

    .jd-products {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--jd-space-md);
    }

    .jd-single-product {
        grid-template-columns: 1fr;
        gap: var(--jd-space-xl);
    }

    .jd-collections {
        grid-template-columns: 1fr;
    }

    .jd-hero {
        min-height: 50vh;
        padding: var(--jd-space-2xl) var(--jd-gutter);
    }

    .jd-hero__actions {
        flex-direction: column;
        align-items: center;
    }

    .jd-footer__grid {
        grid-template-columns: 1fr;
    }

    .jd-footer__bottom {
        flex-direction: column;
        gap: var(--jd-space-md);
        text-align: center;
    }

    .jd-product-card__quick-add {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 480px) {
    .jd-products {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--jd-space-sm);
    }

    .jd-product-card__title {
        font-size: var(--jd-text-xs);
    }

    .jd-product-card__price {
        font-size: var(--jd-text-xs);
    }
}

/* === Skip to content (Accessibility) === */
.skip-to-content {
    position: absolute;
    top: -100%;
    left: var(--jd-space-md);
    background: var(--jd-black);
    color: var(--jd-white);
    padding: var(--jd-space-sm) var(--jd-space-md);
    z-index: 10000;
    font-size: var(--jd-text-sm);
    border-radius: 0 0 var(--jd-radius-sm) var(--jd-radius-sm);
}

.skip-to-content:focus {
    top: 0;
    color: var(--jd-white);
}

/* === Screen reader only === */
.screen-reader-text {
    clip: rect(1px, 1px, 1px, 1px);
    position: absolute !important;
    height: 1px;
    width: 1px;
    overflow: hidden;
    word-wrap: normal !important;
}
