/*!
Theme Name: Hostinger AI theme
Author: Hostinger
Author URI: https://hostinger.com
Details URI: https://hostinger.com
Description: Hostinger AI theme built with SEO and mobile responsiveness in mind, this theme ensures optimal performance and a better online presence.
Version: 1.2.3
Tested up to: 6.9
Requires at least: 5.6
Requires PHP: 8.1
License: GPLv3
License URI: https://www.gnu.org/licenses/gpl-3.0.html
Text Domain: hostinger-ai-theme
Tags: ai-theme
*/

/* ── Impressão Fixe — brand overrides ── */

/* Sticky header: white background, always on top */
/* Target only the inner header element — NOT the outer wp-block-template-part wrapper */
.hostinger-ai-menu,
.is-position-sticky,
header.wp-block-group {
    background: #ffffff !important;
    background-color: #ffffff !important;
    z-index: 9999 !important;
    border-bottom: 1px solid #e5e7eb !important;
}

/* Make sure page sections cannot stack above the header */
.wp-site-blocks > main {
    position: relative;
    z-index: 0;
}

/* Kill the 40px WP auto-gap between the sticky header wrapper and the page content */
.wp-site-blocks > *:not(.wp-block-template-part) {
    margin-block-start: 0 !important;
}

/* Admin bar offset: let sticky header stick BELOW the WP toolbar, not behind it */
html.wp-toolbar .hostinger-ai-menu,
html.wp-toolbar .is-position-sticky {
    top: 32px !important;
}
@media screen and (max-width: 782px) {
    html.wp-toolbar .hostinger-ai-menu,
    html.wp-toolbar .is-position-sticky {
        top: 46px !important;
    }
}

/* Outer FSE template-part header wrapper: no extra space */
.wp-site-blocks > header.wp-block-template-part {
    padding: 0 !important;
    margin: 0 !important;
}

/* ── Header: nav-links vertically aligned with WC icons ──
   These rules are in style.css (a static file) so they are NOT affected
   by LiteSpeed page cache. Hard refresh (Cmd+Shift+R) always gets them fresh. */

/* Reduce WP's default 40px flex gap between nav block and WC icon blocks */
.hostinger-ai-menu .is-content-justification-right.is-layout-flex {
    gap: 1rem !important;
}
/* Ensure all flex items in the right header column are vertically centered */
.hostinger-ai-menu .wp-block-group.is-layout-flex,
.hostinger-ai-menu .wp-block-navigation.is-layout-flex {
    align-items: center !important;
}
.hostinger-ai-menu .wc-block-customer-account,
.hostinger-ai-menu .wc-block-mini-cart {
    align-self: center !important;
    display: flex !important;
    align-items: center !important;
}

/* ── Single product + order confirmation: offset main so sticky header doesn't overlay content ── */
body.single-product main.wp-block-group,
body.woocommerce-order-received main.wp-block-group,
body.woocommerce-checkout main.wp-block-group {
    padding-top: var(--ifixe-header-h, 113px) !important;
}

/* ── My Account: hide title in its FSE position; JS moves it into content column ── */
.woocommerce-account .hostinger-ai-page-title,
.woocommerce-account .wp-block-post-title {
    display: none;
}
/* Once JS moves the title inside .woocommerce-MyAccount-content it becomes visible */
.woocommerce-MyAccount-content .hostinger-ai-page-title,
.woocommerce-MyAccount-content .wp-block-post-title {
    display: block;
    text-align: left;
    margin-top: 0;
    margin-bottom: 1rem;
}
.woocommerce-Address-title.title {
    display: block !important;
}
.woocommerce-Address-title.title a.edit {
    display: inline !important;
    text-align: left !important;
    float: none !important;
}

/* ── Breadcrumb bar: pull up to fill the main padding gap, text stays below header ── */
body.single-product .wp-block-group.alignfull:has(.wc-block-breadcrumbs) {
    margin-top: calc(var(--ifixe-header-h, 113px) * -1) !important;
    padding-top: 4.5rem !important;
    padding-bottom: 1.25rem !important;
}

/* Global scroll offset so sticky header never covers anchor targets */
html {
    scroll-padding-top: 130px;
}

/* ── Category filter pills (loja + archive pages) ── */
/* Outer wrapper: always enough breathing room */
.wp-block-group:has(.ifixe-pill) {
    padding-top: 1.5rem !important;
    padding-bottom: 1.5rem !important;
}
.ifixe-pill {
    transition: color 0.2s, border-color 0.2s, background 0.2s;
    white-space: nowrap;
    line-height: 1 !important;
}
.ifixe-pill:hover {
    color: #ff6b2b !important;
    border-color: #ff6b2b !important;
    background: #fff5f0 !important;
}
/* Active pill: orange on the matching category archive */
body.tax-product_cat.term-organizadores .ifixe-pill[href*="organizadores"],
body.tax-product_cat.term-personalizados .ifixe-pill[href*="personalizados"] {
    color: #ff6b2b !important;
    border-color: #ff6b2b !important;
    background: #fff5f0 !important;
}

/* ── WooCommerce Shop — brand styling ── */

