/*
Theme Name: Devcogent Store
Description: Custom e-commerce theme for Devcogent digital products store, featuring modern design with black backgrounds and blue-cyan gradients.
Version: 1.0.0
Author: Devcogent
Text Domain: devcogent-store
Requires at least: 6.0
Tested up to: 6.8
Requires PHP: 7.2
*/

/* 
===== DEVCOGENT BRAND SYSTEM =====
Primary Colors:
- Background: #000000 (Pure Black)
- Text: #E1E1E6 (Light Gray)
- Accent Gradient: #295ad6 (Blue) to #34c6eb (Cyan)
- Typography: DM Sans
*/

/* CSS Custom Properties for Brand Colors */
:root {
    --color-primary-bg: #000000;
    --color-primary-text: #E1E1E6;
    --color-accent-blue: #295ad6;
    --color-accent-cyan: #34c6eb;
    --color-white: #ffffff;
    --color-gray-light: #f8f9fa;
    --color-gray-medium: #6c757d;
    --color-gray-dark: #343a40;
    
    /* Gradients */
    --gradient-primary: linear-gradient(135deg, var(--color-accent-blue), var(--color-accent-cyan));
    --gradient-subtle: linear-gradient(135deg, rgba(41, 90, 214, 0.1), rgba(52, 198, 235, 0.1));
    
    /* Typography */
    --font-primary: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-weight-normal: 400;
    --font-weight-medium: 500;
    --font-weight-semibold: 600;
    --font-weight-bold: 700;
    
    /* Spacing */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    --spacing-2xl: 3rem;
    --spacing-3xl: 4rem;
    
    /* Border Radius */
    --radius-sm: 0.25rem;
    --radius-md: 0.5rem;
    --radius-lg: 1rem;
    --radius-xl: 1.5rem;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.15);
    
    /* Backdrop Blur */
    --backdrop-blur-sm: blur(4px);
    --backdrop-blur-md: blur(8px);
    --backdrop-blur-lg: blur(12px);
}

/* Base Styles */
body {
    font-family: var(--font-primary);
    background-color: var(--color-primary-bg);
    color: var(--color-primary-text);
    line-height: 1.6;
    font-weight: var(--font-weight-normal);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

/* Ensure no unexpected margins */
html {
    margin: 0;
    padding: 0;
}

/* WordPress admin bar adjustment */
body.admin-bar .wp-block-group.alignfull {
    margin-top: 0;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-primary);
    font-weight: var(--font-weight-bold);
    color: var(--color-white);
    margin: 0 0 var(--spacing-md) 0;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

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; }

p {
    margin: 0 0 var(--spacing-md) 0;
    color: var(--color-primary-text);
}

/* Links */
a {
    color: var(--color-accent-cyan);
    text-decoration: none;
    transition: all 0.3s ease;
}

a:hover {
    color: var(--color-accent-blue);
    text-decoration: underline;
}

/* Buttons */
.wp-block-button__link,
.button,
.btn {
    background: var(--gradient-primary);
    color: var(--color-white);
    border: none;
    padding: var(--spacing-sm) var(--spacing-lg);
    border-radius: var(--radius-md);
    font-family: var(--font-primary);
    font-weight: var(--font-weight-semibold);
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-block;
    text-decoration: none;
}

.wp-block-button__link:hover,
.button:hover,
.btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    color: var(--color-white);
    text-decoration: none;
}

/* Glassmorphism Effects */
.glass-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: var(--backdrop-blur-md);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-lg);
    padding: var(--spacing-xl);
    box-shadow: var(--shadow-xl);
}

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

/* Utility Classes */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: var(--spacing-xs); }
.mb-2 { margin-bottom: var(--spacing-sm); }
.mb-3 { margin-bottom: var(--spacing-md); }
.mb-4 { margin-bottom: var(--spacing-lg); }
.mb-5 { margin-bottom: var(--spacing-xl); }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: var(--spacing-xs); }
.mt-2 { margin-top: var(--spacing-sm); }
.mt-3 { margin-top: var(--spacing-md); }
.mt-4 { margin-top: var(--spacing-lg); }
.mt-5 { margin-top: var(--spacing-xl); }

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

/* Grid System */
.grid {
    display: grid;
    gap: var(--spacing-lg);
}

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

/* Responsive Design */
@media (max-width: 768px) {
    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }
    
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    h3 { font-size: 1.5rem; }
    
    .container {
        padding: 0 var(--spacing-sm);
    }
}

/* WordPress Core Blocks Styling */
.wp-block-group {
    margin-bottom: var(--spacing-xl);
}

.wp-block-columns {
    gap: var(--spacing-lg);
}

.wp-block-image img {
    border-radius: var(--radius-md);
    max-width: 100%;
    height: auto;
}

/* Logo Styling */
.devcogent-logo img,
.custom-logo,
.devcogent-logo-header {
    height: 20px;
    width: auto;
    max-width: 100px;
    object-fit: contain;
    transform: scale(0.5);
    transform-origin: left center;
}

.devcogent-logo-link {
    display: inline-block;
    line-height: 1;
    text-decoration: none;
}

