/* ==========================================================================
   HobbySport.es - Main Stylesheet
   Sport Equipment Comparison Store
   ========================================================================== */

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

:root {
    --hs-primary: #0066CC;
    --hs-primary-dark: #004C99;
    --hs-accent: #FF6600;
    --hs-accent-dark: #E55A00;
    --hs-text: #1A1A1A;
    --hs-text-light: #666666;
    --hs-bg: #FFFFFF;
    --hs-bg-light: #F5F7FA;
    --hs-border: #E0E0E0;
    --hs-success: #28A745;
    --hs-radius: 8px;
    --hs-shadow: 0 2px 8px rgba(0,0,0,0.08);
    --hs-shadow-hover: 0 4px 16px rgba(0,0,0,0.12);
    --hs-max-width: 1200px;
    --hs-font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

html { font-size: 16px; scroll-behavior: smooth; }
body {
    font-family: var(--hs-font);
    color: var(--hs-text);
    background: var(--hs-bg);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--hs-primary); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--hs-primary-dark); }

/* ---------- Container ---------- */
.hs-container {
    max-width: var(--hs-max-width);
    margin: 0 auto;
    padding: 0 20px;
}

/* ---------- Buttons ---------- */
.hs-btn {
    display: inline-block;
    padding: 12px 28px;
    border-radius: var(--hs-radius);
    font-weight: 600;
    font-size: 1rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
}
.hs-btn--primary {
    background: var(--hs-accent);
    color: #fff;
}
.hs-btn--primary:hover {
    background: var(--hs-accent-dark);
    color: #fff;
    transform: translateY(-1px);
}
.hs-btn--secondary {
    background: var(--hs-bg-light);
    color: var(--hs-text);
    border: 1px solid var(--hs-border);
}
.hs-btn--secondary:hover {
    background: var(--hs-border);
    color: var(--hs-text);
}
.hs-btn--large {
    padding: 16px 36px;
    font-size: 1.1rem;
}

/* ---------- Header ---------- */
.hs-header {
    background: var(--hs-bg);
    border-bottom: 1px solid var(--hs-border);
    position: sticky;
    top: 0;
    z-index: 100;
}
.hs-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    gap: 20px;
}
.hs-logo-link {
    display: flex;
    align-items: center;
    text-decoration: none;
}
.hs-logo-link:hover { opacity: 0.85; }
.hs-logo-img {
    height: 44px;
    width: auto;
}
.hs-logo-text {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.5px;
}
.hs-logo-text__hobby { color: var(--hs-primary); }
.hs-logo-text__sport { color: var(--hs-accent); }
.hs-logo-text:hover { color: inherit; }

/* Navigation */
.hs-nav-list {
    list-style: none;
    display: flex;
    gap: 8px;
    align-items: center;
}
.hs-nav-list a {
    display: block;
    padding: 8px 16px;
    color: var(--hs-text);
    font-weight: 500;
    border-radius: var(--hs-radius);
    transition: background 0.2s;
}
.hs-nav-list a:hover {
    background: var(--hs-bg-light);
    color: var(--hs-primary);
}

/* Dropdown */
.hs-nav-list .menu-item-has-children { position: relative; }
.hs-nav-list .sub-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--hs-bg);
    border: 1px solid var(--hs-border);
    border-radius: var(--hs-radius);
    box-shadow: var(--hs-shadow);
    min-width: 200px;
    padding: 8px 0;
    list-style: none;
    z-index: 200;
}
.hs-nav-list .menu-item-has-children:hover .sub-menu { display: block; }
.hs-nav-list .sub-menu a { padding: 8px 20px; border-radius: 0; }

/* Mobile toggle */
.hs-header__toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    flex-direction: column;
    gap: 5px;
}
.hs-header__toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--hs-text);
    transition: 0.3s;
}

/* ---------- Hero ---------- */
.hs-hero {
    background: linear-gradient(135deg, var(--hs-primary) 0%, #003D7A 100%);
    color: #fff;
    padding: 80px 0;
    text-align: center;
}
.hs-hero__title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 16px;
    letter-spacing: -0.5px;
}
.hs-hero__subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto 32px;
}

