/**
 * Theme Name: Halo Mobiles
 * Template:   machic
 * Text Domain: machic
 */

.products .product .product-content:not(.cart-dropdown *) {
    .product-footer-details strong {
        color: #FE0000 !important;
    }

    .products .product-title a {
        font-family: Inter;
        font-weight: 600;
        font-size: 16px;
    }

    .product-buttons, .product-rating {
        display: none;
    }


    .products .product-content-fade {
        background-color: #FFFFFF;
        border-radius: 10px;
        border-width: 2px;
        border: 2px solid #D9D9D9;
        box-shadow: 0px 5px 15px 0px #00000040;
    }

    /* Add "From" above the price */

    .price::before {
        content: "From";
        display: block;
        font-size: 16px;
        line-height: 0em;
        font-weight: 600;
        color: #8792A2;
        font-family: inter;
        padding-bottom: 5px;
    }


    .woocommerce-Price-currencySymbol {
        vertical-align: super;
        margin-right: 1px;
        font-family: Inter;
        font-weight: 600;
        font-size: 24px;
        padding-right: 0.3em;
    }

    .price {
        font-family: Inter;
        font-weight: 600;
        font-size: 2rem;
        line-height: 1em;
    }

    .product-title {
        padding-bottom: 18px;
    }
}

.products .product-price-cart a.button {
    display: none !important
}

.product-footer-details strong {
    color: #FE0000;
}

.products .product .product-title {
    font-family: Inter, serif;
    font-weight: 600;
    font-size: 1rem;
}

.shop-banner-bottom, .shop-banner-top {
    display: none;
}


.site-header .header-addons-icon .button-count {
    color: white;
    background-color: red;
}

#sidebar {
    display: none;
}

.before-shop-loop {
    display: none;
}

.content-wrapper {
    padding-bottom: 2rem;
}

.machic-order-options {
    margin: 20px 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.machic-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.machic-label {
    font-weight: 600;
    font-size: 14px;
}

.machic-select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
}

.product-info .product-actions {
    display: none;
}

.single_add_to_cart_button {
    font-family: Inter, serif;
    background-color: #FE0000;
    font-weight: 600;
    font-size: 1rem;
}

.site-module .module-header .entry-title {
    font-family: Inter, serif;
    font-weight: 600;
    font-size: 1.1rem;
}

.klb-flexslider-thumbnail.horizontal .flex-control-nav {
    margin-bottom: 15px;
}

.klb-flexslider-thumbnail .flex-control-thumbs li img.flex-active {
    border: #FE0000 3px solid;
}

.klb-flexslider-thumbnail .flex-control-thumbs li img {
    border-radius: 5px;
}

.single-product-wrapper .product_title {
    font-family: Inter, serif;
    font-weight: 600;
}

.single-product-wrapper .product-price .price {
    font-family: Inter, serif;
    font-weight: 600;
    font-size: 2.2rem;
}

.variation-badge {
    display: inline-block;
    padding: 8px 16px;
    margin: 0 8px 8px 0;
    border: 1px solid #DADDE3;
    border-radius: 5px;
    cursor: pointer;
    background: #FFFFFF;
    color: #000000;
    font-size: 14px;
    font-weight: 500;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease,
        box-shadow 0.2s ease, transform 0.2s ease;
    min-width: 96px;
}

.variation-badge.selected {
    background: #F5F6F8;
    border-color: #111111;
    color: #111111;
    /* outer ring instead of a thicker border: no size change on select */
    box-shadow: 0 0 0 1px #111111, 0 2px 8px rgba(0, 0, 0, 0.12);
}

.variation-badge::before {
    content: "\2713";
    display: inline-block;
    width: 0;
    margin-right: 0;
    overflow: hidden;
    vertical-align: bottom;
    opacity: 0;
    transition: width 0.2s ease, margin-right 0.2s ease, opacity 0.2s ease;
}

.variation-badge.selected::before {
    width: 1em;
    margin-right: 6px;
    opacity: 1;
}

.variation-badge:hover:not(:disabled) {
    border-color: #6B7280;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.variation-badge.selected:hover:not(:disabled) {
    border-color: #111111;
    box-shadow: 0 0 0 1px #111111, 0 2px 8px rgba(0, 0, 0, 0.12);
}

.variation-badge:disabled,
.variation-badge:disabled:hover {
    background: #F3F4F6;
    border-color: #DADDE3;
    color: #9CA3AF;
    cursor: not-allowed;
    text-decoration: line-through;
}

form.variations_form .label label {
    font-family: Inter, serif;
    font-weight: 600;
    font-size: 0.8rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #6B7280;
    padding-bottom: 8px;
}

.variations {
    display: block;
}

.variations tr {
    display: flex;
    flex-direction: column;
    margin-bottom: 20px;
}

/* Installment line under the price */
.machic-installment--standalone {
    display: inline-block;
    margin: 8px 0 20px;
    padding: 8px 14px;
    background: #F5F6F8;
    border-radius: 8px;
    font-size: 0.9rem;
}