.devcogent-logo-link:hover {
    text-decoration: none;
    opacity: 0.9;
    transition: opacity 0.3s ease;
}

/* Specific targeting for header logo */
.devcogent-logo-link img.devcogent-logo-header,
img.devcogent-logo-header {
    height: 112px !important;
    width: auto !important;
    max-width: 560px !important;
    object-fit: contain !important;
    transform: none !important;
    transform-origin: left center !important;
}

/* Even more specific targeting */
a.devcogent-logo-link img {
    height: 112px !important;
    width: auto !important;
    max-width: 560px !important;
    transform: none !important;
    transform-origin: left center !important;
}

.wp-block-site-logo img {
    height: 20px;
    width: auto;
    max-width: 100px;
    object-fit: contain;
    transform: scale(0.5);
    transform-origin: left center;
}

.wp-block-site-logo {
    line-height: 1;
}

/* Footer Logo */
.devcogent-logo-footer img {
    height: 24px;
    width: auto;
    max-width: 120px;
    object-fit: contain;
}

/* Shopify Partners Badge */
.shopify-partner-badge {
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.shopify-partner-badge:hover {
    opacity: 1;
}

.shopify-partner-badge img {
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-sm);
}

/* Responsive Logo Adjustments */
@media (max-width: 768px) {
    .devcogent-logo img,
    .custom-logo,
    .devcogent-logo-header,
    .wp-block-site-logo img,
    .devcogent-logo-link img.devcogent-logo-header,
    img.devcogent-logo-header,
    a.devcogent-logo-link img {
        height: 88px !important;
        max-width: 440px !important;
        transform: none !important;
    }
    
    .devcogent-logo-footer img {
        height: 12px;
        max-width: 60px;
        transform: scale(0.6);
    }
    
    .shopify-partner-badge img {
        width: 150px !important;
    }
}

/* Full Width Header and Footer */
.wp-block-group.alignfull {
    width: 100vw;
    max-width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
}

/* Site Header */
.site-header,
header.wp-block-group {
    position: relative;
    z-index: 100;
}

/* Site Footer */
.site-footer,
footer.wp-block-group {
    margin-top: auto;
}

/* Navigation */
.wp-block-navigation {
    font-family: var(--font-primary);
    font-weight: var(--font-weight-medium);
}

.wp-block-navigation-link a {
    color: var(--color-primary-text);
    transition: color 0.3s ease;
}

.wp-block-navigation-link a:hover {
    color: var(--color-accent-cyan);
}

/* Hide WooCommerce auto-generated account links from main navigation */
.wp-block-navigation .woocommerce-MyAccount-navigation,
.wp-block-navigation .wc-block-customer-account,
.wp-block-navigation a[href*="my-account"]:not(.header-account-link) {
    display: none !important;
}

/* Hide WooCommerce customer account block completely */
.wp-block-woocommerce-customer-account {
    display: none !important;
}

/* Hero Section */
.hero-section {
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: var(--spacing-3xl) 0;
    background: radial-gradient(circle at 50% 50%, rgba(41, 90, 214, 0.1) 0%, transparent 70%);
}

/* Product Grid */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-xl);
    margin: var(--spacing-xl) 0;
}

.product-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

/* Footer */
.site-footer {
    background: rgba(0, 0, 0, 0.9);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: var(--spacing-xl) 0;
    margin-top: var(--spacing-3xl);
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 0.6s ease-out;
}

/* 404 Page Specific Styles */
.error404 .gradient-text {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: pulse 2s ease-in-out infinite alternate;
}

@keyframes pulse {
    0% {
        opacity: 0.8;
        transform: scale(1);
    }
    100% {
        opacity: 1;
        transform: scale(1.02);
    }
}

.error404 .glass-card {
    backdrop-filter: var(--backdrop-blur-md);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.error404 .glass-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* 404 Page responsive adjustments */
@media (max-width: 768px) {
    .error404 h1 {
        font-size: 4rem !important;
    }
    
    .error404 h2 {
        font-size: 1.75rem !important;
    }
    
    .error404 .wp-block-columns {
        flex-direction: column;
    }
}

/* Themes Page Specific Styles */
.product-section {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.product-section:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

.product-section .button:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* Mobile Responsive for Themes Page */
@media (max-width: 768px) {
    .product-section .grid-2 {
        grid-template-columns: 1fr !important;
        gap: 2rem !important;
    }
    
    .product-section {
        padding: 2rem 1rem !important;
        margin-bottom: 2rem !important;
    }
    
    .product-section h2 {
        font-size: 2rem !important;
    }
    
    .product-section p {
        font-size: 1rem !important;
    }
    
    .grid-3 {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
    }
    
    .container {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }
}

/* Performance Optimizations */
* {
    box-sizing: border-box;
}

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

/* Accessibility */
.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;
}

/* Focus States */
a:focus,
button:focus,
input:focus,
textarea:focus,
select:focus {
    outline: 2px solid var(--color-accent-cyan);
    outline-offset: 2px;
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    :root {
        --color-primary-text: #ffffff;
        --color-accent-blue: #4A90E2;
        --color-accent-cyan: #50E3C2;
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}