/* ---------- Section Titles ---------- */
.hs-section-title {
    font-size: 1.8rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 40px;
    color: var(--hs-text);
}

/* ---------- Categories Grid ---------- */
.hs-categories {
    padding: 60px 0;
    background: var(--hs-bg-light);
}
.hs-categories__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}
.hs-category-card {
    background: var(--hs-bg);
    border-radius: var(--hs-radius);
    overflow: hidden;
    box-shadow: var(--hs-shadow);
    transition: transform 0.2s, box-shadow 0.2s;
    color: var(--hs-text);
}
.hs-category-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--hs-shadow-hover);
    color: var(--hs-text);
}
.hs-category-card__image {
    aspect-ratio: 16/9;
    overflow: hidden;
    background: var(--hs-bg-light);
}
.hs-category-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.hs-category-card__info {
    padding: 20px;
}
.hs-category-card__info h3 {
    font-size: 1.2rem;
    margin-bottom: 4px;
}
.hs-category-card__count {
    color: var(--hs-text-light);
    font-size: 0.9rem;
}

/* ---------- Product Grid ---------- */
.hs-featured, .hs-shop {
    padding: 60px 0;
}
ul.products {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    padding: 0;
}

/* ---------- Product Card ---------- */
.hs-product-card {
    background: var(--hs-bg);
    border-radius: var(--hs-radius);
    overflow: hidden;
    box-shadow: var(--hs-shadow);
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
}
.hs-product-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--hs-shadow-hover);
}
.hs-product-card__link {
    display: block;
    color: var(--hs-text);
    flex: 1;
}
.hs-product-card__link:hover { color: var(--hs-text); }
.hs-product-card__image {
    aspect-ratio: 1;
    overflow: hidden;
    background: var(--hs-bg-light);
}
.hs-product-card__image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 16px;
}
.hs-product-card__info {
    padding: 16px;
}
.hs-product-card__title {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 4px;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.hs-product-card__cat {
    font-size: 0.8rem;
    color: var(--hs-text-light);
    display: block;
    margin-bottom: 8px;
}
.hs-product-card__cat a { color: var(--hs-text-light); }
.hs-product-card__price {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--hs-primary);
}
.hs-product-card__price .woocommerce-Price-currencySymbol { font-size: 0.9rem; }
.hs-product-card__cta, .hs-product-cta {
    display: block;
    text-align: center;
    padding: 12px 16px;
    background: var(--hs-accent);
    color: #fff;
    font-weight: 600;
    font-size: 0.9rem;
    transition: background 0.2s;
}
.hs-product-card__cta:hover, .hs-product-cta:hover {
    background: var(--hs-accent-dark);
    color: #fff;
}

/* ---------- Shop Page ---------- */
.hs-shop__header {
    margin-bottom: 40px;
}
.hs-shop__title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 12px;
}
.hs-shop__description {
    color: var(--hs-text-light);
    font-size: 1.05rem;
    max-width: 700px;
    margin-bottom: 20px;
}
.hs-shop__subcats {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.hs-tag {
    display: inline-block;
    padding: 6px 16px;
    background: var(--hs-bg-light);
    border: 1px solid var(--hs-border);
    border-radius: 20px;
    font-size: 0.85rem;
    color: var(--hs-text);
    transition: all 0.2s;
}
.hs-tag:hover {
    background: var(--hs-primary);
    color: #fff;
    border-color: var(--hs-primary);
}

/* ---------- Single Product ---------- */
.hs-external-buy {
    margin: 24px 0;
    padding: 24px;
    background: var(--hs-bg-light);
    border-radius: var(--hs-radius);
    text-align: center;
}
.hs-external-buy__price {
    font-size: 2rem;
    font-weight: 800;
    color: var(--hs-primary);
    margin-bottom: 16px;
}
.hs-external-buy__button {
    width: 100%;
    max-width: 400px;
    margin-bottom: 12px;
}
.hs-external-buy__note {
    font-size: 0.85rem;
    color: var(--hs-text-light);
}

/* ---------- Trust Section ---------- */
.hs-trust {
    padding: 60px 0;
    background: var(--hs-bg-light);
}
.hs-trust__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
    text-align: center;
}
.hs-trust__icon {
    font-size: 2.5rem;
    display: block;
    margin-bottom: 12px;
}
.hs-trust__item h3 {
    font-size: 1.1rem;
    margin-bottom: 8px;
}
.hs-trust__item p {
    color: var(--hs-text-light);
    font-size: 0.9rem;
}

