/*
Theme Name: TCG Store White
Theme URI: https://example.com/tcg-store-white
Author: Antigravity
Author URI: https://example.com
Description: A premium, light-themed WordPress theme designed specifically for functionality with TCG (Trading Card Game) stores. Features a high-contrast design, card-friendly grid layouts, and modern aesthetics.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
Text Domain: tcg-store-white
*/

:root {
    /* Color Palette - Light & Premium */
    --bg-primary: #ffffff;
    /* White */
    --bg-secondary: #f8fafc;
    /* Slate 50 */
    --bg-card: #ffffff;

    --text-primary: #0f172a;
    /* Slate 900 */
    --text-secondary: #475569;
    /* Slate 600 */
    --text-muted: #94a3b8;
    /* Slate 400 */

    --accent-color: #4f46e5;
    /* Indigo 600 - slightly darker for white bg */
    --accent-hover: #4338ca;
    /* Indigo 700 */
    --accent-glow: rgba(79, 70, 229, 0.2);

    --border-color: #e2e8f0;
    /* Slate 200 */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px 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);

    /* Spacing */
    --container-width: 1200px;
    --header-height: 80px;
    /* Updated to match GUI height */

    /* Typography */
    --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
}

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

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: var(--font-sans);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--accent-color);
    text-decoration: none;
    transition: color 0.2s ease;
}

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

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

/* =============================
   GUI Layout (TrollAndToad Style)
   ============================= */

/* 1. Top Announcement Bar */
.top-announcement-bar {
    background-color: #c2410c;
    /* Orange 700 - slightly darker for white theme contrast? No, keep brand orange */
    background-color: #f97316;
    /* Orange 500 */
    color: white;
    text-align: center;
    font-size: 0.85rem;
    font-weight: 600;
    padding: 0.5rem 1rem;
    z-index: 101;
    position: relative;
}

/* 2. Main Header (Light & Clean) */
.site-header {
    background-color: #ffffff;
    border-bottom: 1px solid var(--border-color);
    height: var(--header-height);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-sm);
}

