/*
Theme Name:   Flawless Finish Child
Theme URI:    https://flawlessfinishaesthetics.com
Description:  Custom Astra child theme for Flawless Finish Aesthetics — luxe spa aesthetic.
Author:       J5 RS / Eric Jones
Author URI:   https://flawlessfinishaesthetics.com
Template:     astra
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:  flawless-finish-child
*/

/* ==========================================================================
   DESIGN TOKENS — LUXE SPA PALETTE
   Central source of truth. Change values here to re-skin the whole site.
   ========================================================================== */

:root {
    /* Brand colors — warm neutrals + gold */
    --ff-cream: #FAF6F0;            /* page background */
    --ff-cream-deep: #F0E4D3;       /* section background, hero gradient end */
    --ff-sand: #E8DFD0;             /* borders, soft dividers */
    --ff-bronze: #A88B5F;           /* primary accent (gold) */
    --ff-bronze-dark: #8B6F47;      /* accent hover state */
    --ff-cocoa: #6B5544;            /* body text */
    --ff-espresso: #4A3828;         /* headings */
    --ff-charcoal: #2A2015;         /* max-contrast text */
    --ff-white: #FFFFFF;
    --ff-error: #A94442;
    --ff-success: #6B7A5A;

    /* Functional tokens */
    --ff-bg-page: var(--ff-cream);
    --ff-bg-surface: var(--ff-white);
    --ff-bg-muted: var(--ff-cream-deep);
    --ff-text-body: var(--ff-cocoa);
    --ff-text-heading: var(--ff-espresso);
    --ff-text-muted: #8A7966;
    --ff-accent: var(--ff-bronze);
    --ff-accent-hover: var(--ff-bronze-dark);
    --ff-border: var(--ff-sand);
    --ff-border-strong: #D4C5AC;

    /* Typography */
    --ff-font-display: 'Cormorant Garamond', 'Playfair Display', Georgia, serif;
    --ff-font-body: 'Inter', 'Helvetica Neue', Arial, sans-serif;
    --ff-font-accent: 'Cormorant Garamond', Georgia, serif;

    /* Spacing scale (rem-based, 1rem = 16px) */
    --ff-space-xs: 0.5rem;      /* 8px  */
    --ff-space-sm: 0.75rem;     /* 12px */
    --ff-space-md: 1rem;        /* 16px */
    --ff-space-lg: 1.5rem;      /* 24px */
    --ff-space-xl: 2rem;        /* 32px */
    --ff-space-2xl: 3rem;       /* 48px */
    --ff-space-3xl: 4.5rem;     /* 72px */
    --ff-space-4xl: 6rem;       /* 96px */

    /* Radius */
    --ff-radius-sm: 2px;
    --ff-radius-md: 6px;
    --ff-radius-lg: 12px;
    --ff-radius-pill: 999px;

    /* Shadow (subtle — luxe not flashy) */
    --ff-shadow-sm: 0 1px 2px rgba(74, 56, 40, 0.04);
    --ff-shadow-md: 0 4px 12px rgba(74, 56, 40, 0.06);
    --ff-shadow-lg: 0 12px 32px rgba(74, 56, 40, 0.08);

    /* Transitions */
    --ff-transition: 200ms ease;
    --ff-transition-slow: 400ms ease;

    /* Layout */
    --ff-container-max: 1280px;
    --ff-content-max: 720px;
}

/* ==========================================================================
   GLOBAL BASE
   ========================================================================== */

body {
    background-color: var(--ff-bg-page);
    color: var(--ff-text-body);
    font-family: var(--ff-font-body);
    font-size: 16px;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Headings — serif, italic display tone */
h1, h2, h3, h4, h5, h6,
.entry-title,
.site-title {
    font-family: var(--ff-font-display);
    color: var(--ff-text-heading);
    font-weight: 400;
    letter-spacing: -0.01em;
    line-height: 1.2;
}

h1, .entry-title { font-size: clamp(2rem, 4vw, 3.25rem); font-style: italic; }
h2             { font-size: clamp(1.75rem, 3vw, 2.5rem); }
h3             { font-size: clamp(1.375rem, 2vw, 1.75rem); }
h4             { font-size: 1.25rem; }
h5             { font-size: 1.125rem; }
h6             { font-size: 1rem; letter-spacing: 0.1em; text-transform: uppercase; font-family: var(--ff-font-body); font-weight: 500; }

/* Overline label — used above headings */
.ff-overline {
    display: inline-block;
    font-family: var(--ff-font-body);
    font-size: 11px;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: var(--ff-accent);
    margin-bottom: var(--ff-space-sm);
    font-weight: 500;
}
.ff-overline::before { content: '◆  '; }

/* Links */
a {
    color: var(--ff-accent);
    text-decoration: none;
    transition: color var(--ff-transition);
}
a:hover, a:focus {
    color: var(--ff-accent-hover);
}

/* ==========================================================================
   BUTTONS
   ========================================================================== */

.ff-btn,
.wp-block-button__link,
.ast-button,
button.ast-search-submit,
.wp-block-search__button,
input[type="submit"],
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button,
.woocommerce #respond input#submit {
    display: inline-block;
    padding: 13px 28px;
    font-family: var(--ff-font-body);
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    background-color: var(--ff-accent);
    color: var(--ff-white) !important;
    border: 1px solid var(--ff-accent);
    border-radius: var(--ff-radius-pill);
    cursor: pointer;
    transition: all var(--ff-transition);
    text-decoration: none;
    line-height: 1.2;
}

