/*
Theme Name: Auto365 Pneumatiky
Theme URI: https://auto365.sk
Author: EWEBY.EU
Author URI: https://eweby.eu
Description: Profesionalna WordPress tema pre e-shop s pneumatikami. Rychla, bezpecna a optimalizovana pre WooCommerce.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.4
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: auto365
Tags: e-commerce, woocommerce, custom-logo, custom-menu, featured-images, threaded-comments, translation-ready

Auto365 Pneumatiky Theme - Copyright 2024 EWEBY.EU
*/

/* ==========================================================================
   REDESIGN GUIDE FOR CLAUDE CODE
   ===========================================================================
   To completely redesign this site, edit ONLY these locations:

   1. COLORS: Change the CSS variables below in :root
      - --primary, --primary-dark, --primary-light, --primary-rgb
      - --secondary, --secondary-dark, --secondary-light, --secondary-dark-rgb, --secondary-rgb
      - --accent, --accent-dark, --accent-light, --accent-rgb
      - --text-primary, --text-secondary, --text-muted
      RGB channels MUST match their hex counterpart (e.g. #e63946 = 230, 57, 70)

   2. FONTS: Change TWO places:
      - --font-primary and --font-heading below
      - AUTO365_GOOGLE_FONTS_URL constant in functions.php (top of file)

   3. SPACING/RADIUS: Change --space-* and --radius-* variables below

   4. SHADOWS: Change --shadow-* variables below

   DO NOT touch: EU label colors, season colors, stock status colors
   (these are product-attribute semantic colors, not brand colors)
   ========================================================================== */

