/*
Theme Name: Ferovive
Theme URI: https://example.com/ferovive
Author: Ferovive Studio
Author URI: https://example.com
Description: Ferovive is a premium WooCommerce theme with a clean white background and a refined purple brand palette. It features a modern, fashion-forward design, a full-width hero, curated category showcases, featured product grids, mega header navigation, wishlist, quick-view, and a fully responsive, conversion-optimised shopping experience.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: elegante
Tags: e-commerce, fashion, woocommerce, custom-colors, custom-menu, custom-logo, featured-images, full-width-template, translation-ready, two-columns, right-sidebar
WC requires at least: 6.0
WC tested up to: 8.7
*/

/* =========================================================
   1. DESIGN TOKENS (CSS Variables)
   ========================================================= */
:root {
    --e-ink:        #45122a;   /* primary text / deep plum */
    --e-ink-soft:   #5f3348;   /* body text */
    --e-muted:      #9b7d8b;
    --e-line:       #ecdde5;   /* borders (light purple tint) */
    --e-bg:         #ffffff;
    --e-cream:      #faf5f8;   /* section background (soft purple tint) */
    --e-gold:       #7a1f4c;   /* brand purple accent (matches logo) */
    --e-gold-dark:  #5e1836;
    --e-danger:     #c0392b;
    --e-success:    #2e7d32;

    --e-font-head:  'Playfair Display', Georgia, 'Times New Roman', serif;
    --e-font-body:  'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

    --e-radius:     10px;
    --e-radius-sm:  6px;
    --e-shadow:     0 12px 40px rgba(28, 28, 28, .08);
    --e-shadow-sm:  0 4px 18px rgba(28, 28, 28, .06);
    --e-container:  1280px;
    --e-transition: .35s cubic-bezier(.2, .7, .3, 1);
}

/* =========================================================
   2. RESET & BASE
   ========================================================= */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: var(--e-font-body);
    font-size: 16px;
    line-height: 1.7;
    color: var(--e-ink-soft);
    background: var(--e-bg);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--e-font-head);
    color: var(--e-ink);
    line-height: 1.2;
    font-weight: 600;
    margin: 0 0 .6em;
}

h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); }
h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); }
h3 { font-size: clamp(1.3rem, 2.5vw, 1.7rem); }

p { margin: 0 0 1.2em; }

a {
    color: var(--e-ink);
    text-decoration: none;
    transition: color var(--e-transition);
}
a:hover { color: var(--e-gold); }

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

ul, ol { margin: 0 0 1.2em; padding-left: 1.2em; }

.e-container {
    max-width: var(--e-container);
    margin: 0 auto;
    padding: 0 24px;
}

.screen-reader-text {
    position: absolute !important;
    width: 1px; height: 1px;
    overflow: hidden;
    clip: rect(1px, 1px, 1px, 1px);
    white-space: nowrap;
}

/* =========================================================
   3. BUTTONS
   ========================================================= */
.e-btn,
button, input[type="submit"], input[type="button"], .button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    font-family: var(--e-font-body);
    font-size: .82rem;
    font-weight: 600;
    letter-spacing: .12em;
    text-transform: uppercase;
    padding: 14px 34px;
    border: 1.5px solid var(--e-ink);
    border-radius: 50px;
    background: var(--e-ink);
    color: #fff;
    cursor: pointer;
    transition: all var(--e-transition);
    line-height: 1;
}
.e-btn:hover,
button:hover, input[type="submit"]:hover, .button:hover {
    background: var(--e-gold);
    border-color: var(--e-gold);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(122, 31, 76, .3);
}

.e-btn--outline {
    background: transparent;
    color: var(--e-ink);
}
.e-btn--outline:hover {
    background: var(--e-ink);
    border-color: var(--e-ink);
    color: #fff;
}

.e-btn--light {
    background: #fff;
    border-color: #fff;
    color: var(--e-ink);
}

/* =========================================================
   4. TOP BAR
   ========================================================= */
.e-topbar {
    background: var(--e-cream);
    color: var(--e-ink);
    border-bottom: 1px solid var(--e-line);
    font-size: .78rem;
    letter-spacing: .06em;
}
.e-topbar .e-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 42px;
    gap: 16px;
}
.e-topbar a { color: var(--e-ink); }
.e-topbar a:hover { color: var(--e-gold); }
.e-topbar__promo { display: flex; align-items: center; gap: .4rem; }
.e-topbar__links { display: flex; gap: 20px; }

/* =========================================================
   5. HEADER
   ========================================================= */
