/*
 Theme Name:   Woodmart Child
 Theme URI:    https://spasarajevo.ba
 Description:  Woodmart Child Theme for Amman Spa & Hammam
 Author:       Amman Spa
 Author URI:   https://spasarajevo.ba
 Template:     woodmart
 Version:      1.0.0
 Text Domain:  woodmart-child
*/

/* ==========================================================
   AMMAN SPA & SULTAN SPA - PREMIUM ARCHIVE LAYOUT
   ========================================================== */

/* 1. KARTICA: BEŽ POZADINA I FLEXBOX PORAVNANJE */
html body .custom-spa-layout {
    display: flex !important;
    flex-direction: column !important;
    height: 100% !important;
    background-color: #fcfbf9 !important; 
    box-sizing: border-box !important;
}

html body .custom-spa-layout .product-element-top {
    flex-shrink: 0 !important;
}

html body .custom-spa-layout .product-element-bottom {
    display: flex !important;
    flex-direction: column !important;
    flex-grow: 1 !important;
    padding: 20px 15px 25px 15px !important; 
    margin: 0 !important;
    background: transparent !important;
    border: none !important;
    position: static !important;
    visibility: visible !important;
    opacity: 1 !important;
    transform: none !important;
}

html body .custom-spa-layout .wd-quick-shop { display: block !important; }
html body .custom-spa-layout .wd-buttons { display: none !important; }

/* 2. NASLOV ARTIKLA (Crna boja, lijevo poravnanje, definisan prored) */
html body .custom-spa-layout .wd-entities-title,
html body .custom-spa-layout .wd-entities-title a,
html body .custom-spa-layout .woocommerce-loop-product__title,
html body .custom-spa-layout .woocommerce-loop-product__title a {
    color: #000000 !important;
    text-align: left !important;
    font-size: 15px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    line-height: 1.4 !important; /* Fiksira visinu jedne linije na 21px (15 * 1.4) */
}

/* KONTEJNER NASLOVA (Fiksna visina) */
html body .custom-spa-layout .wd-entities-title,
html body .custom-spa-layout .woocommerce-loop-product__title {
    display: block !important;
    position: relative !important; /* Ključno da bi linija ostala unutar okvira */
    margin: 0 0 15px 0 !important;
    padding: 0 !important;
    box-sizing: border-box !important;
    height: 55px !important; /* 42px za 2 linije teksta + 13px praznog prostora do linije */
}

/* DIVIDER LINIJA (Apsolutno pozicionirana na dno kontejnera, puna širina) */
html body .custom-spa-layout .wd-entities-title::after,
html body .custom-spa-layout .woocommerce-loop-product__title::after {
    content: "" !important;
    position: absolute !important; /* Prebacuje kontrolu na dno kontejnera */
    bottom: 0 !important; /* Zakucava liniju na samu ivicu tih 55px visine */
    left: 0 !important;
    display: block !important;
    width: 100% !important;
    height: 1px !important;
    background-color: #e2e2e2 !important;
    margin: 0 !important;
}

/* 3. KRATKI OPIS (Lijevo poravnanje) */
html body .custom-spa-layout .spa-loop-excerpt {
    text-align: left !important;
    font-size: 13px !important;
    line-height: 1.5 !important;
    color: #555555 !important;
    margin: 0 0 20px 0 !important;
}

/* 4. VARIJACIJE (CRNI OBRUB) - Poravnate ulijevo */
html body .custom-spa-layout .spa-loop-swatches-wrap {
    margin-top: auto !important; 
    margin-bottom: 15px !important;
    text-align: left !important; 
    display: block !important;
    position: static !important;
    visibility: visible !important;
    opacity: 1 !important;
}

html body .custom-spa-layout .spa-variation-title {
    font-size: 11px !important;
    color: #000000 !important;
    margin: 0 0 8px 0 !important;
    text-transform: uppercase !important;
    font-weight: 600 !important;
    text-align: left !important;
}

html body .custom-spa-layout .wd-swatches-product {
    display: flex !important;
    justify-content: flex-start !important; 
    gap: 8px !important;
    flex-wrap: wrap !important;
}

