/*
Theme Name: ToyWonderland
Theme URI: https://example.com/toywonderland
Author: Senior Full Stack Dev
Description: A colorful, playful WordPress theme for Kids Toy Stores.
Version: 1.1
License: GNU General Public License v2 or later
Text Domain: toywonderland
*/

:root {
    --toy-blue: #3B82F6;
    --toy-pink: #EC4899;
    --toy-yellow: #FACC15;
    --toy-dark: #1e293b;
    --toy-text: #334155;
}

/* =========================================
   1. GLOBAL TYPOGRAPHY & RESET
   ========================================= */
body {
    font-family: 'Nunito', sans-serif;
    color: var(--toy-text);
    background-color: #f8fafc;
    line-height: 1.6;
    margin: 0;
}

h1, h2, h3, h4, h5, h6, .font-heading {
    font-family: 'Fredoka', sans-serif;
    font-weight: 600;
    color: var(--toy-dark);
    line-height: 1.2;
    margin-bottom: 0.8em;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }

a { color: var(--toy-blue); text-decoration: none; font-weight: 700; transition: all 0.2s; }
a:hover { color: var(--toy-pink); }

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* =========================================
   2. WOOCOMMERCE STYLES (THE MAGIC)
   ========================================= */

/* Product Grid */
.woocommerce ul.products {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 2rem;
    padding: 0;
}

.woocommerce ul.products li.product {
    background: #fff;
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    transition: transform 0.2s, box-shadow 0.2s;
    text-align: center;
    list-style: none;
    width: 100% !important; /* Override Woo defaults */
    margin: 0 !important;
    box-sizing: border-box;
}

.woocommerce ul.products li.product:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px rgba(0,0,0,0.1);
}

.woocommerce ul.products li.product img {
    border-radius: 0.5rem;
    margin-bottom: 1rem;
    width: 100%;
    height: auto;
}

/* Product Titles & Prices */
.woocommerce-loop-product__title {
    font-size: 1.25rem !important;
    color: var(--toy-dark);
    margin-bottom: 0.5rem !important;
    font-family: 'Fredoka', sans-serif !important;
}

.woocommerce ul.products li.product .price {
    display: block;
    color: var(--toy-blue);
    font-weight: 800;
    font-size: 1.2rem;
    margin-bottom: 1rem;
}

.woocommerce ul.products li.product .price del {
    color: #94a3b8;
    font-size: 0.9rem;
    font-weight: normal;
    margin-right: 0.5rem;
}

/* Add to Cart Buttons */
.woocommerce ul.products li.product .button {
    background-color: var(--toy-yellow) !important;
    color: var(--toy-dark) !important;
    font-weight: 700 !important;
    padding: 0.75rem 1.5rem !important;
    border-radius: 999px !important;
    display: inline-block;
    transition: all 0.2s;
}

.woocommerce ul.products li.product .button:hover {
    background-color: var(--toy-pink) !important;
    color: white !important;
    transform: scale(1.05);
}

/* Sale Flash */
.woocommerce span.onsale {
    background-color: var(--toy-pink) !important;
    color: white !important;
    border-radius: 999px !important;
    padding: 0.25rem 0.75rem !important;
    font-weight: bold;
    font-size: 0.8rem;
    top: 1rem !important;
    left: 1rem !important;
    right: auto !important;
    min-height: auto !important;
    line-height: normal !important;
}

/* =========================================
   3. SINGLE POST & ARCHIVE STYLES
   ========================================= */
.post-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

article.post {
    background: white;
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

/* Forms & Inputs */
input[type="text"], input[type="email"], input[type="password"], textarea, select {
    border: 2px solid #e2e8f0;
    border-radius: 0.5rem;
    padding: 0.75rem;
    width: 100%;
    box-sizing: border-box;
    font-family: inherit;
}
input:focus {
    border-color: var(--toy-blue);
    outline: none;
}
                    