* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f5f7f5;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 10px;
}

/* Main Categories Section */
.main-categories-section {
    margin: 40px 0;
}

.categories-page-title {
    text-align: center;
    font-size: 2rem;
    color: #000000;
    margin-bottom: 30px;
    font-weight: 700;
}











/* Breadcrumb */
.breadcrumb {
    margin-bottom: 30px;
    padding: 15px 0;
    font-size: 1rem;
}

.breadcrumb a {
    color: #27ae60;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.breadcrumb a:hover {
    color: #1e8449;
}

.breadcrumb .separator {
    color: #999;
    margin: 0 8px;
}

.breadcrumb .current {
    color: #333;
    font-weight: 600;
}



















.error {
    text-align: center;
    padding: 20px;
    color: #e74c3c;
    font-size: 1rem;
}

/* Products Section */
.products-section {
    margin: 40px 0;
}

/* Products Main Section */
.products-main-section {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 30px;
    margin: 40px 0;

}

/* Filters Mobile Button */
.filters-mobile-btn {
    display: none;
    background: #27ae60;
    color: #ffffff;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    gap: 10px;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    width: 100%;
}

.filters-mobile-btn:hover {
    background: #1e8449;
    box-shadow: 0 4px 12px rgba(39, 174, 96, 0.2);
}

.filters-mobile-btn i {
    margin-right: 8px;
}

/* Filters Sidebar */
.filters-sidebar {
    position: sticky;
    top: 20px;
    height: fit-content;
}

.filters-section {
    background: #ffffff;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.filters-title {
    font-size: 1.1rem;
    color: #1e8449;
    margin-bottom: 20px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 15px;
    border-bottom: 2px solid #d5f4e6;
}

.filter-group {
    margin-bottom: 25px;
}

.filter-group:last-child {
    margin-bottom: 0;
}

.filter-label {
    font-weight: 600;
    color: #333;
    font-size: 0.95rem;
    margin-bottom: 12px;
    display: block;
}

.filter-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.filter-options-companies {
    max-height: 500px;
    overflow-y: auto;
    padding-right: 5px;
}

/* Custom scrollbar للشركات */
.filter-options-companies::-webkit-scrollbar {
    width: 2px;
}

.filter-options-companies::-webkit-scrollbar-track {
    background: #f0f0f0;
    border-radius: 10px;
}

.filter-options-companies::-webkit-scrollbar-thumb {
    background: #27ae60;
    border-radius: 10px;
}

.filter-options-companies::-webkit-scrollbar-thumb:hover {
    background: #1e8449;
}

.filter-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid transparent;
    font-size: 0.95rem;
    color: #333;
}

.filter-option:hover {
    background: #f0fdf4;
    border-color: #d5f4e6;

}

.filter-option.selected {
    background: #d5f4e6;
    border-color: #27ae60;
    color: #1e8449;
    font-weight: 600;

}

.filter-radio {
    width: 18px;
    height: 18px;
    border: 2px solid #27ae60;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.filter-option.selected .filter-radio {
    background: #27ae60;
    box-shadow: 0 0 0 3px rgba(39, 174, 96, 0.15);

}

.filter-option.selected .filter-radio::after {
    content: '';
    width: 6px;
    height: 6px;
    background: #ffffff;
    border-radius: 50%;

}

/* Filters Modal */
.filters-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    animation: fadeIn 0.3s ease;
}

.filters-modal.active {
    display: flex;
    align-items: flex-end;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
    }

    to {
        transform: translateY(0);
    }
}

.filters-modal-content {
    background: #ffffff;
    width: 100%;
    border-radius: 20px 20px 0 0;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideUp 0.3s ease;
}

.filters-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #e0e0e0;
    position: sticky;
    top: 0;
    background: #ffffff;
    z-index: 10;
}

.filters-modal-header h2 {
    font-size: 1.2rem;
    color: #1e8449;
    font-weight: 600;
    margin: 0;
}

.filters-modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #333;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filters-modal-close:hover {
    color: #27ae60;
    transform: rotate(90deg);
}

.filters-modal-body {
    padding: 20px;
}

.filters-modal-body .filter-group {
    margin-bottom: 30px;
}

/* Products Content */
.products-content {
    width: 100%;
}



/* Products Grid */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 15px;
}

.product-card {
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 1px solid #f0f0f0;
    display: flex;
    flex-direction: column;
    height: 100%;

}