.ff-btn:hover,
.wp-block-button__link:hover,
.ast-button:hover,
input[type="submit"]:hover,
.woocommerce a.button:hover,
.woocommerce button.button:hover {
    background-color: var(--ff-accent-hover);
    border-color: var(--ff-accent-hover);
    color: var(--ff-white) !important;
    transform: translateY(-1px);
    box-shadow: var(--ff-shadow-md);
}

.ff-btn--outline {
    background-color: transparent;
    color: var(--ff-accent) !important;
    border-color: var(--ff-accent);
}
.ff-btn--outline:hover {
    background-color: var(--ff-accent);
    color: var(--ff-white) !important;
}

.ff-btn--dark {
    background-color: var(--ff-espresso);
    border-color: var(--ff-espresso);
}
.ff-btn--dark:hover {
    background-color: var(--ff-charcoal);
    border-color: var(--ff-charcoal);
}

/* ==========================================================================
   LAYOUT — containers & sections
   ========================================================================== */

.ast-container,
.site-content > .ast-container {
    max-width: var(--ff-container-max);
}

.ff-section {
    padding: var(--ff-space-3xl) var(--ff-space-lg);
}

.ff-section--muted    { background-color: var(--ff-bg-muted); }
.ff-section--surface  { background-color: var(--ff-bg-surface); }
.ff-section--dark     { background-color: var(--ff-espresso); color: var(--ff-cream); }
.ff-section--dark h2,
.ff-section--dark h3  { color: var(--ff-cream); }

.ff-container {
    max-width: var(--ff-container-max);
    margin: 0 auto;
    padding: 0 var(--ff-space-lg);
}
.ff-container--narrow {
    max-width: var(--ff-content-max);
}

/* ==========================================================================
   SITE HEADER — Astra overrides
   ========================================================================== */

.ast-primary-header-bar,
.site-header {
    background-color: var(--ff-bg-page) !important;
    border-bottom: 1px solid var(--ff-border);
}

.site-title a {
    font-family: var(--ff-font-display);
    font-style: italic;
    font-weight: 400;
    color: var(--ff-espresso) !important;
    letter-spacing: 0.05em;
}

.main-header-menu a,
.ast-masthead-custom-menu-items a {
    font-size: 13px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--ff-cocoa) !important;
    font-weight: 400;
    transition: color var(--ff-transition);
}

