/*!
Theme Name: commza
Theme URI: http://underscores.me/
Author: Underscores.me
Author URI: http://underscores.me/
Description: Description
Version: 1.0.0
Tested up to: 5.4
Requires PHP: 5.6
License: GNU General Public License v2 or later
License URI: LICENSE
Text Domain: commza
Tags: custom-background, custom-logo, custom-menu, featured-images, threaded-comments, translation-ready

This theme, like WordPress, is licensed under the GPL.
Use it to make something cool, have fun, and share what you've learned.

commza is based on Underscores https://underscores.me/, (C) 2012-2020 Automattic, Inc.
Underscores is distributed under the terms of the GNU GPL v2 or later.

Normalizing styles have been helped along thanks to the fine work of
Nicolas Gallagher and Jonathan Neal https://necolas.github.io/normalize.css/
*/

/*--------------------------------------------------------------
>>> TABLE OF CONTENTS:
----------------------------------------------------------------
# Generic
	- Normalize
	- Box sizing
# Base
	- Typography
	- Elements
	- Links
	- Forms
## Layouts
# Components
	- Navigation
	- Posts and pages
	- Comments
	- Widgets
	- Media
	- Captions
	- Galleries
# plugins
	- Jetpack infinite scroll
# Utilities
	- Accessibility
	- Alignments

--------------------------------------------------------------*/

/*--------------------------------------------------------------
# Generic
--------------------------------------------------------------*/

/* Normalize
--------------------------------------------- */

.archive .single .single-product .tinv-wishlist .tinvwl_add_to_wishlist_button.tinvwl-icon-heart-plus.no-txt:before, .tinv-wishlist .tinvwl_add_to_wishlist_button.tinvwl-icon-heart.no-txt:before {
    font-size: 28px !important;
}

.ui-slider-horizontal .ui-slider-range {
    height: 0 !important;
}

.single .single-product .tinv-wishlist .tinvwl_add_to_wishlist_button.tinvwl-icon-heart-plus.no-txt:before, .tinv-wishlist .tinvwl_add_to_wishlist_button.tinvwl-icon-heart.no-txt:before {
    top: 36%;
    transform: translate(-12%, 3px);
    font-size: 45px;
}

a.wishlist_products_counter.top_wishlist-heart-plus.no-txt, span.wishlist_products_counter.top_wishlist-heart-plus.no-txt {
    position: absolute;
    top: -18px;
    left: -19px;
    font-size: 20px;
}


.noUi-handle {
    display: none;
}

.wishlist_products_counter.top_wishlist-heart-plus.wishlist-counter-with-products:before, span.wishlist_products_counter.top_wishlist-heart-plus.wishlist-counter-with-products:before {
    font-size: 32px !important;
    color: #000;
}

@media (max-width: 768px) {
    .wishlist_products_counter.top_wishlist-heart-plus.wishlist-counter-with-products:before, span.wishlist_products_counter.top_wishlist-heart-plus.wishlist-counter-with-products:before {
        font-size: 20px !important;
    }
    /* a.wishlist_products_counter.top_wishlist-heart-plus.no-txt, span.wishlist_products_counter.top_wishlist-heart-plus.no-txt {
        top: 7px;
    }
    .wishlist_products_counter_number {
        left: 18px !important;
        top: -7px !important;
    } */
}

.wc-forward { display: none !important; }

.tinv-wishlist .tinvwl_add_to_wishlist_button.icon-white:before, a.wishlist_products_counter.top_wishlist-white:before, span.wishlist_products_counter.top_wishlist-white:before {
    font-size: 48px !important;
}

.wishlist_products_counter_number {
    position: absolute;
    left: 19px;
    top: 0;
    width: 18px;
    height: 18px;
    display: block;
    border-radius: 50%;
    background: var(--primary);
    font-weight: 700;
    font-size: 12px;
    line-height: 16px;
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
}

.tinv-wishlist .tinvwl_add_to_wishlist_button.tinvwl-icon-heart.no-txt:before {
    color: #FFF;
}

