/*
Theme Name: Fancyadeal Byvex
Theme URI: https://fancyadeal.com
Description: Fancyadeal marketplace child theme based on Byvex WooCommerce Starter.
Author: Fancyadeal
Template: byvex-woocommerce-starter
Version: 1.0.0
*/

:root {
    --fd-gold: #D4AF37;
    --fd-gold-dark: #B89220;
    --fd-gold-soft: #F7E7B0;
    --fd-cream: #FFFDF7;
    --fd-text: #202020;
    --fd-muted: #777777;
    --fd-border: #EAE7DE;
    --fd-white: #FFFFFF;
}

html {
    scroll-behavior: smooth;
}

body {
    background: var(--fd-cream);
    color: var(--fd-text);
    font-family:
        Inter,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;
}

a {
    color: var(--fd-text);
}

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

.site-header,
header {
    background: var(--fd-white);
}

.site-header {
    border-bottom: 1px solid var(--fd-border);
}

.navbar,
.navigation,
.main-navigation {
    background: var(--fd-white);
}

button,
.button,
.wp-element-button,
input[type="submit"],
.add_to_cart_button,
.single_add_to_cart_button {
    background: var(--fd-gold) !important;
    border-color: var(--fd-gold) !important;
    color: #fff !important;
    border-radius: 999px !important;
    font-weight: 700;
    transition: all .2s ease;
}

button:hover,
.button:hover,
.wp-element-button:hover,
input[type="submit"]:hover,
.add_to_cart_button:hover,
.single_add_to_cart_button:hover {
    background: var(--fd-gold-dark) !important;
    border-color: var(--fd-gold-dark) !important;
    color: #fff !important;
    transform: translateY(-1px);
}

input,
select,
textarea {
    border: 1px solid var(--fd-border);
    border-radius: 14px;
    background: #fff;
}

.fd-header {
    background: #fff;
    border-bottom: 1px solid var(--fd-border);
    position: sticky;
    top: 0;
    z-index: 999;
}

.fd-header-inner {
    max-width: 1280px;
    margin: auto;
    min-height: 74px;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    gap: 24px;
}

.fd-logo {
    font-size: 27px;
    font-weight: 900;
    text-decoration: none;
    letter-spacing: -1.5px;
    color: var(--fd-text) !important;
    white-space: nowrap;
}

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

.fd-search {
    flex: 1;
    max-width: 650px;
    position: relative;
}

.fd-search input {
    width: 100%;
    height: 46px;
    padding: 0 20px;
    border-radius: 999px;
    background: #F6F5F1;
    border: 1px solid transparent;
    outline: none;
}

.fd-search input:focus {
    background: #fff;
    border-color: var(--fd-gold);
}

.fd-actions {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-left: auto;
}

.fd-actions a {
    text-decoration: none;
    font-weight: 600;
    white-space: nowrap;
}

.fd-sell {
    background: var(--fd-gold);
    color: #fff !important;
    padding: 11px 20px;
    border-radius: 999px;
    font-weight: 800 !important;
}

.fd-sell:hover {
    background: var(--fd-gold-dark);
}

.fd-categories {
    background: #fff;
    border-bottom: 1px solid var(--fd-border);
}

.fd-categories-inner {
    max-width: 1280px;
    margin: auto;
    padding: 10px 20px;
    display: flex;
    gap: 24px;
    overflow-x: auto;
}

.fd-categories a {
    text-decoration: none;
    font-size: 14px;
    white-space: nowrap;
    color: #555;
}

.fd-categories a:hover {
    color: var(--fd-gold-dark);
}

