/* ========================================== */
/* إعدادات عامة */
/* ========================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Amazon Ember", Arial, sans-serif;

}

body {
    font-family: 'Cairo', 'Segoe UI', Tahoma, sans-serif;
    background: #f5f5f5;
    color: #1a1a1a;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
}

.container-fluid {
    max-width: 100%;
    padding: 0;
}



/* ========================================== */
/* البانر الإعلاني (موحد - Full Width & 415px Height) */
/* ========================================== */

.products-page-banner {
    width: 100vw;
    /* عرض الشاشة بالكامل */
    max-width: 100%;

    /* الخلطة السحرية لإلغاء الفراغات الجانبية */
    margin-inline-start: calc(-50vw + 50%);
    margin-inline-end: calc(-50vw + 50%);

    margin-top: 0;
    /* لصق البانر بالأعلى */
    margin-bottom: 30px;
    padding: 0;
    overflow: hidden;
    position: relative;
}

/* تم الاستغناء عن .products-page-banner .banner-container */

.products-page-banner .banner-link {
    display: block;
    width: 100%;
    /* الارتفاع الموحد */
    height: 415px;
    min-height: 415px;
    max-height: 415px;

    position: relative;
    overflow: hidden;
    border-radius: 0 !important;
    /* شلنا الحواف المدورة */
    transition: none;
    margin: 0 !important;
    padding: 0 !important;
}

/* إلغاء تأثيرات الحركة الزائدة */
.products-page-banner .banner-link:hover {
    transform: none;
}

.products-page-banner .banner-img {
    width: 100%;
    height: 100%;

    /* ملء كامل (مط) حسب المعيار الجديد */
    object-fit: fill;
    object-position: center;

    display: block;
    transition: transform 0.5s ease;
    border-radius: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* تكبير بسيط للصورة فقط عند الهوفر */
.products-page-banner .banner-link:hover .banner-img {
    transform: scale(1.02);
}

/* ========================================== */
/* Responsive - نفس مقاسات الهيرو في الصفحات التانية */
/* ========================================== */

@media (max-width: 992px) {
    .products-page-banner .banner-link {
        height: 350px;
        min-height: 350px;
        max-height: 350px;
    }
}

@media (max-width: 576px) {
    .products-page-banner .banner-link {
        height: 250px;
        min-height: 250px;
        max-height: 250px;
    }
}






/* ========================================== */
/* Products Page Section */
/* ========================================== */

.products-page-section {
    padding: 30px 0;
    background: #f5f5f5;
}

.products-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 30px;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ========================================== */
/* Filters Sidebar */
/* ========================================== */

.filters-sidebar {
    background: #fff;
    padding: 25px 20px;
    height: fit-content;
    position: sticky;
    top: 20px;
}

.filters-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}

.filters-title {
    font-size: 20px;
    font-weight: 900;
    color: #1a1a1a;
    display: flex;
    align-items: center;
    gap: 10px;
}

.filters-title i {
    color: #b42f4c;
    font-size: 18px;
}

.clear-filters-btn {
    background: transparent;
    border: none;
    color: #b42f4c;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
}

.clear-filters-btn:hover {
    text-decoration: underline;
}

/* Filter Group */
.filter-group {
    margin-bottom: 20px;
    border-bottom: 1px solid #f0f0f0;
    padding-bottom: 15px;
}

.filter-group:last-of-type {
    border-bottom: none;
}

.filter-toggle {
    width: 100%;
    background: transparent;
    border: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    font-size: 16px;
    font-weight: 700;
    color: #1a1a1a;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-toggle:hover {
    color: #b42f4c;
}

.filter-toggle i {
    font-size: 12px;
    color: #666;
    transition: transform 0.3s ease;
}

.filter-group.active .filter-toggle i {
    transform: rotate(180deg);
}

.filter-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
}

.filter-content.active {
    max-height: 500px;
    padding-top: 12px;
}

/* Search Box */
.search-box {
    position: relative;
    margin-bottom: 15px;
}

.search-box input {
    width: 100%;
    padding: 10px 35px 10px 12px;
    border: 2px solid #e0e0e0;
    font-size: 13px;
    font-family: inherit;
    transition: all 0.3s ease;
}

.search-box input:focus {
    outline: none;
    border-color: #b42f4c;
}

.search-box i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
    font-size: 14px;
}

/* Filter Options */
.filter-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.filter-option {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 14px;
    color: #666;
    transition: all 0.3s ease;
}

.filter-option:hover {
    color: #b42f4c;
}

.filter-option input[type="checkbox"] {
    display: none;
}

.checkbox-custom {
    width: 18px;
    height: 18px;
    border: 2px solid #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.filter-option input[type="checkbox"]:checked+.checkbox-custom {
    background: #b42f4c;
    border-color: #b42f4c;
}

.filter-option input[type="checkbox"]:checked+.checkbox-custom::after {
    content: '\f00c';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    color: #fff;
    font-size: 10px;
}

