/*
Theme Name: Genius Hexa Games
Theme URI: https://example.com/genius-hexa-games
Author: Your Name
Author URI: https://example.com
Description: A modern WordPress theme inspired by clean, playful design for game studios and creative agencies.
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: genius-hexa-games
*/

/* CSS Variables */
:root {
    --color-primary: #D84727;
    --color-secondary: #F4A261;
    --color-bg: #FEF9F0;
    --color-text: #2C241E;
    --color-text-light: #5A4A3A;
    --radius-xl: 24px;
    --radius-lg: 16px;
    --radius-md: 12px;
    --shadow-soft: 0 10px 40px rgba(0,0,0,0.08);
    --shadow-medium: 0 4px 20px rgba(0,0,0,0.1);
}

/* Reset & Base */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: inherit;
    text-decoration: none;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Header */
.site-header {
    padding: 24px 0 16px;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
}

.logo-area h1 {
    font-size: 1.9rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, #D84727, #F4A261);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.logo-area p {
    font-size: 0.8rem;
    color: var(--color-text-light);
    letter-spacing: 0.3px;
}

.nav-links {
    display: flex;
    gap: 32px;
    font-weight: 600;
}

.nav-links a {
    text-decoration: none;
    color: var(--color-text);
    font-size: 1rem;
    transition: 0.2s;
}

.nav-links a:hover {
    color: var(--color-primary);
}

/* Navigation Dropdown */
.nav-dropdown {
    position: relative;
}

.nav-dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 6px;
}

.dropdown-arrow {
    font-size: 0.7rem;
    transition: transform 0.2s;
}

.nav-dropdown:hover .dropdown-arrow {
    transform: rotate(180deg);
}

.nav-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: #fef9f0eb;
    border-radius: 8px;
    padding: 12px 0;
    min-width: 250px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    z-index: 1000;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
}

.nav-dropdown:hover .nav-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav-links .nav-dropdown-menu a {
    display: block;
    padding: 8px 20px;
    font-size: 14px !important;
    font-weight: 400 !important;
    transition: background 0.2s;
}

.nav-dropdown-menu a:hover {
    background: rgba(255,255,255,0.1);
    color: white;
}

.header-actions {
    display: flex;
    gap: 16px;
}

.btn-icon {
    background: none;
    border: none;
    font-size: 1.4rem;
    cursor: pointer;
    color: var(--color-text);
    transition: 0.2s;
}

.btn-icon:hover {
    color: var(--color-primary);
}

/* Hero Section */
.hero {
    padding: 60px 0;
    background: radial-gradient(ellipse at 80% 30%, #FFF2E2, #FEE6D4);
}

.hero-grid {
    display: flex;
    align-items: center;
    gap: 60px;
}

.hero-content {
    flex: 1;
}

.badge {
    display: inline-block;
    background: rgba(216, 71, 39, 0.1);
    color: var(--color-primary);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 20px;
}

.hero-content h2 {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 20px;
    letter-spacing: -0.02em;
}

.hero-content p {
    font-size: 1.15rem;
    color: var(--color-text-light);
    margin-bottom: 32px;
    max-width: 500px;
}

.hero-buttons {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--color-primary);
    color: white;
    padding: 14px 28px;
    border-radius: 60px;
    font-weight: 600;
    font-size: 1rem;
    transition: 0.2s;
    border: none;
    cursor: pointer;
}

.btn-primary:hover {
    background: #c23d20;
    transform: translateY(-2px);
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: transparent;
    color: var(--color-text);
    padding: 14px 28px;
    border-radius: 60px;
    font-weight: 600;
    font-size: 1rem;
    border: 2px solid rgba(0,0,0,0.1);
    transition: 0.2s;
    cursor: pointer;
}

.btn-secondary:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
}

.hero-image {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-image img {
    width: 100%;
    height: auto;
    max-height: 500px;
    object-fit: cover;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-soft);
}

/* Posts Grid */
.posts-section {
    padding: 60px 0;
}

.section-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 40px;
    text-align: center;
}

.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 32px;
}