.machic-installment--standalone strong:first-child {
    color: #111111;
    font-size: 1.1rem;
}

/* Category link: neutral, red reserved for CTAs */
.single-product-wrapper .product_meta a {
    color: #4B5563;
}

.single-product-wrapper .product_meta a:hover {
    color: #111111;
    text-decoration: underline;
}

/* Purchase box: price already shown above, make the CTA prominent */
.single_variation_wrap .woocommerce-variation-add-to-cart {
    display: flex;
    align-items: stretch;
    gap: 12px;
}

.single_variation_wrap .woocommerce-variation-price {
    display: none;
}

.single_variation_wrap .single_add_to_cart_button {
    flex: 1;
    box-shadow: 0 4px 12px rgba(254, 0, 0, 0.3);
    transition: transform 0.2s, box-shadow 0.2s;
}

.single_variation_wrap .single_add_to_cart_button:hover {
    background-color: #D40000;
    border-color: #D40000;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(254, 0, 0, 0.4);
}

.variations th.label {
    text-align: left;
    justify-content: start;

}

.variations td.value {
    padding: 0;
    border: none;
}

.tax-product_cat .products li.product-category {
    display: none !important;
}

/* Additional information tab: drop duplicate heading, soften table */
.single-product-wrapper .woocommerce-Tabs-panel--additional_information > h2 {
    display: none;
}

.single-product-wrapper .woocommerce-product-attributes {
    width: 100%;
    border: 1px solid #E5E7EB;
    border-collapse: separate;
    border-spacing: 0;
    border-radius: 10px;
    overflow: hidden;
}

.single-product-wrapper .woocommerce-product-attributes th,
.single-product-wrapper .woocommerce-product-attributes td {
    padding: 14px 20px;
    border: none;
    border-bottom: 1px solid #E5E7EB;
    background: #FFFFFF;
}

.single-product-wrapper .woocommerce-product-attributes th {
    width: 220px;
    background: #F5F6F8;
    font-weight: 600;
    color: #111111;
}

.single-product-wrapper .woocommerce-product-attributes tr:last-child th,
.single-product-wrapper .woocommerce-product-attributes tr:last-child td {
    border-bottom: none;
}

.single-product-wrapper .woocommerce-product-attributes td p {
    margin: 0;
}

@media (max-width: 767px) {
    .single-product-wrapper .woocommerce-product-attributes th {
        width: 35%;
    }

    .single-product-wrapper .woocommerce-product-attributes th,
    .single-product-wrapper .woocommerce-product-attributes td {
        padding: 10px 12px;
        font-size: 0.9rem;
    }
}

/* Related products: more breathing room */
.single-product-wrapper .related-products {
    margin-top: 3.5rem;
}

.single-product-wrapper .related-products .module-header {
    margin-bottom: 1.5rem;
}

.single-product-wrapper .related-products .products .product {
    padding: 0 0.75rem;
}

.single-product-wrapper .related-products .products .product .product-content .price {
    font-size: 1.5rem;
}

.single-product-wrapper .related-products .products .product .product-content .woocommerce-Price-currencySymbol {
    font-size: 1rem;
}

/* Cart / mini-cart: parent theme hides selected variation options.
   `body` prefix: parent style.css loads after this file (see functions.php). */
body .cart_item dl.variation,
body .mini_cart_item dl.variation {
    display: block;
    margin: 6px 0 0;
    font-size: 0.8125rem;
    color: #6B7280;
}

body .cart_item dl.variation dt,
body .mini_cart_item dl.variation dt {
    float: left;
    clear: left;
    margin: 0 4px 0 0;
    font-weight: 600;
}

body .cart_item dl.variation dd,
body .mini_cart_item dl.variation dd {
    margin: 0 0 2px;
}

body .cart_item dl.variation dd p,
body .mini_cart_item dl.variation dd p {
    margin: 0;
}

/* Mini-cart slider is a fixed 180px: show options as one compact line of values */
body .mini_cart_item dl.variation {
    display: flex;
    flex-wrap: wrap;
    gap: 0 6px;
    margin: 2px 0 0;
    font-size: 0.75rem;
    line-height: 1.4;
}

body .mini_cart_item dl.variation dt {
    display: none;
}

body .mini_cart_item dl.variation dd {
    margin: 0;
}

body .mini_cart_item dl.variation dd:not(:last-child)::after {
    content: "\00b7";
    margin-left: 6px;
}

/* Cart: "Chat with our agent" button */
body .wc-proceed-to-checkout .whatsapp-btn {
    gap: 10px;
    background-color: #FE0000;
    border-color: #FE0000;
    box-shadow: 0 4px 12px rgba(254, 0, 0, 0.3);
    transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
    animation: machic-chat-pulse 2.6s ease-out 1.2s infinite;
}

