/*
Theme Name: Famara Art
Theme URI: https://famara.art
Author: Famara Art
Author URI: https://famara.art
Description: A stunning one-page WordPress theme for resin art showcasing Deep Whisper. Features elegant storytelling sections documenting the artist's journey from corporate world to creative freedom. Built for WooCommerce integration.
Version: 1.0.0
Text Domain: famaraart
Requires at least: 6.0
Tested up to: 6.4
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Tags: one-column, custom-menu, featured-images, theme-options, e-commerce
*/

/* ============================================
/* ============================================
   DESIGN TOKENS & CSS VARIABLES
   ============================================ */
:root {
    /* Colors */
    --color-primary: #111827;
    /* Dark almost black for strong contrast */
    --color-secondary: #0891b2;
    /* Keeping the Brand Teal but refining usage */
    --color-primary-gradient: linear-gradient(135deg, #0891b2 0%, #06b6d4 50%, #22d3ee 100%);
    /* Restoring Gradient */
    --color-accent: #d4af37;
    /* Gold accent */

    --color-bg: #ffffff;
    --color-bg-alt: #f9fafb;

    --color-text: #374151;
    /* Gray 700 */
    --color-text-muted: #6b7280;
    /* Gray 500 */
    --color-text-white: #ffffff;

    /* Typography */
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Inter', sans-serif;
    --font-accent: 'Cormorant Garamond', serif;

    /* Spacing - Simplified */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;
    --spacing-xl: 6rem;

    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1);

    /* Global Radius */
    --radius-sm: 4px;
    --radius-md: 8px;
}

/* ============================================
   RESET & BASE STYLES
   ============================================ */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    font-size: 1.05rem;
    /* Slightly larger for readability */
    line-height: 1.75;
    color: var(--color-text);
    background-color: var(--color-bg);
    -webkit-font-smoothing: antialiased;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: var(--color-secondary);
    text-decoration: none;
    transition: color 0.2s ease;
}

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

/* ============================================
   TYPOGRAPHY
   ============================================ */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    color: var(--color-primary);
    line-height: 1.25;
    font-weight: 700;
    margin-bottom: var(--spacing-xs);
    /* Significantly reduced spacing */
}

h1 {
    font-size: 1.8rem;
    text-transform: uppercase;
    text-align: center;
    letter-spacing: 0.1em;
    font-weight: 800;
    position: relative;
    width: 100%;
    margin-bottom: var(--spacing-sm);
    color: var(--color-primary);
    padding-bottom: 0.2em;
}

/* Line removed as requested */
h1::after {
    display: none;
}

h2 {
    font-size: 1.25rem;
    text-transform: none;
    text-align: left;
    letter-spacing: 0.02em;
    font-weight: 700;
    line-height: 1.35;
    color: var(--color-text);
    margin-top: 1.25rem;
    margin-bottom: var(--spacing-xs);
}

h3 {
    font-size: 1.15rem;
    letter-spacing: 0;
    font-weight: 600;
    margin-bottom: var(--spacing-xs);
    color: var(--color-secondary);
}

p {
    margin-bottom: 0.625rem;
    max-width: 65ch;
}

.subtitle {
    font-family: var(--font-accent);
    font-size: 1.125rem;
    font-style: italic;
    color: var(--color-text-muted);
}

/* Specific overrides for Site Title which uses h1 but is smaller in header */
.site-title {
    font-size: 1.5rem !important;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    background: none;
    -webkit-text-fill-color: initial;
    color: inherit;
    /* Remove the decorative line for the logo */
    width: auto;
}

.site-title::after {
    display: none;
}

/* ============================================
   HEADER
   ============================================ */
.site-header {
    background: var(--color-primary-gradient);
    padding: var(--spacing-md) var(--spacing-sm);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-md);
    color: var(--color-text-white);
}