.post-card {
    background: white;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    transition: 0.3s;
}

.post-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 50px rgba(0,0,0,0.12);
}

.post-card-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.post-card-content {
    padding: 24px;
}

.post-card-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 12px;
    line-height: 1.4;
}

.post-card-title a:hover {
    color: var(--color-primary);
}

.post-card-excerpt {
    color: var(--color-text-light);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 16px;
}

.read-more {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--color-primary);
    font-weight: 600;
    font-size: 0.95rem;
}

.read-more:hover {
    gap: 10px;
}

/* Newsletter */
.newsletter {
    background: #1a1a1a;
    padding: 80px 40px;
    border-radius: var(--radius-xl);
    text-align: center;
    color: white;
    margin: 60px 0;
}

.newsletter h3 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.newsletter p {
    opacity: 0.95;
    margin-bottom: 32px;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.newsletter-form {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.newsletter input[type="email"] {
    padding: 14px 24px;
    border-radius: 60px;
    border: none;
    width: 280px;
    font-size: 1rem;
    background: white;
    outline: none;
}

.newsletter input[type="email"]:focus {
    box-shadow: 0 0 0 3px rgba(216, 71, 39, 0.3);
}

.newsletter-form .btn-secondary {
    background: #D84727;
    color: white;
    border-color: #D84727;
}

.newsletter-form .btn-secondary:hover {
    background: #c23d20;
    border-color: #c23d20;
}

/* Single Post */
.single-post .post-header {
    margin-bottom: 32px;
}

.single-post .post-title {
    font-size: 2.5rem;
    margin-bottom: 16px;
}

.single-post .post-meta {
    color: var(--color-text-light);
    font-size: 0.9rem;
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.single-post .featured-image {
    border-radius: var(--radius-xl);
    margin-bottom: 32px;
    width: 100%;
    max-height: 500px;
    object-fit: cover;
}

.single-post .post-content {
    max-width: 800px;
    margin: 0 auto;
}

.single-post .post-content p {
    margin-bottom: 24px;
    font-size: 1.1rem;
    line-height: 1.8;
    color: #3E2E24;
}

/* Content Area - narrower width with more side margins (only for main content, not header/footer) */
main .content-area,
main .container {
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}



/* Footer */
.site-footer {
    background: #1a1a1a;
    color: rgba(255,255,255,0.8);
    padding: 60px 0 30px;
    margin-top: 80px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-brand h2 {
    font-size: 1.5rem;
    margin-bottom: 12px;
    color: white;
}

.footer-brand p {
    font-size: 0.9rem;
    opacity: 0.8;
}

.footer-links h4 {
    font-size: 1rem;
    margin-bottom: 16px;
    color: white;
}

.footer-links ul {
    list-style: none;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    opacity: 0.8;
    transition: 0.2s;
}

.footer-links a:hover {
    opacity: 1;
    color: var(--color-secondary);
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-social {
    display: flex;
    gap: 16px;
}

.footer-social a {
    font-size: 1.2rem;
    opacity: 0.8;
    transition: 0.2s;
}

.footer-social a:hover {
    opacity: 1;
    color: var(--color-secondary);
}

/* Responsive */
@media (max-width: 780px) {
    .header-inner {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .nav-links {
        flex-wrap: wrap;
        gap: 20px;
    }
    
    .hero-grid {
        flex-direction: column;
    }
    
    .hero-image {
        order: -1;
    }
    
    .newsletter {
        padding: 40px 24px;
    }
    
    .newsletter input[type="email"] {
        width: 100%;
    }
    
    .single-post .post-title {
        font-size: 1.8rem;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
}

@media (max-width: 480px) {
    .hero-content h2 {
        font-size: 2rem;
    }
    
    .hero-content p {
        font-size: 1rem;
    }
    
    .btn-primary,
    .btn-secondary {
        width: 100%;
        justify-content: center;
    }
    
    .posts-grid {
        grid-template-columns: 1fr;
    }
}

/* WooCommerce Styles */

/* Hide post header, title and meta on product pages */
.single-product .post-header,
.single-product .post-title,
.single-product .post-meta,
.single-product article .post-header,
.single-product article .post-title,
.single-product article .post-meta {
    display: none !important;
}

/* Hide WooCommerce product elements on product pages */
.single-product .woocommerce-breadcrumb,
.single-product .summary .product_title,
.single-product .summary .woocommerce-product-rating,
.single-product .summary .posted_in,
.single-product h1.product_title,
.single-product .product .summary .product_title,
.single-product .product .woocommerce-product-rating,
.single-product .product .product_meta,
.single-product .entry-summary .product_title,
.single-product .entry-summary .woocommerce-product-rating {
    display: none !important;
}

/* WooCommerce Product Page Layout */
.single-product main {
   /* padding-top: 20px;*/
}

.single-product .container {
    max-width: 1200px;
}

.single-product .woocommerce-product-gallery {
    float: left;
    width: 45%;
}

.single-product .summary.entry-summary {
    float: right;
    width: 50%;
}

.single-product .woocommerce-tabs {
    clear: both;
    padding-top: 40px;
}

/* Product Variations Select Styling */
.single-product .variations {
    width: 100%;
    margin-bottom: 20px;
}

.single-product .variations tr {
    display: flex;
    flex-direction: column;
    margin-bottom: 16px;
}

.single-product .variations td {
    padding: 0;
}

.single-product .variations td.label {
    margin-bottom: 8px;
}

.single-product .variations th.label,
.single-product .variations td.label {
    text-align: left !important;
}

.single-product .variations th.label label,
.single-product .variations td.label label {
    font-weight: 600;
    color: var(--color-text);
    font-size: 0.95rem;
    text-align: left !important;
    display: block;
}

.single-product .variations select {
    width: 100%;
    max-width: 300px;
    padding: 12px 40px 12px 16px;
    font-size: 1rem;
    font-family: 'Inter', sans-serif;
    color: var(--color-text);
    background-color: white;
    border: 2px solid rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23D84727' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
    transition: all 0.2s ease;
}

.single-product .variations select:hover {
    border-color: var(--color-primary);
    box-shadow: 0 2px 8px rgba(216, 71, 39, 0.1);
}

.single-product .variations select:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(216, 71, 39, 0.15);
}

/* Reset button styling */
.single-product .reset_variations {
    display: inline-block;
    margin-top: 8px;
    color: var(--color-primary);
    font-size: 0.85rem;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.2s;
}

.single-product .reset_variations:hover {
    color: #c23d20;
}

/* Product Gallery */
.woocommerce-product-gallery {
    position: relative;
}

.woocommerce-product-gallery__trigger {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 10;
}

/* Product Price */
.single-product .price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-primary);
    margin-bottom: 20px;
}

/* Quantity Input Styling */
.single-product .quantity {
    display: inline-block;
    margin-right: 12px;
}

.single-product .quantity input[type="number"],
.single-product .quantity .qty {
    width: 70px !important;
    height: 37px !important;
    padding: 0 16px !important;
    font-size: 1rem !important;
    font-family: 'Inter', sans-serif !important;
    color: var(--color-text) !important;
    background-color: white !important;
    border: 2px solid rgba(0, 0, 0, 0.1) !important;
    border-radius: 12px !important;
    text-align: center !important;
    outline: none !important;
    transition: all 0.2s ease !important;
    box-sizing: border-box !important;
}

.single-product .quantity input[type="number"]:hover,
.single-product .quantity .qty:hover {
    border-color: var(--color-primary) !important;
    box-shadow: 0 2px 8px rgba(216, 71, 39, 0.1) !important;
}

.single-product .quantity input[type="number"]:focus,
.single-product .quantity .qty:focus {
    border-color: var(--color-primary) !important;
    box-shadow: 0 0 0 3px rgba(216, 71, 39, 0.15) !important;
}

/* Remove number input arrows */
.single-product .quantity input[type="number"]::-webkit-outer-spin-button,
.single-product .quantity input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.single-product .quantity input[type="number"] {
    -moz-appearance: textfield;
}

/* Add to Cart Button */
.single-product .single_add_to_cart_button {
    background: var(--color-primary);
    color: white;
    padding: 14px 32px;
    border-radius: 60px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: 0.2s;
    vertical-align: top;
}

.single-product .single_add_to_cart_button:hover {
    background: #c23d20;
}

/* Product Tabs */
.woocommerce-tabs .panel,
.woocommerce-Tabs-panel,
.woocommerce div.product .woocommerce-tabs .panel {
    background: white;
    padding: 30px !important;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
}

/* Related Products */
.related.products {
    margin-top: 60px;
}

.related.products h2 {
    font-size: 1.8rem;
    margin-bottom: 30px;
}

/* Shop Page */
.shop-page .products {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 32px;
}

/* Product Card in Shop */
.product-card {
    background: white;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    transition: 0.3s;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 50px rgba(0,0,0,0.12);
}

/* WooCommerce Responsive */
@media (max-width: 768px) {
    .single-product .woocommerce-product-gallery,
    .single-product .summary.entry-summary {
        float: none;
        width: 100%;
    }
    
    .single-product .summary.entry-summary {
        margin-top: 30px;
    }
}

/* Header & Footer wider width - override container default */
.site-header > .container,
footer > .container {
    max-width: 1200px !important;
}

/* Our Games Section */
.our-games {
    padding: 80px 0;
    background: #FEF9F0;
}

.our-games .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.our-games .section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 48px;
    position: relative;
    padding-left: 20px;
    text-align: left;
}

.our-games .section-title::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 40px;
    background: #D84727;
    border-radius: 2px;
}

.our-games .games-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.our-games .game-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.our-games .game-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.12);
}

