/**
 * CBDFunhouse Core - Global CSS
 * Loads on all pages
 * Version: 1.0.0
 */

/* =============================================================
   CSS VARIABLES (Design Tokens)
   ============================================================= */
:root {
    --cbdfh-primary: #2C4C3B;       /* Verde închis - brand principal */
    --cbdfh-secondary: #E7EADB;     /* Verde-gri deschis */
    --cbdfh-accent: #b67e53;        /* Maroniu/Auriu - accente, butoane */
    --cbdfh-bg: #fdf3f2;            /* Crem deschis fundal */
    --cbdfh-text: #202020;          /* Negru/gri închis */
    --cbdfh-white: #ffffff;
    --cbdfh-border: #E7EADB;
    --cbdfh-radius: 8px;
    --cbdfh-shadow: 0 2px 12px rgba(0,0,0,0.08);
    --cbdfh-transition: all 0.3s ease;
}

/* =============================================================
   TYPOGRAPHY
   ============================================================= */
body {
    color: var(--cbdfh-text);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* =============================================================
   BUTTONS
   ============================================================= */
.button,
.btn,
button[type="submit"],
.woocommerce a.button,
.woocommerce button.button {
    border-radius: var(--cbdfh-radius);
    transition: var(--cbdfh-transition);
}

/* Primary buttons */
.woocommerce a.button.alt,
.woocommerce button.button.alt,
.woocommerce input.button.alt {
    background-color: var(--cbdfh-primary);
    border-color: var(--cbdfh-primary);
    color: var(--cbdfh-white);
}

.woocommerce a.button.alt:hover,
.woocommerce button.button.alt:hover,
.woocommerce input.button.alt:hover {
    background-color: var(--cbdfh-accent);
    border-color: var(--cbdfh-accent);
    color: var(--cbdfh-white);
}

/* =============================================================
   LINKS
   ============================================================= */
a {
    transition: var(--cbdfh-transition);
}

/* =============================================================
   HIDE BROKEN SHORTCODE TEXT
   ============================================================= */
.entry-content p:empty,
.entry-content br:only-child {
    display: none;
}

/* Hide any leftover VC shortcode text that might slip through */
.page-content > p:first-child:last-child:empty {
    display: none;
}

/* =============================================================
   POLYLANG LANGUAGE SWITCHER (RO/EN)
   ============================================================= */
.lang-item a {
    text-transform: uppercase;
    font-weight: 600;
    font-size: 13px;
}

/* =============================================================
   FIX: Blog images oversized in carousel/sidebar
   ============================================================= */
.slide-post img,
.blog-post-loop .entry-thumbnail img,
.owl-carousel .owl-item img,
.woodmart-blog-holder img {
    max-width: 100%;
    height: auto;
    object-fit: cover;
}

/* Limit blog post image height in carousels */
.slide-post .post-img-wrapp img,
.owl-carousel .slide-post img {
    max-height: 250px;
    width: 100%;
    object-fit: cover;
}

/* =============================================================
   FIX: Hide broken prefooter with WPBakery shortcodes
   ============================================================= */
.woodmart-prefooter [class*="vc_row"],
.woodmart-prefooter [class*="vc_column"] {
    display: none !important;
}

/* Hide raw shortcode text in prefooter */
.woodmart-prefooter > .container > :not(.brands-items-wrapper):not(div[class]) {
    display: none;
}

/* If prefooter still shows shortcode text, hide it completely */
.woodmart-prefooter {
    overflow: hidden;
}

/* =============================================================
   RESPONSIVE FIXES
   ============================================================= */
@media (max-width: 768px) {
    /* Ensure proper spacing on mobile */
    .container,
    .site-content {
        padding-left: 15px;
        padding-right: 15px;
    }
}

/* =============================================================
   TRANSLATION OVERRIDES (RO)
   ============================================================= */
html[lang*="ro"] .woocommerce a.button.add_to_cart_button span,
html[lang*="ro"] .add-to-cart-loop span {
    font-size: 0;
}
html[lang*="ro"] .woocommerce a.button.add_to_cart_button span::after,
html[lang*="ro"] .add-to-cart-loop span::after {
    content: "Adaugă în coș";
    font-size: 14px;
}

html[lang*="ro"] a.btn-read-more,
html[lang*="ro"] a.more-link {
    font-size: 0;
}
html[lang*="ro"] a.btn-read-more::after,
html[lang*="ro"] a.more-link::after {
    content: "CITEȘTE MAI MULT";
    font-size: 14px;
}
