/*
Theme Name: Evolvian Starter
Theme URI: https://evolvian.com
Author: Evolvian
Author URI: https://evolvian.com
Description: A modern starter theme designed for Evolvian Commerce subscription products.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 8.0
License: GPL v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: evolvian-starter
*/

/* ============================================
   CSS Variables
============================================ */
:root {
    --primary: #6c5ce7;
    --primary-dark: #5b4cdb;
    --secondary: #a55eea;
    --accent: #00d2d3;
    --success: #00b894;
    --warning: #fdcb6e;
    --danger: #e74c3c;
    --dark: #1a1a2e;
    --darker: #0f0f1a;
    --light: #f8f9fa;
    --gray: #6c757d;
    --gray-light: #e9ecef;
    --white: #ffffff;
    --gradient: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    --gradient-dark: linear-gradient(135deg, #1a1a2e 0%, #2d2d44 100%);
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.15);
    --radius: 12px;
    --radius-sm: 8px;
    --transition: all 0.3s ease;
}

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

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 16px;
    line-height: 1.7;
    color: var(--dark);
    background: var(--light);
}

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

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

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

/* ============================================
   Typography
============================================ */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.3;
    color: var(--dark);
    margin-bottom: 1rem;
}

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

p {
    margin-bottom: 1rem;
}

/* ============================================
   Layout
============================================ */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.container-narrow {
    max-width: 800px;
}

.container-wide {
    max-width: 1400px;
}

/* ============================================
   Header
============================================ */
.site-header {
    background: var(--white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 0;
}

.site-logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--dark);
}

.site-logo span {
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Navigation */
.main-nav ul {
    display: flex;
    list-style: none;
    gap: 30px;
}

.main-nav a {
    color: var(--dark);
    font-weight: 500;
    padding: 10px 0;
    position: relative;
}

.main-nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient);
    transition: var(--transition);
}

.main-nav a:hover::after,
.main-nav .current-menu-item a::after {
    width: 100%;
}

/* Header Actions */
.header-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.header-cart {
    position: relative;
    font-size: 1.2rem;
    color: var(--dark);
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--primary);
    color: var(--white);
    font-size: 0.7rem;
    font-weight: 600;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--dark);
}

/* ============================================
   Buttons
============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 28px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: var(--radius-sm);
    border: none;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}

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

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

.btn-secondary {
    background: var(--white);
    color: var(--dark);
    border: 2px solid var(--gray-light);
}

.btn-secondary:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.btn-dark {
    background: var(--dark);
    color: var(--white);
}

.btn-dark:hover {
    background: var(--darker);
    color: var(--white);
}

.btn-lg {
    padding: 16px 36px;
    font-size: 1.1rem;
}

.btn-sm {
    padding: 8px 18px;
    font-size: 0.9rem;
}

.btn-block {
    width: 100%;
}

/* ============================================
   Hero Section
============================================ */
.hero {
    background: var(--gradient-dark);
    color: var(--white);
    padding: 100px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="50" cy="50" r="40" fill="none" stroke="%236c5ce7" stroke-width="0.5" opacity="0.1"/></svg>');
    background-size: 100px;
    opacity: 0.5;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    margin: 0 auto;
}

.hero h1 {
    font-size: 3.5rem;
    color: var(--white);
    margin-bottom: 1.5rem;
}

.hero p {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 2rem;
}

.hero-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
}

/* ============================================
   Cards
============================================ */
.card {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: var(--transition);
}

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

.card-image {
    aspect-ratio: 16/10;
    overflow: hidden;
}

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

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

.card-body {
    padding: 25px;
}

.card-title {
    font-size: 1.25rem;
    margin-bottom: 10px;
}

.card-text {
    color: var(--gray);
    margin-bottom: 15px;
}

/* ============================================
   Product Grid
============================================ */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    padding: 40px 0;
}

.product-card {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: var(--transition);
}

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

.product-image {
    position: relative;
    aspect-ratio: 1;
    overflow: hidden;
    background: var(--gray-light);
}

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

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

.product-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background: var(--gradient);
    color: var(--white);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.product-badge.sale {
    background: var(--danger);
}

.product-info {
    padding: 20px;
}

.product-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.product-title a {
    color: var(--dark);
}

