/*
Theme Name: MH Food
Theme URI: https://mhfood.com
Author: MH Foods
Author URI: https://mhfood.com
Description: A custom WordPress WooCommerce theme for MH Foods honey products, built with Tailwind CSS.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
WC requires at least: 7.0
WC tested up to: 9.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: mhfood
Tags: e-commerce, woocommerce, tailwind, honey, food
*/

/* ── WordPress custom logo ── */
/* High-specificity rule beats WooCommerce's img { height:auto } on WC pages */
#mhf-header a.custom-logo-link {
    display: flex;
    align-items: center;
    line-height: 0;
    height: 64px;
    flex-shrink: 0;
}
#mhf-header a.custom-logo-link img.custom-logo {
    height: 52px !important;
    width: auto !important;
    max-width: 170px !important;
    max-height: 52px !important;
    object-fit: contain !important;
    display: block !important;
}

/* Footer logo */
footer a.custom-logo-link img.custom-logo {
    height: 58px !important;
    max-height: 58px !important;
    width: auto !important;
    background: #fff;
    border-radius: 10px;
    padding: 5px 10px;
    object-fit: contain !important;
}

/* Sidebar icons — never expand */
#mhf-price-filter-box svg,
aside svg {
    flex-shrink: 0;
}

/* ── Custom dual price range slider ── */
#mhf-range-min, #mhf-range-max {
    -webkit-appearance: none;
    appearance: none;
    background: transparent;
    width: 100%;
    height: 20px;
    outline: none;
    cursor: pointer;
}
/* Thumb — WebKit */
#mhf-range-min::-webkit-slider-thumb,
#mhf-range-max::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #fff;
    border: 2.5px solid #d97706;
    box-shadow: 0 1px 6px rgba(0,0,0,.18);
    cursor: grab;
    pointer-events: all;
    position: relative;
    z-index: 4;
}
#mhf-range-min::-webkit-slider-thumb:active,
#mhf-range-max::-webkit-slider-thumb:active { cursor: grabbing; background: #fef3c7; }
/* Thumb — Firefox */
#mhf-range-min::-moz-range-thumb,
#mhf-range-max::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #fff;
    border: 2.5px solid #d97706;
    box-shadow: 0 1px 6px rgba(0,0,0,.18);
    cursor: grab;
    pointer-events: all;
}
/* Hide default track line on Firefox */
#mhf-range-min::-moz-range-track,
#mhf-range-max::-moz-range-track { background: transparent; }

/* ── WooCommerce ordering dropdown ── */
.woocommerce-ordering select,
.woocommerce-ordering-wrap select {
    border: 1px solid #e7e5e4;
    border-radius: 10px;
    padding: 6px 36px 6px 12px;
    font-size: 0.875rem;
    color: #44403c;
    background-color: #fff;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%239ca3af'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 16px;
    cursor: pointer;
    outline: none;
}
.woocommerce-ordering select:focus,
.woocommerce-ordering-wrap select:focus {
    border-color: #f59e0b;
    box-shadow: 0 0 0 2px rgba(245,158,11,0.2);
}

/* ── WooCommerce price filter widget ── */
.mhf-price-widget { width: 100%; }

.widget_price_filter .price_slider_wrapper {
    padding: 4px 0;
}
.widget_price_filter .ui-slider {
    background: #fde68a;
    border-radius: 9999px;
    height: 5px;
    margin: 14px 0 10px;
    position: relative;
}
.widget_price_filter .ui-slider .ui-slider-range {
    background: #d97706;
    border-radius: 9999px;
    position: absolute;
    height: 100%;
}
.widget_price_filter .ui-slider .ui-slider-handle {
    background: #fff;
    border: 2px solid #d97706;
    border-radius: 9999px;
    width: 18px;
    height: 18px;
    top: -7px;
    margin-left: -9px;
    position: absolute;
    box-shadow: 0 1px 6px rgba(0,0,0,.18);
    cursor: grab;
    outline: none;
    z-index: 2;
}
.widget_price_filter .ui-slider .ui-slider-handle:active { cursor: grabbing; }

/* Selected price range label */
.widget_price_filter .price_label {
    font-size: 0.8rem;
    color: #78716c;
    margin: 10px 0 12px;
    display: flex;
    align-items: center;
    gap: 4px;
}
.widget_price_filter .price_label::before {
    content: 'Selected Range:';
    font-size: 0.7rem;
    font-weight: 600;
    color: #a8a29e;
    text-transform: uppercase;
    letter-spacing: .05em;
    display: block;
    margin-right: 2px;
}
.widget_price_filter .price_label span {
    font-weight: 700;
    color: #d97706;
}
.widget_price_filter .price_label .to {
    color: #78716c;
    font-weight: 400;
}

/* Apply Filter button */
.widget_price_filter .wc-block-components-price-slider__controls,
.widget_price_filter .price_slider_amount {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 4px;
}
.widget_price_filter button.button,
.widget_price_filter input[type="submit"] {
    background: #d97706;
    color: #fff !important;
    border: none;
    border-radius: 10px;
    padding: 7px 16px;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    letter-spacing: .02em;
    transition: background .15s;
    width: 100%;
    margin-top: 10px;
}
.widget_price_filter button.button:hover,
.widget_price_filter input[type="submit"]:hover {
    background: #b45309;
}

/* ── WooCommerce pagination ── */
.woocommerce-pagination ul {
    display: flex;
    align-items: center;
    gap: 6px;
    list-style: none;
    padding: 0;
    margin: 0;
}
.woocommerce-pagination ul li a,
.woocommerce-pagination ul li span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 500;
    color: #44403c;
    border: 1px solid #e7e5e4;
    background: #fff;
    text-decoration: none;
    transition: all .15s;
}
.woocommerce-pagination ul li a:hover {
    background: #fef3c7;
    border-color: #fcd34d;
    color: #b45309;
}
.woocommerce-pagination ul li span.current {
    background: #d97706;
    border-color: #d97706;
    color: #fff;
    font-weight: 700;
}
