/*
Theme Name: Facetrough Premium
Theme URI: https://facetrough.com
Author: Antigravity AI Elite Dev
Author URI: https://facetrough.com
Description: A premium, minimalist, and ultra-fast WooCommerce theme for the undisputed #1 global dealer of faceting rough.
Version: 1.0.0
Text Domain: facetrough
*/

/* --- Typography & Google Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;600;700;900&display=swap');

/* --- CSS Variables --- */
:root {
    --color-gold: #D4AF37;
    --color-dark: #0f172a; /* Deeper slate for headers/footers */
    --color-slate: #1e293b; /* Dark slate for main background */
    --color-text: #e2e8f0; /* Light text for readability on dark background */
    --color-white: #ffffff;
    --color-light-gray: #334155; /* Adjusted for dark mode panels */
    
    --font-heading: 'Cinzel', serif;
    --font-body: Georgia, 'Times New Roman', Times, serif;

    --transition-speed: 0.3s;
}

/* --- Base Styles --- */
html, body {
    margin: 0;
    padding: 0;
    font-family: var(--font-body);
    color: var(--color-text);
    background-color: var(--color-slate);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--color-gold);
}

a {
    color: var(--color-gold);
    text-decoration: none;
    transition: color var(--transition-speed) ease;
}

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

/* --- Container & Layout --- */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* --- Buttons --- */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background-color: var(--color-gold);
    color: var(--color-white);
    font-family: var(--font-heading);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: none;
    cursor: pointer;
    transition: background-color var(--transition-speed) ease;
}

.btn:hover {
    background-color: var(--color-dark);
    color: var(--color-white);
}

/* --- Header & Navigation --- */
.site-header {
    background-color: var(--color-dark);
    color: var(--color-white);
    padding: 1rem 0;
}

.site-header a {
    color: var(--color-white);
}

.site-header a:hover {
    color: var(--color-gold);
}

.site-header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-branding img.custom-logo {
    max-width: 250px;
    height: auto;
}

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

.main-navigation li a {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Dropdown Menu Styles */
.nav-dropdown {
    position: relative;
}

.main-navigation ul.sub-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    flex-direction: column;
    background-color: var(--color-dark);
    padding: 1rem;
    border-radius: 4px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.5);
    z-index: 999;
    min-width: 200px;
}

.nav-dropdown:hover ul.sub-menu {
    display: flex;
}

.main-navigation ul.sub-menu li a {
    font-size: 0.95rem;
    text-transform: none;
    display: block;
    margin-bottom: 0.5rem;
}

/* --- Footer --- */
.site-footer {
    background-color: var(--color-dark);
    color: var(--color-light-gray);
    padding: 3rem 0;
    text-align: center;
    margin-top: 4rem;
}

/* --- WooCommerce Specific Styles --- */

/* Data Table Styles */
.facetrough-tech-specs {
    margin: 2rem 0;
    padding: 2rem;
    background-color: var(--color-light-gray);
    border-radius: 4px;
}

.facetrough-tech-specs h3 {
    margin-top: 0;
    text-align: center;
    color: var(--color-gold);
    text-transform: uppercase;
}

table.shop_attributes {
    width: 100%;
    border-collapse: collapse;
}

table.shop_attributes th,
table.shop_attributes td {
    padding: 1rem;
    border-bottom: 1px solid #ddd;
    text-align: left;
}

table.shop_attributes th {
    width: 30%;
    font-weight: 700;
    color: var(--color-dark);
}

table.shop_attributes tr:last-child th,
table.shop_attributes tr:last-child td {
    border-bottom: none;
}

/* WooCommerce Full Width Archive Fixes */
.woocommerce ul.products[class*=columns-] li.product, 
.woocommerce-page ul.products[class*=columns-] li.product {
    width: 30.8%; /* Forces 3 columns when sidebar is removed */
    margin: 0 3.8% 2.992em 0;
}

