/*
Theme Name: Onsus Child
Template: onsus
Version: 1.0
*/

/* Shop Layout Improvements */
.onsus-shop-wrapper {
    margin: 40px 0;
}

/* Sidebar Styling */
.shop-sidebar-content {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid #e9ecef;
}

.shop-sidebar-content .widget {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid #dee2e6;
}

.shop-sidebar-content .widget:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.shop-sidebar-content .widget-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 15px;
    color: #333;
}

/* Mobile Filter Toggle */
.mobile-filter-toggle button {
    padding: 12px 20px;
    font-weight: 500;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s ease;
}

/* Shop Toolbar */
.shop-toolbar {
    background: #fff;
    padding: 20px;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* View Toggle */
.view-toggle .btn-group .btn {
    padding: 8px 12px;
    border-color: #dee2e6;
}

.view-toggle .btn.active {
    background-color: #007cba;
    border-color: #007cba;
    color: white;
}

/* Products Grid */
.products-wrapper[data-view="grid"] .products {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
    margin: 0;
    padding: 0;
}

.products-wrapper[data-view="list"] .products {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin: 0;
    padding: 0;
}

.products-wrapper[data-view="list"] .product {
    display: flex;
    align-items: center;
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    transition: box-shadow 0.3s ease;
}

.products-wrapper[data-view="list"] .product:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.products-wrapper[data-view="list"] .product .woocommerce-loop-product__link {
    display: flex;
    width: 100%;
    align-items: center;
    text-decoration: none;
    color: inherit;
}

.products-wrapper[data-view="list"] .product img {
    width: 120px;
    height: 120px;
    object-fit: cover;
    margin-right: 20px;
    border-radius: 6px;
}

/* Active Filters */
.active-filters .widget_layered_nav_filters ul {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.active-filters .widget_layered_nav_filters li {
    background: #007cba;
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 14px;
}

.active-filters .widget_layered_nav_filters a {
    color: white;
    text-decoration: none;
}

/* No Products Found */
.no-products-found {
    text-align: center;
    padding: 60px 20px;
}

.no-products-found .woocommerce-info {
    font-size: 18px;
    color: #6c757d;
    margin: 0;
}

/* Offcanvas Customization */
.offcanvas {
    border: none;
    box-shadow: -2px 0 10px rgba(0,0,0,0.1);
}

.offcanvas-header {
    background: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
}

.offcanvas-body {
    padding: 20px;
}

.offcanvas .widget {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid #dee2e6;
}

.offcanvas .widget:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.offcanvas .widget-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 15px;
    color: #333;
}

/* Responsive Design */
@media (max-width: 991.98px) {
    /* Hide sidebar on tablets and mobile */
    .shop-sidebar-left,
    .shop-sidebar-right {
        display: none !important;
    }
    
    /* Full width main content */
    .shop-main-content {
        flex: 0 0 100%;
        max-width: 100%;
    }
    
    /* Stack toolbar items */
    .shop-toolbar {
        padding: 15px;
    }
    
    .shop-controls {
        gap: 15px;
    }
}

@media (max-width: 767.98px) {
    .onsus-shop-wrapper {
        margin: 20px 0;
    }
    
    .shop-toolbar {
        padding: 15px;
        margin-bottom: 20px;
    }
    
    /* Mobile product grid */
    .products-wrapper[data-view="grid"] .products {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 15px;
    }
    
    /* Mobile list view */
    .products-wrapper[data-view="list"] .product {
        padding: 15px;
    }
    
    .products-wrapper[data-view="list"] .product .woocommerce-loop-product__link {
        flex-direction: column;
        text-align: center;
    }
    
    .products-wrapper[data-view="list"] .product img {
        margin-right: 0;
        margin-bottom: 15px;
        width: 100px;
        height: 100px;
    }
    
    /* Mobile view toggle */
    .view-toggle {
        flex-wrap: wrap;
    }
    
    .view-label {
        width: 100%;
        margin-bottom: 8px;
        font-size: 14px;
    }
}

@media (max-width: 575.98px) {
    .products-wrapper[data-view="grid"] .products {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .shop-toolbar {
        padding: 10px;
    }
    
    .shop-controls {
        flex-direction: column;
        align-items: stretch !important;
        gap: 10px;
    }
    
    .view-toggle .btn-group {
        width: 100%;
    }
    
    .view-toggle .btn-group .btn {
        flex: 1;
    }
}

/* Clean up any unwanted borders/lines */
.products-wrapper * {
    box-sizing: border-box;
}

.products,
.products li {
    margin: 0;
    padding: 0;
    list-style: none;
}

/* Override any theme black borders */
.shop-main-content *,
.shop-sidebar-content *,
.offcanvas-body * {
    border-color: #e9ecef !important;
}

/* Remove any black lines/borders */
.shop-toolbar,
.products-wrapper,
.active-filters,
.mobile-filter-toggle {
    border: none !important;
}

/* Ensure proper spacing */
.mb-3 {
    margin-bottom: 1rem !important;
}

.mb-4 {
    margin-bottom: 1.5rem !important;
}

/* Force sidebar visibility when needed */
.shop-sidebar-content {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* ── Custom Filter Panel ─────────────────────────────────────────── */

/* Panel slide-in open state */
.tf-filter-panel.open .content-popup-filter {
    transform: translateX(0);
}
.tf-filter-panel.open .overlay {
    opacity: 1;
    visibility: visible;
}

/* Filter block sections */
.tf-filter-block {
    padding: 22px 0;
    border-bottom: 1px solid #f0f0f0;
}
.tf-filter-block:last-child {
    border-bottom: none;
}

.tf-filter-title {
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #333;
    margin: 0 0 16px;
}

/* Category list */
.tf-cat-list,
.tf-cat-children {
    list-style: none;
    margin: 0;
    padding: 0;
}

.tf-cat-item {
    margin-bottom: 4px;
}

.tf-cat-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.tf-cat-link {
    font-size: 14px;
    color: #444;
    text-decoration: none;
    flex: 1;
    padding: 5px 0;
    transition: color 0.15s;
    line-height: 1.4;
}
.tf-cat-link:hover {
    color: var(--theme-secondary-color, #c8a96e);
}
.tf-cat-link.is-active {
    color: var(--theme-secondary-color, #c8a96e);
    font-weight: 600;
}

/* Toggle button */
.tf-toggle {
    background: none;
    border: 1px solid #ddd;
    border-radius: 3px;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    padding: 0;
    line-height: 1;
    color: #777;
    transition: border-color 0.15s, color 0.15s;
}
.tf-toggle:hover {
    border-color: var(--theme-secondary-color, #c8a96e);
    color: var(--theme-secondary-color, #c8a96e);
}
.tf-toggle-icon {
    font-size: 16px;
    line-height: 1;
    display: block;
}

/* Subcategory list (hidden by default, shown when parent .is-open) */
.tf-cat-children {
    margin-top: 6px;
    padding-left: 14px;
    display: none;
}
.tf-cat-item.is-open > .tf-cat-children {
    display: block;
}
.tf-cat-children li {
    margin-bottom: 2px;
}
.tf-cat-children .tf-cat-link {
    font-size: 13px;
    color: #666;
    padding: 3px 0;
}

/* Price filter */
.tf-price-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}
.tf-price-input {
    flex: 1;
    min-width: 0;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 8px 10px;
    font-size: 13px;
    color: #333;
    appearance: textfield;
    -moz-appearance: textfield;
}
.tf-price-input::-webkit-outer-spin-button,
.tf-price-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
}
.tf-price-input:focus {
    outline: none;
    border-color: var(--theme-secondary-color, #c8a96e);
}
.tf-price-dash {
    color: #aaa;
    font-size: 14px;
    flex-shrink: 0;
}
.tf-price-btn {
    width: 100%;
    padding: 10px 16px;
    background: var(--theme-secondary-color, #333);
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: opacity 0.15s;
    letter-spacing: 0.03em;
}
.tf-price-btn:hover {
    opacity: 0.85;
}

/* Clear link */
.tf-clear-link {
    display: block;
    padding: 16px 0 4px;
    font-size: 13px;
    color: #aaa;
    text-decoration: underline;
    text-align: center;
}
.tf-clear-link:hover {
    color: #555;
}

/* Hide grid/list view toggle on shop page */
.woocommerce-ordering ~ .woocommerce-result-count,
.shop-loop-before .list-layout,
.shop-loop-before .grid-layout,
.woocommerce-ordering + ul.wc-tabs,
.tf-layout-toggle,
.woocommerce .woocommerce-ordering ~ .view-switcher,
.shop-view-switcher,
[class*="view-mode"],
[class*="grid-list"],
[class*="layout-switcher"],
.woocommerce ul.products .change-view,
.woocommerce .products-header .view-mode,
.loop-header .view-switcher {
    display: none !important;
}

/* Hide view as grid/list toggle */
.wrap-toggle-products-layout {
    display: none !important;
}

/* Hide quick view */
.tf-btn-quickview,
.tf-tooltip:has(.tf-btn-quickview) {
    display: none !important;
}

/* Hide wishlist */
.tf-btn-wishlist,
.tf-tooltip:has(.tf-btn-wishlist) {
    display: none !important;
}

/* Hide compare */
.tf-btn-compare,
.tf-tooltip:has(.tf-btn-compare) {
    display: none !important;
}

/* Shop top bar layout */
.meta-wrap.clearfix .row {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    flex-wrap: nowrap !important;
}

.meta-wrap.clearfix .left-top-shop-loop {
    flex: 0 0 auto !important;
    width: auto !important;
}

.meta-wrap.clearfix .center-top-shop-loop {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 12px !important;
    flex-wrap: nowrap !important;
    width: auto !important;
    flex: 0 0 auto !important;
    padding: 0 !important;
}

.meta-wrap.clearfix .center-top-shop-loop .woocommerce-ordering {
    margin-bottom: 0 !important;
    flex-shrink: 0 !important;
}

.meta-wrap.clearfix .center-top-shop-loop .almasabih-filter-btn-wrap {
    margin-bottom: 0 !important;
    flex-shrink: 0 !important;
}

/* Hide 360 view button on single product page */
.button-360-image,
.content-product-360-image {
    display: none !important;
}

/* Hide add to wishlist on single product page */
.single-product .yith-add-to-wishlist-button-block,
.single-product .yith-wcwl-add-to-wishlist,
.single-product .add_to_wishlist {
    display: none !important;
}

/* Hide sidebar filter widget area on single product page */
.single-product #secondary,
.single-product .widget-area,
.single-product .sidebar {
    display: none !important;
}

/* Make product content full width when sidebar is hidden */
.single-product #primary {
    width: 100% !important;
    float: none !important;
}