/* TechHub E-Commerce Main Styles */

:root {
    --primary-color: #3b82f6;
    --primary-dark: #2563eb;
    --secondary-color: #ef4444;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --dark-color: #1f2937;
    --light-color: #f8fafc;
    --gray-color: #6b7280;
    --border-color: #e5e7eb;
}

/* Toast Notification */
.techhub-toast {
    position: fixed;
    bottom: 20px;
    left: 20px;
    background: #10b981;
    color: white;
    padding: 12px 24px;
    border-radius: 50px;
    z-index: 10000;
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        transform: translateX(-100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Cart Badge */
.cart-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ef4444;
    color: white;
    font-size: 10px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

/* Loading Spinner */
.loading-spinner {
    text-align: center;
    padding: 50px;
    font-size: 24px;
    color: var(--primary-color);
}

/* Quantity Selector */
.quantity-selector {
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
}

.quantity-selector button {
    width: 36px;
    height: 36px;
    border: none;
    background: var(--light-color);
    cursor: pointer;
    font-size: 18px;
    transition: background 0.2s;
}

.quantity-selector button:hover:not(:disabled) {
    background: #e2e8f0;
}

.quantity-selector button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.quantity-selector input {
    width: 50px;
    height: 36px;
    text-align: center;
    border: none;
    border-left: 1px solid var(--border-color);
    border-right: 1px solid var(--border-color);
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 40px;
    flex-wrap: wrap;
}

.pagination a,
.pagination span {
    padding: 8px 14px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    text-decoration: none;
    color: var(--dark-color);
    transition: all 0.2s;
}

.pagination a:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.pagination .current {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}



.product-link {
    text-decoration: none;
    color: inherit;
}



.product-img img {
    max-width: 100%;
    object-fit: contain;
}

.product-img i {
    font-size: 60px;
    color: var(--primary-color);
}


.old-price {
    font-size: 12px;
    color: var(--gray-color);
    text-decoration: line-through;
    margin-left: 8px;
}

.add-to-cart,
.add-to-wishlist,
.buy-now {
    flex: 1;
    padding: 8px 12px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

.add-to-cart {
    background: var(--primary-color);
    color: white;
}

.add-to-cart:hover {
    background: var(--primary-dark);
}

.add-to-wishlist {
    background: var(--light-color);
    color: var(--secondary-color);
}

.add-to-wishlist:hover {
    background: #fee2e2;
}

.buy-now {
    background: var(--secondary-color);
    color: white;
}

.buy-now:hover {
    background: #dc2626;
}

/* Filters Sidebar */
.filter-box {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
}

.filter-box h3 {
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary-color);
}

.filter-section {
    margin-bottom: 25px;
}

.filter-section h4 {
    margin-bottom: 15px;
    font-size: 16px;
}

.price-range {
    padding: 10px 0;
}

.price-range input[type="range"] {
    width: 100%;
    margin: 10px 0;
}

.price-values {
    text-align: center;
    font-size: 14px;
    color: var(--gray-color);
}

.categories-list label {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    cursor: pointer;
}

.categories-list label i {
    width: 25px;
    color: var(--primary-color);
}

.filter-btn {
    width: 100%;
    padding: 10px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    margin-top: 10px;
    font-weight: 600;
    transition: background 0.2s;
}

.filter-btn:hover {
    background: var(--primary-dark);
}

.reset-btn {
    background: var(--light-color);
    color: var(--dark-color);
    border: 1px solid var(--border-color);
}

.reset-btn:hover {
    background: var(--border-color);
}

/* Responsive */
@media (max-width: 768px) {
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 15px;
    }
    


    
    .filter-box {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100%;
        z-index: 1000;
        overflow-y: auto;
        transition: right 0.3s;
        border-radius: 0;
    }
    
    .filter-box.open {
        right: 0;
    }
}

div#wpadminbar {
    display: none;
}







/* assets/css/products-style.css */

/* === حاوية الشبكة === */
.techhub-products-grid {
    display: grid;
    gap: 20px;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
}

/* === بطاقة المنتج === */
.product-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.12);
}

/* === رابط المنتج === */
.product-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

/* === صورة المنتج === */
.product-img {
    position: relative;
    aspect-ratio: 1/1;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.product-img img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.4s ease;
}

.product-card:hover .product-img img {
    transform: scale(1.05);
}