.tinv-wishlist .tinvwl_add_to_wishlist_button.tinvwl-icon-heart.no-txt {
    background: #000;
    padding: 22px;
    border-radius: 50%;
}

.card-product_wrapper .product-img {
    width: -webkit-fill-available;
}


/* 3. الستايل المطلوب */
.search-container {
    position: relative;
}

#wc-search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    z-index: 1000;
    max-height: 400px;
    overflow-y: auto;
    display: none;
}

.search-results-container {
    padding: 10px;
}

.search-result-item {
    display: flex;
    align-items: center;
    padding: 12px;
    border-bottom: 1px solid #eee;
    transition: background-color 0.3s;
    cursor: pointer;
}

.search-result-item:hover {
    background-color: #f9f9f9;
}

.search-result-item:last-child {
    border-bottom: none;
}

/* .product-image {
    width: 60px !important;
    height: 60px !important;
    margin-left: 12px;
    border-radius: 4px;
    overflow: hidden;
} */

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.no-image {
    width: 100%;
    height: 100%;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    color: #999;
}

.product-info {
    flex: 1;
}

.product-title {
    font-size: 14px;
    font-weight: 600;
    margin: 0 0 4px 0;
    color: #333;
}

.product-price {
    font-size: 14px;
    font-weight: 700;
    color: #e74c3c;
    margin-bottom: 4px;
}

.product-category {
    font-size: 12px;
    color: #666;
}

.view-product {
    padding: 6px 12px;
    background: #007cba;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-size: 12px;
    transition: background-color 0.3s;
}

.view-product:hover {
    background: #005a87;
    color: white;
}

.view-all-results {
    padding: 12px;
    text-align: center;
    border-top: 1px solid #eee;
}

.btn-view-all {
    display: inline-block;
    padding: 8px 16px;
    background: #28a745;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 600;
    transition: background-color 0.3s;
}

.btn-view-all:hover {
    background: #218838;
    color: white;
}

.no-results {
    padding: 20px;
    text-align: center;
    color: #666;
}

/* تحسينات للموبايل */
@media (max-width: 768px) {
    .search-result-item {
        flex-direction: column;
        text-align: center;
    }
    
    .product-image {
        margin: 0 0 10px 0;
    }
    
    .view-product {
        margin-top: 10px;
    }
}


/* تنسيق صفحة البحث */
.search-page-container {
    padding: 20px 0;
}

.search-header {
    background: #f8f9fa;
    padding: 30px 0;
    margin-bottom: 30px;
    border-bottom: 1px solid #e9ecef;
}

.search-title-section {
    text-align: center;
    margin-bottom: 30px;
}

.search-title {
    font-size: 28px;
    font-weight: 700;
    color: #333;
    margin-bottom: 10px;
}

.search-term {
    color: #007cba;
}

.search-category {
    font-size: 16px;
    color: #666;
    margin-bottom: 10px;
}

.category-name {
    color: #28a745;
    font-weight: 600;
}

.search-results-count {
    font-size: 14px;
    color: #888;
}

/* فورم البحث المتقدم */
.advanced-search-form {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.search-form-row {
    display: flex;
    gap: 15px;
    align-items: center;
    flex-wrap: wrap;
}

.search-field {
    flex: 2;
    min-width: 250px;
}

.category-field {
    flex: 1;
    min-width: 180px;
}

.price-range-field {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 200px;
}

.search-input-field,
.category-select,
.price-input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.search-input-field:focus,
.category-select:focus,
.price-input:focus {
    outline: none;
    border-color: #007cba;
}

.price-input {
    width: 80px;
}

.price-separator {
    color: #666;
    font-weight: 600;
}

.search-submit-btn {
    background: #007cba;
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s;
    white-space: nowrap;
}

.search-submit-btn:hover {
    background: #005a87;
}

.search-submit-btn i {
    margin-left: 5px;
}

/* الفلاتر */
.search-filters {
    background: white;
    padding: 20px 0;
    border-bottom: 1px solid #e9ecef;
    margin-bottom: 30px;
}

.filters-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.active-filters {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.filter-tag {
    background: #007cba;
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.remove-filter {
    color: white;
    text-decoration: none;
    font-size: 16px;
    font-weight: bold;
    transition: opacity 0.3s;
}

.remove-filter:hover {
    opacity: 0.7;
}

.clear-all-filters {
    background: #dc3545;
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    text-decoration: none;
    transition: background-color 0.3s;
}

.clear-all-filters:hover {
    background: #c82333;
    color: white;
}

.sort-options {
    display: flex;
    align-items: center;
    gap: 10px;
}

.sort-select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

/* شبكة المنتجات */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.product-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
}

.product-image {
    position: relative;
    overflow: hidden;
}

.product-image img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.3s;
}

.product-card:hover .product-image img {
    transform: scale(1.05);
}

.no-image {
    width: 100%;
    height: 200px;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 14px;
}

.sale-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #dc3545;
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
}