.e-header {
    position: sticky;
    top: 0;
    z-index: 900;
    background: rgba(255, 255, 255, .96);
    backdrop-filter: saturate(1.4) blur(8px);
    border-bottom: 1px solid var(--e-line);
    transition: box-shadow var(--e-transition);
}
.e-header.is-stuck { box-shadow: var(--e-shadow-sm); }

.e-header__inner {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 24px;
    min-height: 84px;
}

.e-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    justify-self: center;
    text-align: center;
}
.e-brand__title {
    font-family: var(--e-font-head);
    font-size: 1.7rem;
    font-weight: 700;
    letter-spacing: .04em;
    color: var(--e-gold);
    margin: 0;
    line-height: 1;
}
.e-brand__tag {
    display: block;
    font-family: var(--e-font-body);
    font-size: .58rem;
    letter-spacing: .35em;
    text-transform: uppercase;
    color: var(--e-gold-dark);
    margin-top: 4px;
}
.e-brand img { max-height: 52px; width: auto; }

/* Primary nav */
.e-nav { justify-self: start; }
.e-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 30px; }
.e-nav li { position: relative; }
.e-nav a {
    font-size: .82rem;
    font-weight: 600;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--e-ink);
    padding: 8px 0;
    position: relative;
}
.e-nav a::after {
    content: "";
    position: absolute;
    left: 0; bottom: 0;
    width: 0; height: 2px;
    background: var(--e-gold);
    transition: width var(--e-transition);
}
.e-nav a:hover::after,
.e-nav .current-menu-item > a::after { width: 100%; }

/* Sub menu */
.e-nav ul ul {
    position: absolute;
    top: 130%;
    left: 0;
    flex-direction: column;
    gap: 0;
    min-width: 210px;
    background: #fff;
    border: 1px solid var(--e-line);
    border-radius: var(--e-radius-sm);
    box-shadow: var(--e-shadow);
    padding: 8px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: all var(--e-transition);
}
.e-nav li:hover > ul { opacity: 1; visibility: visible; transform: translateY(0); }
.e-nav ul ul a { display: block; padding: 10px 20px; letter-spacing: .06em; }
.e-nav ul ul a::after { display: none; }
.e-nav ul ul a:hover { background: var(--e-cream); color: var(--e-gold-dark); }

/* Header actions */
.e-actions {
    justify-self: end;
    display: flex;
    align-items: center;
    gap: 22px;
}
.e-action {
    position: relative;
    display: inline-flex;
    color: var(--e-gold);
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
}
.e-action:hover { color: var(--e-gold-dark); }
.e-action svg { width: 22px; height: 22px; }
.e-action__badge {
    position: absolute;
    top: -8px; right: -10px;
    min-width: 18px; height: 18px;
    padding: 0 4px;
    background: var(--e-gold);
    color: #fff;
    font-size: .62rem;
    font-weight: 700;
    line-height: 18px;
    text-align: center;
    border-radius: 20px;
}

.e-burger { display: none; }

/* =========================================================
   6. HERO
   ========================================================= */
.e-hero {
    position: relative;
    min-height: 78vh;
    display: flex;
    align-items: center;
    color: var(--e-ink);
    background: linear-gradient(120deg, #ffffff 0%, #faf5f8 55%, #f3e6ee 100%);
    overflow: hidden;
}
.e-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: .55;
}
.e-hero__inner { position: relative; z-index: 2; max-width: 640px; }
.e-hero__eyebrow {
    display: inline-block;
    font-size: .72rem;
    letter-spacing: .35em;
    text-transform: uppercase;
    color: var(--e-gold);
    margin-bottom: 20px;
}
.e-hero h1 { color: var(--e-ink); margin-bottom: .3em; }
.e-hero p { color: var(--e-ink-soft); font-size: 1.1rem; max-width: 500px; }
.e-hero__cta { display: flex; gap: 16px; margin-top: 30px; flex-wrap: wrap; }

/* =========================================================
   7. SECTIONS & HEADINGS
   ========================================================= */
.e-section { padding: 88px 0; }
.e-section--cream { background: var(--e-cream); }

.e-section__head {
    text-align: center;
    max-width: 620px;
    margin: 0 auto 54px;
}
.e-section__eyebrow {
    display: inline-block;
    font-size: .72rem;
    letter-spacing: .3em;
    text-transform: uppercase;
    color: var(--e-gold-dark);
    margin-bottom: 14px;
}
.e-section__head p { color: var(--e-muted); }

/* =========================================================
   8. CATEGORY SHOWCASE
   ========================================================= */