html body .custom-spa-layout .wd-swatches-product .wd-swatch {
    width: 44px !important;
    height: 32px !important;
    min-width: 44px !important;
    border-radius: 0 !important;
    border: 1px solid #000000 !important;
    background-color: #ffffff !important;
    color: #000000 !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin: 0 !important;
    cursor: pointer !important;
    box-shadow: none !important;
}

html body .custom-spa-layout .wd-swatches-product .wd-swatch.wd-active,
html body .custom-spa-layout .wd-swatches-product .wd-swatch:hover {
    background-color: #000000 !important;
    color: #ffffff !important;
    border-color: #000000 !important;
}

/* 5. DIVIDER LINIJA I CIJENA */
html body .custom-spa-layout .spa-price-wrap {
    border-top: 1px solid #e2e2e2 !important;
    padding-top: 12px !important;
    margin: 16px 0 15px 0 !important;
    text-align: right !important;
}

html body .custom-spa-layout:not(:has(.spa-loop-swatches-wrap)) .spa-price-wrap {
    margin-top: auto !important; 
}

html body .custom-spa-layout .spa-price-wrap .price {
    font-size: 20px !important;
    color: #000000 !important;
    font-weight: 600 !important;
    display: inline-block !important;
    margin: 0 !important;
}

/* 6. DUAL DUGMAD (STRIKTNO ZAKLJUČANA U JEDAN RED I FIKSIRANA) */
html body .custom-spa-layout .spa-dual-buttons {
    display: flex !important;
    flex-direction: row !important; 
    flex-wrap: nowrap !important; 
    gap: 10px !important;
    width: 100% !important;
    margin-top: 0 !important;
}

html body .custom-spa-layout .spa-dual-buttons > div.wd-add-btn,
html body .custom-spa-layout .spa-dual-buttons > a.spa-book-btn {
    flex: 1 1 50% !important;
    width: 50% !important;
    max-width: 50% !important; 
    margin: 0 !important;
    padding: 0 !important;
    display: flex !important;
    
    /* VRAĆENI OSIGURAČI PROTIV WOODMART HOVER POMJERANJA */
    position: static !important;
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
}

/* Zajedničke postavke za dugmad */
html body .custom-spa-layout .wd-add-btn a.button,
html body .custom-spa-layout .spa-book-btn {
    width: 100% !important;
    height: 40px !important;
    min-height: 40px !important;
    max-height: 40px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    padding: 0 10px !important;
    border-radius: 0 !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    letter-spacing: 1px !important;
    text-transform: uppercase !important;
    box-shadow: none !important;
    box-sizing: border-box !important;
    transition: all 0.2s ease !important;
}

/* UKLANJANJE IKONICE KORPE I TEKSTUALNIH EFEKATA NA HOVER */
html body .custom-spa-layout .wd-add-btn a.button::before,
html body .custom-spa-layout .wd-add-btn a.button::after {
    display: none !important;
    content: none !important;
}

html body .custom-spa-layout .wd-add-btn a.button span {
    transform: none !important;
    transition: none !important;
}
html body .custom-spa-layout .wd-add-btn a.button:hover span {
    transform: none !important;
}

/* KUPI VOUCHER (Bijelo dugme, crni tekst i obrub -> hover obrnuto) */
html body .custom-spa-layout .wd-add-btn a.button {
    background-color: #ffffff !important;
    color: #000000 !important;
    border: 1px solid #000000 !important;
}
html body .custom-spa-layout .wd-add-btn a.button:hover {
    background-color: #000000 !important;
    color: #ffffff !important;
    border-color: #000000 !important;
}

/* BOOK (Crno dugme, bijeli tekst, crni obrub -> hover obrnuto) */
html body .custom-spa-layout .spa-book-btn {
    background-color: #000000 !important;
    color: #ffffff !important;
    border: 1px solid #000000 !important;
}
html body .custom-spa-layout .spa-book-btn:hover {
    background-color: #ffffff !important;
    color: #000000 !important;
    border-color: #000000 !important;
}

/* Skrivanje WooCommerce "View Cart" teksta nakon klika */
html body .custom-spa-layout .wd-add-btn a.added_to_cart { display: none !important; }