/*
Theme Name: TCG Store
Theme URI: https://example.com/tcg-store
Author: Antigravity
Author URI: https://example.com
Description: A premium, dark-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
*/

:root {
    /* Color Palette - Dark & Premium */
    --bg-primary: #0f172a;
    /* Slate 900 */
    --bg-secondary: #1e293b;
    /* Slate 800 */
    --bg-card: #334155;
    /* Slate 700 */

    --text-primary: #f8fafc;
    /* Slate 50 */
    --text-secondary: #cbd5e1;
    /* Slate 300 */
    --text-muted: #94a3b8;
    /* Slate 400 */

    --accent-color: #6366f1;
    /* Indigo 500 */
    --accent-hover: #4f46e5;
    /* Indigo 600 */
    --accent-glow: rgba(99, 102, 241, 0.5);

    --border-color: #334155;
    /* Slate 700 */

    /* Spacing */
    --container-width: 1200px;
    --header-height: 70px;

    /* 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);
    text-shadow: 0 0 8px var(--accent-glow);
}

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

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

/* 1. Top Announcement Bar */
.top-announcement-bar {
    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;
    /* Explicit White */
    color: #1e293b;
    border-bottom: none;
    height: 80px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

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

.site-title a {
    color: #1e293b;
    /* Dark text for light header */
    background: none;
    -webkit-text-fill-color: initial;
    font-weight: 800;
    font-size: 1.8rem;
    letter-spacing: -1px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* 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 (Dominant) */
.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;
    color: #334155;
    padding: 0.7rem 1.2rem;
    border-radius: 8px;
    /* Slightly less pill, more tech */
    font-size: 1rem;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.03);
}

.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 rgba(99, 102, 241, 0.2);
}

.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;
    transition: color 0.2s;
    color: #64748b;
}

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

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

/* Navigation */
.main-navigation ul,
.main-navigation .menu {
    list-style: none;
    display: flex;
    gap: 2rem;
    margin: 0;
    padding: 0;
}



.main-navigation a {
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.95rem;
}

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

/* Card Grid (General) */
.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: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    position: relative;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
    border-color: var(--accent-color);
}

.product-image {
    width: 100%;
    aspect-ratio: 2/3;
    /* Standard card ratio roughly */
    object-fit: contain;
    /* Don't crop cards */
    background-color: #000;
    padding: 10px;
    display: block;
}

.product-info {
    padding: 1rem;
}

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

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

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

.woocommerce ul.products li.product,
.woocommerce-page ul.products li.product {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 0;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    height: auto;
    float: none;
    margin: 0 1rem 2rem 1rem;
    width: calc(25% - 2rem);
}

@media (max-width: 1024px) {
    .woocommerce ul.products li.product {
        width: calc(33.333% - 2rem);
    }
}

@media (max-width: 768px) {
    .woocommerce ul.products li.product {
        width: calc(50% - 2rem);
    }
}

@media (max-width: 480px) {
    .woocommerce ul.products li.product {
        width: calc(100% - 2rem);
    }
}

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

.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: #111;
}

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

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

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

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

/* Shop Layout with Sidebar */
.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: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.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 (Categories, etc) */
.widget ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.widget ul li {
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    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);
}

/* Price Filter Widget Specifics */
.widget_price_filter .price_slider_wrapper .ui-slider-horizontal {
    background-color: var(--bg-primary);
    border-radius: 99px;
    height: 6px;
    margin-bottom: 1rem;
}

.widget_price_filter .ui-slider .ui-slider-range {
    background-color: var(--accent-color);
}

.widget_price_filter .ui-slider .ui-slider-handle {
    background-color: white;
    border: 2px solid var(--accent-color);
    border-radius: 50%;
    width: 16px;
    height: 16px;
    top: -6px;
    cursor: pointer;
}

.widget_price_filter .price_label {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.widget_price_filter .button {
    float: right;
    font-size: 0.85rem;
    padding: 0.4rem 0.8rem;
}

/* ===========================
   Hero Section - Premium Look (Centered)
   =========================== */
.hero-section {
    position: relative;
    padding: 6rem 1rem;
    background: radial-gradient(circle at center, #1e293b 0%, #0f172a 100%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    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 100px rgba(0, 0, 0, 0.5);
}

.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: white;
    word-break: keep-all;
    /* Better for Korean */
}

.hero-title .highlight {
    background: linear-gradient(135deg, var(--accent-color) 0%, #a5b4fc 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    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;
}

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

.btn-glow {
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.4);
    animation: pulse 3s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(99, 102, 241, 0.4);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(99, 102, 241, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(99, 102, 241, 0);
    }
}

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

.card-float {
    position: absolute;
    width: 180px;
    height: 260px;
    background: linear-gradient(145deg, #334155, #1e293b);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.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 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 6s ease-in-out infinite 1s;
    border-color: var(--accent-color);
    box-shadow: 0 0 30px rgba(99, 102, 241, 0.3);
}

.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 6s ease-in-out infinite 2s;
}

@keyframes float {
    0% {
        transform: translateY(0px) rotate(var(--r));
    }

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

    100% {
        transform: translateY(0px) rotate(var(--r));
    }
}

/* Fix rotation in keyframes requiring dynamic variable or specific blocks */
/* Since we used specific classes, we need specific keyframes or a simpler approach */
@keyframes float {
    0% {
        transform: translateY(0);
    }

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

    100% {
        transform: translateY(0);
    }
}

/* Re-applying transforms in animation is tricky without separate wrappers or calc. 
   Let's just animate marginTop for simplicity in this constrained edit. 
*/
.card-1 {
    animation: float-1 6s ease-in-out infinite;
}

.card-2 {
    animation: float-2 6s ease-in-out infinite 1s;
}

.card-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 {
        flex-direction: column;
        text-align: center;
        padding: 4rem 1rem;
    }

    .hero-content {
        margin-bottom: 3rem;
    }

    .hero-subtitle {
        margin-left: auto;
        margin-right: auto;
    }

    .hero-visual {
        transform: scale(0.8);
    }
}

/* ===========================
   Game Nav Bar (Header Bottom)
   =========================== */
/* 5. Game Nav Bar (Dark & Bold) */
.game-nav-bar {
    background-color: #1e293b;
    /* Dark Slate */
    border-bottom: 2px solid #0f172a;
    height: auto;
}

.game-nav-list {
    justify-content: center;
    padding: 0;
    list-style: none;
    /* Add list-style: none back */
}

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

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



/* ===========================
   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: var(--bg-secondary);
}

.cat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    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-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.shop-now {
    font-size: 0.85rem;
    color: var(--accent-color);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.cat-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    opacity: 0.4;
    transition: transform 0.5s ease;
    background-size: cover;
    background-position: center;
}

.cat-card:hover .cat-bg {
    transform: scale(1.1);
    opacity: 0.6;
}

/* Specific Category Backgrounds (Placeholders) */
.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;
    /* Placeholder for MTG */
}

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