.e-cats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}
.e-cat {
    position: relative;
    display: block;
    border-radius: var(--e-radius);
    overflow: hidden;
    aspect-ratio: 3 / 4;
    background: var(--e-cream);
}
.e-cat img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.e-cat:hover img { transform: scale(1.06); }
.e-cat__label {
    position: absolute;
    left: 0; right: 0; bottom: 0;
    padding: 22px;
    background: linear-gradient(to top, rgba(0,0,0,.65), transparent);
    color: #fff;
}
.e-cat__label h3 { color: #fff; margin: 0; font-size: 1.25rem; }
.e-cat__label span { font-size: .78rem; letter-spacing: .06em; opacity: .85; }

/* =========================================================
   9. PRODUCT GRID (WooCommerce loop – see woocommerce.css too)
   ========================================================= */
.e-products {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

/* =========================================================
   10. FEATURE STRIP
   ========================================================= */
.e-features {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}
.e-feature { text-align: center; padding: 10px; }
.e-feature__icon {
    width: 52px; height: 52px;
    margin: 0 auto 16px;
    color: var(--e-gold);
}
.e-feature h4 { font-family: var(--e-font-body); font-size: 1rem; font-weight: 600; margin-bottom: 6px; text-transform: uppercase; letter-spacing: .06em; }
.e-feature p { font-size: .88rem; color: var(--e-muted); margin: 0; }

/* =========================================================
   11. PROMO BANNER
   ========================================================= */
.e-banner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}
.e-banner__card {
    position: relative;
    border-radius: var(--e-radius);
    overflow: hidden;
    min-height: 320px;
    display: flex;
    align-items: center;
    padding: 48px;
    color: var(--e-ink);
    border: 1px solid var(--e-line);
    background: linear-gradient(135deg, #faf5f8 0%, #f3e6ee 100%);
}
.e-banner__card:nth-child(2) { background: linear-gradient(135deg, #f6eef3 0%, #efdce8 100%); }
.e-banner__card h3 { color: var(--e-ink); font-size: 1.8rem; }
.e-banner__card .e-btn { margin-top: 14px; }

/* =========================================================
   12. NEWSLETTER
   ========================================================= */
.e-newsletter {
    background: var(--e-cream);
    color: var(--e-ink-soft);
    text-align: center;
    padding: 80px 0;
    border-top: 1px solid var(--e-line);
}
.e-newsletter h2 { color: var(--e-ink); }
.e-newsletter p { color: var(--e-muted); max-width: 480px; margin: 0 auto 28px; }
.e-newsletter__form {
    display: flex;
    max-width: 480px;
    margin: 0 auto;
    gap: 10px;
}
.e-newsletter__form input[type="email"] {
    flex: 1;
    padding: 14px 20px;
    border: 1px solid var(--e-line);
    background: #fff;
    color: var(--e-ink);
    border-radius: 50px;
    font-family: var(--e-font-body);
}
.e-newsletter__form input::placeholder { color: var(--e-muted); }
.e-newsletter__form .e-btn { background: var(--e-gold); border-color: var(--e-gold); }

/* =========================================================
   13. FOOTER
   ========================================================= */
.e-footer {
    background: var(--e-cream);
    color: var(--e-ink-soft);
    padding: 72px 0 0;
    font-size: .92rem;
    border-top: 1px solid var(--e-line);
}
.e-footer a { color: var(--e-ink-soft); }
.e-footer a:hover { color: var(--e-gold); }
.e-footer__grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1fr;
    gap: 40px;
    padding-bottom: 54px;
}
.e-footer h4 {
    color: var(--e-ink);
    font-family: var(--e-font-body);
    font-size: .95rem;
    text-transform: uppercase;
    letter-spacing: .1em;
    margin-bottom: 20px;
}
.e-footer ul { list-style: none; padding: 0; margin: 0; }
.e-footer li { margin-bottom: 12px; }
.e-footer__brand .e-brand__title { color: var(--e-gold); }
.e-footer__social { display: flex; gap: 14px; margin-top: 18px; }
.e-footer__social a {
    width: 40px; height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--e-ink);
    border: 1px solid var(--e-line);
    border-radius: 50%;
}
.e-footer__social a:hover { background: var(--e-gold); border-color: var(--e-gold); color: #fff; }
.e-footer__social svg { width: 18px; height: 18px; }
.e-footer__bottom {
    border-top: 1px solid var(--e-line);
    padding: 26px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    font-size: .82rem;
    color: var(--e-muted);
    flex-wrap: wrap;
}
.e-footer__pay { display: flex; gap: 10px; align-items: center; opacity: .8; }
.e-footer__pay span {
    padding: 4px 10px;
    border: 1px solid var(--e-line);
    border-radius: 4px;
    font-size: .7rem;
    letter-spacing: .05em;
}

/* =========================================================
   14. PAGE HEADER (inner pages / shop)
   ========================================================= */
.e-pagehead {
    background: var(--e-cream);
    text-align: center;
    padding: 64px 0;
    border-bottom: 1px solid var(--e-line);
}
.e-pagehead h1 { margin: 0 0 10px; }
.e-breadcrumb { font-size: .82rem; color: var(--e-muted); }
.e-breadcrumb a { color: var(--e-gold-dark); }

/* =========================================================
   15. CONTENT / PAGES
   ========================================================= */
.e-content { padding: 72px 0; }
.e-content-narrow { max-width: 820px; margin: 0 auto; }

.e-page-layout { display: grid; grid-template-columns: 1fr 300px; gap: 48px; }
.e-sidebar .widget {
    margin-bottom: 36px;
    padding-bottom: 28px;
    border-bottom: 1px solid var(--e-line);
}
.e-sidebar .widget-title {
    font-size: 1.1rem;
    margin-bottom: 18px;
}

/* Contact grid */
.e-contact-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: 48px; align-items: start; }
.e-contact-info { display: grid; gap: 26px; }
.e-contact-item { display: flex; gap: 16px; }
.e-contact-item svg { width: 26px; height: 26px; color: var(--e-gold); flex-shrink: 0; }
.e-contact-item h4 { margin: 0 0 4px; font-family: var(--e-font-body); font-size: 1rem; }
.e-contact-item p { margin: 0; color: var(--e-muted); }

/* Simple form styling */
.e-form label { display: block; font-size: .82rem; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; margin-bottom: 8px; color: var(--e-ink); }
.e-form input, .e-form textarea, .e-form select {
    width: 100%;
    padding: 13px 16px;
    border: 1px solid var(--e-line);
    border-radius: var(--e-radius-sm);
    font-family: var(--e-font-body);
    font-size: .95rem;
    margin-bottom: 20px;
    background: #fff;
    color: var(--e-ink);
}
.e-form input:focus, .e-form textarea:focus, .e-form select:focus {
    outline: none;
    border-color: var(--e-gold);
    box-shadow: 0 0 0 3px rgba(122,31,76,.15);
}

/* =========================================================
   16. MOBILE DRAWER
   ========================================================= */
.e-drawer {
    position: fixed;
    top: 0; right: -100%;
    width: 320px; max-width: 86vw;
    height: 100%;
    background: #fff;
    z-index: 1200;
    box-shadow: -20px 0 60px rgba(0,0,0,.2);
    transition: right var(--e-transition);
    padding: 28px 24px;
    overflow-y: auto;
}
.e-drawer.is-open { right: 0; }
.e-drawer__close { background: none; border: none; padding: 0; font-size: 1.6rem; cursor: pointer; float: right; }
.e-drawer ul { list-style: none; padding: 0; margin: 40px 0 0; }
.e-drawer li { border-bottom: 1px solid var(--e-line); }
.e-drawer a { display: block; padding: 15px 0; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; font-size: .9rem; }
.e-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.5);
    z-index: 1100;
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--e-transition);
}
.e-overlay.is-open { opacity: 1; visibility: visible; }

