/**
* Theme Name: Carafity Child
* Description: This is a child theme of Carafity, generated by Merlin WP.
* Author: <a href="https://wpopal.com/">Opalthemes</a>
* Template: carafity
* Version: 1.2.8
*/

/** product css */
.product-block {
    background: #F7F5F0;
    border-radius: 18px;
    overflow: visible !important;
    transition: all 0.35s ease;
    box-shadow: 0 6px 25px rgba(0,0,0,0.06);
    position: relative;
}

.product-block:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 50px rgba(0,0,0,0.12);
}

.product-image img {
    width: 100%;
    transition: transform 0.6s ease;
}

.product-block:hover .product-image img {
    transform: scale(1.08);
}

.woocommerce-LoopProduct-link {
    position: absolute;
    inset: 0;
    z-index: 2;
}

.group-action {
    position: absolute;
    top: 14px;
    right: 14px;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 3;
}

.product-block:hover .group-action {
    opacity: 1;
    transform: translateY(0);
}

.shop-action {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.shop-action button {
    background: #fff;
    border: none;
    padding: 9px;
    border-radius: 50%;
    box-shadow: 0 6px 15px rgba(0,0,0,0.1);
}

.shop-action button:hover {
    background: #1F3D2B;
    color: #fff;
}

.product-caption {
    padding: 18px 16px;
    text-align: center;
}

.product-caption h3 {
    font-size: 16px;
    font-weight: 600;
    color: #222;
}

.product-caption h3 a:hover {
    color: #C8A96A;
}

.product-action .button {
    padding: 8px 18px;
    border-radius: 999px;
    border: 1px solid #C8A96A;
    color: #1F3D2B;
    background: transparent;
}

.product-action .button:hover {
    background: #C8A96A;
    color: #fff;
}

/* PAGE BACKGROUND */
#page .site-content {
    background: #F1ECE3;
    padding: 100px 20px;
    margin: 0;
}

/* Category siDebar */
#secondary {
    background: rgba(247,245,240,0.9);
    padding: 20px;
    border-radius: 18px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.06);
    backdrop-filter: blur(8px);
}

#secondary .widget-title {
    font-size: 18px;
    color: #1F3D2B;
    margin-bottom: 18px;
}

#secondary .widget-title::after {
    content: "";
    width: 40px;
    height: 2px;
    background: #C8A96A;
    display: block;
    margin-top: 6px;
}

.product-categories {
    list-style: none;
    padding: 0;
}

/* FIX ALIGNMENT */
.product-categories li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.product-categories li a {
    flex: 1;
    padding: 12px;
    border-radius: 12px;
    background: #fff;
    text-decoration: none;
    color: #222;
}

.product-categories li a:hover {
    background: #1F3D2B;
    color: #fff!important;
}

.product-categories .count {
    white-space: nowrap;
    background: #EFE9DF;
    padding: 4px 10px;
    border-radius: 999px;
}

.product-categories li:hover .count {
    background: #C8A96A;
    color: #fff;
}

/* RESPONSIVE  */
@media (max-width: 768px) {

    .site-content .container,
    .content-area {
        display: block !important;
    }

    #primary,
    #secondary {
        width: 100% !important;
    }

    #secondary {
        margin-bottom: 20px;
    }
}

/* PRODUCT GRID - tablet  */
@media (max-width: 768px) {

    ul.products {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    ul.products li.product {
        width: 100% !important;
        margin: 0 !important;
    }
}

/* PRODUCT GRID - Mobile  */
@media (max-width: 480px) {

    ul.products {
        display: block !important;
    }

    ul.products li.product {
        width: 100% !important;
        display: block !important;
        margin-bottom: 20px !important;
    }

    /* kill theme column system */
    .columns-2 ul.products li.product,
    .columns-3 ul.products li.product,
    .columns-4 ul.products li.product {
        width: 100% !important;
    }
}

/* Small UI Adjustments */
@media (max-width: 768px) {

    #page .site-content {
        padding: 60px 15px;
    }

    .product-caption {
        padding: 12px;
    }

    .product-caption h3 {
        font-size: 13px;
    }

    .product-action .button {
        font-size: 12px;
        padding: 6px 12px;
    }

    .woocommerce-ordering select {
        width: 100%;
    }
}

