/* ==========================================================
   Global Product Card Styles
   Unified product card display for:
   - Search Results
   - Related Products
   - Vendor Store
   - Any product grid/list
   ========================================================== */

/* ----------------------------------------------------------
   Base Product Card Container
   ---------------------------------------------------------- */
.cv-product-card {
    position: relative;
    margin: 0;
    list-style: none;
}

.cv-product-card p:empty{
    margin:0!important;
}

.cv-product-card .cv-product-image {
    position: relative;
    overflow: hidden;
    background: #f5f5f5;
    display: block;
}

.cv-product-card .cv-product-image img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.3s ease;
    margin: 0!important;
    max-height: 427px;
    object-fit: cover;
}

.cv-product-card:hover .cv-product-image img {
    transform: scale(1.02);
}

/* ----------------------------------------------------------
   Product Badges (Wishlist + Sale)
   ---------------------------------------------------------- */
.cv-product-card .cv-product-badges {
    position: absolute;
    top: 12px;
    right: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
    z-index: 10;
}

/* Sale Badge */
.cv-product-card .cv-sale-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 12px;
    background: #567E7D;
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Wishlist Wrapper */
.cv-product-card .cv-wishlist-wrapper {
    display: inline-flex;
}

.cv-product-card .cv-wishlist-wrapper .wlfmc-add-to-wishlist {
    margin: 0 !important;
}

.cv-product-card .cv-wishlist-wrapper .wlfmc-add-to-wishlist a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    transition: all 0.2s ease;
}



.cv-product-card .cv-wishlist-wrapper .wlfmc-add-to-wishlist i,
.cv-product-card .cv-wishlist-wrapper .wlfmc-add-to-wishlist .wlfmc-icon {
    font-size: 16px;
    color: #141414;
    line-height: 1;
}

.cv-product-card .cv-wishlist-wrapper .wlfmc-add-to-wishlist.exists i,
.cv-product-card .cv-wishlist-wrapper .wlfmc-add-to-wishlist.exists .wlfmc-icon {
    color: #e74c3c;
}

/* ----------------------------------------------------------
   Add to Cart Button (Icon, Bottom-Right, Hover Reveal)
   ---------------------------------------------------------- */