.product-title a:hover {
    color: var(--primary);
}

.product-price {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 15px;
}

.product-price .period {
    font-size: 0.9rem;
    font-weight: 400;
    color: var(--gray);
}

.product-price del {
    color: var(--gray);
    font-weight: 400;
    margin-right: 8px;
}

.product-actions {
    display: flex;
    gap: 10px;
}

/* ============================================
   Single Product
============================================ */
.single-product {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    padding: 60px 0;
    max-width: 1200px;
    margin: 0 auto;
}

.product-gallery {
    position: sticky;
    top: 100px;
    height: fit-content;
}

.product-gallery img {
    width: 100%;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
}

.product-summary {
    padding: 20px 0;
}

.product-summary .product-title {
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.product-summary .product-price {
    font-size: 2rem;
    margin-bottom: 25px;
}

.product-excerpt {
    font-size: 1.1rem;
    color: var(--gray);
    margin-bottom: 30px;
    line-height: 1.8;
}

.subscription-details {
    background: var(--gradient);
    color: var(--white);
    padding: 20px 25px;
    border-radius: var(--radius-sm);
    margin-bottom: 30px;
}

.subscription-details p {
    margin: 5px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.subscription-details .icon {
    width: 20px;
    height: 20px;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
}

.add-to-cart-form {
    margin-bottom: 40px;
}

.add-to-cart-form .btn {
    padding: 18px 50px;
    font-size: 1.1rem;
}

.product-description {
    border-top: 1px solid var(--gray-light);
    padding-top: 40px;
}

.product-description h3 {
    margin-bottom: 20px;
}

/* ============================================
   Pricing Section
============================================ */
.pricing-section {
    padding: 80px 0;
    background: var(--light);
}

.pricing-header {
    text-align: center;
    margin-bottom: 50px;
}

.pricing-header h2 {
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.pricing-header p {
    font-size: 1.1rem;
    color: var(--gray);
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
    max-width: 1100px;
    margin: 0 auto;
}

.pricing-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 40px;
    text-align: center;
    box-shadow: var(--shadow);
    position: relative;
    transition: var(--transition);
}

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

.pricing-card.featured {
    border: 2px solid var(--primary);
    transform: scale(1.05);
}

.pricing-card.featured:hover {
    transform: scale(1.05) translateY(-5px);
}

.pricing-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--gradient);
    color: var(--white);
    padding: 5px 20px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
}

.pricing-name {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.pricing-price {
    font-size: 3rem;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 5px;
}

.pricing-price span {
    font-size: 1rem;
    font-weight: 400;
    color: var(--gray);
}

.pricing-description {
    color: var(--gray);
    margin-bottom: 30px;
}

.pricing-features {
    list-style: none;
    text-align: left;
    margin-bottom: 30px;
}

.pricing-features li {
    padding: 10px 0;
    border-bottom: 1px solid var(--gray-light);
    display: flex;
    align-items: center;
    gap: 10px;
}

.pricing-features li:last-child {
    border-bottom: none;
}

.pricing-features .check {
    color: var(--success);
    font-weight: bold;
}

.pricing-features .cross {
    color: var(--gray);
}

/* ============================================
   Features Section
============================================ */
.features-section {
    padding: 80px 0;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 40px;
}

.feature-card {
    text-align: center;
    padding: 30px;
}

.feature-icon {
    width: 80px;
    height: 80px;
    background: var(--gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 2rem;
    color: var(--white);
}

.feature-title {
    font-size: 1.25rem;
    margin-bottom: 10px;
}

.feature-text {
    color: var(--gray);
}

/* ============================================
   Footer
============================================ */
.site-footer {
    background: var(--dark);
    color: var(--white);
    padding: 60px 0 30px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-brand p {
    color: rgba(255, 255, 255, 0.7);
    margin-top: 15px;
}

.footer-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--white);
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
}

.footer-links a:hover {
    color: var(--white);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 30px;
    text-align: center;
    color: rgba(255, 255, 255, 0.5);
}

/* ============================================
   Forms
============================================ */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--dark);
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 12px 16px;
    font-size: 1rem;
    border: 2px solid var(--gray-light);
    border-radius: var(--radius-sm);
    transition: var(--transition);
    background: var(--white);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(108, 92, 231, 0.1);
}

