/* ============================================================
   GLOBAL BRANDING + LAYOUT
   ============================================================ */

/* Import Plus Jakarta Sans */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700&display=swap');

/* Universal font override */
body, button, input, select, textarea,
h1, h2, h3, h4, h5, h6,
.site-header, .main-navigation a,
.woocommerce, .woocommerce a, .woocommerce button,
.woocommerce div.product .product_title,
.woocommerce ul.products li.product .woocommerce-loop-product__title,
.widget, .widget a, .site-footer, .site-footer a {
    font-family: 'Plus Jakarta Sans', 'Segoe UI', Roboto, Arial, sans-serif !important;
}

/* LOGO — DESKTOP + MOBILE RESPONSIVE */
.custom-logo,
.site-header .site-branding img {
    height: auto !important;
    width: auto !important;
    max-width: 260px !important;
    object-fit: contain !important;
}

@media (max-width: 768px) {
    .custom-logo,
    .site-header .site-branding img {
        max-width: 55vw !important;
    }
}

.site-header {
    padding-top: 20px;
    padding-bottom: 20px;
}

/* ============================================================
   NAVIGATION + MENUS
   ============================================================ */

.main-navigation .current-menu-item > a,
.main-navigation .current-menu-ancestor > a,
.main-navigation .current_page_item > a,
.main-navigation .current_page_ancestor > a {
    font-weight: 600 !important;
    color: #000 !important;
}

.main-navigation ul ul {
    background: #ffffff !important;
    border-radius: 6px;
    padding: 6px 0 !important;
    box-shadow: 0 8px 22px rgba(0,0,0,0.12);
    opacity: 0;
    transform: translateY(6px);
    transition: opacity 0.18s ease, transform 0.18s ease;
}

.main-navigation ul li:hover > ul,
.main-navigation ul li.focus > ul {
    opacity: 1;
    transform: translateY(0);
}

.main-navigation ul ul li a {
    padding: 8px 16px !important;
    font-size: 15px !important;
    line-height: 1.3 !important;
    color: #222 !important;
    transition: background 0.15s ease, padding-left 0.15s ease;
}

.main-navigation ul ul li a:hover {
    background: #f2f2f2 !important;
    padding-left: 20px !important;
}

/* ============================================================
   SEARCH BAR — WIDER, SAME POSITION, LOGO SAFE
   ============================================================ */