.cv-product-card .button.add_to_cart_button,
.cv-product-card .button.product_type_simple {
    position: absolute;
    bottom: 12px;
    right: 12px;
    width: 44px;
    height: 44px;
    padding: 0;
    margin: 0;
    background: rgba(255, 255, 255, 0.95);
    color: #141414;
    border: none;
    border-radius: 50%;
    font-size: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Cart icon using pseudo-element */
.cv-product-card .button.add_to_cart_button::before,
.cv-product-card .button.product_type_simple::before {
    content: "";
    width: 20px;
    height: 20px;
    background-image: url("data:image/svg+xml,%3Csvg%20width%3D%2220%22%20height%3D%2220%22%20viewBox%3D%220%200%2020%2020%22%20fill%3D%22none%22%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M18.6349%2016.0062C18.2447%2013.0306%2017.3455%206.172%2016.9961%203.5062C16.8737%202.573%2016.0783%201.875%2015.1369%201.875C12.8003%201.875%207.35492%201.875%205.01832%201.875C4.07712%201.875%203.28172%202.573%203.15932%203.5062C2.80972%206.172%201.91052%2013.0306%201.52032%2016.0062C1.45012%2016.5414%201.61412%2017.081%201.97012%2017.4866C2.32612%2017.8924%202.83972%2018.125%203.37952%2018.125H16.7759C17.3157%2018.125%2017.8293%2017.8924%2018.1853%2017.4866C18.5413%2017.081%2018.7051%2016.5414%2018.6349%2016.0062ZM17.3955%2016.1688C17.4189%2016.3472%2017.3643%2016.527%2017.2457%2016.6622C17.1269%2016.7974%2016.9557%2016.875%2016.7759%2016.875H3.37952C3.19952%2016.875%203.02832%2016.7974%202.90972%2016.6622C2.79092%2016.527%202.73632%2016.3472%202.75972%2016.1688L4.39872%203.6688C4.43952%203.3576%204.70452%203.125%205.01832%203.125H15.1369C15.4507%203.125%2015.7159%203.3576%2015.7567%203.6688L17.3955%2016.1688Z%22%20fill%3D%22%23282828%22/%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M6.32568%205.00098C6.32568%207.07058%208.00588%208.75098%2010.0757%208.75098C12.1453%208.75098%2013.8257%207.07058%2013.8257%205.00098C13.8257%204.65598%2013.5455%204.37598%2013.2007%204.37598C12.8557%204.37598%2012.5757%204.65598%2012.5757%205.00098C12.5757%206.38078%2011.4555%207.50098%2010.0757%207.50098C8.69588%207.50098%207.57568%206.38078%207.57568%205.00098C7.57568%204.65598%207.29548%204.37598%206.95068%204.37598C6.60568%204.37598%206.32568%204.65598%206.32568%205.00098Z%22%20fill%3D%22%23282828%22/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

/* Show on hover (only when not added) */
.cv-product-card:hover .button.add_to_cart_button:not(.added),
.cv-product-card:hover .button.product_type_simple:not(.added) {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Hover effect */
.cv-product-card .button.add_to_cart_button:hover,
.cv-product-card .button.product_type_simple:hover {
    background: #fff;
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Hide when added */
.cv-product-card .button.add_to_cart_button.added,
.cv-product-card .button.product_type_simple.added {
    display: none !important;
}

/* ----------------------------------------------------------
   Loading State
   ---------------------------------------------------------- */
.cv-product-card .button.add_to_cart_button.loading,
.cv-product-card .button.product_type_simple.loading {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: none;
}

.cv-product-card .button.add_to_cart_button.loading::before,
.cv-product-card .button.product_type_simple.loading::before {
    display: none;
}

.cv-product-card .button.add_to_cart_button.loading::after,
.cv-product-card .button.product_type_simple.loading::after {
    content: "";
    position: absolute;
    width: 16px;
    height: 16px;
    border: 2px solid #141414;
    border-top-color: transparent;
    border-radius: 50%;
    animation: cv-product-spin 0.8s linear infinite;
}

@keyframes cv-product-spin {
    to { transform: rotate(360deg); }
}

/* ----------------------------------------------------------
   View Cart Button (Green, Appears After Add)
   ---------------------------------------------------------- */
.cv-product-card .button.cv-view-cart-button {
    position: absolute;
    bottom: 12px;
    right: 12px;
    width: 44px;
    height: 44px;
    padding: 0;
    margin: 0;
    background: #fff;
    color: #fff;
    border: none;
    border-radius: 50%;
    font-size: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    z-index: 20;
    display: flex!important;
    align-items: center;
    justify-content: center;
}

.cv-product-card .button.cv-view-cart-button::before {
    content: "";
    width: 25px;
    height: 25px;
    background-image: url("/wp-content/themes/furnique/assets/images/view-icon.svg") !important;
    background-repeat: no-repeat;
    background-position: center;
}

li.cv-product-card.product a.button{
    display: flex!important;
    align-items: center;
    justify-content: center;
}

/* Show when has-added class is present */
.cv-product-card .cv-product-image.has-added .button.cv-view-cart-button {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.cv-product-card .button.cv-view-cart-button .cv-tooltip {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #141414;
    color: #fff;
    padding: 6px 10px;
    font-size: 11px;
    font-weight: 500;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    margin-bottom: 8px;
    pointer-events: none;
}

.cv-product-card .button.cv-view-cart-button:hover .cv-tooltip {
    opacity: 1;
    visibility: visible;
}

.added_to_cart.wc-forward, .cv-product-image br, .cv-product-image p:empty{
 display:none!important;
}

.cv-product-image p{
 margin: 0!important;
}

/* ----------------------------------------------------------
   External / Group Product Buttons
   ---------------------------------------------------------- */
.cv-product-card .button.cv-external-button,
.cv-product-card .button.cv-view-product-button {
    position: absolute;
    bottom: 12px;
    right: 12px;
    width: 44px;
    height: 44px;
    padding: 0;
    margin: 0;
    background: rgba(255, 255, 255, 0.95);
    color: #141414;
    border: none;
    border-radius: 50%;
    font-size: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cv-product-card:hover .button.cv-external-button,
.cv-product-card:hover .button.cv-view-product-button {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.cv-product-card .button.cv-external-button:hover,
.cv-product-card .button.cv-view-product-button:hover {
    background: #fff;
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* External button icon (cart) */
.cv-product-card .button.cv-external-button::before {
    content: "";
    width: 20px;
    height: 20px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23141414' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='9' cy='21' r='1'/%3E%3Ccircle cx='20' cy='21' r='1'/%3E%3Cpath d='M1 1h4l2.68 13.39a2 2 0 0 0 2 1.61h9.72a2 2 0 0 0 2-1.61L23 6H6'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

/* View product button icon (eye) */
.cv-product-card .button.cv-view-product-button::before {
    content: "";
    width: 20px;
    height: 20px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23141414' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

/* Tooltips for external/view product buttons */
.cv-product-card .button.cv-external-button .cv-tooltip,
.cv-product-card .button.cv-view-product-button .cv-tooltip {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #141414;
    color: #fff;
    padding: 6px 10px;
    font-size: 11px;
    font-weight: 500;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    margin-bottom: 8px;
    pointer-events: none;
}

.cv-product-card .button.cv-external-button:hover .cv-tooltip,
.cv-product-card .button.cv-view-product-button:hover .cv-tooltip {
    opacity: 1;
    visibility: visible;
}

/* ----------------------------------------------------------
   Product Meta (Category, Title, Price)
   ---------------------------------------------------------- */
.cv-product-card .cv-product-meta {
    padding-top: 20px;
}

.woocommerce ul.products li.product .price ins {
    color: #BB2227 !important;
    float: left;
}

.cv-product-meta .woocommerce-loop-product__title,
.cv-product-meta span.cv-product-cat{
    margin-bottom:20px!important;
    padding: 0 !important;
    font-family: var(--wp--preset--font-family--dmsans) !important;
}

.cv-product-meta span.price {
    font-size: 15px !important;
    margin: 0 !important;
}

.cv-product-meta .woocommerce-loop-product__title{
    font-size: 15.7px !important;
}

.cv-product-meta p:last-child {
    margin: 0 !important;
}

.cv-product-card .cv-product-cat {
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: #6E6E6E;
    display: block;
    margin-bottom: 4px;
}

.cv-product-card .cv-product-cat a {
    color: inherit;
    text-decoration: none;
}

.cv-product-card .woocommerce-loop-product__title {
    font-size: 14px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #141414;
    margin: 0 0 4px;
    line-height: 1.3;
}

.cv-product-card .woocommerce-loop-product__title a {
    color: inherit;
    text-decoration: none;
}

.cv-product-card .price {
    font-size: 14px;
    color: #141414;
    font-weight: 500;
}

.cv-product-card .price del {
    color: #B5B5B5;
    font-weight: 400;
    margin-left: 6px;
}

.cv-product-card .price ins {
    text-decoration: none;
    color: #BB2227;
}

/* ----------------------------------------------------------
   Hide Default WooCommerce Elements
   ---------------------------------------------------------- */
.cv-product-card .onsale {
    display: none !important;
}

.cv-product-card .wlfmc-add-to-wishlist .woocommerce-loop-product__link {
    display: none !important;
}

/* ----------------------------------------------------------
   Responsive
   ---------------------------------------------------------- */
@media (max-width: 767px) {
    .cv-product-card .woocommerce-loop-product__title {
        font-size: 13px;
    }

    .cv-product-card .price {
        font-size: 13px;
    }
}