/* Footer gap — works regardless of template source (file or DB) */
footer.wp-block-template-part {
    margin-top: 4rem;
}

/* ─── FSE Block product collection — card grid ─── */
/* WooCommerce renders its own responsive grid via .wc-block-product-template__responsive.columns-3
   Do NOT override display/grid-template-columns on the outer wrapper — it breaks the layout.
   Only add card visual styling targeted at the product <li> items. */

/* Product image */
.wp-block-woocommerce-product-collection .wp-block-woocommerce-product-image img {
    width: 100% !important;
    object-fit: cover !important;
    display: block !important;
}

/* Product title */
.wp-block-woocommerce-product-collection .wp-block-post-title {
    font-size: 0.95rem !important;
    font-weight: 700 !important;
    line-height: 1.35 !important;
    color: #111827 !important;
    margin: 0 !important;
}
.wp-block-woocommerce-product-collection .wp-block-post-title a {
    color: #111827 !important;
    text-decoration: none !important;
    transition: color 0.2s !important;
}
.wp-block-woocommerce-product-collection .wp-block-post-title a:hover {
    color: #ff6b2b !important;
}

/* Price */
.wp-block-woocommerce-product-collection .wp-block-woocommerce-product-price {
    color: #ff6b2b !important;
    font-weight: 800 !important;
    font-size: 1.15rem !important;
}

/* Button — outlined orange, fills solid on hover */
.wp-block-woocommerce-product-button a,
.wp-block-woocommerce-product-button button {
    display: block !important;
    width: 100% !important;
    box-sizing: border-box !important;
    text-align: center !important;
    background: transparent !important;
    color: #ff6b2b !important;
    border: 2px solid #ff6b2b !important;
    border-radius: 8px !important;
    padding: 0.6rem 1rem !important;
    font-weight: 700 !important;
    font-size: 0.78rem !important;
    letter-spacing: 0.07em !important;
    text-transform: uppercase !important;
    text-decoration: none !important;
    transition: background 0.2s ease, color 0.2s ease !important;
}
.wp-block-woocommerce-product-button a:hover,
.wp-block-woocommerce-product-button button:hover {
    background: #ff6b2b !important;
    color: #ffffff !important;
}

/* Hide "Ver carrinho" link that WC injects after add-to-cart on product grids */
.wc-block-product-template .added_to_cart,
.wp-block-woocommerce-product-collection .added_to_cart {
    display: none !important;
}

/* ─── Classic WooCommerce grid (fallback) ─── */

.woocommerce ul.products {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 1.5rem !important;
    list-style: none !important;
    padding: 0 !important;
    margin: 2rem 0 !important;
}
@media (max-width: 768px) {
    .woocommerce ul.products { grid-template-columns: repeat(2, 1fr) !important; }
}
@media (max-width: 480px) {
    .woocommerce ul.products { grid-template-columns: 1fr !important; }
}

.woocommerce ul.products li.product {
    background: #ffffff !important;
    border: none !important;
    border-radius: 16px !important;
    overflow: hidden !important;
    padding: 0 0 1.25rem !important;
    margin: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    box-shadow: 0 2px 16px rgba(0,0,0,0.07) !important;
    transition: transform 0.25s ease, box-shadow 0.25s ease !important;
    position: relative !important;
}
.woocommerce ul.products li.product:hover {
    transform: translateY(-5px) !important;
    box-shadow: 0 16px 40px rgba(0,0,0,0.14) !important;
}

.woocommerce ul.products li.product img {
    width: 100% !important;
    height: 240px !important;
    object-fit: cover !important;
    border-radius: 0 !important;
    margin: 0 0 0.75rem !important;
}

.woocommerce ul.products li.product .woocommerce-loop-product__title {
    font-size: 0.95rem !important;
    font-weight: 700 !important;
    color: #111827 !important;
    padding: 0 1.25rem 0.25rem !important;
    margin: 0 !important;
    line-height: 1.35 !important;
}
.woocommerce ul.products li.product a:hover .woocommerce-loop-product__title,
.woocommerce ul.products li.product .woocommerce-loop-product__title:hover {
    color: #ff6b2b !important;
}

.woocommerce ul.products li.product .price {
    color: #ff6b2b !important;
    font-weight: 800 !important;
    font-size: 1.15rem !important;
    padding: 0 1.25rem !important;
    margin: 0 0 0.75rem !important;
}

.woocommerce ul.products li.product .button {
    background: transparent !important;
    color: #ff6b2b !important;
    border: 2px solid #ff6b2b !important;
    border-radius: 8px !important;
    font-weight: 700 !important;
    font-size: 0.78rem !important;
    letter-spacing: 0.07em !important;
    text-transform: uppercase !important;
    padding: 0.6rem 1.25rem !important;
    margin: auto 1.25rem 0 !important;
    display: block !important;
    text-align: center !important;
    text-decoration: none !important;
    transition: background 0.2s ease, color 0.2s ease !important;
    box-sizing: border-box !important;
    width: calc(100% - 2.5rem) !important;
}
.woocommerce ul.products li.product .button:hover {
    background: #ff6b2b !important;
    color: #ffffff !important;
}