.site-header .col-full {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.site-header .site-branding {
    flex: 0 0 auto;
}

@media (max-width: 768px) {
    .site-header .col-full {
        flex-direction: row;
        align-items: center;
    }

    .site-header .site-branding {
        width: 100%;
        text-align: center;
        margin-bottom: 8px;
    }

    .site-header .menu-toggle {
        margin-left: auto;
    }
}

.site-header .site-search {
    margin-left: auto;
    width: 420px;
    max-width: 40%;
}

.site-search form {
    width: 100%;
    position: relative;
    margin: 0;
}

.site-search .search-field {
    width: 100%;
    padding: 9px 20px 9px 50px;
    font-size: 16px;
    border-radius: 999px;
    border: 2px solid #ddd;
    background: #fafafa;
    color: #333;
    transition: all 0.25s ease;
    outline: none;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.site-search .search-field:focus {
    background: #fff;
    border-color: #0073e6;
    box-shadow: 0 4px 14px rgba(0,115,230,0.18);
    transform: scale(1.01);
}

.site-search form::before {
    content: "\1F50D";
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 18px;
    color: #0073e6;
    pointer-events: none;
}

.site-search .search-submit {
    display: none !important;
}

@media (max-width: 768px) {
    .site-header .site-search {
        width: 100%;
        max-width: 100%;
        margin-top: 10px;
    }

    .site-search form {
        padding: 0 12px;
    }
}

/* ============================================================
   CATEGORY + PRODUCT PAGE IMPROVEMENTS
   ============================================================ */

.site-main {
    padding-top: 10px !important;
}

.storefront-breadcrumb {
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
}

.woocommerce-products-header {
    padding: 10px 0 5px 0 !important;
    text-align: center !important;
}

.woocommerce-products-header .woocommerce-products-header__title {
    font-size: 54px !important;
    font-weight: 600 !important;
    margin: 0 auto !important;
    line-height: 1.05 !important;
}

.woocommerce ul.products li.product .woocommerce-loop-product__title,
.woocommerce ul.products li.product .price,
.woocommerce ul.products li.product .woocommerce-loop-category__title,
.woocommerce div.product .product_title,
.woocommerce div.product p.price,
.woocommerce div.product span.price,
.woocommerce div.product .woocommerce-product-details__short-description,
.woocommerce div.product .product_meta,
.woocommerce div.product .woocommerce-tabs .panel,
.woocommerce div.product .woocommerce-tabs .panel p,
.woocommerce div.product .woocommerce-tabs .panel li {
    color: #444 !important;
}

.woocommerce ul.products li.product .woocommerce-loop-category__title {
    font-size: 20px !important;
    font-weight: 700 !important;
    color: #222 !important;
    text-align: center !important;
    margin-top: 12px !important;
    letter-spacing: 0.3px;
}

/* ============================================================
   PRODUCT PAGE — UPSELLS: 4 PER ROW (OVERRIDE STOREFRONT 3-COL)
   ============================================================ */

/* Remove Storefront's 3-column clear rule that causes the ghost gap */
.upsells ul.products li.product:nth-child(3n+1) {
    clear: none !important;
}

/* Force 4 columns visually */
.upsells ul.products li.product {
    width: 23% !important;
    margin-right: 2% !important;
}

/* No extra margin on every 4th item */
.upsells ul.products li.product:nth-child(4n) {
    margin-right: 0 !important;
}

/* Mobile: 2 per row for readability */
@media (max-width: 768px) {
    .upsells ul.products li.product {
        width: 48% !important;
        margin-right: 4% !important;
    }

    .upsells ul.products li.product:nth-child(2n) {
        margin-right: 0 !important;
    }
}

/* ============================================================
   PRODUCT GRID MODERNISATION
   ============================================================ */

.woocommerce ul.products li.product a img {
    width: 100% !important;
    height: auto !important;
    object-fit: contain !important;
    border-radius: 6px;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.woocommerce ul.products li.product a img:hover {
    transform: scale(1.08);
    box-shadow: 0 6px 18px rgba(0,0,0,0.15);
}

.woocommerce ul.products {
    gap: 25px !important;
}

.woocommerce ul.products li.product {
    padding: 12px !important;
    background: #ffffff;
    border-radius: 10px;
    transition: box-shadow 0.25s ease, transform 0.25s ease;
}

.woocommerce ul.products li.product:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
    transform: translateY(-3px);
}

.woocommerce ul.products li.product .woocommerce-loop-product__title {
    font-size: 17px !important;
    font-weight: 600;
    text-align: center;
    margin-top: 12px;
    line-height: 1.3;
}

/* ============================================================
   MISC FIXES
   ============================================================ */

.site-header-cart .cart-contents .amount,
.site-header-cart .cart-contents .woocommerce-Price-amount {
    color: #ffffff !important;
}

.related > h2,
.upsells > h2,
.cross-sells > h2,
.woocommerce .related.products > h2,
.woocommerce .upsells.products > h2 {
    font-size: 32px !important;
    color: #111 !important;
    font-weight: 700 !important;
    margin-top: 40px !important;
    margin-bottom: 24px !important;
    letter-spacing: 0.4px;
}

.page .entry-title { display: none; }

.site-info .powered-by,
.site-info .storefront-credit,
.site-info a[href*="wordpress.com"] {
    display: none !important;
}

.edit-link { display: none !important; }

/* ============================================================
   HERO SECTION — MODERN + MOBILE FIX
   ============================================================ */

html, body {
    overflow-x: hidden !important;
}

.hero-wrap {
    position: relative;
    padding: 110px 20px !important;
    text-align: center;
    overflow: hidden;
}

.hero-wrap::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        rgba(0,0,0,0.25),
        rgba(0,0,0,0.05)
    );
    z-index: 1;
}

.hero-wrap > * {
    position: relative;
    z-index: 2;
}

@keyframes fadeUp {
    0% { opacity: 0; transform: translateY(18px); }
    100% { opacity: 1; transform: translateY(0); }
}

.hero-wrap h1,
.hero-wrap p,
.hero-wrap a {
    opacity: 0;
    animation: fadeUp 0.8s ease forwards;
}

.hero-wrap h1 { animation-delay: 0.1s; }
.hero-wrap p { animation-delay: 0.25s; }
.hero-wrap a { animation-delay: 0.4s; }

.hero-wrap h1 {
    font-size: 44px !important;
    line-height: 1.15 !important;
    font-weight: 700;
    margin-bottom: 22px !important;
    white-space: normal !important;
    word-break: break-word !important;
    overflow-wrap: break-word !important;
    max-width: 100% !important;
}

.hero-wrap p {
    font-size: 20px !important;
    line-height: 1.5 !important;
    font-weight: 300;
    margin-bottom: 36px !important;
}

.hero-wrap a {
    font-size: 18px !important;
    padding: 14px 32px !important;
    border-radius: 50px;
    font-weight: 600;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.hero-wrap a:hover {
    transform: scale(1.06);
    box-shadow: 0 6px 18px rgba(0,0,0,0.25);
}

/* ============================================================
   MOBILE FIXES — HERO WRAP + TEXT BREAKS
   ============================================================ */

@media (max-width: 768px) {

    .hero-wrap {
        padding: 40px 12px !important;
        max-width: 100% !important;
        overflow-x: hidden !important;
    }

    .hero-wrap h1 {
        font-size: 22px !important;
        line-height: 1.35 !important;
        margin-bottom: 16px !important;
        max-width: 100% !important;
        width: 100% !important;
        display: block !important;
        white-space: normal !important;
        word-break: break-word !important;
        overflow-wrap: break-word !important;
    }

    .hero-wrap p {
        font-size: 15px !important;
        line-height: 1.45 !important;
        margin-bottom: 22px !important;
        max-width: 100% !important;
        white-space: normal !important;
        word-break: break-word !important;
        overflow-wrap: break-word !important;
    }

    .hero-wrap a {
        font-size: 16px !important;
        padding: 12px 26px !important;
    }
}