.site-header .container {
    height: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-title a {
    color: #0f172a;
    font-weight: 800;
    font-size: 1.8rem;
    letter-spacing: -1px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: none;
    -webkit-text-fill-color: initial;
}

/* Logo icon simulation */
.site-title a::before {
    content: '';
    display: block;
    width: 32px;
    height: 32px;
    background-color: var(--accent-color);
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
}

/* 3. Search Bar */
.header-search {
    flex: 1;
    max-width: 600px;
    margin: 0 3rem;
}

.header-search form {
    display: flex;
    position: relative;
    width: 100%;
}

.header-search input[type="search"],
.header-search input[type="text"] {
    width: 100%;
    background-color: #f1f5f9;
    /* Slate 100 */
    border: 1px solid #cbd5e1;
    /* Slate 300 */
    color: #334155;
    padding: 0.7rem 1.2rem;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.2s ease;
}

.header-search input[type="search"]:focus,
.header-search input[type="text"]:focus {
    outline: none;
    background-color: white;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.header-search button[type="submit"] {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
    padding: 5px 10px;
    color: #64748b;
    transition: color 0.2s;
}

.header-search button[type="submit"]:hover {
    color: var(--accent-color);
}

/* 4. User Tools (Cart/Account) */
.main-navigation ul,
.main-navigation .menu {
    list-style: none;
    display: flex;
    gap: 1.5rem;
    margin: 0;
    padding: 0;
}

/* Mobile Header Responsiveness */
@media (max-width: 768px) {
    .site-header {
        height: auto;
        padding: 1rem 0;
    }

    .site-header .container {
        flex-direction: column;
        gap: 1rem;
    }

    .header-search {
        margin: 0;
        width: 100%;
        order: 2;
    }

    .site-title {
        order: 1;
        width: 100%;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .site-title a {
        font-size: 1.5rem;
    }

    .main-navigation {
        order: 3;
        width: 100%;
    }

    .main-navigation ul {
        justify-content: space-between;
        gap: 0.5rem;
    }

    .main-navigation a {
        font-size: 0.85rem;
    }
}

.main-navigation a {
    color: #475569;
    font-weight: 600;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.main-navigation a:hover {
    color: var(--accent-color);
}

.header-cart a {
    background-color: #f1f5f9;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    color: #334155 !important;
}

.header-cart .cart-count {
    background-color: var(--accent-color);
    color: white;
    font-size: 0.75rem;
    padding: 2px 6px;
    border-radius: 99px;
    margin-left: 5px;
}

/* 5. Game Nav Bar (Dark) */
.game-nav-bar {
    background-color: #1e293b;
    /* Keep dark for contrast/brand ID */
    border-bottom: 2px solid #0f172a;
    height: auto;
}

.game-nav-list {
    justify-content: center;
    padding: 0;
    list-style: none;
    display: flex;
    overflow-x: auto;
    margin: 0;
    gap: 0;
}

.game-link {
    color: #e2e8f0;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.95rem;
    padding: 1rem 1.5rem;
    letter-spacing: 0.5px;
    border-bottom: 3px solid transparent;
    display: block;
    white-space: nowrap;
}

.game-link:hover {
    background-color: #334155;
    color: white;
    border-bottom-color: var(--accent-color);
}

/* ===========================
   Hero Section - Light Premium
   =========================== */
.hero-section {
    position: relative;
    padding: 6rem 1rem;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    /* Light gradient */
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 3rem;
    border-radius: 20px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    box-shadow: inset 0 0 60px rgba(0, 0, 0, 0.03);
    /* Subtle inner shadow */
}

.hero-content {
    max-width: 800px;
    z-index: 2;
    position: relative;
    margin-bottom: 3rem;
}

.hero-title {
    font-size: clamp(2rem, 5vw, 4rem);
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    color: #0f172a;
    /* Dark text */
    word-break: keep-all;
}

.hero-title .highlight {
    background: linear-gradient(135deg, var(--accent-color) 0%, #818cf8 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin: 0 auto 2.5rem;
    max-width: 600px;
    line-height: 1.6;
    word-break: keep-all;
}

.hero-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

/* Hero Visuals (Floating Cards - maintain style but maybe softer shadow) */
.hero-visual {
    position: relative;
    width: 400px;
    height: 400px;
    z-index: 1;
}

.card-float {
    position: absolute;
    width: 180px;
    height: 260px;
    background: linear-gradient(145deg, #ffffff, #f1f5f9);
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    /* Softer shadow */
}

/* Animations same as before */
.card-1 {
    top: 20px;
    left: 20px;
    transform: rotate(-15deg);
    background: url('https://w.namu.la/s/72583842c06915e6115980753086eb26ed803a6bc1177695029e00125712128a1761d154425ec88aed409191d4e08bfdb0107a781b0f55aa91ce962135f6087798369654afb55f5f0b5d92ec35a297e5ad438995a9436d42df96ac4ec3843bbd') center/cover no-repeat;
    z-index: 1;
    animation: float-1 6s ease-in-out infinite;
}

.card-2 {
    top: 0;
    left: 140px;
    transform: rotate(5deg);
    background: url('https://w.namu.la/s/4c65e8b4e76020586e3f60851dccc59897262da3959c9535031b26284f2913b7e424260a927d3550e56cc8f6b0f69a571c46e4c278fd229a4ae1ebc26d2e6730761e38318260b0d3d517c2a71f76d21381275ca8f8c858564177d704ba713360') center/cover no-repeat;
    z-index: 2;
    animation: float-2 6s ease-in-out infinite 1s;
    border-color: var(--accent-color);
    box-shadow: 0 10px 30px rgba(79, 70, 229, 0.2);
}

.card-3 {
    top: 140px;
    left: 80px;
    transform: rotate(20deg);
    background: url('https://w.namu.la/s/be5c613e8787053e1a8775f0a3597d8487955c4d688cf7f45a0044ef0a6e60b1e427f715e7fc558af690f0b4d4b1a41857876a160d84f8d9515904deab36e654c600f92694b846e300ac7c20c4a457580b06b3a0e71361c4710df47291a27e7f') center/cover no-repeat;
    z-index: 3;
    animation: float-3 6s ease-in-out infinite 2s;
}

@keyframes float-1 {

    0%,
    100% {
        transform: rotate(-15deg) translateY(0);
    }

    50% {
        transform: rotate(-15deg) translateY(-20px);
    }
}

@keyframes float-2 {

    0%,
    100% {
        transform: rotate(5deg) translateY(0);
    }

    50% {
        transform: rotate(5deg) translateY(-20px);
    }
}

@keyframes float-3 {

    0%,
    100% {
        transform: rotate(20deg) translateY(0);
    }

    50% {
        transform: rotate(20deg) translateY(-20px);
    }
}

@media (max-width: 900px) {
    .hero-section {
        padding: 4rem 1rem;
    }

    .hero-visual {
        transform: scale(0.7);
        margin-top: -2rem;
    }
}

/* ===========================
   Featured Categories Grid
   =========================== */
.featured-categories {
    margin-bottom: 4rem;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    padding-left: 1rem;
    border-left: 4px solid var(--accent-color);
    color: var(--text-primary);
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
}

.cat-card {
    position: relative;
    height: 140px;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    align-items: center;
    padding: 1.5rem;
    text-decoration: none;
    border: 1px solid var(--border-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background-color: white;
    /* Light card bg */
    box-shadow: var(--shadow-sm);
}

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

.cat-content {
    z-index: 2;
    position: relative;
}

.cat-content h3 {
    font-size: 1.4rem;
    font-weight: 800;
    margin-bottom: 0.2rem;
    color: white;
    /* Text on images still white? No, images have overlay */
    /* Wait, cat-bg opacity is low in white theme? */
    /* In dark theme, opacity was 0.4. In light theme, if opacity 0.4 on white bg, image is faint. */
    /* Let's keep text white but make sure overlay is dark enough */
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
    /* Stronger shadow */
}

.shop-now {
    font-size: 0.85rem;
    color: var(--accent-color);
    background: rgba(255, 255, 255, 0.9);
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.cat-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    opacity: 0.8;
    /* Higher opacity for visibility */
    transition: transform 0.5s ease;
    background-size: cover;
    background-position: center;
    filter: brightness(0.6);
    /* Darken image for white text */
}

.cat-card:hover .cat-bg {
    transform: scale(1.1);
    filter: brightness(0.5);
}

/* Specific Category Backgrounds */
.cat-card.ygo .cat-bg {
    background-image: url('https://w.namu.la/s/72583842c06915e6115980753086eb26ed803a6bc1177695029e00125712128a1761d154425ec88aed409191d4e08bfdb0107a781b0f55aa91ce962135f6087798369654afb55f5f0b5d92ec35a297e5ad438995a9436d42df96ac4ec3843bbd');
}

.cat-card.pkm .cat-bg {
    background-image: url('https://w.namu.la/s/4c65e8b4e76020586e3f60851dccc59897262da3959c9535031b26284f2913b7e424260a927d3550e56cc8f6b0f69a571c46e4c278fd229a4ae1ebc26d2e6730761e38318260b0d3d517c2a71f76d21381275ca8f8c858564177d704ba713360');
}

.cat-card.mtg .cat-bg {
    background-color: #d97706;
}

.cat-card.acc .cat-bg {
    background-color: #64748b;
}


/* ===========================
   Shop Layout & Products
   =========================== */
.shop-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 2rem;
    align-items: start;
}

@media (max-width: 900px) {
    .shop-layout {
        grid-template-columns: 1fr;
    }
}

/* Sidebar Widgets */
.shop-sidebar .widget {
    background-color: white;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-sm);
}

.shop-sidebar .widget-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-primary);
}

/* Widget Lists */
.widget ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.widget ul li {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.widget ul li:last-child {
    border-bottom: none;
}

.widget ul li a {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.widget ul li a:hover {
    color: var(--accent-color);
}

/* Card Grid */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 2rem;
    padding: 2rem 0;
}

/* Product Card Style */
.product-card {
    background-color: white;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    position: relative;
    box-shadow: var(--shadow-sm);
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--accent-color);
}

.product-image {
    width: 100%;
    aspect-ratio: 2/3;
    object-fit: contain;
    background-color: #f1f5f9;
    /* Light gray background for images */
    padding: 10px;
    display: block;
}

.product-info {
    padding: 1rem;
}

.product-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.product-price {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--accent-color);
}

/* WooCommerce Overrides */
/* WooCommerce Overrides */
.woocommerce ul.products,
.woocommerce-page ul.products {
    display: flex !important;
    flex-wrap: wrap !important;
    padding: 0;
    margin: 0 -1rem;
    list-style: none;
}

.woocommerce ul.products li.product,
.woocommerce-page ul.products li.product {
    background-color: white;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 0;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
    display: flex !important;
    flex-direction: column !important;
    height: auto !important;
    /* Let flex control height */
    float: none !important;
    margin: 0 1rem 2rem 1rem !important;
    width: calc(25% - 2rem) !important;
}

/* Default 4 columns */


/* Responsive columns */
@media (max-width: 1024px) {

    .woocommerce ul.products li.product,
    .woocommerce-page ul.products li.product {
        width: calc(33.333% - 2rem);
    }
}

@media (max-width: 768px) {

    .woocommerce ul.products li.product,
    .woocommerce-page ul.products li.product {
        width: calc(50% - 2rem);
    }
}

@media (max-width: 480px) {

    /* 2 Columns on mobile for better conversion */
    .woocommerce ul.products li.product,
    .woocommerce-page ul.products li.product {
        width: calc(50% - 1rem) !important;
        margin: 0 0.5rem 1rem 0.5rem !important;
    }

    .woocommerce ul.products,
    .woocommerce-page ul.products {
        margin: 0 -0.5rem;
    }

    /* Smaller font sizes on mobile cards */
    .woocommerce ul.products li.product .woocommerce-loop-product__title {
        font-size: 0.9rem;
    }

    .woocommerce ul.products li.product .price {
        font-size: 0.95rem;
    }

    .woocommerce .button.add_to_cart_button {
        padding: 0.5rem;
        font-size: 0.85rem;
    }

    /* Hero adjustments */
    .hero-title {
        font-size: 2rem;
    }

    .hero-section {
        padding: 3rem 1rem;
    }
}

.woocommerce ul.products li.product:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.woocommerce ul.products li.product .woocommerce-loop-product__title {
    color: var(--text-primary);
    padding: 0.5rem 1rem 0;
    font-size: 1rem;
}

.woocommerce ul.products li.product .price {
    color: var(--accent-color);
    padding: 0 1rem 1rem;
    font-weight: bold;
}

.woocommerce ul.products li.product a img {
    border-radius: 12px 12px 0 0;
    margin-bottom: 0 !important;
    padding: 10px;
    background: #f8fafc;
    /* Light bg for images */
}

.woocommerce .button.add_to_cart_button {
    width: 100%;
    border-radius: 0 0 12px 12px;
    background-color: var(--accent-color);
    color: white;
    margin-top: auto !important;
}

.woocommerce .button.add_to_cart_button:hover {
    background-color: var(--accent-hover);
}

/* Buttons (Generic) */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background-color: var(--accent-color);
    color: white;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.2s ease;
}

.btn:hover {
    background-color: var(--accent-hover);
    box-shadow: 0 0 15px var(--accent-glow);
    text-decoration: none;
    color: white;
}

.btn-lg {
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
}

.btn-glow {
    box-shadow: 0 0 20px rgba(79, 70, 229, 0.4);
    animation: pulse 3s infinite;
}

/* Footer */
.site-footer {
    background-color: #f8fafc;
    border-top: 1px solid var(--border-color);
    padding: 3rem 0;
    margin-top: 4rem;
    text-align: center;
    color: var(--text-muted);
}