.woocommerce ul.products[class*=columns-] li.product:nth-child(3n),
.woocommerce-page ul.products[class*=columns-] li.product:nth-child(3n) {
    margin-right: 0;
}

/* --- Vintage Gold Pill Category Buttons --- */
.gold-pill-category {
    display: inline-block;
    /* Metallic gold gradient approximating the legacy style */
    background: linear-gradient(to bottom, #d4b566 0%, #ffec99 30%, #fcf6ba 50%, #c49a30 75%, #8a641c 100%);
    color: #000;
    font-family: 'Times New Roman', Times, serif;
    font-size: 1.8rem;
    font-style: italic;
    font-weight: normal;
    padding: 12px 45px;
    border-radius: 50px;
    text-decoration: none;
    text-align: center;
    box-shadow: inset 0 0 8px rgba(255,255,255,0.6), 0 4px 15px rgba(0,0,0,0.6);
    border: 1px solid #5a4010;
    transition: transform 0.2s ease, filter 0.2s ease;
    text-shadow: 1px 1px 0px rgba(255,255,255,0.4);
}

.gold-pill-category:hover {
    transform: translateY(-2px) scale(1.02);
    filter: brightness(1.1);
    color: #000;
}

/* --- Responsive mobile-first --- */

@media (max-width: 768px) {
    .site-header-inner {
        flex-direction: column;
        text-align: center;
    }
    
    .main-navigation ul {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.75rem;
        margin-top: 1rem;
    }

    .main-navigation li a {
        font-size: 0.9rem;
        padding: 5px;
    }
    
    table.shop_attributes th,
    table.shop_attributes td {
        display: block;
        width: 100%;
    }
    
    table.shop_attributes th {
        padding-bottom: 0.25rem;
        border-bottom: none;
    }
    
    table.shop_attributes td {
        padding-top: 0;
        margin-bottom: 1rem;
    }
}

/* --- WooCommerce Cart Styles --- */
.woocommerce table.cart td.actions {
    padding: 1.5rem 1rem;
    background-color: var(--color-dark);
    border-top: 1px solid var(--color-light-gray);
}

.woocommerce table.cart td.actions .coupon {
    float: left;
    display: flex;
    align-items: center;
    gap: 15px;
}

.woocommerce table.cart td.actions .coupon .input-text {
    width: 220px; /* Wider input box for aesthetics */
    padding: 0.75rem 1rem;
    border: 1px solid var(--color-light-gray);
    background-color: var(--color-slate);
    color: var(--color-text);
    border-radius: 4px;
    font-size: 1rem;
}

.woocommerce table.cart td.actions .button {
    font-family: var(--font-heading);
    padding: 0.75rem 1.5rem;
    background-color: var(--color-gold);
    color: var(--color-dark);
    border: none;
    font-weight: 700;
    cursor: pointer;
    border-radius: 4px;
    transition: background-color var(--transition-speed) ease;
    text-transform: uppercase;
}

.woocommerce table.cart td.actions .button:hover {
    background-color: var(--color-white);
}

.woocommerce table.cart td.actions .button[name="update_cart"] {
    background-color: var(--color-light-gray);
    color: var(--color-text);
}

.woocommerce table.cart td.actions .button[name="update_cart"]:not(:disabled):hover {
    background-color: var(--color-gold);
    color: var(--color-dark);
}

/* Fix mobile scaling for cart actions */
@media (max-width: 768px) {
    .woocommerce table.cart td.actions .coupon {
        float: none;
        flex-direction: column;
        align-items: flex-start;
        width: 100%;
        margin-bottom: 1rem;
        gap: 10px;
    }
    
    .woocommerce table.cart td.actions .coupon .input-text {
        width: 100%;
        box-sizing: border-box;
    }
    
    .woocommerce table.cart td.actions .button {
        width: 100%;
        margin-bottom: 10px;
    }
    
    .woocommerce table.cart td.actions .button[name="update_cart"] {
        width: 100%;
        margin-bottom: 0;
    }
}