.option-text {
    flex: 1;
}

.option-count {
    font-size: 12px;
    color: #999;
}

/* Price Range */
.price-range {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.price-inputs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.price-input-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.price-input-group label {
    font-size: 12px;
    font-weight: 600;
    color: #666;
}

.price-input-group input {
    width: 100%;
    padding: 8px 10px;
    border: 2px solid #e0e0e0;
    font-size: 13px;
    font-family: inherit;
}

.price-input-group input:focus {
    outline: none;
    border-color: #b42f4c;
}

.price-slider {
    width: 100%;
    height: 6px;
    background: #e0e0e0;
    outline: none;
    -webkit-appearance: none;
}

.price-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    background: #b42f4c;
    cursor: pointer;
}

.price-slider::-moz-range-thumb {
    width: 18px;
    height: 18px;
    background: #b42f4c;
    cursor: pointer;
    border: none;
}

.price-display {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    font-weight: 600;
    color: #b42f4c;
}

/* Apply Filters Button */
.apply-filters-btn {
    width: 100%;
    padding: 14px 20px;
    background: linear-gradient(135deg, #b42f4c 0%, #8d2439 100%);
    color: #fff;
    border: none;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(180, 47, 76, 0.3);
}

.apply-filters-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(180, 47, 76, 0.4);
}

/* Sidebar Ad */
.sidebar-ad {
    margin-top: 25px;
    overflow: hidden;
    border: 2px solid #f0f0f0;
}

.sidebar-ad img {
    width: 100%;
    height: auto;
    display: block;
}

/* ========================================== */
/* Products Main Area */
/* ========================================== */

.products-main {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

/* Toolbar */
.products-toolbar {
    background: #fff;
    padding: 18px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.toolbar-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.mobile-filter-btn {
    display: none;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: #b42f4c;
    color: #fff;
    border: none;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
}

.mobile-filter-btn:hover {
    background: #8d2439;
}

.results-count {
    font-size: 15px;
    color: #666;
}

.results-count .count {
    font-weight: 700;
    color: #b42f4c;
}

.toolbar-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.sort-dropdown {
    position: relative;
}

.sort-dropdown select {
    padding: 10px 35px 10px 15px;
    border: 2px solid #e0e0e0;
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background: #fff;
}

.sort-dropdown select:focus {
    outline: none;
    border-color: #b42f4c;
}

.sort-dropdown i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #666;
    font-size: 12px;
    pointer-events: none;
}

.view-toggle {
    display: flex;
    gap: 8px;
}

.view-btn {
    width: 40px;
    height: 40px;
    background: #fff;
    border: 2px solid #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.view-btn i {
    font-size: 16px;
    color: #666;
}

.view-btn:hover,
.view-btn.active {
    border-color: #b42f4c;
    background: #fff5f7;
}

.view-btn:hover i,
.view-btn.active i {
    color: #b42f4c;
}

/* Active Filters */
.active-filters {
    background: #fff;
    padding: 15px 25px;
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.filter-label {
    font-size: 14px;
    font-weight: 700;
    color: #666;
}

.filter-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.filter-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: #ffe0e6;
    color: #b42f4c;
    font-size: 13px;
    font-weight: 600;
}

.filter-tag i {
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-tag i:hover {
    color: #8d2439;
}

/* ========================================== */
/* Products Grid */
/* ========================================== */

.products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.product-card {
    background: #fff;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    display: flex;
    flex-direction: column;
    position: relative;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}

.product-badges {
    position: absolute;
    top: 12px;
    right: 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    z-index: 2;
}

.badge {
    padding: 5px 12px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-sale {
    background: #b42f4c;
    color: #fff;
}

.badge-new {
    background: #15803d;
    color: #fff;
}

.badge-hot {
    background: #ea580c;
    color: #fff;
}

.product-image {
    position: relative;
    width: 100%;
    height: 320px;
    overflow: hidden;
    background: #f9f9f9;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.product-card:hover .product-image img {
    transform: scale(1.08);
}

.product-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.product-card:hover .product-overlay {
    opacity: 1;
    visibility: visible;
}

.quick-view-btn {
    padding: 12px 24px;
    background: #fff;
    color: #b42f4c;
    border: none;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.quick-view-btn:hover {
    background: #b42f4c;
    color: #fff;
}

.product-info {
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
}

.product-category {
    font-size: 12px;
    color: #999;
    font-weight: 600;
    text-transform: uppercase;
}

.product-title {
    font-size: 15px;
    font-weight: 700;
    color: #1a1a1a;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-title a {
    color: inherit;
    transition: color 0.3s ease;
}

.product-title a:hover {
    color: #b42f4c;
}

.product-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid #f0f0f0;
}

.product-price {
    display: flex;
    align-items: center;
    gap: 8px;
}

.current-price {
    font-size: 20px;
    font-weight: 900;
    color: #b42f4c;
}

.old-price {
    font-size: 14px;
    color: #999;
    text-decoration: line-through;
}

.view-details-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: #f9f9f9;
    color: #b42f4c;
    font-size: 13px;
    font-weight: 700;
    transition: all 0.3s ease;
}

.view-details-btn:hover {
    background: #b42f4c;
    color: #fff;
}

.view-details-btn i {
    font-size: 11px;
}

/* ========================================== */
/* Pagination */
/* ========================================== */

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    padding: 30px 0;
}

.page-btn {
    min-width: 42px;
    height: 42px;
    padding: 0 12px;
    background: #fff;
    border: 2px solid #e0e0e0;
    color: #666;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.page-btn:hover:not(:disabled) {
    border-color: #b42f4c;
    background: #fff5f7;
    color: #b42f4c;
}

.page-btn.active {
    background: #b42f4c;
    border-color: #b42f4c;
    color: #fff;
}

.page-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.page-dots {
    color: #999;
    font-weight: 700;
}

/* ========================================== */
/* Quick View Modal */
/* ========================================== */

.quick-view-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
}