.header-inner {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-logo {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.site-title {
    font-family: var(--font-heading);
    font-size: 1.75rem;
    color: var(--color-text-white);
    margin: 0;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.site-title a {
    color: inherit;
}

.site-title a:hover {
    color: rgba(255, 255, 255, 0.9);
}

.site-subtitle {
    font-family: var(--font-accent);
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.9);
    font-style: italic;
    margin: 0.25rem 0 0 0;
    display: block;
    /* Ensure visibility */
}

/* Navigation */
.main-navigation ul {
    list-style: none;
    display: flex;
    gap: var(--spacing-md);
    margin: 0;
}

.main-navigation a {
    color: var(--color-text-white);
    font-weight: 500;
    font-size: 0.95rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    padding: 0.5rem 0;
    position: relative;
    transition: color 0.2s ease;
}

.main-navigation a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--color-text-white);
    transition: width 0.3s ease;
}

.main-navigation a:hover::after {
    width: 100%;
}

.main-navigation a:hover {
    color: rgba(255, 255, 255, 0.9);
}

/* Cart Icon */
.cart-icon {
    color: var(--color-text-white);
    font-size: 1.25rem;
    position: relative;
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -10px;
    background: var(--color-accent);
    color: white;
    font-size: 0.7rem;
    width: 18px;
    height: 18px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

/* ============================================
   HERO / INTRO SECTION
   ============================================ */
.section {
    padding: var(--spacing-lg) var(--spacing-sm);
}

.section-container {
    max-width: 1200px;
    margin: 0 auto;
}

/* ============================================
   FOOTER
   ============================================ */
.site-footer {
    background: var(--color-primary);
    color: var(--color-text-white);
    padding: var(--spacing-xl) var(--spacing-sm);
    text-align: center;
    clear: both;
}

.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-logo {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    color: white;
    margin-bottom: var(--spacing-md);
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.footer-social {
    display: flex;
    justify-content: center;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-md);
}

.footer-social a {
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.25rem;
    transition: color 0.2s ease;
}

.footer-social a:hover {
    color: white;
}

.footer-copyright {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.5);
}

.footer-copyright a {
    color: rgba(255, 255, 255, 0.7);
}

/* ============================================
   WOOCOMMERCE OVERRIDES
   ============================================ */
.woocommerce-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--spacing-xl) var(--spacing-sm);
}

/* Product Grid */
.woocommerce ul.products {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-md);
    margin: 0;
    padding: 0;
    list-style: none;
}

.woocommerce ul.products::before,
.woocommerce ul.products::after {
    display: none;
    /* Remove WooCommerce clearfix */
}

.woocommerce ul.products li.product {
    width: 100% !important;
    margin: 0 !important;
    float: none !important;
    clear: none !important;
    background: white;
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: var(--radius-sm);
    overflow: hidden;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

@media (max-width: 1024px) {
    .woocommerce ul.products {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .woocommerce ul.products {
        grid-template-columns: repeat(1, 1fr);
    }
}


.woocommerce ul.products li.product:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: rgba(0, 0, 0, 0.1);
}

.woocommerce ul.products li.product img {
    width: 100%;
    margin-bottom: 0 !important;
}

.woocommerce ul.products li.product .woocommerce-loop-product__title {
    font-family: var(--font-heading);
    color: var(--color-primary);
    font-size: 1.1rem;
    padding: 1rem 1rem 0.5rem;
    margin: 0;
}

.woocommerce ul.products li.product .price {
    color: var(--color-secondary);
    font-weight: 600;
    font-size: 1rem;
    padding: 0 1rem 1rem;
    display: block;
}

.woocommerce ul.products li.product .button {
    background: var(--color-primary);
    color: white;
    border-radius: 0;
    padding: 0.75rem 1rem;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.05em;
    width: 100%;
    text-align: center;
    transition: background 0.2s ease;
    margin-top: 0;
}

.woocommerce ul.products li.product .button:hover {
    background: var(--color-secondary);
    color: white;
}

/* Single Product */
.woocommerce div.product {
    overflow: hidden;
    margin-bottom: var(--spacing-xl);
}

.woocommerce div.product .product_title {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    color: var(--color-primary);
    margin-bottom: 1rem;
}

.woocommerce div.product p.price {
    color: var(--color-secondary);
    font-size: 1.5rem;
    font-family: var(--font-heading);
    margin-bottom: 1.5rem;
}

.woocommerce div.product .single_add_to_cart_button {
    background: var(--color-primary) !important;
    color: white !important;
    padding: 1rem 2rem !important;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-radius: 0;
    transition: background 0.2s ease;
}

.woocommerce div.product .single_add_to_cart_button:hover {
    background: var(--color-secondary) !important;
}

/* Cart & Checkout */
.woocommerce .cart-collaterals .cart_totals,
.woocommerce-cart .cart-collaterals .cart_totals {
    background: var(--color-bg-alt);
    padding: var(--spacing-md);
    border-radius: var(--radius-sm);
}

.woocommerce a.button.alt,
.woocommerce button.button.alt,
.woocommerce input.button.alt {
    background: var(--color-primary);
    border-radius: 0;
    font-weight: 600;
    text-transform: uppercase;
    color: white;
}

.woocommerce a.button.alt:hover,
.woocommerce button.button.alt:hover,
.woocommerce input.button.alt:hover {
    background: var(--color-secondary);
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */
@media (max-width: 480px) {
    html {
        font-size: 14px;
    }

    h1 {
        font-size: 2.25rem;
    }

    .site-title {
        font-size: 1.25rem;
    }
}

/* ============================================
   GUTENBERG & UTILITIES
   ============================================ */
.entry-content {
    width: 100%;
    max-width: 100%;
}

.alignfull {
    width: 100vw;
    max-width: 100%;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
}

.alignwide {
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
}

.aligncenter {
    display: block;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

/* Wrapper helpers for boxed layout inside fullwidth */
.wrapper-boxed {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-sm);
}

.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-logo {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    color: var(--color-text-light);
    margin-bottom: var(--spacing-sm);
    letter-spacing: 0.15em;
}

.footer-social {
    display: flex;
    justify-content: center;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-md);
}

.footer-social a {
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.25rem;
    transition: color var(--transition-fast);
}

.footer-social a:hover {
    color: var(--color-text-light);
}

.footer-copyright {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.6);
}