:root {
    /* Primary Colors */
    --primary: #e63946;
    --primary-dark: #b71c2a;
    --primary-light: #ff6b6b;
    --primary-rgb: 230, 57, 70;

    /* Secondary Colors - Deep Dark */
    --secondary: #1e293b;
    --secondary-dark: #0f172a;
    --secondary-light: #334155;
    --secondary-dark-rgb: 15, 23, 42;
    --secondary-rgb: 30, 41, 59;

    /* Accent Colors */
    --accent: #f59e0b;
    --accent-dark: #d97706;
    --accent-light: #fbbf24;
    --accent-rgb: 245, 158, 11;

    /* Neutral Colors */
    --white: #ffffff;
    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1e293b;
    --black: #000000;

    /* Semantic Colors */
    --success: #10b981;
    --warning: #f59e0b;
    --error: #ef4444;
    --info: #3b82f6;
    --info-rgb: 59, 130, 246;

    /* Text Colors */
    --text-primary: #1a1a2e;
    --text-secondary: #4a5568;
    --text-muted: #a0aec0;
    --text-on-dark: #ffffff;
    --text-on-dark-muted: rgba(255, 255, 255, 0.5);

    /* Background Colors */
    --bg-secondary: #f8f9fa;
    --border-light: #e9ecef;

    /* EU Label Colors (semantic - these stay consistent across themes) */
    --eu-fuel: #047857;
    --eu-fuel-bg: rgba(5, 150, 105, 0.12);
    --eu-fuel-border: rgba(5, 150, 105, 0.35);
    --eu-grip: #1d4ed8;
    --eu-grip-bg: rgba(37, 99, 235, 0.12);
    --eu-grip-border: rgba(37, 99, 235, 0.35);
    --eu-noise: #b45309;
    --eu-noise-bg: rgba(217, 119, 6, 0.12);
    --eu-noise-border: rgba(217, 119, 6, 0.35);

    /* Season Colors */
    --season-summer: #f59e0b;
    --season-summer-bg: linear-gradient(135deg, #fef3c7, #fde68a);
    --season-summer-border: #fcd34d;
    --season-winter: #3b82f6;
    --season-winter-bg: linear-gradient(135deg, #dbeafe, #bfdbfe);
    --season-winter-border: #93c5fd;
    --season-allseason: #8b5cf6;
    --season-allseason-bg: linear-gradient(135deg, #d1fae5, #a7f3d0);
    --season-allseason-border: #6ee7b7;

    /* Section Backgrounds (derived from brand colors) */
    --section-gray-bg: linear-gradient(180deg, var(--gray-100) 0%, var(--gray-200) 50%, var(--gray-100) 100%);
    --section-accent-bg: linear-gradient(135deg, rgba(var(--primary-rgb), 0.03) 0%, rgba(var(--primary-rgb), 0.05) 50%, rgba(var(--primary-rgb), 0.03) 100%);
    --section-accent-border: rgba(var(--primary-rgb), 0.08);
    --featured-section-bg: linear-gradient(180deg, var(--secondary-dark) 0%, rgba(var(--secondary-rgb), 0.85) 50%, var(--secondary-dark) 100%);

    /* Filter Bar Colors (derived from secondary) */
    --filter-bg: linear-gradient(135deg, var(--secondary-dark) 0%, var(--secondary-light) 100%);
    --filter-text: #ffffff;
    --filter-text-muted: rgba(255, 255, 255, 0.5);
    --filter-input-bg: rgba(255, 255, 255, 0.08);
    --filter-input-border: rgba(255, 255, 255, 0.15);
    --filter-option-bg: var(--secondary-dark);

    /* Gradients */
    --gradient-primary: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    --gradient-hero: linear-gradient(135deg, var(--secondary-dark) 0%, var(--secondary) 50%, var(--secondary-dark) 100%);
    --gradient-dark: linear-gradient(180deg, var(--secondary-dark) 0%, var(--secondary) 100%);
    --gradient-accent: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
    --gradient-card: linear-gradient(145deg, var(--white) 0%, var(--gray-50) 100%);
    --gradient-glow: linear-gradient(135deg, rgba(var(--primary-rgb), 0.15) 0%, rgba(var(--accent-rgb), 0.08) 100%);

    /* Primary RGBA (for shadows/glows - derived from --primary) */
    --primary-shadow: rgba(var(--primary-rgb), 0.3);
    --primary-shadow-hover: rgba(var(--primary-rgb), 0.45);

    /* Glow Effects */
    --glow-primary: 0 0 20px var(--primary-shadow);
    --glow-accent: 0 0 20px rgba(var(--accent-rgb), 0.3);

    /* Typography */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-heading: 'Poppins', var(--font-primary);

    /* Font Sizes */
    --text-xs: 0.75rem;
    --text-sm: 0.875rem;
    --text-base: 1rem;
    --text-lg: 1.125rem;
    --text-xl: 1.25rem;
    --text-2xl: 1.5rem;
    --text-3xl: 1.875rem;
    --text-4xl: 2.25rem;
    --text-5xl: 3rem;
    --text-6xl: 3.75rem;

    /* Spacing */
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-5: 1.25rem;
    --space-6: 1.5rem;
    --space-8: 2rem;
    --space-10: 2.5rem;
    --space-12: 3rem;
    --space-16: 4rem;
    --space-20: 5rem;
    --space-24: 6rem;

    /* Border Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-2xl: 1.5rem;
    --radius-full: 9999px;

    /* Shadows - More dramatic */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.07), 0 2px 4px -2px rgb(0 0 0 / 0.05);
    --shadow-lg: 0 10px 25px -5px rgb(0 0 0 / 0.1), 0 4px 10px -4px rgb(0 0 0 / 0.05);
    --shadow-xl: 0 20px 40px -8px rgb(0 0 0 / 0.12), 0 8px 16px -6px rgb(0 0 0 / 0.05);
    --shadow-2xl: 0 25px 50px -12px rgb(0 0 0 / 0.2);
    --shadow-card: 0 1px 3px rgb(0 0 0 / 0.06), 0 0 0 1px rgb(0 0 0 / 0.03);
    --shadow-card-hover: 0 20px 40px -8px rgb(0 0 0 / 0.12), 0 0 0 1px rgba(var(--primary-rgb), 0.1);

    /* Transitions */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 300ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 500ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-spring: 500ms cubic-bezier(0.34, 1.56, 0.64, 1);

    /* Container */
    --container-max: 1400px;
    --container-padding: 1.5rem;

    /* Header Height */
    --header-height: 80px;
    --header-height-mobile: 70px;
}

/* ==========================================================================
   Base Reset & Typography
   ========================================================================== */

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

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

body {
    font-family: var(--font-primary);
    font-size: var(--text-base);
    line-height: 1.6;
    color: var(--gray-800);
    background-color: var(--gray-50);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
    color: var(--secondary-dark);
    margin-bottom: var(--space-4);
}

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

p {
    margin-bottom: var(--space-4);
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--primary-dark);
}

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

ul, ol {
    list-style: none;
}

button, input, select, textarea {
    font-family: inherit;
    font-size: inherit;
}

/* ==========================================================================
   Layout Components
   ========================================================================== */

.container {
    width: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding-left: var(--container-padding);
    padding-right: var(--container-padding);
}

.container-fluid {
    width: 100%;
    padding-left: var(--container-padding);
    padding-right: var(--container-padding);
}

.row {
    display: flex;
    flex-wrap: wrap;
    margin-left: calc(var(--space-4) * -1);
    margin-right: calc(var(--space-4) * -1);
}

.col {
    flex: 1;
    padding-left: var(--space-4);
    padding-right: var(--space-4);
}

/* ==========================================================================
   Utility Classes
   ========================================================================== */

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: var(--space-2); }
.gap-4 { gap: var(--space-4); }
.gap-6 { gap: var(--space-6); }

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-6);
    font-family: var(--font-primary);
    font-size: var(--text-base);
    font-weight: 600;
    line-height: 1.5;
    text-align: center;
    text-decoration: none;
    border: 2px solid transparent;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-base);
    white-space: nowrap;
    position: relative;
    overflow: hidden;
    letter-spacing: 0.01em;
}

.btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.25);
}

.btn-primary {
    background: var(--gradient-primary);
    color: var(--white);
    border-color: transparent;
    box-shadow: 0 4px 15px rgba(var(--primary-rgb), 0.25);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(var(--primary-rgb), 0.35);
    color: var(--white);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background: var(--gradient-dark);
    color: var(--white);
    border-color: transparent;
    box-shadow: 0 4px 15px rgba(var(--secondary-dark-rgb), 0.2);
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(var(--secondary-dark-rgb), 0.3);
    color: var(--white);
}

.btn-outline {
    background-color: transparent;
    color: var(--primary);
    border-color: var(--primary);
}

.btn-outline:hover {
    background: var(--gradient-primary);
    color: var(--white);
    border-color: transparent;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(var(--primary-rgb), 0.3);
}

.btn-lg {
    padding: var(--space-4) var(--space-10);
    font-size: var(--text-lg);
    border-radius: var(--radius-lg);
}

.btn-sm {
    padding: var(--space-2) var(--space-4);
    font-size: var(--text-sm);
}

.btn-icon {
    width: 44px;
    height: 44px;
    padding: 0;
    border-radius: var(--radius-full);
}

/* ==========================================================================
   Forms
   ========================================================================== */

.form-group {
    margin-bottom: var(--space-4);
}

.form-label {
    display: block;
    margin-bottom: var(--space-2);
    font-weight: 500;
    color: var(--gray-700);
}

.form-control {
    width: 100%;
    padding: var(--space-3) var(--space-4);
    font-size: var(--text-base);
    line-height: 1.5;
    color: var(--gray-800);
    background-color: var(--white);
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-md);
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.15);
}

.form-control::placeholder {
    color: var(--gray-400);
}

select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%236c757d' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right var(--space-4) center;
    padding-right: var(--space-10);
}

/* ==========================================================================
   Product Filter - Shared
   ========================================================================== */

.pf-form {
    margin: 0;
}

.pf-fields {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px 16px;
    margin: 0;
    padding: 0;
}

.pf-field {
    min-width: 0;
}

.pf-select {
    display: block;
    width: 100%;
    padding: 10px 36px 10px 14px;
    border: 1.5px solid var(--gray-300);
    border-radius: 10px;
    background-color: var(--white);
    color: var(--text-primary);
    font-size: var(--text-sm);
    cursor: pointer;
    line-height: normal;
    transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
    -webkit-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%236c757d' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
}

.pf-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.1);
}

/* --- Homepage filter (light, inside hero) --- */
.pf-form-homepage .pf-fields {
    gap: var(--space-4);
    margin-bottom: var(--space-4);
}

.pf-form-homepage .pf-select {
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-lg);
    background-color: var(--gray-50);
    font-size: var(--text-base);
    height: 50px;
    padding: var(--space-3) 40px var(--space-3) var(--space-4);
    background-position: right var(--space-4) center;
}

.pf-form-homepage .pf-select:focus {
    background-color: var(--white);
}