/* ---------- Breadcrumbs ---------- */
.hs-breadcrumb {
    padding: 16px 0;
    font-size: 0.85rem;
    color: var(--hs-text-light);
}
.hs-breadcrumb a { color: var(--hs-text-light); }
.hs-breadcrumb a:hover { color: var(--hs-primary); }

/* ---------- Page Template ---------- */
.hs-page {
    padding: 40px 0 80px;
}
.hs-page__title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 24px;
}
.hs-page__body {
    max-width: 800px;
    line-height: 1.8;
}
.hs-page__body h2 {
    font-size: 1.5rem;
    margin: 32px 0 16px;
}
.hs-page__body h3 {
    font-size: 1.2rem;
    margin: 24px 0 12px;
}
.hs-page__body p {
    margin-bottom: 16px;
}
.hs-page__body ul, .hs-page__body ol {
    margin: 0 0 16px 24px;
}
.hs-page__body li {
    margin-bottom: 6px;
}

/* ---------- 404 ---------- */
.hs-404 {
    text-align: center;
    padding: 100px 0;
}
.hs-404__content h1 {
    font-size: 3rem;
    margin-bottom: 16px;
}
.hs-404__content p {
    font-size: 1.1rem;
    color: var(--hs-text-light);
    margin-bottom: 32px;
}
.hs-404__actions {
    display: flex;
    gap: 16px;
    justify-content: center;
}

/* ---------- Footer ---------- */
.hs-footer {
    background: #1A1A1A;
    color: #CCC;
    padding: 60px 0 0;
}
.hs-footer a { color: #CCC; }
.hs-footer a:hover { color: #fff; }
.hs-footer__grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    padding-bottom: 40px;
}
.hs-footer__heading {
    color: #fff;
    font-size: 1rem;
    margin-bottom: 16px;
}
.hs-footer__about p {
    font-size: 0.9rem;
    line-height: 1.6;
}
.hs-footer ul {
    list-style: none;
}
.hs-footer ul li {
    margin-bottom: 8px;
}
.hs-footer ul a {
    font-size: 0.9rem;
}
.hs-footer__bottom {
    border-top: 1px solid #333;
    padding: 20px 0;
    text-align: center;
    font-size: 0.85rem;
}
.hs-footer__address {
    font-size: 0.85rem;
    margin-top: 10px;
    color: #aaa;
    line-height: 1.5;
}
.hs-footer__disclaimer {
    margin-top: 8px;
    font-size: 0.8rem;
    color: #888;
}

/* ---------- Pagination ---------- */
.woocommerce-pagination {
    margin-top: 40px;
    text-align: center;
}
.woocommerce-pagination ul {
    list-style: none;
    display: inline-flex;
    gap: 4px;
}
.woocommerce-pagination ul li a,
.woocommerce-pagination ul li span {
    display: inline-block;
    padding: 8px 14px;
    border-radius: var(--hs-radius);
    border: 1px solid var(--hs-border);
    font-weight: 500;
}
.woocommerce-pagination ul li span.current {
    background: var(--hs-primary);
    color: #fff;
    border-color: var(--hs-primary);
}

/* ---------- WooCommerce Overrides ---------- */
.woocommerce-notices-wrapper { margin-bottom: 20px; }
.woocommerce .products { margin: 0; }

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
    .hs-header__nav { display: none; }
    .hs-header__toggle { display: flex; }
    .hs-header__nav.is-open {
        display: block;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--hs-bg);
        border-bottom: 1px solid var(--hs-border);
        box-shadow: var(--hs-shadow);
        padding: 16px 20px;
    }
    .hs-header__nav.is-open .hs-nav-list {
        flex-direction: column;
        align-items: stretch;
    }
    .hs-header__nav.is-open .sub-menu {
        position: static;
        box-shadow: none;
        border: none;
        padding-left: 16px;
        display: block;
    }

    .hs-hero { padding: 48px 0; }
    .hs-hero__title { font-size: 1.8rem; }
    .hs-hero__subtitle { font-size: 1rem; }

    .hs-categories__grid,
    ul.products,
    .hs-trust__grid {
        grid-template-columns: 1fr;
    }
    ul.products { grid-template-columns: repeat(2, 1fr); gap: 12px; }

    .hs-footer__grid {
        grid-template-columns: 1fr 1fr;
        gap: 24px;
    }

    .hs-404__actions { flex-direction: column; align-items: center; }
}