.product-card:hover {
    box-shadow: 0 8px 20px rgba(39, 174, 96, 0.15);
    border-color: #27ae60;
}

.product-card.unavailable {
    opacity: 0.85;
}

.product-image-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 1;
    /* هذا يجعل الصورة مربعة */
    overflow: hidden;
    background: #f8f9fa;
    flex-shrink: 0;
}

.product-image {
    width: 100%;
    height: 100%;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}



/* Product Size Badge */
.product-size-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    color: #ffffff;
    padding: 8px 10px;
    font-size: 10px;
    position: absolute;
    background: linear-gradient(135deg, rgba(39, 174, 96, 0.95), rgba(30, 132, 73, 0.95));
    backdrop-filter: blur(10px);
    color: white;
    border-radius: 50px;
    font-weight: 800;
    box-shadow: 0 8px 20px rgba(39, 174, 96, 0.4);
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 8px;
    border: 2px solid rgba(255, 255, 255, 0.3);


}



/* Product Discount Badge */
.product-discount-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    color: #ffffff;
    padding: 8px 10px;
    font-size: 10px;
    position: absolute;
    background: linear-gradient(135deg, rgba(120, 29, 8, 0.95), rgba(172, 20, 0, 0.95));
    backdrop-filter: blur(10px);
    color: white;
    border-radius: 50px;
    font-weight: 800;
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 8px;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.product-card:hover .product-discount-badge {
    transform: translateY(-2px);
}

/* Product Unavailable Overlay */
.product-unavailable-overlay {
    position: absolute;
    inset: 0;
    background: rgb(57 45 44 / 80%);
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(1px);
    z-index: 10;
}

.product-unavailable-text {
    color: #ffffff;
    font-size: 0.85rem;
    font-weight: 600;
    text-align: center;
    padding: 12px;
    line-height: 1.4;
}

