/*
Theme Name: TheCpuHub
Theme URI: https://www.thecpuhub.co.uk
Author: TheCpuHub
Author URI: https://www.thecpuhub.co.uk
Description: Custom WooCommerce theme for TheCpuHub - Epic Gaming Computers. Dark theme with cyan/pink gradient accents, designed to match the React web application.
Version: 2.1.1
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: thecpuhub
Tags: e-commerce, woocommerce, dark-theme, custom-colors, custom-logo, featured-images, threaded-comments

TheCpuHub WordPress Theme
Built for Victory - Epic Gaming Computers
*/

/* ==========================================================================
   CSS Variables - Color Palette from React App
   ========================================================================== */

:root {
    /* -- Brand Colors -- */
    --color-primary: #dc4f91;           /* Magenta/Pink - CTAs, buttons */
    --color-primary-hover: #c43f7e;     /* Darker magenta for hover */
    --color-secondary: #e9622a;         /* Orange - accents, hover states */
    --color-secondary-hover: #d4551f;   /* Darker orange for hover */

    /* -- Background Colors -- */
    --color-bg-dark: #101010;           /* Header, footer, dark sections */
    --color-bg-body: #ffffff;           /* Main body background */
    --color-bg-light: #f5f5f5;          /* Alternating section background */
    --color-bg-card: #ffffff;           /* Product cards */
    --color-bg-overlay: rgba(16, 16, 16, 0.85); /* Dark overlays */

    /* Legacy aliases (backwards compat for existing components) */
    --color-bg-primary: #101010;
    --color-bg-secondary: #1a1a1a;

    /* -- Text Colors -- */
    --color-text-dark: #1a1a1a;         /* Body text on white bg */
    --color-text-medium: #555555;       /* Secondary text on white bg */
    --color-text-light: #ffffff;        /* Text on dark backgrounds */
    --color-text-muted-light: #b0b0b0; /* Muted text on dark backgrounds */

    /* Legacy aliases */
    --color-text-primary: #f8fafc;
    --color-text-secondary: #e5e7eb;
    --color-text-muted: #b8bfc7;

    /* -- Accent Colors -- */
    --color-pink: #dc4f91;
    --color-pink-dark: #c43f7e;
    --color-orange: #e9622a;
    --color-green: #22c55e;
    --color-cyan: #22d3ee;              /* Keep for legacy, minimize use */

    /* -- Utility Colors -- */
    --color-success: #22c55e;
    --color-warning: #f59e0b;
    --color-trustpilot: #00b67a;

    /* -- Border Colors -- */
    --color-border: #e0e0e0;            /* Light borders on white bg */
    --color-border-dark: #333333;       /* Borders on dark bg */

    /* -- Gradients -- */
    --gradient-primary: linear-gradient(135deg, #dc4f91, #e9622a);
    --gradient-primary-hover: linear-gradient(135deg, #c43f7e, #d4551f);
    --gradient-dark: linear-gradient(180deg, #101010 0%, #1a1a1a 100%);
    --gradient-hero: linear-gradient(135deg, #101010 0%, #1a1020 50%, #101010 100%);
    --gradient-button: linear-gradient(135deg, #dc4f91, #e9622a);
    --gradient-button-hover: linear-gradient(135deg, #c43f7e, #d4551f);
    --gradient-hero-bg: linear-gradient(to right, rgba(220, 79, 145, 0.1), rgba(233, 98, 42, 0.1));

    /* -- Typography -- */
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-size-xs: 0.75rem;
    --font-size-sm: 0.875rem;
    --font-size-base: 1rem;
    --font-size-lg: 1.125rem;
    --font-size-xl: 1.25rem;
    --font-size-2xl: 1.5rem;
    --font-size-3xl: 2rem;
    --font-size-4xl: 2.5rem;
    --font-size-5xl: 3rem;

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

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

    /* -- Borders -- */
    --radius-none: 0;
    --radius-sm: 2px;
    --radius-md: 0;
    --radius-lg: 0;
    --radius-full: 9999px;

    /* -- Transitions -- */
    --transition-fast: 150ms ease;
    --transition-base: 250ms ease;
    --transition-normal: 300ms ease;
    --transition-slow: 400ms ease;

    /* -- Shadows -- */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
    --shadow-card-hover: 0 8px 30px rgba(220, 79, 145, 0.15);
}

/* ==========================================================================
   Reset & Base Styles
   ========================================================================== */

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

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-family);
    background-color: var(--color-bg-body);
    color: var(--color-text-dark);
    line-height: 1.6;
    min-height: 100vh;
}

/* Dark theme pages (shop, product, cart, checkout, static pages) keep dark bg */
body.shop-page,
body.product-page,
body.woocommerce-cart,
body.woocommerce-checkout,
body.woocommerce-account,
body.static-page {
    background-color: var(--color-bg-dark);
    color: var(--color-text-light);
}

/* ==========================================================================
   Typography
   ========================================================================== */

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.125rem; }
h6 { font-size: 1rem; }

@media (min-width: 768px) {
    h1 { font-size: 3.75rem; }
    h2 { font-size: 2.5rem; }
    h3 { font-size: 1.875rem; }
}

p {
    margin-bottom: 1rem;
    color: var(--color-text-medium);
}

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

a:hover {
    color: var(--color-secondary);
}

/* Gradient Text */
.text-gradient {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

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

.section {
    padding: 5rem 0;
}

@media (min-width: 768px) {
    .section {
        padding: 8rem 0;
    }
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 1.5rem;
    font-size: 1rem;
    font-weight: 500;
    min-height: 3rem;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
    border: none;
    text-decoration: none;
}

.btn-primary {
    background: var(--gradient-button);
    color: white;
    font-weight: 600;
    font-size: 1.125rem;
}

.btn-primary:hover {
    background: var(--gradient-button-hover);
    color: white;
}

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

.btn-outline:hover {
    background: rgba(220, 79, 145, 0.08);
    color: var(--color-primary);
}

/* Outline light variant for dark backgrounds */
.btn-outline-light {
    background: transparent;
    border: 2px solid white;
    color: white;
}

.btn-outline-light:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.125rem;
}

.btn-icon {
    padding: 0.75rem;
    width: 3rem;
    height: 3rem;
}

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

.card {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    overflow: hidden;
    transition: border-color var(--transition-normal), box-shadow var(--transition-normal);
}

.card:hover {
    border-color: var(--color-primary);
    box-shadow: var(--shadow-card-hover);
}

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

input,
textarea,
select {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    background: var(--color-bg-secondary);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    color: var(--color-text-primary);
    transition: border-color var(--transition-fast);
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--color-cyan);
}

input::placeholder,
textarea::placeholder {
    color: var(--color-text-muted);
}

/* ==========================================================================
   Custom Scrollbar
   ========================================================================== */

::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--color-bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--color-border);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #475569;
}