.product-actions {
    position: absolute;
    top: 10px;
    left: 10px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    opacity: 0;
    transition: opacity 0.3s;
}

.product-card:hover .product-actions {
    opacity: 1;
}

.quick-view,
.add-to-cart-btn {
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    background: rgba(255,255,255,0.9);
    color: #333;
    cursor: pointer;
    transition: background-color 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.quick-view:hover,
.add-to-cart-btn:hover {
    background: #007cba;
    color: white;
}

.product-info {
    padding: 20px;
}

.product-category {
    font-size: 12px;
    color: #666;
    margin-bottom: 8px;
}

.product-category a {
    color: #007cba;
    text-decoration: none;
}

.product-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 10px;
}

.product-title a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s;
}

.product-title a:hover {
    color: #007cba;
}

.product-rating {
    margin-bottom: 10px;
}

.product-price {
    font-size: 16px;
    font-weight: 700;
    color: #007cba;
    margin-bottom: 10px;
}

.stock-status {
    font-size: 12px;
    padding: 4px 8px;
    border-radius: 4px;
    text-align: center;
}

.out-of-stock {
    background: #f8d7da;
    color: #721c24;
}

/* صفحة عدم وجود نتائج */
.no-results {
    text-align: center;
    padding: 60px 20px;
}

.no-results-icon {
    font-size: 64px;
    color: #ccc;
    margin-bottom: 20px;
}

.page-template-form-checkout .tf-payment-body {
    display: none;
}

.no-results h2 {
    font-size: 24px;
    color: #333;
    margin-bottom: 15px;
}

.no-results p {
    color: #666;
    margin-bottom: 30px;
}

.search-suggestions {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
    text-align: right;
}

.search-suggestions h3 {
    font-size: 18px;
    color: #333;
    margin-bottom: 15px;
}

.search-suggestions ul {
    list-style: none;
    padding: 0;
}

.search-suggestions li {
    padding: 5px 0;
    color: #666;
    position: relative;
    padding-right: 20px;
}

.search-suggestions li:before {
    content: "•";
    color: #007cba;
    position: absolute;
    right: 0;
}

.btn-back-to-shop {
    background: #007cba;
    color: white;
    padding: 12px 25px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    transition: background-color 0.3s;
}

.btn-back-to-shop:hover {
    background: #005a87;
    color: white;
}

/* الترقيم */
.pagination-section {
    text-align: center;
    margin-top: 40px;
}

.pagination-section .page-numbers {
    display: inline-block;
    padding: 8px 12px;
    margin: 0 2px;
    background: white;
    border: 1px solid #ddd;
    color: #007cba;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.3s;
}

.pagination-section .page-numbers:hover,
.pagination-section .page-numbers.current {
    background: #007cba;
    color: white;
    border-color: #007cba;
}

/* تحسينات الموبايل */
@media (max-width: 768px) {
    .search-form-row {
        flex-direction: column;
        align-items: stretch;
    }
    
    .search-field,
    .category-field {
        flex: none;
        min-width: auto;
    }
    
    .price-range-field {
        flex: none;
        min-width: auto;
    }
    
    .filters-row {
        flex-direction: column;
        align-items: stretch;
    }
    
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 15px;
    }
    
    .product-info {
        padding: 15px;
    }
    
    .search-title {
        font-size: 22px;
    }
}