/*
 Theme Name:   Woodmart Child
 Description:  Woodmart Child Theme
 Author:       XTemos
 Author URI:   http://xtemos.com
 Template:     woodmart
 Version:      1.0.9
 Text Domain:  woodmart
*/

/* Kohandatud hindade kuvamine */
.price-label-regular,
.price-label-sale {
    font-size: 0.85em;
    font-weight: normal;
    color: #666;
}

.price-label-regular {
    text-decoration: none;
}

.regular-price {
    color: #333;
}

/* ============================================
   HINNAKIRJA TABEL - Desktop + Mobiili akordion
   ============================================ */

.starcom-pricelist-note {
    font-size: 13px;
    color: #666;
    margin: 15px 0;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 4px;
}

.starcom-pricelist-section {
    margin: 30px 0;
}

.starcom-pricelist-section h3 {
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #1c61e7;
    color: #333;
}

/* ===== DESKTOP TABEL ===== */
.starcom-pricelist-wrapper {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 20px 0;
}

.starcom-pricelist {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.starcom-pricelist th,
.starcom-pricelist td {
    padding: 10px 8px;
    text-align: center;
    border: 1px solid #ddd;
}

.starcom-pricelist th {
    background: #1c61e7;
    color: #fff;
    font-weight: 600;
    font-size: 12px;
}

.starcom-pricelist th:first-child,
.starcom-pricelist td:first-child {
    text-align: left;
    font-weight: 600;
}

.starcom-pricelist tbody tr:nth-child(even) {
    background-color: #f8f9fa;
}

.starcom-pricelist tbody tr:hover {
    background-color: #e8f4fc;
}

.starcom-pricelist .price-unavailable {
    color: #ccc;
}

/* ===== MOBIILI AKORDION ===== */
.starcom-accordion {
    display: none;
}

.accordion-item {
    border: 1px solid #ddd;
    border-radius: 6px;
    margin-bottom: 8px;
    overflow: hidden;
}

.accordion-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px;
    background: #f8f9fa;
    cursor: pointer;
    font-weight: 600;
    font-size: 15px;
    color: #333;
    transition: background 0.2s;
}

.accordion-header:hover {
    background: #e8f4fc;
}

.accordion-header.active {
    background: #1c61e7;
    color: #fff;
}

.accordion-icon {
    font-size: 20px;
    font-weight: bold;
    transition: transform 0.3s;
    margin-left: 10px;
}

.accordion-header.active .accordion-icon {
    transform: rotate(45deg);
}

.accordion-content {
    display: none;
    padding: 0;
    background: #fff;
}

.accordion-content.show {
    display: block;
}

.accordion-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 16px;
    border-bottom: 1px solid #eee;
    font-size: 14px;
}

.accordion-row:last-child {
    border-bottom: none;
}

.accordion-label {
    color: #666;
    flex: 1;
}

.accordion-value {
    font-weight: 600;
    color: #333;
    text-align: right;
}

.accordion-value.unavailable {
    color: #ccc;
}

/* ===== MEDIA QUERIES ===== */
@media (max-width: 768px) {
    .starcom-pricelist-wrapper {
        display: none;
    }

    .starcom-accordion {
        display: block;
    }
}

@media (min-width: 769px) {
    .starcom-accordion {
        display: none !important;
    }

    .starcom-pricelist-wrapper {
        display: block !important;
    }
}

/* ============================================
   OTSINGU LEHT - Peida kategooriad
   ============================================ */

/* Peida kategooriate karussell otsingu tulemuste lehel */
body.search-results .wd-cats-element,
body.search .wd-cats-element,
body.search-results .wd-cats,
body.search .wd-cats {
    display: none !important;
}

/* ============================================
   AVALEHE KATEGOORIAD - Ruudukujulised kastid
   ============================================ */

/* Kategooriate konteiner - 10px vahe */
.wd-cats.elements-grid,
.wd-cats-element .wd-cats,
.products.wd-cats,
.wd-cats.wd-grid {
    --wd-gap: 10px !important;
    --wd-col-gap: 10px !important;
    --wd-row-gap: 10px !important;
    gap: 10px !important;
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
}

