/*
Theme Name: The Merchant of The Market - Ye Olde Shoppe
Theme URI: https://themerchantofthemarket.com
Author: Gemini
Author URI: themerchantofthemarket.com
Description: A dark fantasy, antique curiosity shop theme designed for The Merchant of The Market. Features a parchment background, medieval typography, and full-screen logo entry.
Version: 1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Tags: dark, fantasy, curiosity, parchment, antique, custom-background, responsive-layout
Text Domain: merchant-theme
*/

/* --- 1. Global Setup and Variables --- */
@import url('https://fonts.googleapis.com/css2?family=IM+Fell+English+SC&family=Cinzel:wght@400;700&display=swap');

:root {
    --color-parchment: #f0e8d9; /* Slightly darker, aged paper */
    --color-dark-wood: #2c251f; /* Deeper, richer dark wood */
    --color-earth-moss: #586f4b; /* Subtle earthy/apothecary green */
    --color-gold: #b38b4d; /* More antique brass/gold */
    --color-rust: #8b3a2a; /* For accents and borders */
    --color-text-body: #333333;
    --color-text-dark: #0f0f0f;
    --font-heading: 'Cinzel', serif;
    --font-body: 'IM Fell English SC', serif;
}

/* --- 2. Layout Fixes (Sticky Footer & Full Height) --- */
html, body {
    height: 100%;
    width: 100%;
    overflow-x: hidden; /* Prevents horizontal scrollbar */
    display: flex; /* Start Flexbox container */
    flex-direction: column; /* Stack items vertically */
}

body {
    background-color: var(--color-dark-wood);
    font-family: var(--font-body);
    color: var(--color-text-body);
    line-height: 1.6;
    margin: 0;
    padding: 0;
    /* Dark Wood Background (Body Background) */
    background-image: url('images/Gemini_Generated_Image_axby3caxby3caxby.png');
    background-size: cover;
    background-attachment: fixed;
}

/* Subtle texture overlay for a dustier look */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Dust Overlay */
    background-image: url('images/Gemini_Generated_Image_ofy45nofy45nofy4.png');
    opacity: 0.1;
    pointer-events: none;
    z-index: -1;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--color-rust); /* Heading colour changed to aged metal/rust */
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.7); /* Deeper shadow */
    text-transform: uppercase;
}

/* --- 3. Main Content Wrapper (The Parchment Scroll) --- */
#content-wrapper {
    max-width: 1400px; /* Wider max-width for shop */
    margin: 40px auto;
    padding: 60px 40px;
    flex-grow: 1; /* Allows content to push footer down */
    
    /* Parchment Background Image (Content Background) */
    background-image: url('images/Gemini_Generated_Image_f8wcqtf8wcqtf8wc.png'); 
    background-color: var(--color-parchment); 
    background-repeat: no-repeat; 
    background-size: cover; /* STRETCH FIX */
    background-position: center center;
    
    /* Layered Box Shadow for Depth and Age */
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.8), 
                inset 0 0 30px rgba(0, 0, 0, 0.1); 
    
    /* Custom Aged Border using CSS */
    border: 5px solid var(--color-dark-wood);
    border-radius: 8px;
    outline: 5px solid var(--color-rust); 
    outline-offset: -10px;
}

/* Fix: Make the primary content area wider within the wrapper */
#content-wrapper #primary {
    max-width: 95%; 
    width: 100%; 
    margin: 0 auto; 
}


/* --- 4. Header and Navigation --- */
#site-header {
    background-color: var(--color-dark-wood);
    color: var(--color-gold);
    padding: 20px 40px;
    text-align: center;
    border-bottom: 3px solid var(--color-earth-moss); 
    margin: -60px -40px 40px -40px; /* Extends to the wrapper edge */
}

#site-title a {
    font-size: 3em;
    text-decoration: none;
    color: var(--color-gold);
    transition: color 0.3s;
}

#site-title a:hover {
    color: white;
}

/* Fix: Navigation List Style (Horizontal Menu) */
.main-navigation ul {
    list-style: none; 
    padding: 10px 0 0 0;
    margin: 0;
    display: flex; 
    justify-content: center;
    gap: 15px; 
}

.main-navigation li {
    list-style: none; 
    display: inline-block; 
}

.main-navigation li a {
    font-family: var(--font-heading);
    color: white; /* FIX: Brighter menu text */
    text-decoration: none;
    padding: 5px 15px;
    display: block;
    border: 1px solid transparent;
    transition: color 0.3s, border-color 0.3s;
}

.main-navigation li a:hover {
    color: var(--color-gold);
    background-color: rgba(255, 255, 255, 0.05);
    border-color: var(--color-gold);
}


/* --- 5. Full-Screen Logo Introduction (The Dark Portal) --- */
#logo-splash {
    height: 100vh;
    width: 100vw;
    position: fixed;
    top: 0;
    left: 0;
    /* Logo Image */
    background-image: url('images/Gemini_Generated_Image_xpgiinxpgiinxpgi.png'); 
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center center;
    background-color: #000; 
    z-index: 999;
    opacity: 1;
    transition: opacity 1.5s ease-out; 
    cursor: pointer;
}

.splash-hidden {
    opacity: 0 !important;
    pointer-events: none !important;
}


/* --- 6. Footer (The Seal - Sticky Footer Styling) --- */
#site-footer {
    /* STICKY FOOTER FIX */
    margin-top: 0;
    width: 100%;
    order: 3; /* Places it last in the flex column */
    
    /* Aesthetic Styling */
    text-align: center;
    padding: 20px 0 0 0;
    border-top: 2px solid var(--color-rust); 
    color: var(--color-text-body);
    font-size: 0.8em;
}

#site-footer .site-info {
    padding: 10px;
    background-color: rgba(255, 255, 255, 0.1); 
}


/* ==========================================================================
   WOOCOMMERCE STYLING: THE CURIOSITY SHOP DISPLAY
   ========================================================================== */

/* Fix: Ensure WooCommerce content takes up full width */
.woocommerce #content,
.woocommerce-page #content,
.woocommerce #primary,
.woocommerce-page #primary {
    width: 100%; 
    padding: 0;
}

/* --- 1. Product Grid and General Listing Containers --- */
.woocommerce ul.products {
    margin: 0 -15px !important; 
}

.woocommerce ul.products li.product {
    padding: 0 15px 30px 15px;
    border: 1px solid var(--color-rust);
    background-color: var(--color-parchment);
    box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.3);
    text-align: center;
    margin-bottom: 30px;
    transition: transform 0.3s ease-out, box-shadow 0.3s ease-out;
}

.woocommerce ul.products li.product:hover {
    box-shadow: 4px 4px 15px rgba(0, 0, 0, 0.5);
    transform: translateY(-2px);
}

/* --- 2. Product Images --- */
.woocommerce ul.products li.product img {
    border: 3px solid var(--color-dark-wood); 
    opacity: 0.9; 
}

/* --- 3. Titles and Headings --- */
.woocommerce ul.products li