.pf-form-homepage .pf-submit {
    width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: var(--space-4) var(--space-6);
    background: var(--gradient-primary);
    color: var(--white);
    border: none;
    border-radius: var(--radius-lg);
    font-weight: 700;
    font-size: var(--text-lg);
    cursor: pointer;
    transition: all 0.2s;
    height: 54px;
    letter-spacing: 0.02em;
    box-shadow: 0 4px 15px rgba(var(--primary-rgb), 0.3);
}

.pf-form-homepage .pf-submit:hover {
    box-shadow: 0 6px 25px rgba(var(--primary-rgb), 0.45);
    transform: translateY(-1px);
}

/* --- Archive filter (dark themed, inside filter bar) --- */
.pf-form-archive .pf-select {
    border-color: var(--filter-input-border);
    background-color: var(--filter-input-bg);
    color: var(--filter-text);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23ffffff' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E");
}

.pf-form-archive .pf-select:focus {
    background-color: rgba(255, 255, 255, 0.12);
    box-shadow: none;
}

.pf-form-archive .pf-select option {
    background: var(--filter-option-bg);
    color: var(--filter-text);
}

.pf-form-archive .pf-actions {
    display: flex;
    align-items: center;
    gap: 16px;
    padding-top: 10px;
    margin-top: 4px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.pf-form-archive .pf-submit {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    background: var(--gradient-primary);
    color: var(--text-on-dark);
    border: none;
    border-radius: 10px;
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s;
    box-shadow: 0 4px 15px var(--primary-shadow);
    letter-spacing: 0.3px;
}

.pf-form-archive .pf-submit:hover {
    box-shadow: 0 6px 20px var(--primary-shadow-hover);
    transform: translateY(-1px);
}

.pf-form-archive .pf-reset {
    color: var(--filter-text-muted);
    font-size: 13px;
    text-decoration: none;
    white-space: nowrap;
    flex-shrink: 0;
    border-color: var(--filter-input-border);
}

.pf-form-archive .pf-reset:hover {
    color: var(--filter-text);
    border-color: var(--filter-text-muted);
}

/* --- Active filter tags --- */
.pf-active-filters {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: var(--space-4);
}

.pf-active-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: rgba(var(--primary-rgb), 0.1);
    color: var(--primary);
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s;
}

.pf-active-tag:hover {
    background: rgba(var(--primary-rgb), 0.2);
}

.pf-active-tag svg {
    flex-shrink: 0;
    opacity: 0.7;
}

.pf-clear-all {
    font-size: 13px;
    color: var(--gray-500);
    text-decoration: none;
    margin-left: 4px;
}

.pf-clear-all:hover {
    color: var(--primary);
}

/* --- Filter responsive --- */
@media (max-width: 992px) {
    .pf-form-archive .pf-fields {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .pf-form-homepage .pf-fields {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .pf-form-archive .pf-fields {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   Cards
   ========================================================================== */

.card {
    background-color: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    overflow: hidden;
    transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
}

.card-image {
    position: relative;
    overflow: hidden;
    aspect-ratio: 1 / 1;
}

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

.card:hover .card-image img {
    transform: scale(1.05);
}

.card-body {
    padding: var(--space-4);
}

.card-title {
    font-size: var(--text-lg);
    margin-bottom: var(--space-2);
}

.card-text {
    color: var(--gray-600);
    margin-bottom: var(--space-3);
}

/* ==========================================================================
   Header Styles - Moved to main.css
   ========================================================================== */

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 1200px) {
    :root {
        --container-padding: 1rem;
    }
}

@media (max-width: 768px) {
    :root {
        --text-4xl: 2rem;
        --text-3xl: 1.5rem;
        --text-2xl: 1.25rem;
    }

    h1 { font-size: var(--text-3xl); }
    h2 { font-size: var(--text-2xl); }
}

@media (max-width: 480px) {
    :root {
        --container-padding: 0.75rem;
    }
}

/* ==========================================================================
   Global Overflow Fix - Prevent Horizontal Scroll
   ========================================================================== */

html,
body {
    overflow-x: hidden;
    max-width: 100%;
}

#page,
.site,
.site-main,
.site-content,
#main-content,
.site-footer {
    max-width: 100%;
    overflow-x: hidden;
}

/* Header - overflow visible for search overlay */
.site-header {
    max-width: 100%;
    overflow: visible;
}

/* Front page - hide wpautop-injected elements between sections (critical, render-blocking) */
.front-page > p,
.front-page > br {
    display: none;
}