body .wc-proceed-to-checkout .whatsapp-btn::before {
    content: "";
    width: 1.25rem;
    height: 1.25rem;
    flex: none;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='white' d='M17.472 14.382c-.297-.149-1.758-.867-2.03-.967-.273-.099-.471-.148-.67.15-.197.297-.767.966-.94 1.164-.173.199-.347.223-.644.075-.297-.15-1.255-.463-2.39-1.475-.883-.788-1.48-1.761-1.653-2.059-.173-.297-.018-.458.13-.606.134-.133.298-.347.446-.52.149-.174.198-.298.298-.497.099-.198.05-.371-.025-.52-.075-.149-.669-1.612-.916-2.207-.242-.579-.487-.5-.669-.51-.173-.008-.371-.01-.57-.01-.198 0-.52.074-.792.372-.272.297-1.04 1.016-1.04 2.479 0 1.462 1.065 2.875 1.213 3.074.149.198 2.096 3.2 5.077 4.487.709.306 1.262.489 1.694.625.712.227 1.36.195 1.871.118.571-.085 1.758-.719 2.006-1.413.248-.694.248-1.289.173-1.413-.074-.124-.272-.198-.57-.347m-5.421 7.403h-.004a9.87 9.87 0 01-5.031-1.378l-.361-.214-3.741.982.998-3.648-.235-.374a9.86 9.86 0 01-1.51-5.26c.001-5.45 4.436-9.884 9.888-9.884 2.64 0 5.122 1.03 6.988 2.898a9.825 9.825 0 012.893 6.994c-.003 5.45-4.437 9.884-9.885 9.884m8.413-18.297A11.815 11.815 0 0012.05 0C5.495 0 .16 5.335.157 11.892c0 2.096.547 4.142 1.588 5.945L.057 24l6.305-1.654a11.882 11.882 0 005.683 1.448h.005c6.554 0 11.89-5.335 11.893-11.893a11.821 11.821 0 00-3.48-8.413Z'/%3E%3C/svg%3E") center / contain no-repeat;
    transition: transform 0.2s ease;
}

body .wc-proceed-to-checkout .whatsapp-btn:hover {
    background-color: #D40000;
    border-color: #D40000;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(254, 0, 0, 0.4);
    animation: none;
}

body .wc-proceed-to-checkout .whatsapp-btn:hover::before {
    transform: scale(1.15) rotate(-8deg);
}

body .wc-proceed-to-checkout .whatsapp-btn:active {
    transform: translateY(0) scale(0.98);
    box-shadow: 0 2px 6px rgba(254, 0, 0, 0.3);
}

@keyframes machic-chat-pulse {
    0%   { box-shadow: 0 4px 12px rgba(254, 0, 0, 0.3), 0 0 0 0 rgba(254, 0, 0, 0.45); }
    70%  { box-shadow: 0 4px 12px rgba(254, 0, 0, 0.3), 0 0 0 12px rgba(254, 0, 0, 0); }
    100% { box-shadow: 0 4px 12px rgba(254, 0, 0, 0.3), 0 0 0 0 rgba(254, 0, 0, 0); }
}

@media (prefers-reduced-motion: reduce) {
    body .wc-proceed-to-checkout .whatsapp-btn {
        animation: none;
    }
}

/* My Account: short pages (dashboard) sat directly on the footer */
.my-account-wrapper {
    min-height: 60vh;
    margin-bottom: 3rem;
}

/* My Account: link colour rule made .button text unreadable (e.g. "Confirm email address") */
.my-account-wrapper .woocommerce-MyAccount-content a.button,
.my-account-wrapper .woocommerce-MyAccount-content a.button:hover {
    color: #FFFFFF;
}

/* Smoother product card hover: animate only opacity/transform/shadow */
.products .product-content-fade {
    transform: translateY(6px);
    transition: opacity 0.25s ease-out, transform 0.25s ease-out;
    will-change: opacity, transform;
}

.products .product-footer {
    transform: translateY(4px);
    transition: opacity 0.25s ease-out, transform 0.25s ease-out, visibility 0s linear 0.25s;
}

.products .product:hover .product-footer {
    transform: translateY(0);
    transition-delay: 0s;
}

.products .product-footer-buttons > * {
    transition: opacity 0.25s ease-out, transform 0.25s ease-out;
}

@media (min-width: 768px) {
    .site-header .site-menu.primary .menu {
        justify-content: space-around;
        width: 800px;
    }

    .single-product-wrapper .related-products {
        padding-bottom: 6rem; /* ≥ hover footer height + 10px fade */
    }
}

@media (max-width: 767px) {

    .products .product .product-content:not(.cart-dropdown *) {
        & .price {
            /* font-size: 2rem; */
            font-size: 1.25rem;
        }

        & .woocommerce-Price-currencySymbol {
            /* font-size: 24px; */
            font-size: 1.25rem;
        }

        & .price::before {
            /* font-size: 16px; */
            font-size: 0.825rem;
        }
    }
}

