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

/* --- Accessibility & AI Visibility --- */
.screen-reader-text {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute !important;
    width: 1px;
    word-wrap: normal !important;
}

/* --- 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 (Refined styling from facet-rough.com) --- */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 1.5rem 0;
    z-index: 1000;
    transition: background-color var(--transition-speed) ease, padding var(--transition-speed) ease, color var(--transition-speed) ease;
    color: var(--color-gold);
    background: transparent;
}

.navbar.scrolled {
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 1rem 0;
    border-bottom: 1px solid rgba(212, 175, 55, 0.2);
    color: var(--color-dark);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-gold);
    text-transform: uppercase;
    letter-spacing: 2px;
    transition: color var(--transition-speed) ease;
    font-family: var(--font-heading);
}

.logo:hover {
    color: var(--color-gold);
}

.navbar.scrolled .logo,
.navbar.scrolled .nav-links a {
    color: var(--color-dark);
}

.navbar.scrolled .logo:hover,
.navbar.scrolled .nav-links a:hover {
    color: var(--color-gold);
}

.nav-links {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 2.5rem;
    align-items: center;
}

.nav-links > li {
    margin: 0;
}

.nav-links a {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    color: var(--color-gold); /* Matches facet-rough.com */
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background-color: var(--color-gold);
    transition: width var(--transition-speed) ease;
}

.nav-links a:hover::after {
    width: 100%;
}

.nav-links a.cart-icon {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.cart-icon svg {
    margin-bottom: 2px;
}

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

/* Ensure the sub-menus look good in light/dark scrolled modes */
.nav-links 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;
}

.nav-links ul.sub-menu li a {
    font-size: 0.95rem;
    text-transform: none;
    display: block;
    margin-bottom: 0.5rem;
    color: var(--color-white);
}

/* Side Submenu Styles */
.nav-dropdown-submenu {
    position: relative;
}

.nav-links ul.sub-menu-level-2 {
    display: none;
    position: absolute;
    top: 0;
    left: 100%;
    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: 1000;
    min-width: 200px;
    margin: 0;
    list-style: none;
}

.nav-dropdown-submenu:hover > ul.sub-menu-level-2 {
    display: flex;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 100;
}

.menu-toggle span {
    display: block;
    width: 25px;
    height: 2px;
    background-color: currentColor;
    margin: 5px 0;
    transition: 0.3s;
}

/* Header Icons */
.header-icon {
    vertical-align: middle;
    margin-top: -3px;
}

/* --- 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 (Using CSS Grid to prevent uneven heights overlap) */
.woocommerce ul.products[class*=columns-], 
.woocommerce-page ul.products[class*=columns-] {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-gap: 2.992em;
    margin: 0;
    padding: 0;
}

.woocommerce ul.products[class*=columns-]::before,
.woocommerce ul.products[class*=columns-]::after,
.woocommerce-page ul.products[class*=columns-]::before,
.woocommerce-page ul.products[class*=columns-]::after {
    display: none; /* Disable WooCommerce clearfix that breaks grid */
}

.woocommerce ul.products[class*=columns-] li.product, 
.woocommerce-page ul.products[class*=columns-] li.product {
    width: 100% !important;
    margin: 0 !important;
    float: none !important;
}

/* --- 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;
    }
    
    .woocommerce ul.products[class*=columns-], 
    .woocommerce-page ul.products[class*=columns-] {
        grid-template-columns: repeat(2, 1fr);
    }
    
    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;
    }
}

/* --- Hero Slider Animation (Imported from facet-rough.com) --- */
.hero {
    height: 100vh;
    min-height: 500px;
    width: 100%; /* Ensure it spans exactly the device width */
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    margin-top: 0;
}

.facetrough-hero.hero {
    padding: 0;
    margin: 0;
}

.hero-slider {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    overflow: hidden;
}

.hero-slider .slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transform: scale(1);
    transition: opacity 2s ease-in-out, transform 0s linear 2s;
    filter: contrast(1.15) saturate(1.2); /* Enhance colors to prevent washed out look */
}

.hero-slider .slide.active {
    opacity: 1;
    transform: scale(1.1);
    transition: opacity 2s ease-in-out, transform 10s linear;
}

.hero-overlay-dark {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Premium vignette effect to make text pop while keeping the center vibrant */
    background: radial-gradient(ellipse at center, rgba(15, 23, 42, 0.25) 0%, rgba(0, 0, 0, 0) 40%, rgba(15, 23, 42, 0.6) 100%);
    z-index: 1;
    pointer-events: none;
}

.hero-title {
    color: var(--color-gold);
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    text-transform: uppercase;
    margin-bottom: 20px;
    line-height: 1.2;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.8);
}

.hero-content h1 {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: var(--color-gold);
    margin: 0 auto 2.5rem auto;
    max-width: 800px;
    letter-spacing: 2px;
    text-transform: uppercase;
    font-weight: 600;
    font-family: var(--font-body);
    text-shadow: 
        0 0 10px rgba(0, 0, 0, 1), 
        0 0 20px rgba(0, 0, 0, 0.8),
        0 0 30px rgba(0, 0, 0, 0.6);
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    opacity: 0.8;
    z-index: 2;
    animation: bounce 2s infinite;
}

.scroll-indicator span {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 8px;
}

.mouse {
    width: 24px;
    height: 36px;
    border: 2px solid white;
    border-radius: 12px;
    position: relative;
}

.mouse::before {
    content: '';
    position: absolute;
    top: 6px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 6px;
    background-color: white;
    border-radius: 2px;
    animation: scroll 2s infinite;
}

@keyframes scroll {
    0% { transform: translate(-50%, 0); opacity: 1; }
    100% { transform: translate(-50%, 10px); opacity: 0; }
}
@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0) translateX(-50%); }
    40% { transform: translateY(-10px) translateX(-50%); }
    60% { transform: translateY(-5px) translateX(-50%); }
}

@media (prefers-reduced-motion: reduce) {
    .hero-slider .slide { transition: opacity 2s ease-in-out !important; transform: none !important; }
    .hero-slider .slide.active { transform: none !important; }
    .scroll-indicator, .mouse::before { animation: none !important; }
}

/* --- Mobile Menu Styles --- */
@media (max-width: 768px) {
    .main-navigation ul.nav-links {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: var(--color-dark);
        flex-direction: column;
        align-items: center;
        padding: 2rem 0;
        border-bottom: 1px solid rgba(212, 175, 55, 0.2);
        clip-path: polygon(0 0, 100% 0, 100% 0, 0 0);
        transition: clip-path 0.4s ease;
        gap: 1.5rem;
        display: flex;
    }

    .main-navigation ul.nav-links.active {
        clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
    }

    /* Override mobile sub-menu positioning preventing overlap */
    .main-navigation ul.nav-links ul.sub-menu {
        position: static;
        background-color: transparent;
        box-shadow: none;
        padding: 0.5rem 0;
        align-items: center;
        width: 100%;
    }

    .menu-toggle {
        display: block;
        color: var(--color-gold);
    }
    
    .navbar.scrolled .menu-toggle {
        color: var(--color-dark);
    }

    .menu-toggle.active span:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }
    .menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }
    .menu-toggle.active span:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
    }
}