.fd-hero {
    max-width: 1280px;
    margin: 32px auto;
    padding: 65px 50px;
    border-radius: 28px;
    background:
        radial-gradient(circle at 85% 20%, rgba(212,175,55,.30), transparent 30%),
        linear-gradient(135deg, #fff 0%, #FFF8E5 100%);
    border: 1px solid #F0E5C1;
}

.fd-hero h1 {
    max-width: 650px;
    font-size: clamp(38px, 6vw, 68px);
    line-height: 1;
    letter-spacing: -3px;
    margin: 0 0 22px;
    font-weight: 900;
}

.fd-hero h1 span {
    color: var(--fd-gold-dark);
}

.fd-hero p {
    max-width: 600px;
    color: #666;
    font-size: 18px;
    line-height: 1.6;
}

.fd-hero-actions {
    margin-top: 30px;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.fd-hero-primary {
    display: inline-block;
    padding: 14px 26px;
    background: var(--fd-gold);
    color: #fff !important;
    border-radius: 999px;
    text-decoration: none;
    font-weight: 800;
}

.fd-hero-secondary {
    display: inline-block;
    padding: 14px 26px;
    background: #fff;
    color: var(--fd-text) !important;
    border: 1px solid var(--fd-border);
    border-radius: 999px;
    text-decoration: none;
    font-weight: 700;
}

.fd-section {
    max-width: 1280px;
    margin: 45px auto;
    padding: 0 20px;
}

.fd-section-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.fd-section-title h2 {
    margin: 0;
    font-size: 30px;
    font-weight: 900;
    letter-spacing: -1px;
}

.fd-section-title a {
    color: var(--fd-gold-dark);
    font-weight: 700;
    text-decoration: none;
}

.woocommerce ul.products {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 22px;
    margin: 0 !important;
}

.woocommerce ul.products::before,
.woocommerce ul.products::after {
    display: none !important;
}

.woocommerce ul.products li.product {
    width: auto !important;
    float: none !important;
    margin: 0 !important;
    padding: 0 0 16px !important;
    background: #fff;
    border: 1px solid var(--fd-border);
    border-radius: 18px;
    overflow: hidden;
    transition: transform .2s ease, box-shadow .2s ease;
}

.woocommerce ul.products li.product:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(0,0,0,.08);
}

.woocommerce ul.products li.product a img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    margin: 0 0 13px !important;
}

.woocommerce ul.products li.product .woocommerce-loop-product__title {
    padding: 0 15px;
    font-size: 15px;
    font-weight: 700;
}

.woocommerce ul.products li.product .price {
    padding: 0 15px;
    color: var(--fd-text);
    font-weight: 800;
}

.woocommerce ul.products li.product .button {
    margin: 8px 15px 0 !important;
    display: inline-block;
}