@media (max-width: 480px) {
    ul.products { grid-template-columns: 1fr; }
    .hs-footer__grid { grid-template-columns: 1fr; }
}

/* ---------- Single Product Detail ---------- */
.hs-single-product {
    padding: 20px 0 80px;
}
.hs-product-detail {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    margin-bottom: 48px;
}
.hs-product-detail__image {
    background: var(--hs-bg-light);
    border-radius: var(--hs-radius);
    overflow: hidden;
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}
.hs-product-detail__image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    padding: 24px;
}
.hs-product-detail__cat {
    font-size: 0.85rem;
    color: var(--hs-text-light);
    display: block;
    margin-bottom: 8px;
}
.hs-product-detail__cat a { color: var(--hs-primary); }
.hs-product-detail__title {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 16px;
    line-height: 1.3;
}
.hs-product-detail__short-desc {
    color: var(--hs-text-light);
    font-size: 1rem;
    line-height: 1.7;
    margin-bottom: 24px;
}
.hs-product-detail__description {
    max-width: 800px;
    margin-bottom: 48px;
}
.hs-product-detail__description h2 {
    font-size: 1.4rem;
    margin-bottom: 16px;
}
.hs-product-detail__description p {
    margin-bottom: 12px;
    line-height: 1.7;
}
.hs-related {
    margin-top: 48px;
    padding-top: 48px;
    border-top: 1px solid var(--hs-border);
}

@media (max-width: 768px) {
    .hs-product-detail {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    .hs-product-detail__title { font-size: 1.4rem; }
}

/* ---------- Contact Form ---------- */
.hs-contact-form {
    max-width: 600px;
    margin: 24px 0 32px;
}
.hs-form-group {
    margin-bottom: 20px;
}
.hs-form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
    font-size: 0.95rem;
}
.hs-form-group input,
.hs-form-group select,
.hs-form-group textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--hs-border);
    border-radius: var(--hs-radius);
    font-family: var(--hs-font);
    font-size: 1rem;
    transition: border-color 0.2s;
}
.hs-form-group input:focus,
.hs-form-group select:focus,
.hs-form-group textarea:focus {
    outline: none;
    border-color: var(--hs-primary);
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
}

/* ---------- Search ---------- */
.hs-search-form {
    display: flex;
    gap: 8px;
    max-width: 500px;
    margin: 24px 0;
}
.hs-search-form__input {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid var(--hs-border);
    border-radius: var(--hs-radius);
    font-size: 1rem;
}
.hs-search-form__submit {
    padding: 10px 20px;
}
.hs-search-results { margin-top: 24px; }
.hs-search-result {
    padding: 20px 0;
    border-bottom: 1px solid var(--hs-border);
}
.hs-search-result h2 { font-size: 1.2rem; margin-bottom: 8px; }
.hs-search-result p { color: var(--hs-text-light); }