/* Kategooria kast - ruudukujuline ümarate nurkadega */
.wd-cats .wd-cat,
.wd-cats-element .wd-cat,
.products.wd-cats .wd-cat {
    background: #fff !important;
    border-radius: 12px !important;
    overflow: hidden !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08) !important;
    transition: transform 0.2s ease, box-shadow 0.2s ease !important;
    margin: 0 !important;
    padding: 10px !important;
    width: auto !important;
    flex: 0 0 auto !important;
}

/* Hover efekt */
.wd-cats .wd-cat:hover {
    transform: translateY(-3px) !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.12) !important;
}

/* Kategooria sisemine osa - ümarad nurgad */
.wd-cats .wd-cat .wd-cat-wrap,
.wd-cats .wd-cat .wd-cat-inner {
    border-radius: 12px !important;
    overflow: hidden !important;
}

/* Pildi konteiner ruudukujuline 150x150 */
.wd-cats .wd-cat .wd-cat-thumb,
.wd-cat-thumb,
.category-image-wrapp {
    width: 150px !important;
    height: 150px !important;
    max-width: 150px !important;
    max-height: 150px !important;
    min-width: 150px !important;
    min-height: 150px !important;
    border-radius: 12px !important;
    overflow: hidden !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin: 0 auto !important;
}

/* Pilt 150x150 */
.wd-cats .wd-cat .wd-cat-thumb img,
.wd-cat-thumb img,
.category-image-wrapp img {
    width: auto !important;
    height: auto !important;
    max-width: 150px !important;
    max-height: 150px !important;
    object-fit: contain !important;
    display: block !important;
}

/* Kategooria sisu/tekst */
.wd-cats .wd-cat .wd-cat-content {
    padding: 12px 10px !important;
    border-radius: 0 0 12px 12px !important;
    background: #fff !important;
    text-align: center !important;
}

/* Kategooria leht sidebar - väiksem */
.widget_product_categories img,
.wc-block-product-categories img {
    width: 50px !important;
    height: 50px !important;
    object-fit: cover !important;
    aspect-ratio: 1 / 1 !important;
}

/* Mobiilivaade */
@media (max-width: 576px) {
    .wd-cats.elements-grid,
    .wd-cats-element .wd-cats,
    .products.wd-cats {
        gap: 8px !important;
    }

    .wd-cats .wd-cat {
        border-radius: 10px !important;
        padding: 8px !important;
    }

    .wd-cats .wd-cat .wd-cat-thumb,
    .wd-cat-thumb {
        width: 120px !important;
        height: 120px !important;
        max-width: 120px !important;
        max-height: 120px !important;
        min-width: 120px !important;
        min-height: 120px !important;
        border-radius: 10px !important;
    }

    .wd-cats .wd-cat .wd-cat-thumb img,
    .wd-cat-thumb img {
        max-width: 120px !important;
        max-height: 120px !important;
    }

    .wd-cats .wd-cat .wd-cat-content {
        padding: 10px 8px !important;
        border-radius: 0 0 10px 10px !important;
    }
}

/* ============================================
   TOOTE NIMI - 4 rida (vaikimisi 2)
   ============================================ */

/* Woodmart kasutab CSS muutujat --title-line-count */
.title-line-two,
.title-line-one,
[class*="title-line-"] {
    --title-line-count: 4 !important;
}

/* Otse max-height ülekirjutus 4 rea jaoks */
/* line-height on 1.4em, seega 4 rida = 5.6em */
[class*="title-line-"] .wd-product .wd-entities-title,
.title-line-two .wd-product .wd-entities-title,
.title-line-one .wd-product .wd-entities-title {
    max-height: 5.6em !important;
    -webkit-line-clamp: 4 !important;
    line-clamp: 4 !important;
    display: -webkit-box !important;
    -webkit-box-orient: vertical !important;
}