/* =========================================================
   17. UTILITIES & PAGINATION
   ========================================================= */
.text-center { text-align: center; }
.mt-40 { margin-top: 40px; }
.e-more-wrap { text-align: center; margin-top: 50px; }

/* =========================================================
   18. RESPONSIVE
   ========================================================= */
@media (max-width: 1024px) {
    .e-cats { grid-template-columns: repeat(2, 1fr); }
    .e-products { grid-template-columns: repeat(3, 1fr); }
    .e-features { grid-template-columns: repeat(2, 1fr); }
    .e-footer__grid { grid-template-columns: 1fr 1fr; }
    .e-page-layout { grid-template-columns: 1fr; }
}

@media (max-width: 860px) {
    .e-nav { display: none; }
    .e-burger { display: inline-flex; }
    .e-header__inner { grid-template-columns: auto 1fr auto; }
    .e-brand { justify-self: start; text-align: left; }
    .e-topbar__promo { display: none; }
    .e-products { grid-template-columns: repeat(2, 1fr); }
    .e-banner { grid-template-columns: 1fr; }
    .e-contact-grid { grid-template-columns: 1fr; }
    .e-section { padding: 60px 0; }
}

@media (max-width: 520px) {
    .e-products { grid-template-columns: repeat(2, 1fr); gap: 16px; }
    .e-features { grid-template-columns: 1fr; }
    .e-footer__grid { grid-template-columns: 1fr; }
    .e-newsletter__form { flex-direction: column; }
    .e-newsletter__form input[type="email"] { border-radius: var(--e-radius-sm); }
    .e-hero { min-height: 68vh; }
}