/* === عنوان المنتج === */
.product-title {
    font-size: 15px;
    font-weight: 600;
    margin: 12px 15px 8px;
    color: #242424;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* === السعر === */
.product-price {
    margin: 0 15px 12px;
    font-size: 18px;
    font-weight: 700;
    color: #1c61e7;
}

.old-price {
    font-size: 13px;
    color: #999;
    text-decoration: line-through;
    margin-left: 6px;
    font-weight: 400;
}


.add-to-cart {
    flex: 2;
    padding: 10px;
    background: #1c61e7;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.add-to-cart:hover {
    background: #1552c4;
}

.add-to-wishlist {
    flex: 1;
    padding: 10px;
    background: #fee2e2;
    color: #ef4444;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s;
}

.add-to-wishlist:hover {
    background: #fecaca;
}

/* === الشارات === */
.product-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    color: #fff;
    z-index: 2;
}

.product-badge.sale {
    background: #ef4444;
}

.product-badge.new {
    background: #22c55e;
}

.product-badge.out-of-stock {
    background: #6b7280;
}

/* === حالة التحميل === */
.products-loading {
    text-align: center;
    padding: 40px;
    color: #6b7280;
}

.products-loading i {
    font-size: 24px;
    margin-bottom: 10px;
}

/* === التجاوب === */
@media (max-width: 768px) {
    .techhub-products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .product-title {
        font-size: 14px;
        margin: 10px 12px 6px;
    }
    
    .product-price {
        font-size: 16px;
        margin: 0 12px 10px;
    }
    
    .product-actions {
        padding: 0 12px 12px;
        gap: 8px;
    }
}

@media (max-width: 480px) {
    .techhub-products-grid {
        grid-template-columns: 1fr;
    }
}


/* حاوية اللودر لضمان التمركز */
.loading-spinner-wrapper {
    grid-column: 1 / -1; /* لضمان التوسط في نظام الـ Grid */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 400px; /* يعطي ارتفاعاً لمنطقة المنتجات حتى يظهر اللودر في المنتصف */
    width: 100%;
}

/* تصميم اللودر "الجبار" */
.pro-loader {
    position: relative;
    width: 70px;
    height: 70px;
}

.pro-loader .circle {
    position: absolute;
    width: 100%;
    height: 100%;
    border: 4px solid transparent;
    border-top-color: #2b59c3; /* لون المتجر الأساسي */
    border-radius: 50%;
    animation: spin-pro 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite;
}

/* إضافة حلقة ثانية لحركة أكثر احترافية */
.pro-loader .circle-inner {
    position: absolute;
    top: 10px; left: 10px; right: 10px; bottom: 10px;
    border: 3px solid transparent;
    border-top-color: #ff5c00; /* لون الأكشن أو التخفيض */
    border-radius: 50%;
    animation: spin-pro 2s linear infinite reverse;
    opacity: 0.7;
}

@keyframes spin-pro {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loader-text {
    margin-top: 25px;
    font-size: 16px;
    font-weight: 600;
    color: #444;
    letter-spacing: 0.5px;
    animation: pulse-text 1.5s ease-in-out infinite;
}

@keyframes pulse-text {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}


/* Language Switcher Styles - محسّن */
.techhub-lang-switcher {
    position: relative;
    display: inline-block;
}

/* Buttons Style */
.techhub-lang-buttons {
    display: flex;
    gap: 8px;
}

.techhub-lang-buttons .lang-btn {
    padding: 6px 14px;
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    border-radius: 30px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.2s ease;
    font-family: inherit;
}

.techhub-lang-buttons .lang-btn:hover {
    background: #e5e7eb;
    border-color: #d1d5db;
}

.techhub-lang-buttons .lang-btn.active {
    background: var(--primary-color, #2563eb);
    border-color: var(--primary-color, #2563eb);
    color: white;
}

/* Dropdown Style */
.techhub-lang-dropdown {
    position: relative;
    display: inline-block;
}

.techhub-lang-dropdown .lang-toggle {
    padding: 6px 14px;
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    border-radius: 30px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: inherit;
}

.techhub-lang-dropdown .lang-toggle:hover {
    background: #e5e7eb;
}

.techhub-lang-dropdown .dropdown-arrow {
    font-size: 10px;
    transition: transform 0.2s;
}

.techhub-lang-dropdown .lang-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    margin-top: 8px;
    padding: 6px 0;
    min-width: 120px;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    display: none;
}

.techhub-lang-dropdown .lang-dropdown-item {
    display: block;
    width: 100%;
    padding: 8px 16px;
    text-align: left;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 13px;
    transition: background 0.2s;
    font-family: inherit;
}

.techhub-lang-dropdown .lang-dropdown-item:hover {
    background: #f3f4f6;
}

/* RTL support for dropdown */
html[dir="rtl"] .techhub-lang-dropdown .lang-dropdown-menu {
    left: auto;
    right: 0;
}

html[dir="rtl"] .techhub-lang-dropdown .lang-dropdown-item {
    text-align: right;
}

button.lang-btn.active {
    display: none;
}
html[lang="ar"] button.lang-btn {
    font-family: 'Poppins' !important;
}