.product-info {
    padding: 12px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.product-company {
    font-size: 0.75rem;
    color: #27ae60;
    font-weight: 900;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.product-company i {
    font-size: 0.7rem;
}

.product-name {
    font-size: 0.9rem;
    color: #1e8449;
    font-weight: 600;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: 2em;
}

.product-price-section {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: auto;
    flex-wrap: wrap;

}

.product-old-price {
    font-size: 0.75rem;
    color: #999;
    text-decoration: line-through;
}

.product-price {
    font-size: 0.95rem;
    font-weight: 700;
    color: #27ae60;
}

.product-price.discount-price {
    color: #e74c3c;
}

.no-products-message {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: #27ae60;
    font-size: 1.1rem;
}



/* Filters Styling */
.filter-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 12px;
    border-radius: 8px;
    cursor: pointer;

    border: 1px solid transparent;
    font-size: 0.95rem;
    color: #333;
}

.filter-option:hover {
    background: #f0fdf4;
    border-color: #d5f4e6;

}

.filter-option.selected {
    background: #d5f4e6;
    border-color: #27ae60;
    color: #1e8449;
    font-weight: 600;

}

.filter-radio {
    width: 18px;
    height: 18px;
    border: 2px solid #27ae60;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.filter-option.selected .filter-radio {
    background: #27ae60;
    box-shadow: 0 0 0 3px rgba(39, 174, 96, 0.15);
    transform: scale(0.95);
}

.filter-option.selected .filter-radio::after {
    content: '';
    width: 6px;
    height: 6px;
    background: #ffffff;
    border-radius: 50%;
    transform: scale(1);
}



.subcategories-section {
    margin: 20px 0 30px;
}

.subcategories-title {
    font-size: 1.15rem;
    color: #1e8449;
    margin-bottom: 18px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}

.subcategories-title::before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 20px;
    background: linear-gradient(180deg, #27ae60, #52d68a);
    border-radius: 4px;
}

/* Scroll Container */
.subcategories-scroll {
    overflow-x: auto;
    overflow-y: hidden;
    padding: 8px 4px 16px;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

.subcategories-scroll::-webkit-scrollbar {
    height: 8px;
}

.subcategories-scroll::-webkit-scrollbar-track {
    background: #e8f5e9;
    border-radius: 10px;
}

.subcategories-scroll::-webkit-scrollbar-thumb {
    background: #27ae60;
    border-radius: 10px;
}

.subcategories-scroll::-webkit-scrollbar-thumb:hover {
    background: #1e8449;
}

/* Cards Container */
.subcategories-container {
    display: flex;
    gap: 12px;
    padding: 4px 2px;
    width: max-content;
}

/* Individual Card */
.subcategory-card {
    flex: 0 0 100px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: transform 0.25s ease;
    padding: 4px;
    background: transparent;
    border: none;
    text-align: center;
}

.subcategory-card:hover {
    transform: translateY(-4px);
}

.subcategory-card.active .subcategory-img-wrap {
    border-color: #27ae60;
    box-shadow: 0 0 0 3px rgba(39, 174, 96, 0.2);
    background: #e8f5e9;
}

.subcategory-card.active .subcategory-label {
    color: #1e8449;
    font-weight: 700;
}

/* Image Wrapper — الصورة المستديرة الجميلة */
.subcategory-img-wrap {
    width: 72px;
    height: 72px;
    border-radius: 22px;
    overflow: hidden;
    border: 2.5px solid #d5f4e6;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.07);
    flex-shrink: 0;
}

.subcategory-card:hover .subcategory-img-wrap {
    border-color: #7dce9f;
    box-shadow: 0 6px 18px rgba(39, 174, 96, 0.15);
}

.subcategory-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
    border-radius: 18px;
}

.subcategory-card:hover .subcategory-img-wrap img {
    transform: scale(1.08);
}

/* Label under image */
.subcategory-label {
    font-size: 0.78rem;
    color: #444;
    font-weight: 600;
    line-height: 1.3;
    max-width: 95px;
    text-align: center;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.25s ease;
}

/* "All Products" special card */
.all-products-btn .subcategory-img-wrap {
    background: linear-gradient(135deg, #e8f5e9 0%, #c8f0d8 100%);
    border-color: #a8dfc0;
}

.all-products-icon {
    font-size: 1.8rem;
    color: #27ae60;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.no-items {
    text-align: center;
    padding: 40px;
    color: #27ae60;
    font-size: 1.1rem;
}


.price-button {
    background-color: #28a745;
    color: white;
    border: 2px solid #28a745;
    padding: 8px 10px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.price-button:hover {
    background-color: transparent;
    color: #28a745;
    border-color: #28a745;
}

/* ============ عرض الفلاتر النشطة ============ */
.active-filters-display {
    background: linear-gradient(135deg, #e8f5e9 0%, #f0fdf4 100%);
    border: 2px solid #27ae60;
    border-radius: 10px;
    padding: 15px 20px;
    animation: slideDown 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.active-filters-container {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
}

.active-filters-label {
    font-weight: 700;
    color: #1e8449;
    font-size: 0.95rem;
    white-space: nowrap;
}

.active-filters-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.filter-badge {
    background: #27ae60;
    color: #ffffff;
    padding: 8px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    animation: popIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 6px rgba(39, 174, 96, 0.2);
}

@keyframes popIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.filter-badge-close {
    cursor: pointer;
    font-size: 1.1rem;
    line-height: 1;
    transition: all 0.2s ease;
    opacity: 0.9;
}

.filter-badge-close:hover {
    opacity: 1;
    transform: rotate(90deg);
}

.clear-all-filters {
    background: none;
    border: 2px solid #27ae60;
    color: #27ae60;
    padding: 6px 12px;
    border-radius: 16px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.clear-all-filters:hover {
    background: #27ae60;
    color: #ffffff;
}

/* ============ الـ RESPONSIVE للفلاتر النشطة ============ */
@media (max-width: 768px) {
    .active-filters-display {
        padding: 12px 16px;
        margin-bottom: 16px;
    }

    .active-filters-label {
        font-size: 0.9rem;
    }

    .filter-badge {
        font-size: 0.8rem;
        padding: 6px 12px;
    }
}

@media (max-width: 480px) {
    .active-filters-container {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .active-filters-label {
        width: 100%;
        margin-bottom: 5px;
    }

    .active-filters-list {
        width: 100%;
    }

    .filter-badge {
        font-size: 0.75rem;
        padding: 5px 10px;
    }
}

/* ============ SKELETON LOADING ============ */
.skeleton-card {
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 1px solid #f0f0f0;
    display: flex;
    flex-direction: column;
    height: 100%;
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

.skeleton-image {
    width: 100%;
    aspect-ratio: 1;
    background: linear-gradient(90deg, #e8e8e8 0%, #f0f0f0 50%, #e8e8e8 100%);
    background-size: 200% 100%;
    animation: shimmer 2s infinite;
}

.skeleton-content {
    padding: 12px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.skeleton-company {
    height: 12px;
    background: linear-gradient(90deg, #e8e8e8 0%, #f0f0f0 50%, #e8e8e8 100%);
    background-size: 200% 100%;
    animation: shimmer 2s infinite;
    border-radius: 4px;
    width: 60%;
}

.skeleton-name {
    height: 16px;
    background: linear-gradient(90deg, #e8e8e8 0%, #f0f0f0 50%, #e8e8e8 100%);
    background-size: 200% 100%;
    animation: shimmer 2s infinite;
    border-radius: 4px;
    width: 100%;
}

.skeleton-name-line {
    height: 16px;
    background: linear-gradient(90deg, #e8e8e8 0%, #f0f0f0 50%, #e8e8e8 100%);
    background-size: 200% 100%;
    animation: shimmer 2s infinite;
    border-radius: 4px;
    width: 80%;
    margin-top: 4px;
}

.skeleton-price {
    height: 18px;
    background: linear-gradient(90deg, #e8e8e8 0%, #f0f0f0 50%, #e8e8e8 100%);
    background-size: 200% 100%;
    animation: shimmer 2s infinite;
    border-radius: 20px;
    width: 70%;
    margin-top: auto;
}

@keyframes shimmer {

    0%,
    100% {
        background-position: 200% 0;
    }

    50% {
        background-position: -200% 0;
    }
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.8;
    }
}

/* ============ IMPROVED NO PRODUCTS MESSAGE ============ */
.no-products-message {
    grid-column: 1 / -1;
    text-align: center;
    padding: 80px 20px;
    color: #999;
    font-size: 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
    min-height: 400px;
}

.no-products-icon {
    font-size: 4rem;
    color: #d5f4e6;
    margin-bottom: 10px;
}

.no-products-title {
    font-size: 1.5rem;
    color: #1e8449;
    font-weight: 700;
    margin: 0;
}

.no-products-description {
    font-size: 0.95rem;
    color: #999;
    max-width: 400px;
    line-height: 1.6;
    margin: 0;
}

.no-products-suggestion {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 2px solid #d5f4e6;
}

.no-products-suggestion-text {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 12px;
}

.no-products-action {
    display: inline-block;
    background: #27ae60;
    color: #ffffff;
    padding: 10px 20px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    margin-top: 10px;
}

.no-products-action:hover {
    background: #1e8449;
    box-shadow: 0 4px 12px rgba(39, 174, 96, 0.2);
}

/* ============ RESPONSIVE ============ */
@media (max-width: 768px) {
    .skeleton-card {
        animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
    }

    .no-products-message {
        padding: 60px 20px;
        min-height: 300px;
    }

    .no-products-icon {
        font-size: 3.5rem;
    }

    .no-products-title {
        font-size: 1.3rem;
    }

    .subcategory-card {
        flex: 0 0 85px;
    }

    .subcategory-img-wrap {
        width: 64px;
        height: 64px;
        border-radius: 18px;
    }

    .subcategory-img-wrap img {
        border-radius: 14px;
    }

    .subcategory-label {
        font-size: 0.72rem;
        max-width: 82px;
    }

    .categories-page-title {

        font-size: 1.5rem;

    }
}

@media (max-width: 480px) {
    .skeleton-card {
        animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
    }

    .no-products-message {
        padding: 50px 15px;
        min-height: 280px;
    }

    .no-products-icon {
        font-size: 3rem;
    }

    .no-products-title {
        font-size: 1.15rem;
    }

    .no-products-description {
        font-size: 0.85rem;
    }

    .no-products-action {
        padding: 8px 16px;
        font-size: 0.85rem;
    }

    .subcategories-container {
        gap: 10px;
    }

    .subcategory-card {
        flex: 0 0 76px;
    }

    .subcategory-img-wrap {
        width: 70px;
        height: 70px;
        border-radius: 16px;
    }

    .subcategory-img-wrap img {
        border-radius: 12px;
    }

    .subcategory-label {
        font-size: 0.68rem;
        max-width: 74px;
    }


}

/* ============ PREVIEW PAGE ONLY ============ */
.preview-note {
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 24px;
    font-size: 0.85rem;
    color: #856404;
    direction: rtl;
}

.preview-note strong {
    display: block;
    margin-bottom: 4px;
}

.divider {
    border: none;
    border-top: 2px dashed #ddd;
    margin: 30px 0;
}

.preview-title {
    text-align: center;
    color: #555;
    font-size: 0.9rem;
    margin-bottom: 16px;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 12px;
    }

    .product-info {
        padding: 10px;
    }

    .product-name {
        font-size: 0.85rem;
    }

    .product-price {
        font-size: 0.9rem;
    }
}

@media (max-width: 768px) {
    .products-main-section {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .filters-sidebar {
        display: none;
    }

    .filters-mobile-btn {
        display: flex;
        font-size: 0.8rem;
        padding: 6px 10px;
    }

    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
        gap: 10px;
    }

    .product-info {
        padding: 8px;
    }

    .product-name {
        font-size: 0.8rem;
        margin-bottom: 6px;
    }

    .product-company {
        font-size: 0.7rem;
        margin-bottom: 4px;
    }

    .product-price {
        font-size: 0.85rem;
    }

    .product-old-price {
        font-size: 0.7rem;
    }

    .product-size-badge {
        font-size: 0.7rem;
        padding: 4px 8px;
        top: 6px;
        left: 6px;
    }

    .product-discount-badge {
        font-size: 0.7rem;
        padding: 4px 6px;
        top: 6px;
        right: 6px;
    }
}

@media (max-width: 480px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .product-info {
        padding: 8px;
    }

    .product-name {
        font-size: 0.75rem;
        min-height: 1.8em;
    }

    .product-company {
        font-size: 0.65rem;
    }

    .product-price {
        font-size: 0.8rem;
    }

    .product-old-price {
        font-size: 0.65rem;
    }

    .product-price-section {
        gap: 6px;
    }

    .product-size-badge {
        font-size: 0.65rem;
        padding: 3px 6px;
    }

    .price-button {

        font-size: 10px;

    }
}

/* ============ آحدث المنتجات والعروض SECTIONS ============ */
.latest-products-section,
.promotions-products-section {
    margin: 50px 0;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 28px;
    padding-bottom: 12px;
    border-bottom: 3px solid #d5f4e6;
}

.section-title {
    font-size: 1.6rem;
    color: #1e8449;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0;
}

.section-title i {
    color: #27ae60;
    font-size: 1.4rem;
}

.view-all-link {
    color: #27ae60;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s ease;
    padding: 8px 16px;
    border-radius: 6px;
}

.view-all-link:hover {
    background: #d5f4e6;
    color: #1e8449;
    gap: 10px;
}

.view-all-link i {
    transition: transform 0.3s ease;
}

.view-all-link:hover i {
    transform: translateX(-4px);
}

/* Horizontal Scroll Container */
.products-scroll-container {
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 4px 0 16px 0;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    /* ← هذا يمنع المساحة الفارغة */
    scrollbar-width: none;
    -ms-overflow-style: none;
    background: linear-gradient(to bottom, transparent 95%, #d5f4e6 100%);
}

.products-scroll-container::-webkit-scrollbar {
    height: 6px;
}

.products-scroll-container::-webkit-scrollbar-track {
    background: #e8f5e9;
    border-radius: 10px;
}

.products-scroll-container::-webkit-scrollbar-thumb {
    background: #27ae60;
    border-radius: 10px;
}

.products-scroll-container::-webkit-scrollbar-thumb:hover {
    background: #1e8449;
}





.loading-message {
    width: 100%;
    text-align: center;
    padding: 40px;
    color: #27ae60;
    font-size: 1.05rem;
    font-weight: 600;
}

.no-products-message {
    width: 100%;
    text-align: center;
    padding: 40px;
    color: #999;
    font-size: 1rem;
}




/* ============ RESPONSIVE للـ sections الجديدة ============ */
@media (max-width: 768px) {
    .section-header {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
        margin-bottom: 20px;
    }

    .section-title {
        font-size: 1.3rem;
    }

    .view-all-link {
        align-self: flex-start;
        font-size: 0.9rem;
    }



    .latest-products-section,
    .promotions-products-section {
        margin: 35px 0;
    }
}

@media (max-width: 480px) {
    .section-title {
        font-size: 1.15rem;
    }

    .section-title i {
        font-size: 1.1rem;
    }

    .view-all-link {
        font-size: 0.85rem;
    }





    .product-info {
        padding: 8px;
    }

    .product-name {
        font-size: 0.75rem;
    }

    .product-price {
        font-size: 0.8rem;
    }

    .latest-products-section,
    .promotions-products-section {
        margin: 25px 0;
    }

    .loading-message,
    .no-products-message {
        padding: 30px 20px;
        font-size: 0.95rem;
    }
}