/*
Theme Name: FUN HUB
Theme URI: https://funhub.qa
Author: FUN HUB
Description: A playful, bilingual-ready WooCommerce storefront for FUN HUB Toys & Gifts Trading.
Version: 1.0.0
Requires at least: 6.3
Tested up to: 6.8
Requires PHP: 7.4
License: GPL-2.0-or-later
Text Domain: funhub
*/
:root{
 --fh-green:#4f8b68; --fh-green-dark:#356b4e; --fh-cream:#fffaf1;
 --fh-yellow:#f5d56b; --fh-coral:#ef927c; --fh-blue:#a9c9d8;
 --fh-ink:#25352d; --fh-muted:#69766e; --fh-white:#fff;
 --fh-radius:22px; --fh-shadow:0 12px 35px rgba(35,55,43,.08);
}
*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{margin:0;background:var(--fh-cream);color:var(--fh-ink);font-family:Arial,"Noto Sans Arabic",sans-serif;line-height:1.65}
a{color:inherit;text-decoration:none}
img{max-width:100%;height:auto;display:block}
button,input,select{font:inherit}
.fh-container{width:min(1160px,calc(100% - 40px));margin-inline:auto}
.fh-announcement{background:var(--fh-green-dark);color:#fff;text-align:center;padding:8px 16px;font-size:13px}
.fh-header{background:rgba(255,250,241,.96);position:sticky;top:0;z-index:20;border-bottom:1px solid rgba(53,107,78,.1);backdrop-filter:blur(12px)}
.fh-header-inner{min-height:82px;display:flex;align-items:center;justify-content:space-between;gap:24px}
.fh-brand{display:flex;align-items:center;gap:10px;font-weight:900;font-size:25px;letter-spacing:1px;color:var(--fh-green-dark)}
.fh-brand-mark{width:42px;height:42px;border-radius:14px;background:var(--fh-yellow);display:grid;place-items:center;color:var(--fh-green-dark);font-size:22px}
.fh-brand small{display:block;font-size:9px;letter-spacing:2px;line-height:1.2;color:var(--fh-muted);font-weight:700}
.fh-nav{display:flex;align-items:center;gap:27px;font-size:14px;font-weight:700}
.fh-nav a:hover{color:var(--fh-green)}
.fh-actions{display:flex;align-items:center;gap:12px;font-size:14px}
.fh-icon-link{padding:9px 12px;border:1px solid #e8e8dc;border-radius:999px;background:#fff}
.fh-menu-toggle{display:none;border:0;background:none;font-size:25px}
.fh-hero{padding:54px 0 42px}
.fh-hero-panel{position:relative;overflow:hidden;border-radius:34px;background:#e8f0e6;min-height:340px;display:grid;grid-template-columns:1.08fr .92fr;align-items:center;padding:clamp(35px,5vw,45px);gap:20px}
.fh-hero-panel:before,.fh-hero-panel:after{content:"";position:absolute;border-radius:50%;pointer-events:none}
.fh-hero-panel:before{width:260px;height:260px;background:rgba(245,213,107,.42);right:-75px;top:-100px}
.fh-hero-panel:after{width:170px;height:170px;background:rgba(239,146,124,.24);left:42%;bottom:-115px}
.fh-hero-copy{position:relative;z-index:1;max-width:510px}
.fh-eyebrow{color:var(--fh-green-dark);font-size:12px;font-weight:900;letter-spacing:2px;text-transform:uppercase}
.fh-hero h1{font-size:clamp(26px,2.5vw,34px);line-height:1.08;margin:14px 0 18px;letter-spacing:-1.8px}
.fh-hero p{font-size:15px;color:#53665a;max-width:450px;margin:0 0 28px}
.fh-btn{display:inline-flex;align-items:center;justify-content:center;border:0;border-radius:999px;padding:13px 25px;background:var(--fh-green-dark);color:#fff;font-weight:800;transition:.2s;cursor:pointer}
.fh-btn:hover{background:var(--fh-green);transform:translateY(-2px);color:#fff}
.fh-btn-light{background:#fff;color:var(--fh-green-dark);border:1px solid #e7e8dc}
.fh-hero-art{
    position:relative;
    z-index:1;
    min-height:220px;
    display:grid;
    place-items:center;
}

.fh-hero-art .fh-hero-image {
    display: block !important;
    width: 200px !important;
    max-width: 200px !important;
    height: auto !important;
    max-height: 200px !important;
    object-fit: contain;
    margin: auto;
}
.fh-trust{display:grid;grid-template-columns:repeat(3,1fr);gap:15px;margin:25px 0 10px}
.fh-trust-item{display:flex;align-items:center;gap:12px;padding:17px 19px;background:#fff;border-radius:18px;box-shadow:0 5px 22px rgba(35,55,43,.04)}
.fh-trust-icon{width:40px;height:40px;border-radius:13px;background:#f5efd9;display:grid;place-items:center;font-size:20px}
.fh-trust strong{display:block;font-size:13px}.fh-trust span{font-size:11px;color:var(--fh-muted)}
.fh-section{padding:48px 0}
.fh-section-head{display:flex;align-items:end;justify-content:space-between;gap:20px;margin-bottom:24px}
.fh-section-head h2{font-size:clamp(25px,3vw,36px);line-height:1.15;margin:5px 0 0}
.fh-section-head p{margin:0;color:var(--fh-muted);font-size:14px}
.fh-categories{display:grid;grid-template-columns:repeat(4,1fr);gap:17px}
.fh-category{min-height:185px;border-radius:24px;padding:22px;display:flex;flex-direction:column;justify-content:space-between;transition:.2s}
.fh-category:hover{transform:translateY(-5px);box-shadow:var(--fh-shadow)}
.fh-category:nth-child(1){background:#f8e7d9}.fh-category:nth-child(2){background:#e1edf0}.fh-category:nth-child(3){background:#f4edc9}.fh-category:nth-child(4){background:#e4ecdf}
.fh-category-icon{font-size:43px}.fh-category strong{font-size:17px}.fh-category span{font-size:12px;color:#617066}
.fh-products{display:grid;grid-template-columns:repeat(4,1fr);gap:18px}
.fh-product{background:#fff;border-radius:22px;padding:12px;box-shadow:0 5px 24px rgba(35,55,43,.045);transition:.2s}
.fh-product:hover{transform:translateY(-4px);box-shadow:var(--fh-shadow)}
.fh-product-image{aspect-ratio:1;background:#f4f2e9;border-radius:16px;display:grid;place-items:center;overflow:hidden}
.fh-product-image img{width:100%;height:100%;object-fit:cover}
.fh-product-placeholder{font-size:66px}
.fh-product h3{font-size:14px;margin:13px 4px 3px}
.fh-product-meta{display:flex;justify-content:space-between;align-items:center;margin:0 4px 9px;color:var(--fh-muted);font-size:12px}
.fh-price{font-size:15px;color:var(--fh-green-dark);font-weight:900}
.fh-product .button,.woocommerce a.button,.woocommerce button.button,.woocommerce input.button{background:var(--fh-green-dark)!important;color:#fff!important;border-radius:999px!important;padding:10px 16px!important;font-size:12px!important;font-weight:800!important}
.fh-promo{background:#f4e7c9;border-radius:28px;padding:34px 38px;display:flex;align-items:center;justify-content:space-between;gap:25px}
.fh-promo h2{font-size:30px;margin:4px 0}.fh-promo p{margin:0;color:#687166}
.fh-footer{background:#263d31;color:#f7f5ec;padding:48px 0 20px;margin-top:45px}
.fh-footer-grid{display:grid;grid-template-columns:1.4fr 1fr 1fr;gap:35px}
.fh-footer p,.fh-footer a{color:#d5ded5;font-size:13px}.fh-footer h3{font-size:14px}
.fh-footer-bottom{border-top:1px solid rgba(255,255,255,.15);margin-top:30px;padding-top:16px;font-size:11px;color:#c5d0c5}
.fh-page{padding:45px 0;min-height:45vh}.fh-page h1{font-size:36px}
.woocommerce .woocommerce-breadcrumb{font-size:12px;color:var(--fh-muted)}
.woocommerce ul.products li.product{background:#fff;padding:12px;border-radius:20px;box-shadow:0 5px 24px rgba(35,55,43,.045)}
.woocommerce ul.products li.product a img{border-radius:15px}
.woocommerce div.product div.images img{border-radius:20px}
.woocommerce div.product .product_title{font-size:30px}
.woocommerce span.onsale{background:var(--fh-coral);min-height:38px;min-width:38px;line-height:38px}
.woocommerce-message,.woocommerce-info{border-top-color:var(--fh-green)}
.woocommerce-message:before,.woocommerce-info:before{color:var(--fh-green)}
@media(max-width:850px){
 .fh-nav{display:none;position:absolute;top:82px;left:0;right:0;background:var(--fh-cream);padding:20px 25px;flex-direction:column;align-items:flex-start;border-bottom:1px solid #e8e8dc}
 .fh-nav.is-open{display:flex}.fh-menu-toggle{display:block}.fh-actions .fh-account{display:none}
 .fh-hero-panel{grid-template-columns:1fr;text-align:center}.fh-hero-copy{margin:auto}.fh-hero p{margin-inline:auto}
 .fh-hero-art{min-height:230px}.fh-categories,.fh-products{grid-template-columns:repeat(2,1fr)}
 .fh-trust{grid-template-columns:1fr}.fh-footer-grid{grid-template-columns:1fr 1fr}
}
@media(max-width:520px){
 .fh-container{width:min(100% - 28px,1160px)}.fh-header-inner{min-height:72px}
 .fh-brand{font-size:21px}.fh-brand-mark{width:36px;height:36px}
 .fh-hero{padding-top:24px}.fh-hero-panel{border-radius:25px;padding:30px 20px;min-height:unset}
 .fh-hero h1{font-size:30px}.fh-hero p{font-size:15px}
 .fh-section{padding:32px 0}.fh-section-head{align-items:start;flex-direction:column}
 .fh-categories{gap:11px}.fh-category{min-height:155px;padding:15px}.fh-category-icon{font-size:34px}
 .fh-products{gap:10px}.fh-product{padding:8px}.fh-product h3{font-size:12px}
 .fh-promo{padding:25px;align-items:flex-start;flex-direction:column}.fh-promo h2{font-size:25px}
 .fh-footer-grid{grid-template-columns:1fr}.fh-footer{padding-top:35px}
}

/* v1.1 brand integration */
.fh-brand{display:flex;align-items:center;max-width:190px;min-width:125px}
.fh-logo-img,.fh-brand .custom-logo{display:block;width:auto;max-width:170px;max-height:88px;object-fit:contain}
.fh-brand .custom-logo-link{display:block;line-height:0}
.fh-footer-logo img{width:150px;height:auto;max-height:120px;object-fit:contain;background:#fff;border-radius:14px;padding:5px}
.fh-footer-logo{display:inline-block}
.fh-nav{flex:1;justify-content:center}
.fh-actions{white-space:nowrap}
.fh-actions .pll-parent-menu-item{list-style:none}
.fh-actions ul{list-style:none;margin:0;padding:0}
.fh-actions li{display:inline-block}
@media(max-width:850px){.fh-brand{max-width:145px}.fh-logo-img,.fh-brand .custom-logo{max-width:132px;max-height:72px}.fh-header-inner{gap:10px}}

/* FUN HUB - Square category images */
.fh-category .fh-category-image {
    display: block !important;
    position: relative !important;
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    flex: 0 0 auto !important;
    aspect-ratio: 1 / 1 !important;
    overflow: hidden;
    border-radius: 14px;
    margin-bottom: 12px;
}

.fh-category .fh-category-image img {
    display: block !important;
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    border-radius: 14px;
}


/* FUN HUB - Hamburger dropdown menu on all screen sizes */

.fh-header-inner {
    position: relative !important;
}

.fh-menu-toggle {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border: 1px solid #e8e8d8;
    border-radius: 12px;
    background: #ffffff;
    color: #356b4e;
    font-size: 25px;
    cursor: pointer;
    z-index: 1002;
}

.fh-nav {
    display: none !important;
    position: absolute !important;
    top: calc(100% + 8px);
    inset-inline-end: 0;
    inset-inline-start: auto;
    width: min(300px, calc(100vw - 32px));
    padding: 18px !important;
    background: #fffaf1 !important;
    border: 1px solid #e8e8d8;
    border-radius: 16px;
    box-shadow: 0 12px 35px rgba(35,55,43,.12);
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 0 !important;
    z-index: 1001;
}

.fh-nav.is-open {
    display: flex !important;
}

.fh-nav a {
    display: block;
    width: 100%;
    padding: 13px 10px;
    border-bottom: 1px solid #eee8dc;
    font-size: 16px;
}

.fh-nav a:last-child {
    border-bottom: 0;
}
/* FUN HUB - Footer Logo and Description Side by Side */
.fh-footer-grid > div:first-child {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 18px !important;
}

.fh-footer-brand {
    flex: 0 0 125px !important;
    margin: 0 !important;
}

.fh-footer-brand img {
    width: 125px !important;
    max-width: 125px !important;
    height: auto !important;
    max-height: 65px !important;
    object-fit: contain !important;
    background: transparent !important;
    padding: 0 !important;
}

.fh-footer-grid > div:first-child p {
    margin: 0 !important;
    line-height: 1.5 !important;
}

/* FUN HUB - Reduce Footer Height */
@media (min-width: 851px) {

    .fh-footer {
        padding: 22px 0 12px !important;
        margin-top: 25px !important;
    }

    .fh-footer-grid {
        gap: 18px !important;
    }

    .fh-footer p {
        margin-top: 4px !important;
        margin-bottom: 6px !important;
        line-height: 1.4 !important;
    }

    .fh-footer h3 {
        margin-top: 0 !important;
        margin-bottom: 6px !important;
        line-height: 1.4 !important;
    }

    .fh-footer-bottom {
        margin-top: 16px !important;
        padding-top: 10px !important;
    }
}


/* FUN HUB - Bilingual Footer Layout */
@media (min-width: 851px) {

    .fh-footer-grid {
        grid-template-columns: 1.3fr 0.5fr 1fr !important;
        align-items: start !important;
    }

    /* First column: Logo and description */
    .fh-footer-grid > div:first-child {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        gap: 18px !important;
    }

    .fh-footer-brand {
        flex: 0 0 100px !important;
        margin: 0 !important;
    }

    .fh-footer-grid > div:first-child p {
        flex: 1 !important;
        margin: 0 !important;
    }

    /* Arabic layout */
    html[lang^="ar"] .fh-footer-grid {
        direction: rtl !important;
    }

    html[lang^="ar"] .fh-footer-grid > div {
        text-align: right !important;
    }

    /* English layout */
    html[lang^="en"] .fh-footer-grid {
        direction: ltr !important;
    }

    html[lang^="en"] .fh-footer-grid > div {
        text-align: left !important;
    }
}


/* FUN HUB - Align product card content */

.fh-product {
    display: flex;
    flex-direction: column;
}

.fh-product > a {
    display: block;
}

.fh-product h3,
.woocommerce ul.products li.product .woocommerce-loop-product__title {
    min-height: 3.3em;
    line-height: 1.65;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
}

.fh-product-meta {
    min-height: 24px;
}

.woocommerce ul.products li.product {
    display: flex;
    flex-direction: column;
}

.woocommerce ul.products li.product .price {
    min-height: 24px;
}

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

/* FUN HUB - Match Shop Cards with Homepage Cards */

.woocommerce ul.products li.product {
    display: flex !important;
    flex-direction: column !important;
    height: 100% !important;
    padding: 12px !important;
    background: #ffffff !important;
    border-radius: 22px !important;
    box-shadow: 0 5px 24px rgba(35,55,43,.045) !important;
    overflow: hidden;
}

.woocommerce ul.products li.product a.woocommerce-LoopProduct-link {
    display: flex !important;
    flex-direction: column !important;
    flex: 1 1 auto !important;
    width: 100% !important;
}

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

.woocommerce ul.products li.product .woocommerce-loop-product__title {
    font-size: 14px !important;
    line-height: 1.65 !important;
    font-weight: 700 !important;
    margin: 0 4px 3px !important;
    padding: 0 !important;
    min-height: 3.3em !important;
    display: -webkit-box !important;
    -webkit-box-orient: vertical !important;
    -webkit-line-clamp: 2 !important;
    overflow: hidden !important;
}

.woocommerce ul.products li.product .price {
    min-height: 24px !important;
    margin: 0 4px 9px !important;
    font-size: 15px !important;
    color: #356b4e !important;
    font-weight: 900 !important;
}

.woocommerce ul.products li.product a.button {
    align-self: flex-start !important;
    margin: auto 0 0 !important;
    background: #356b4e !important;
    color: #ffffff !important;
    border-radius: 999px !important;
    padding: 10px 16px !important;
    font-size: 12px !important;
    font-weight: 800 !important;
    line-height: 1.5 !important;
}


/* FUN HUB - Comfortable Desktop Scale */

@media (min-width: 851px) {
    html {
        zoom: 0.90;
    }
}


/* Content width and spacing: Product, Shop and All Categories */
body.single-product #primary,
body.woocommerce.archive #primary {
    width: min(1160px, calc(100% - 40px));
    max-width: 1160px;
    margin-inline: auto;
}

/* Hide default sidebar */
body.single-product #sidebar,
body.woocommerce.archive #sidebar {
    display: none !important;
}

/* Mobile spacing */
@media (max-width: 520px) {
    body.single-product #primary,
    body.woocommerce.archive #primary {
        width: calc(100% - 28px);
    }
}


/* FUN HUB - Align Header with Main Content */
.fh-header .fh-header-inner {
    width: min(1160px, calc(100% - 40px)) !important;
    max-width: 1160px !important;
    margin-inline: auto !important;
}


/* FUN HUB - Reduce Footer Links Vertical Spacing */
.fh-footer-grid > div:nth-child(2) p,
.fh-footer-grid > div:nth-child(3) p {
    margin: 3px 0 !important;
    line-height: 1.3 !important;
}

.fh-footer-grid > div:nth-child(2) h3,
.fh-footer-grid > div:nth-child(3) h3 {
    margin-bottom: 6px !important;
    line-height: 1.3 !important;
}

.fh-footer-grid > div:nth-child(2),
.fh-footer-grid > div:nth-child(3) {
    padding-top: 0 !important;
    margin-top: 0 !important;
}

.fh-footer-grid > div:nth-child(2) h3,
.fh-footer-grid > div:nth-child(3) > p:first-child {
    margin-top: 0 !important;
    margin-bottom: 6px !important;
    font-family: Arial, "Noto Sans Arabic", sans-serif !important;
    font-size: 14px !important;
    line-height: 1.4 !important;
    font-weight: 700 !important;
    font-style: normal !important;
}

/* FUN HUB - Unify Footer Font */
.fh-footer,
.fh-footer h3,
.fh-footer p,
.fh-footer a,
.fh-footer strong {
    font-family: inherit !important;
}

/* FUN HUB - Unified Footer Typography */
.fh-footer,
.fh-footer h3,
.fh-footer p,
.fh-footer a,
.fh-footer strong {
    font-family: Tahoma, Arial, sans-serif !important;
}