/*
Theme Name: Blocksy Child
Template: blocksy
Version: 2.2.0
Description: Bespoke theme for Trang Trí 4 Mùa - Modern Vietnamese Seasonal Holiday & Festive Decor E-Commerce.
Author: Trang Trí 4 Mùa
Text Domain: blocksy-child
*/

/* ==========================================================================
   Global Theme Overrides & Foundation
   ========================================================================== */

/* Logo & Site Title */
.site-title-container {
    display: none !important;
}

.site-logo-container img {
    max-height: 52px;
    width: auto;
    object-fit: contain;
}

/* Ensure smooth font smoothing and rendering */
html {
    scroll-behavior: auto !important;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Base Body Typography and Color */
body {
    font-family: var(--tt4m-font-sans, 'Be Vietnam Pro', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif);
    color: var(--tt4m-text, #1F2937);
    background-color: var(--tt4m-bg, #FFFFFF);
}

h1, h2, h3, .entry-title, .product_title, .tt4m-serif {
    font-family: var(--tt4m-font-serif, 'Playfair Display', Georgia, serif);
    letter-spacing: -0.01em;
}

/* WooCommerce Button Primary Accent Override */
.woocommerce .button.alt,
.woocommerce a.button.alt,
.woocommerce button.button.alt,
.woocommerce #respond input#submit.alt {
    background-color: var(--tt4m-cta) !important;
    color: #ffffff !important;
    border-radius: var(--tt4m-radius-md, 8px) !important;
    font-weight: 600 !important;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.woocommerce .button.alt:hover,
.woocommerce a.button.alt:hover,
.woocommerce button.button.alt:hover,
.woocommerce #respond input#submit.alt:hover {
    background-color: var(--tt4m-cta-hover) !important;
    color: #ffffff !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(196, 30, 47, 0.25) !important;
}

/* WooCommerce Sale Badge */
.woocommerce .onsale,
.ct-sale-badge {
    background: var(--tt4m-cta) !important;
    color: #ffffff !important;
    font-weight: 700 !important;
    font-size: 12px !important;
    border-radius: var(--tt4m-radius-sm, 4px) !important;
    padding: 3px 8px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.03em !important;
}

/* Blocksy Breadcrumbs Styling */
.ct-breadcrumbs {
    font-size: 13.5px;
    color: var(--tt4m-secondary);
    margin-bottom: 1.25rem;
}

.ct-breadcrumbs a {
    color: var(--tt4m-secondary);
    text-decoration: none;
    transition: color 0.15s ease;
}

.ct-breadcrumbs a:hover {
    color: var(--tt4m-primary) !important;
}

.ct-breadcrumbs .ct-separator {
    margin: 0 6px;
    opacity: 0.5;
}

/* Print Stylesheet Safety */
@media print {
    .tt4m-sticky-bar,
    .tt4m-floating-wrap,
    .ct-header,
    .ct-footer {
        display: none !important;
    }
}

/* ============================================
   R2-14: Search Results Product Card Enhancements
   ============================================ */
.search-results .entry-card.product .meta-date,
.search-results article.product .meta-date {
    display: none !important;
}

.search-results .entry-card.product {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.search-results .entry-card.product .card-content {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.search-results .entry-card.product .entry-excerpt {
    flex-grow: 1;
    margin-bottom: 14px;
    font-size: 13.5px;
    color: var(--tt4m-secondary, #6B7280);
    line-height: 1.55;
}

.tt4m-search-card-commerce {
    margin-top: auto;
    padding-top: 14px;
    border-top: 1px solid var(--tt4m-border, #E5E7EB);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.tt4m-search-price {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--tt4m-cta, #C41E2F);
    line-height: 1.3;
    display: flex;
    align-items: baseline;
    gap: 6px;
    flex-wrap: wrap;
}

.tt4m-search-price del {
    font-size: 0.88rem;
    color: var(--tt4m-secondary, #6B7280);
    font-weight: 400;
    text-decoration: line-through;
}

.tt4m-search-price ins {
    text-decoration: none;
    color: var(--tt4m-cta, #C41E2F);
    font-weight: 700;
}

.tt4m-search-actions {
    display: flex;
    align-items: center;
}

.tt4m-search-cta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
    min-height: 38px;
    box-sizing: border-box;
}

.tt4m-search-cta--variable {
    background: var(--tt4m-primary, #14532D);
    color: #ffffff !important;
}

.tt4m-search-cta--variable:hover {
    background: #0f3d21;
    transform: translateY(-1px);
    color: #ffffff !important;
}

.tt4m-search-cta--simple {
    background: var(--tt4m-cta, #C41E2F);
    color: #ffffff !important;
}

.tt4m-search-cta--simple:hover {
    background: var(--tt4m-cta-hover, #A01825);
    transform: translateY(-1px);
    color: #ffffff !important;
}

@media (max-width: 600px) {
    .tt4m-search-card-commerce {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    .tt4m-search-actions {
        width: 100%;
    }
    .tt4m-search-cta {
        width: 100%;
        justify-content: center;
    }
}

/* R27-01: Ensure variation price is completely hidden when reset */
.single_variation[style*="display: none"] .woocommerce-variation-price,
.single_variation[style*="display:none"] .woocommerce-variation-price,
.single_variation:empty .woocommerce-variation-price {
    display: none !important;
}