/* ==========================================================================
   Utilities
   ========================================================================== */

.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: 0.5rem; }
.gap-4 { gap: 1rem; }
.gap-6 { gap: 1.5rem; }
.gap-8 { gap: 2rem; }

.grid { display: grid; }
.grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
.grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

@media (min-width: 768px) {
    .md\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .md\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .md\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (min-width: 1024px) {
    .lg\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .lg\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* ==========================================================================
   Badge
   ========================================================================== */

.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: var(--radius-full);
}

.badge-success {
    background: var(--color-green);
    color: white;
}

.badge-pink {
    background: var(--color-pink);
    color: white;
}

/* ==========================================================================
   Price Display
   ========================================================================== */

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

.price-original {
    font-size: 0.875rem;
    color: var(--color-text-muted);
    text-decoration: line-through;
}

/* ==========================================================================
   Accessibility - Focus States
   ========================================================================== */

*:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

/* Remove outline on mouse click, keep for keyboard */
*:focus:not(:focus-visible) {
    outline: none;
}

/* ==========================================================================
   Accessibility - Reduced Motion
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* ==========================================================================
   Dark Page Text Readability (OLED halation reduction)
   ========================================================================== */

body.shop-page,
body.product-page,
body.woocommerce-cart,
body.woocommerce-checkout,
body.woocommerce-account,
body.static-page {
    color: #f0f0f0;
    letter-spacing: 0.01em;
}

/* ==========================================================================
   Mobile Touch Target Overrides
   ========================================================================== */

@media (max-width: 768px) {
    .btn-sm {
        padding: 0.875rem 1.5rem;
        font-size: 1rem;
        min-height: 3rem;
    }
}