.fd-trust {
    max-width: 1280px;
    margin: 45px auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.fd-trust-card {
    background: #fff;
    border: 1px solid var(--fd-border);
    border-radius: 18px;
    padding: 25px;
}

.fd-trust-card strong {
    display: block;
    font-size: 17px;
    margin-bottom: 7px;
}

.fd-trust-card span {
    color: var(--fd-muted);
    font-size: 14px;
}

.fd-footer {
    margin-top: 70px;
    background: #202020;
    color: #fff;
    padding: 45px 20px;
}

.fd-footer-inner {
    max-width: 1280px;
    margin: auto;
}

.fd-footer a {
    color: #fff;
}

@media (max-width: 900px) {
    .fd-actions a:not(.fd-sell) {
        display: none;
    }

    .fd-header-inner {
        gap: 12px;
    }

    .fd-hero {
        margin: 20px;
        padding: 45px 25px;
    }

    .woocommerce ul.products {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 14px;
    }

    .fd-trust {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .fd-logo {
        font-size: 23px;
    }

    .fd-search {
        display: none;
    }

    .fd-hero h1 {
        letter-spacing: -2px;
    }

    .woocommerce ul.products {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* ==========================================================
   FANCYADEAL UI PATCH
   ========================================================== */

*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    overflow-x: hidden;
}

.site-content,
.content-area,
.site-main,
main {
    min-width: 0;
    overflow: visible;
}

.fd-header-inner {
    width: 100%;
    box-sizing: border-box;
}

.fd-actions {
    flex-shrink: 0;
    white-space: nowrap;
}

.fd-actions a {
    white-space: nowrap;
}

.fd-search {
    min-width: 0;
}

.fd-search input {
    box-sizing: border-box;
}

/* Prevent WooCommerce product/card text from overlapping */
.woocommerce ul.products {
    align-items: start !important;
    grid-auto-rows: auto;
}

.woocommerce ul.products li.product {
    min-width: 0;
    height: auto !important;
    min-height: 0 !important;
    display: flex !important;
    flex-direction: column !important;
}

.woocommerce ul.products li.product a {
    display: block;
    min-width: 0;
}

.woocommerce ul.products li.product a img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
    object-fit: cover;
}

.woocommerce ul.products li.product .woocommerce-loop-product__title {
    margin: 0 !important;
    min-height: 42px;
    line-height: 1.35;
    overflow-wrap: anywhere;
    word-break: normal;
}

.woocommerce ul.products li.product .price {
    margin: 7px 0 0 !important;
    min-height: 24px;
    line-height: 1.4;
}

.woocommerce ul.products li.product .button {
    align-self: flex-start;
    margin-top: auto !important;
}

/* Bottom feature cards */
.fd-trust {
    width: 100%;
    box-sizing: border-box;
    align-items: stretch;
    margin: 60px auto 70px;
}

.fd-trust-card {
    min-width: 0;
    height: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

.fd-trust-card strong,
.fd-trust-card span {
    display: block;
    overflow-wrap: anywhere;
    word-break: normal;
}

.fd-trust-card strong {
    line-height: 1.3;
    margin-bottom: 10px;
}

.fd-trust-card span {
    line-height: 1.6;
}

/* Footer must never overlap page content */
.fd-footer {
    position: relative !important;
    clear: both;
    width: 100%;
    box-sizing: border-box;
    margin-top: 80px !important;
}

.fd-footer-inner {
    width: 100%;
    box-sizing: border-box;
    overflow-wrap: anywhere;
}

/* WordPress/WooCommerce blocks */
.wp-block-columns {
    align-items: stretch;
}

.wp-block-column {
    min-width: 0;
}

.wp-block-heading,
.wp-block-paragraph,
p,
h1,
h2,
h3,
h4,
h5,
h6 {
    overflow-wrap: anywhere;
}

/* Mobile */
@media (max-width: 900px) {
    .fd-header-inner {
        flex-wrap: wrap;
    }

    .fd-logo {
        flex: 0 0 auto;
    }

    .fd-actions {
        margin-left: auto;
    }

    .fd-search {
        order: 3;
        flex: 1 1 100%;
        max-width: none;
    }

    .fd-search input {
        width: 100%;
    }

    .fd-trust {
        grid-template-columns: 1fr;
        gap: 16px;
        margin-top: 45px;
        margin-bottom: 50px;
    }

    .fd-trust-card {
        width: 100%;
    }
}

@media (max-width: 600px) {
    .fd-header-inner {
        padding: 12px 15px;
        gap: 10px;
    }

    .fd-actions {
        gap: 10px;
    }

    .fd-actions a {
        font-size: 13px;
    }

    .fd-categories-inner {
        padding-left: 15px;
        padding-right: 15px;
        gap: 18px;
    }

    .fd-hero {
        margin: 15px;
        padding: 38px 22px;
    }

    .fd-section {
        padding-left: 15px;
        padding-right: 15px;
    }

    .woocommerce ul.products {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 12px !important;
    }

    .woocommerce ul.products li.product .woocommerce-loop-product__title {
        font-size: 14px;
        min-height: 38px;
    }

    .woocommerce ul.products li.product .price {
        font-size: 14px;
    }

    .fd-trust {
        padding-left: 15px;
        padding-right: 15px;
    }

    .fd-footer {
        padding: 40px 15px;
    }
}

/* =========================================================
   FANCYADEAL FOOTER — CLEAN UK LAYOUT
   ========================================================= */

html {
    lang: en-GB;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

/* Remove inherited/theme footer layouts completely */
body > footer,
.site-footer,
.footer-widgets,
.site-info,
footer.site-footer,
footer.footer,
#colophon {
    display: none !important;
}

/* Prevent old custom footer layouts from interfering */
.fd-footer,
.fd-footer *,
.fd-footer *::before,
.fd-footer *::after {
    box-sizing: border-box !important;
}

.fd-footer {
    display: block !important;
    position: relative !important;
    clear: both !important;
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    margin: 70px 0 0 !important;
    padding: 0 !important;
    background: #202020 !important;
    color: #ffffff !important;
    overflow: visible !important;
    float: none !important;
    z-index: 20 !important;
}

.fd-footer-inner {
    display: grid !important;
    grid-template-columns: minmax(220px, 1.7fr) repeat(3, minmax(150px, 1fr)) !important;
    gap: 50px !important;
    width: min(1180px, calc(100% - 40px)) !important;
    margin: 0 auto !important;
    padding: 55px 0 50px !important;
    height: auto !important;
    min-height: 0 !important;
    float: none !important;
    position: relative !important;
}

.fd-footer-brand,
.fd-footer-column {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    justify-content: flex-start !important;
    width: auto !important;
    height: auto !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    float: none !important;
    position: relative !important;
}

.fd-footer-logo {
    display: inline-block !important;
    width: auto !important;
    margin: 0 0 14px !important;
    padding: 0 !important;
    color: #D4AF37 !important;
    font-size: 30px !important;
    line-height: 1.15 !important;
    font-weight: 800 !important;
    text-decoration: none !important;
}

.fd-footer-brand p {
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
    max-width: 260px !important;
    color: #cfcfcf !important;
    font-size: 14px !important;
    line-height: 1.7 !important;
}

.fd-footer-column h3 {
    display: block !important;
    width: 100% !important;
    margin: 0 0 18px !important;
    padding: 0 !important;
    color: #ffffff !important;
    font-size: 15px !important;
    line-height: 1.3 !important;
    font-weight: 700 !important;
}

.fd-footer-column a {
    display: block !important;
    width: auto !important;
    height: auto !important;
    margin: 0 0 11px !important;
    padding: 0 !important;
    color: #cfcfcf !important;
    font-size: 14px !important;
    line-height: 1.5 !important;
    text-decoration: none !important;
    white-space: normal !important;
    overflow: visible !important;
    position: relative !important;
}

.fd-footer-column a:hover {
    color: #D4AF37 !important;
    text-decoration: none !important;
}

.fd-footer-country {
    display: block !important;
    margin: 8px 0 0 !important;
    padding: 0 !important;
    color: #D4AF37 !important;
    font-size: 14px !important;
    line-height: 1.5 !important;
    font-weight: 600 !important;
}

.fd-footer-bottom {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 20px !important;
    width: min(1180px, calc(100% - 40px)) !important;
    min-height: 62px !important;
    margin: 0 auto !important;
    padding: 18px 0 !important;
    border-top: 1px solid rgba(255,255,255,.12) !important;
    color: #999999 !important;
    font-size: 12px !important;
    line-height: 1.5 !important;
    text-align: left !important;
}

.fd-footer-bottom > div {
    display: block !important;
    width: auto !important;
    height: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    float: none !important;
    position: relative !important;
}

/* Remove old Sell an item element wherever the theme still outputs it */
.fd-sell,
a.fd-sell,
.fd-header .fd-sell,
.fd-header a[href*="sell"] {
    display: none !important;
}

/* Stop content/cards immediately above the footer from overlapping */
main,
.site-main,
.content-area,
.site-content,
.woocommerce,
.woocommerce-page,
.entry-content {
    overflow: visible !important;
}

.fd-trust {
    position: relative !important;
    clear: both !important;
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 20px !important;
    width: min(1180px, calc(100% - 40px)) !important;
    height: auto !important;
    min-height: 0 !important;
    margin: 50px auto !important;
    padding: 0 !important;
    float: none !important;
}

.fd-trust > *,
.fd-trust-card {
    position: relative !important;
    display: block !important;
    width: auto !important;
    height: auto !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 25px !important;
    float: none !important;
    overflow: visible !important;
}

.woocommerce ul.products,
.woocommerce-page ul.products {
    clear: both !important;
    overflow: visible !important;
    height: auto !important;
}

.woocommerce ul.products li.product {
    height: auto !important;
    min-height: 0 !important;
    overflow: visible !important;
    margin-bottom: 35px !important;
}

/* Mobile */
@media (max-width: 900px) {
    .fd-footer-inner {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 35px 25px !important;
        padding: 45px 0 35px !important;
    }

    .fd-footer-brand {
        grid-column: 1 / -1 !important;
    }

    .fd-trust {
        grid-template-columns: 1fr !important;
    }
}

@media (max-width: 600px) {
    .fd-footer {
        margin-top: 45px !important;
    }

    .fd-footer-inner {
        grid-template-columns: 1fr 1fr !important;
        width: calc(100% - 30px) !important;
        gap: 30px 20px !important;
        padding: 40px 0 30px !important;
    }

    .fd-footer-brand {
        grid-column: 1 / -1 !important;
    }

    .fd-footer-bottom {
        flex-direction: column !important;
        align-items: flex-start !important;
        justify-content: flex-start !important;
        width: calc(100% - 30px) !important;
        gap: 5px !important;
        padding: 16px 0 !important;
    }

    .fd-footer-column a {
        font-size: 13px !important;
    }
}

@media (max-width: 420px) {
    .fd-footer-inner {
        grid-template-columns: 1fr !important;
    }

    .fd-footer-brand {
        grid-column: auto !important;
    }
}

/* SINGLE FOOTER FIX */
body > footer:not(.fd-footer),
.site-footer:not(.fd-footer),
footer:not(.fd-footer),
#colophon:not(.fd-footer),
.footer-wrapper:not(.fd-footer),
.footer-container:not(.fd-footer) {
    display: none !important;
}

.fd-footer {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}


/* Fancyadeal does NOT support selling items */
.fd-sell,
.fd-start-selling,
.fd-sell-item,
.fd-seller,
.start-selling,
.start-selling-button,
.sell-item,
.sell-an-item,
a[href*="sell"],
a[href*="selling"],
button[class*="sell"],
[class*="sell-item"],
[class*="start-selling"] {
    display: none !important;
}


/* Fancyadeal does NOT support selling items */
.fd-sell,
.fd-start-selling,
.fd-sell-item,
.fd-seller,
.start-selling,
.start-selling-button,
.sell-item,
.sell-an-item,
a[href*="sell"],
a[href*="selling"],
button[class*="sell"],
[class*="sell-item"],
[class*="start-selling"] {
    display: none !important;
}



/* Hide links/buttons whose visible text is selling-related */
a[href*="sell"],
a[href*="selling"],
button[class*="sell"],
button[id*="sell"] {
    display: none !important;
}


/* NO SELLING FEATURE */
.fd-sell,
.fd-start-selling,
.fd-sell-item,
.fd-seller,
.start-selling,
.start-selling-button,
.sell-item,
.sell-an-item,
.sell-button,
.selling-button,
a[href*="sell"],
a[href*="selling"] {
    display: none !important;
}


/* REMOVE BANNER "START SELLING" BUTTON */
.fd-hero a,
.fd-hero button,
.fd-banner a,
.fd-banner button,
.hero a,
.hero button,
.banner a,
.banner button {
    visibility: visible;
}


/* Banner CTA: Fancyadeal does not support selling */
.fd-hero .fd-sell,
.fd-hero .fd-start-selling,
.fd-hero .start-selling,
.fd-hero .start-selling-button,
.fd-banner .fd-sell,
.fd-banner .fd-start-selling,
.fd-banner .start-selling,
.fd-banner .start-selling-button {
    display: none !important;
}


.fd-hero-secondary {
    display: none !important;
}


a.fd-hero-secondary,
.fd-hero-secondary {
    display: none !important;
    visibility: hidden !important;
    width: 0 !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
}


.fd-hero h1 {
    font-size: clamp(38px, 5vw, 64px) !important;
    line-height: 1.05 !important;
    letter-spacing: -1.5px !important;
}

.fd-hero p {
    max-width: 650px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    font-size: 18px !important;
    line-height: 1.65 !important;
}


/* Remove parent-theme Fancy a Deal? navbar brand */
a.navbar-brand.fw-bold.m-0.p-0.text-truncate {
    display: none !important;
}

/* Exact Fancyadeal hero */
.fd-hero h1 {
    display: block !important;
    margin: 0 0 18px !important;
}

.fd-hero h1 span {
    display: inline !important;
}

.fd-hero p {
    display: block !important;
    margin: 0 auto 30px !important;
    max-width: 680px !important;
}


.fd-hero h1 {
    display: block !important;
}

.fd-hero p {
    display: block !important;
}


.fd-hero {
    text-align: center !important;
}

.fd-hero h1 {
    display: block !important;
    margin: 0 0 18px !important;
}

.fd-hero p {
    display: block !important;
    max-width: 680px !important;
    margin: 0 auto 30px !important;
}