.main-header-menu a:hover {
    color: var(--ff-accent) !important;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */

.site-footer,
.footer-adv {
    background-color: var(--ff-espresso);
    color: var(--ff-cream);
}

.site-footer a,
.footer-adv a {
    color: var(--ff-cream) !important;
    opacity: 0.85;
    transition: opacity var(--ff-transition);
}
.site-footer a:hover,
.footer-adv a:hover {
    color: var(--ff-bronze) !important;
    opacity: 1;
}

.site-footer h2,
.site-footer h3,
.site-footer h4,
.footer-adv h2,
.footer-adv h3,
.footer-adv h4 {
    color: var(--ff-cream) !important;
    font-family: var(--ff-font-display);
    font-style: italic;
}

/* ==========================================================================
   WOOCOMMERCE OVERRIDES
   ========================================================================== */

/* Shop grid — product cards */
.woocommerce ul.products li.product {
    background: var(--ff-bg-surface);
    border: 1px solid var(--ff-border);
    border-radius: var(--ff-radius-md);
    padding: var(--ff-space-md) !important;
    transition: all var(--ff-transition);
}

.woocommerce ul.products li.product:hover {
    border-color: var(--ff-border-strong);
    transform: translateY(-2px);
    box-shadow: var(--ff-shadow-md);
}

.woocommerce ul.products li.product .woocommerce-loop-product__title {
    font-family: var(--ff-font-display);
    font-style: italic;
    font-size: 1.25rem !important;
    color: var(--ff-espresso) !important;
    padding: var(--ff-space-sm) 0 var(--ff-space-xs) !important;
}

.woocommerce ul.products li.product .price {
    font-family: var(--ff-font-body);
    color: var(--ff-accent) !important;
    font-size: 12px !important;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    font-weight: 500;
}

.woocommerce ul.products li.product .price del {
    opacity: 0.5;
    font-size: 0.9em;
}

.woocommerce ul.products li.product .onsale {
    background: var(--ff-espresso);
    color: var(--ff-cream);
    border-radius: var(--ff-radius-pill);
    font-size: 10px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 4px 12px;
    min-height: auto;
    min-width: auto;
    line-height: 1.5;
    top: var(--ff-space-md);
    right: var(--ff-space-md);
    left: auto;
}

/* Single product page */
.woocommerce div.product .product_title {
    font-family: var(--ff-font-display);
    font-style: italic;
    color: var(--ff-espresso);
}

.woocommerce div.product p.price,
.woocommerce div.product span.price {
    color: var(--ff-accent);
    font-family: var(--ff-font-display);
    font-size: 1.75rem;
}

.woocommerce-tabs .tabs li {
    background: transparent !important;
    border: 0 !important;
    border-bottom: 1px solid transparent !important;
}
.woocommerce-tabs .tabs li.active {
    border-bottom-color: var(--ff-accent) !important;
}
.woocommerce-tabs .tabs li a {
    color: var(--ff-cocoa) !important;
    font-size: 12px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    font-weight: 500;
}

/* Cart & checkout */
.woocommerce-cart table.cart,
.woocommerce-checkout .woocommerce-checkout-review-order-table {
    border: 1px solid var(--ff-border);
    background: var(--ff-bg-surface);
}

.woocommerce #respond input#submit.alt,
.woocommerce a.button.alt,
.woocommerce button.button.alt,
.woocommerce input.button.alt {
    background-color: var(--ff-espresso) !important;
    color: var(--ff-cream) !important;
    border-color: var(--ff-espresso) !important;
}
.woocommerce #respond input#submit.alt:hover,
.woocommerce a.button.alt:hover,
.woocommerce button.button.alt:hover {
    background-color: var(--ff-charcoal) !important;
    border-color: var(--ff-charcoal) !important;
}

/* Notices */
.woocommerce-message,
.woocommerce-info {
    border-top-color: var(--ff-accent) !important;
    background: var(--ff-cream-deep);
    color: var(--ff-espresso);
}
.woocommerce-message::before,
.woocommerce-info::before {
    color: var(--ff-accent) !important;
}

/* ==========================================================================
   ELEMENTOR GLOBAL OVERRIDES
   Hook into Elementor's global classes for consistent luxe feel
   ========================================================================== */

.elementor-button {
    border-radius: var(--ff-radius-pill) !important;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-size: 13px !important;
    padding: 13px 28px !important;
}

/* ==========================================================================
   FORMS — consultation intake etc.
   ========================================================================== */

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="url"],
input[type="password"],
input[type="search"],
input[type="number"],
textarea,
select {
    background: var(--ff-bg-surface);
    border: 1px solid var(--ff-border);
    border-radius: var(--ff-radius-sm);
    padding: 12px 16px;
    font-family: var(--ff-font-body);
    font-size: 14px;
    color: var(--ff-text-body);
    transition: border-color var(--ff-transition);
    width: 100%;
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--ff-accent);
    box-shadow: 0 0 0 3px rgba(168, 139, 95, 0.12);
}

label {
    font-size: 12px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--ff-cocoa);
    font-weight: 500;
    display: block;
    margin-bottom: var(--ff-space-xs);
}

/* ==========================================================================
   UTILITY CLASSES
   Drop-in classes usable from Elementor "CSS Classes" field
   ========================================================================== */

.ff-text-center   { text-align: center; }
.ff-text-accent   { color: var(--ff-accent); }
.ff-text-muted    { color: var(--ff-text-muted); }
.ff-italic        { font-style: italic; }
.ff-serif         { font-family: var(--ff-font-display); }

.ff-divider {
    width: 60px;
    height: 1px;
    background: var(--ff-accent);
    margin: var(--ff-space-md) auto;
    border: 0;
}

/* Image treatment — soft vignette on hover */
.ff-image-lux img {
    border-radius: var(--ff-radius-md);
    transition: all var(--ff-transition-slow);
    filter: saturate(0.95);
}
.ff-image-lux:hover img {
    filter: saturate(1.05);
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */

@media (max-width: 768px) {
    :root {
        --ff-space-3xl: 3rem;
        --ff-space-4xl: 4rem;
    }

    .ff-section { padding: var(--ff-space-2xl) var(--ff-space-md); }
}

/* ==========================================================================
   ACCESSIBILITY
   ========================================================================== */

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

/* Focus visible — keyboard navigation */
*:focus-visible {
    outline: 2px solid var(--ff-accent);
    outline-offset: 2px;
    border-radius: var(--ff-radius-sm);
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}