/* product top bar filer option */
/* 🌿 Top Sorting Bar Container */
.carafity-sorting {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
	z-index: 20;
    background: rgba(255,255,255,0.6);
    backdrop-filter: blur(10px);

	position: relative;
    z-index: 50;
	
    padding: 14px 18px;
    border-radius: 14px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.05);
    margin-bottom: 25px;
}

/* 🟦 Grid/List Toggle */
.gridlist-toggle a {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    width: 34px;
    height: 34px;

    border-radius: 8px;
    background: #F1ECE3;
    margin-left: 5px;

    transition: 0.3s;
}
.gridlist-toggle a:first-child {
	display: none;
}
.gridlist-toggle a.active {
    background: #1F3D2B;
    color: #fff;
}

.gridlist-toggle a:hover {
    background: #C8A96A;
    color: #fff;
}

/* 📊 Result Count */
.woocommerce-result-count {
    font-size: 13px;
    color: #777;
    margin: 0;
}

/* 🎯 Dropdowns (Sort + Show) */
.woocommerce-ordering,
.carafity-products-per-page {
    position: relative;
}

.carafity-sorting, .woocommerce-products-header, #primary, .site-main {
	
overflow: visible !important;	
}

/* Fix custom dropdown (Elementor style) */
.select-items {
    position: absolute;
    top: calc(100% + 8px); /* cleaner spacing */
    left: 0;
    right: 0;

    background: #fff;
    border-radius: 10px;
    box-shadow: 0 12px 30px rgba(0,0,0,0.12);

    z-index: 9999;
}

/* Hide properly */
.select-hide {
    display: none;
}

.carafity-sorting {
    overflow: visible !important;
}

.woocommerce-ordering select,
.carafity-products-per-page select {
    width: auto;
    min-width: 140px;
}

/* Prevent pushing layout */
.carafity-products-per-page {
    white-space: nowrap;
}


.woocommerce-ordering select,
.carafity-products-per-page select {
    appearance: none;
    -webkit-appearance: none;

    background: #fff;
    border: 1px solid #E5E0D8;
    padding: 8px 12px;
    border-radius: 10px;
    font-size: 13px;
    color: #222;
    cursor: pointer;
    transition: 0.3s;
}

/* Hover effect */
.woocommerce-ordering select:hover,
.carafity-products-per-page select:hover {
    border-color: #C8A96A;
}

/* Wrap dropdowns nicely */
.woocommerce-ordering,
.carafity-products-per-page {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Label */
.per-page-title {
    font-size: 13px;
    color: #777;
}

/* responsive top product bar -  filer options */
/* 📱 Mobile Layout */
@media (max-width: 768px) {

    .carafity-sorting {
        flex-direction: column;
        align-items: stretch;
        padding: 12px;
    }

    /* Full width buttons */
    .carafity-sorting > a.filter-toggle {
        width: 100%;
        justify-content: center;
    }

    /* Center toggles */
    .gridlist-toggle {
        display: flex;
        justify-content: center;
        width: 100%;
    }

    /* Stack text */
    .woocommerce-result-count {
        text-align: center;
        width: 100%;
    }

    /* Dropdown full width */
    .woocommerce-ordering,
    .carafity-products-per-page {
        width: 100%;
        justify-content: space-between;
    }

    .woocommerce-ordering select,
    .carafity-products-per-page select {
        width: 100%;
    }
}

@media (max-width: 768px) {

    .select-items {
        position: absolute;
        width: 100%;
        left: 0;
    }

    .woocommerce-ordering,
    .carafity-products-per-page {
        width: 100%;
    }

    .woocommerce-ordering select,
    .carafity-products-per-page select {
        width: 100%;
    }
}