<?php
/**
 * Custom WooCommerce Theme - Built from Scratch
 * Modern, clean design with full WooCommerce integration
 */

// ==============================================
// 1. STYLE.CSS (Main Theme Stylesheet)
// ==============================================
?>

/*
Theme Name: Modern WooCommerce
Description: Custom WooCommerce theme built from scratch
Version: 1.0.0
Author: Custom Theme
*/

/* ==============================================
   CSS RESET & BASE STYLES
   ============================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #1a1a1a;
    --secondary: #6366f1;
    --accent: #f59e0b;
    --success: #10b981;
    --danger: #ef4444;
    --white: #ffffff;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    --radius: 8px;
    --radius-lg: 12px;
    --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

html {
    font-size: 16px;
    line-height: 1.5;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background: var(--gray-50);
    color: var(--gray-900);
    font-weight: 400;
}

img {
    max-width: 100%;
    height: auto;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

button {
    cursor: pointer;
    border: none;
    background: none;
    font-family: inherit;
}

/* ==============================================
   LAYOUT & CONTAINERS
   ============================================== */

.site-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.site-header {
    background: var(--white);
    border-bottom: 1px solid var(--gray-200);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 80px;
}

.site-logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
}

.main-nav ul {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.main-nav a {
    color: var(--gray-700);
    font-weight: 500;
    transition: var(--transition);
}

.main-nav a:hover {
    color: var(--secondary);
}

.header-cart {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.cart-icon {
    position: relative;
    padding: 0.5rem;
    color: var(--gray-700);
    transition: var(--transition);
}

.cart-icon:hover {
    color: var(--secondary);
}

.cart-count {
    position: absolute;
    top: 0;
    right: 0;
    background: var(--secondary);
    color: var(--white);
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.site-main {
    flex: 1;
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
    width: 100%;
}

.site-footer {
    background: var(--gray-900);
    color: var(--gray-300);
    padding: 3rem 2rem 2rem;
    margin-top: auto;
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    text-align: center;
}

/* ==============================================
   BUTTONS & FORMS
   ============================================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius);
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
    border: 1px solid transparent;
    font-size: 0.875rem;
    line-height: 1;
}

.btn-primary {
    background: var(--secondary);
    color: var(--white);
}

.btn-primary:hover {
    background: #5856eb;
    transform: translateY(-1px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: var(--white);
    color: var(--gray-700);
    border-color: var(--gray-300);
}

.btn-secondary:hover {
    background: var(--gray-50);
    border-color: var(--gray-400);
}

.btn-outline {
    background: transparent;
    color: var(--secondary);
    border-color: var(--secondary);
}

.btn-outline:hover {
    background: var(--secondary);
    color: var(--white);
}

.form-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius);
    font-size: 0.875rem;
    transition: var(--transition);
    background: var(--white);
}

.form-input:focus {
    outline: none;
    border-color: var(--secondary);
    box-shadow: 0 0 0 3px rgb(99 102 241 / 0.1);
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--gray-700);
    font-size: 0.875rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

/* ==============================================
   WOOCOMMERCE SHOP PAGE
   ============================================== */

.woocommerce-shop-header {
    text-align: center;
    padding: 4rem 0;
    background: linear-gradient(135deg, var(--secondary), #8b5cf6);
    color: var(--white);
    margin: -2rem -2rem 3rem -2rem;
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

.shop-title {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 1rem;
    letter-spacing: -0.025em;
}

.shop-subtitle {
    font-size: 1.25rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
}

.shop-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}

.view-toggle {
    display: flex;
    gap: 0.5rem;
    background: var(--gray-100);
    padding: 0.25rem;
    border-radius: var(--radius);
}

.view-btn {
    padding: 0.5rem 1rem;
    border-radius: calc(var(--radius) - 2px);
    font-size: 0.875rem;
    font-weight: 500;
    transition: var(--transition);
    color: var(--gray-600);
}

.view-btn.active {
    background: var(--white);
    color: var(--gray-900);
    box-shadow: var(--shadow-sm);
}

.view-btn:hover:not(.active) {
    color: var(--gray-900);
}

.woocommerce-ordering select {
    padding: 0.5rem 1rem;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius);
    background: var(--white);
    font-size: 0.875rem;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.products-table {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.product-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 1px solid var(--gray-200);
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
}

.products-table .product-card {
    display: flex;
    align-items: center;
    padding: 1.5rem;
}

.products-table .product-card:hover {
    transform: translateY(-2px);
}

.product-image {
    position: relative;
    overflow: hidden;
    aspect-ratio: 1;
}

.products-table .product-image {
    width: 120px;
    height: 120px;
    margin-right: 1.5rem;
    border-radius: var(--radius);
    flex-shrink: 0;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.product-card:hover .product-image img {
    transform: scale(1.05);
}

.product-info {
    padding: 1.5rem;
}

.products-table .product-info {
    padding: 0;
    flex: 1;
}

.product-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--gray-900);
    line-height: 1.4;
}

.product-title:hover {
    color: var(--secondary);
}

.product-price {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--secondary);
    margin-bottom: 1rem;
}

.product-excerpt {
    color: var(--gray-600);
    font-size: 0.875rem;
    line-height: 1.5;
    margin-bottom: 1rem;
}

.add-to-cart-btn {
    width: 100%;
    padding: 0.75rem;
    background: var(--secondary);
    color: var(--white);
    border-radius: var(--radius);
    font-weight: 600;
    transition: var(--transition);
}

.add-to-cart-btn:hover {
    background: #5856eb;
}

.products-table .add-to-cart-btn {
    width: auto;
    padding: 0.5rem 1.5rem;
    margin-left: 1rem;
}