.footer-copyright a {
    color: rgba(255, 255, 255, 0.8);
}

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.animate-fade-in-up {
    animation: fadeInUp 0.8s ease-out forwards;
}

.animate-fade-in {
    animation: fadeIn 0.6s ease-out forwards;
}

/* Scroll animations - will be activated via JS */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================
   BLOCK EDITOR (GUTENBERG) SUPPORT
   ============================================ */

/* Main Content Wrapper - Centered with Max Width 1161px */
.entry-content,
.site-content {
    width: 90%;
    /* Responsive width for smaller screens */
    max-width: 1161px;
    /* Hard limit as requested */
    margin-left: auto;
    margin-right: auto;
    padding-left: var(--spacing-sm);
    padding-right: var(--spacing-sm);
}

/* Generic Block Spacing */
/* Generic Block Spacing */
.entry-content>* {
    margin-bottom: var(--spacing-md);
}

/* Tighter spacing for headings */
.entry-content>h1,
.entry-content>h2,
.entry-content>h3,
.entry-content>h4,
.entry-content>h5,
.entry-content>h6 {
    margin-bottom: var(--spacing-sm);
}

/* Standard WordPress Alignment Classes */
.alignright {
    float: right;
    margin-left: var(--spacing-md);
    margin-bottom: var(--spacing-sm);
    clear: both;
}

.alignleft {
    float: left;
    margin-right: var(--spacing-md);
    margin-bottom: var(--spacing-sm);
    clear: both;
}

.aligncenter {
    display: block;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
    clear: both;
}

/* Standard WordPress Alignment Classes */
.alignfull {
    width: 100vw;
    max-width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
}

.alignwide {
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
    width: 100%;
    /* Relative to the flow */
}

/* Ensure WooCommerce Content follows the 75% rule */
.woocommerce-container,
.woocommerce-page .site-content,
.woocommerce-page .entry-content,
.woocommerce .entry-content {
    max-width: 75%;
    margin-left: auto;
    margin-right: auto;
}

.wp-block-button.btn-primary .wp-block-button__link {
    background: var(--color-text-light);
    color: var(--color-primary-dark);
    padding: var(--spacing-sm) var(--spacing-xl);
    font-weight: 600;
    border-radius: 0;
    text-transform: uppercase;
    transition: all var(--transition-normal);
}

.wp-block-button.btn-primary .wp-block-button__link:hover {
    background: var(--color-accent-gold);
    color: var(--color-text-primary);
}

/* Editor Specific Tweaks */
.is-visual-editor .entry-content {
    max-width: 1200px;
    margin: 0 auto;
}