/* WooCommerce Price Slider Styles */
.widget_price_filter .price_slider_wrapper .ui-widget-content {
    background-color: #e5e7eb;
    /* gray-200 */
    border-radius: 9999px;
}

.widget_price_filter .ui-slider-horizontal {
    height: 0.5rem;
    margin-bottom: 1.5rem;
}

.widget_price_filter .ui-slider .ui-slider-range {
    background-color: #4b5563;
    /* gray-600 */
    border-radius: 9999px;
}

.widget_price_filter .ui-slider .ui-slider-handle {
    background-color: #1f2937;
    /* gray-800 */
    border-radius: 50%;
    width: 1rem;
    height: 1rem;
    top: -0.25rem;
    cursor: grab !important;
    outline: none;
}

.widget_price_filter .ui-slider .ui-slider-handle:active {
    cursor: grabbing !important;
    background-color: #111827;
    transform: scale(1.1);
}

.widget_price_filter .ui-slider .ui-slider-handle:hover,
.widget_price_filter .ui-slider .ui-slider-handle:focus {
    background-color: #111827;
    /* gray-900 */
    transform: scale(1.1);
}

/* Layered Nav Widget Styles */
.widget_layered_nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    max-height: 400px;
    overflow-y: auto;
    /* Custom Scrollbar Styling */
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 transparent;
}

/* Webkit scrollbar fallback */
.widget_layered_nav ul::-webkit-scrollbar {
    width: 6px;
}

.widget_layered_nav ul::-webkit-scrollbar-thumb {
    background-color: #cbd5e1;
    border-radius: 3px;
}

.widget_layered_nav ul::-webkit-scrollbar-track {
    background: transparent;
}

.widget_layered_nav ul li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.widget_layered_nav ul li a {
    color: #4b5563;
    /* gray-600 */
    text-decoration: none;
    transition: color 0.2s;
}

.widget_layered_nav ul li a:hover {
    color: #0284c7;
    /* primary-600 (example) */
}

/* Selected/Active Filter */
.widget_layered_nav ul li.chosen a {
    color: #0284c7;
    font-weight: bold;
}

.widget_layered_nav ul li.chosen a::before {
    content: "✕ ";
    color: #ef4444;
    /* red-500 */
    margin-right: 0.25rem;
}

.widget_layered_nav .count {
    font-size: 0.75rem;
    background-color: #f3f4f6;
    /* gray-100 */
    color: #6b7280;
    /* gray-500 */
    padding: 0.125rem 0.5rem;
    border-radius: 9999px;
}

.widget_layered_nav ul li:hover .count {
    background-color: #e0f2fe;
    /* primary-50 */
    color: #0284c7;
}

.widget_price_filter .price_slider_amount {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.875rem;
}

.widget_price_filter .price_label {
    color: #4b5563;
    /* gray-600 */
}

.widget_price_filter .button {
    background-color: white;
    border: 1px solid #e5e7eb;
    color: #374151;
    padding: 0.25rem 0.75rem;
    border-radius: 0.375rem;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s;
}

.widget_price_filter .button:hover {
    border-color: #4b5563;
    color: #111827;
}

/* Clearfix for floats if any */
.widget_price_filter .price_slider_amount::after {
    content: "";
    display: table;
    clear: both;
}

/* Mini Cart Layout Customization */
.widget_shopping_cart_content .woocommerce-mini-cart-item {
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    padding: 12px 30px 12px 84px !important;
    /* Top/Right/Bottom/Left */
    border: 1px solid #d1d5db;
    /* Gray-300 */
    border-radius: 6px;
    margin-bottom: 12px;
    min-height: 84px;
    /* Ensure height for 60px image + padding */
    background-color: #ffffff;
}

/* Remove Button - Positioned Top Right */
.widget_shopping_cart_content .woocommerce-mini-cart-item .remove {
    position: absolute !important;
    top: 10px !important;
    right: 10px !important;
    width: 20px;
    height: 20px;
    line-height: 20px;
    text-align: center;
    color: #ef4444 !important;
    /* Red-500 */
    font-size: 1.25rem;
    background: transparent !important;
    border: none;
    order: 3;
}

.widget_shopping_cart_content .woocommerce-mini-cart-item .remove:hover {
    color: #b91c1c !important;
    /* Red-700 */
    background: #f3f4f6 !important;
    /* Gray-100 */
    border-radius: 50%;
}

/* Product Image - Absolute Left */
.widget_shopping_cart_content .woocommerce-mini-cart-item a img {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 60px !important;
    height: 60px !important;
    object-fit: cover;
    border-radius: 4px;
    margin: 0 !important;
    float: none !important;
}

/* Product Title Link */
.widget_shopping_cart_content .woocommerce-mini-cart-item a:not(.remove) {
    display: block;
    font-weight: 600;
    font-size: 0.95rem;
    line-height: 1.3;
    color: #1f2937;
    /* Gray-800 */
    text-decoration: none;
    margin-bottom: 4px;
    padding-right: 15px;
}

/* Price / Quantity */
.widget_shopping_cart_content .woocommerce-mini-cart-item .quantity {
    display: block;
    font-size: 0.875rem;
    color: #6b7280;
    /* Gray-500 */
}

/* Hide tab navigation when only one tab exists */
.woocommerce-tabs ul.tabs {
    display: none !important;
}

.woocommerce-tabs .woocommerce-Tabs-panel {
    padding: 0;
    margin-top: 2rem;
}

.woocommerce-tabs .woocommerce-Tabs-panel h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

/* Privacy Policy Text Styles (Moved from core modifications) */
.woocommerce-privacy-policy-text {
    margin-bottom: 1rem; /* mb-4 equivalent */
    font-size: 0.875rem; /* text-sm equivalent */
}

/* Related Products Heading */
.related.products h2,
.upsells.products h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

/* Product gallery thumbnails — horizontal row */
.flex-control-nav.flex-control-thumbs {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.5rem;
    list-style: none;
    margin: 0.75rem 0 0;
    padding: 0;
}

.flex-control-thumbs li {
    margin: 0;
    width: 72px;
    flex-shrink: 0;
}

.flex-control-thumbs li img {
    display: block;
    width: 100%;
    height: 72px;
    object-fit: contain;
    cursor: pointer;
    border: 2px solid transparent;
    border-radius: 4px;
    background-color: #f9fafb;
    transition: border-color 0.15s;
}

.flex-control-thumbs li img:hover,
.flex-control-thumbs li img.flex-active {
    border-color: currentColor;
}