.quick-view-modal.active {
    display: flex;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
}

.modal-content {
    position: relative;
    background: #fff;
    width: 90%;
    max-width: 900px;
    max-height: 90vh;
    overflow-y: auto;
    z-index: 2;
}

.modal-close {
    position: absolute;
    top: 15px;
    left: 15px;
    width: 40px;
    height: 40px;
    background: #fff;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 3;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: #b42f4c;
    color: #fff;
}

.modal-close i {
    font-size: 18px;
}

.modal-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    padding: 40px;
}

.modal-image {
    width: 100%;
    height: 450px;
    overflow: hidden;
    background: #f9f9f9;
}

.modal-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.modal-details {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.modal-category {
    font-size: 13px;
    color: #999;
    font-weight: 600;
    text-transform: uppercase;
}

.modal-title {
    font-size: 26px;
    font-weight: 900;
    color: #1a1a1a;
    line-height: 1.3;
}

.modal-price {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px 0;
    border-top: 2px solid #f0f0f0;
    border-bottom: 2px solid #f0f0f0;
}

.modal-price .current-price {
    font-size: 32px;
}

.modal-price .old-price {
    font-size: 20px;
}

.modal-description {
    font-size: 15px;
    line-height: 1.7;
    color: #666;
}

.modal-options {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.modal-option-group label {
    display: block;
    font-size: 15px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 10px;
}

.modal-sizes {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.size-box {
    padding: 12px 20px;
    border: 2px solid #e0e0e0;
    font-size: 14px;
    font-weight: 700;
    color: #666;
    cursor: pointer;
    transition: all 0.3s ease;
}

.size-box:hover {
    border-color: #b42f4c;
    background: #fff5f7;
    color: #b42f4c;
}

.size-box.active {
    background: #b42f4c;
    border-color: #b42f4c;
    color: #fff;
}

.modal-actions {
    padding-top: 15px;
}

.modal-btn-primary {
    width: 100%;
    padding: 16px 25px;
    background: linear-gradient(135deg, #b42f4c 0%, #8d2439 100%);
    color: #fff;
    border: none;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    transition: all 0.3s ease;
    box-shadow: 0 6px 20px rgba(180, 47, 76, 0.3);
}

.modal-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(180, 47, 76, 0.4);
}

/* ========================================== */
/* Filters Overlay (Mobile) */
/* ========================================== */

.filters-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 998;
}

.filters-overlay.active {
    display: block;
}

/* ========================================== */
/* Responsive */
/* ========================================== */

@media (max-width: 1200px) {
    .products-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 992px) {
    .products-layout {
        grid-template-columns: 1fr;
    }

    .filters-sidebar {
        position: fixed;
        top: 0;
        right: -100%;
        width: 320px;
        height: 100vh;
        z-index: 999;
        overflow-y: auto;
        transition: right 0.4s ease;
    }

    .filters-sidebar.active {
        right: 0;
    }

    .mobile-filter-btn {
        display: flex;
    }

    .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .products-toolbar {
        padding: 15px;
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
    }

    .toolbar-right {
        width: 100%;
        justify-content: space-between;
    }

    .toolbar-left {
        width: 100%;
    }

    .sort-dropdown {
        width: 100%;
    }

    .sort-dropdown select {
        width: 100%;
        font-size: 13px;
        padding: 10px 30px 10px 12px;
    }

    .modal-body {
        grid-template-columns: 1fr;
        gap: 25px;
        padding: 25px 20px;
    }

    .modal-image {
        height: 350px;
    }
}

@media (max-width: 480px) {
    .products-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .product-image {
        height: 280px;
    }

    .filters-sidebar {
        width: 280px;
    }

    .pagination {
        gap: 5px;
    }

    .page-btn {
        min-width: 38px;
        height: 38px;
        font-size: 13px;
    }
}