.form-textarea {
    min-height: 120px;
    resize: vertical;
}

/* ============================================
   Cart & Checkout
============================================ */
.cart-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 30px;
}

.cart-table th,
.cart-table td {
    padding: 20px;
    text-align: left;
    border-bottom: 1px solid var(--gray-light);
}

.cart-table th {
    background: var(--light);
    font-weight: 600;
}

.cart-item-image {
    width: 80px;
    height: 80px;
    border-radius: var(--radius-sm);
    object-fit: cover;
}

.cart-item-name {
    font-weight: 600;
}

.cart-item-remove {
    color: var(--danger);
    cursor: pointer;
}

.cart-totals {
    background: var(--white);
    border-radius: var(--radius);
    padding: 30px;
    box-shadow: var(--shadow);
}

.cart-totals-row {
    display: flex;
    justify-content: space-between;
    padding: 15px 0;
    border-bottom: 1px solid var(--gray-light);
}

.cart-totals-row:last-child {
    border-bottom: none;
    font-size: 1.25rem;
    font-weight: 700;
}

/* ============================================
   Page Header
============================================ */
.page-header {
    background: var(--gradient-dark);
    color: var(--white);
    padding: 60px 0;
    text-align: center;
}

.page-header h1 {
    color: var(--white);
    margin-bottom: 10px;
}

.page-header p {
    color: rgba(255, 255, 255, 0.7);
}

.breadcrumb {
    margin-top: 20px;
}

.breadcrumb a {
    color: rgba(255, 255, 255, 0.7);
}

.breadcrumb a:hover {
    color: var(--white);
}

.breadcrumb span {
    color: rgba(255, 255, 255, 0.5);
    margin: 0 10px;
}

/* ============================================
   Utilities
============================================ */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mt-5 { margin-top: 3rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.mb-5 { margin-bottom: 3rem; }

.py-1 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.py-2 { padding-top: 1rem; padding-bottom: 1rem; }
.py-3 { padding-top: 1.5rem; padding-bottom: 1.5rem; }
.py-4 { padding-top: 2rem; padding-bottom: 2rem; }
.py-5 { padding-top: 3rem; padding-bottom: 3rem; }

.hidden { display: none; }
.visible { display: block; }

/* ============================================
   Responsive
============================================ */
@media (max-width: 1024px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .single-product {
        gap: 40px;
    }
}

@media (max-width: 768px) {
    h1 { font-size: 2.5rem; }
    h2 { font-size: 2rem; }
    h3 { font-size: 1.5rem; }
    
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .hero {
        padding: 60px 0;
    }
    
    .hero-buttons {
        flex-direction: column;
    }
    
    .main-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--white);
        box-shadow: var(--shadow);
        padding: 20px;
    }
    
    .main-nav.active {
        display: block;
    }
    
    .main-nav ul {
        flex-direction: column;
        gap: 15px;
    }
    
    .menu-toggle {
        display: block;
    }
    
    .single-product {
        grid-template-columns: 1fr;
        gap: 30px;
        padding: 40px 20px;
    }
    
    .product-gallery {
        position: static;
    }
    
    .product-summary .product-title {
        font-size: 1.8rem;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .pricing-card.featured {
        transform: none;
    }
    
    .pricing-card.featured:hover {
        transform: translateY(-5px);
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .products-grid {
        grid-template-columns: 1fr;
    }
    
    .btn-lg {
        padding: 14px 28px;
        font-size: 1rem;
    }
}

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

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

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

/* ============================================
   WordPress Specific
============================================ */
.wp-block-image img {
    border-radius: var(--radius);
}

.aligncenter {
    display: block;
    margin: 0 auto;
}

.alignleft {
    float: left;
    margin-right: 20px;
}

.alignright {
    float: right;
    margin-left: 20px;
}

.screen-reader-text {
    clip: rect(1px, 1px, 1px, 1px);
    position: absolute !important;
    height: 1px;
    width: 1px;
    overflow: hidden;
}

/* Admin bar adjustment */
body.admin-bar .site-header {
    top: 32px;
}

@media (max-width: 782px) {
    body.admin-bar .site-header {
        top: 46px;
    }
}