.our-games .game-card-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.our-games .game-image {
    width: 100%;
  height: 270px;
  background: #F5E6D3;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  margin-top: 10px;
}

.our-games .game-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.our-games .game-content {
    padding: 24px;
}

.our-games .game-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 12px;
}

.our-games .game-description {
    font-size: 0.95rem;
    color: #666;
    line-height: 1.6;
    margin-bottom: 16px;
}

.our-games .game-meta {
    font-size: 0.85rem;
    color: #888;
    margin-bottom: 20px;
}

.our-games .game-link {
    color: #D84727;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: color 0.2s;
}

.our-games .game-link:hover {
    color: #c23d20;
}

/* Our Games Responsive */
@media (max-width: 1024px) {
    .our-games .games-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .our-games .games-grid {
        grid-template-columns: 1fr;
    }
    
    .our-games .section-title {
        font-size: 2rem;
    }
}

.error-404 {
    padding: 40px 0;
    text-align: center;
}

/* Refund & Returns Page Specific Styles */
.page-refund_returns .page-content,
.page-cart .page-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Hide empty cart message and upsells when cart has items */
.cart-not-empty .cart-empty,
.cart-not-empty .wc-empty-cart-message,
.cart-not-empty .cross-sells,
.cart-not-empty .upsells,
.cart-not-empty .related.products {
    display: none !important;
}

/* Hide empty cart title and new products section when cart has items */
.cart-not-empty .wp-block-heading,
.cart-not-empty .wc-block-grid__products,
.cart-not-empty .wp-block-woocommerce-product-new,
.cart-not-empty .wp-block-woocommerce-product-category-list,
.cart-not-empty h2:first-of-type,
.cart-not-empty .page-cart h2 {
    display: none !important;
}

/* Hide sidebar on product pages */
.single-product #sidebar,
.single-product .sidebar,
.single-product [role="complementary"] {
    display: none !important;
}


/* 让所有带 aligncenter 类的图片本身居中 */
.woocommerce-Tabs-panel--description .aligncenter {
    display: block !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

/* 让所有带 alignleft 类的图片左浮动，实现文字环绕 */
.woocommerce-Tabs-panel--description .alignleft {
    float: left !important;
    margin: 0 20px 20px 0 !important;
}

/* 让所有带 alignright 类的图片右浮动，实现文字环绕 */
.woocommerce-Tabs-panel--description .alignright {
    float: right !important;
    margin: 0 0 20px 20px !important;
}
