/* ==========================================
   Shop Page Styles
   Responsive & RTL Ready
========================================== */

/* Breadcrumb */
.breadcrumb-wrapper {
    padding: 120px 0 60px;
    position: relative;
}

.breadcrumb-wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
}

.page-heading {
    position: relative;
    z-index: 1;
    text-align: center;
}

.page-heading h1 {
    color: #fff;
    font-size: 48px;
    margin-bottom: 15px;
    text-align: center !important;
}

.breadcrumb-items {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.breadcrumb-items li {
    color: #fff;
}

.breadcrumb-items a {
    color: #fff;
    text-decoration: none;
    transition: 0.3s;
}

.breadcrumb-items a:hover {
    color: #951010;
}

/* Shop Section */
.shop-section {
    padding: 80px 0;
    background: #fafafa;
}

/* Shop Sidebar */
.shop-sidebar {
    padding-right: 30px;
}

.sidebar-widget {
    margin-bottom: 30px;
    padding: 25px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.05);
    border: 1px solid #f0f0f0;
}

.sidebar-widget h4 {
    font-size: 18px;
    font-weight: 700;
    color: #222;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid #951010;
    position: relative;
}

.sidebar-widget h4::before {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 50px;
    height: 2px;
    background: #951010;
}

/* Search Widget */
.search-form {
    position: relative;
}

.search-form input {
    width: 100%;
    padding: 14px 55px 14px 18px;
    border: 2px solid #f0f0f0;
    border-radius: 8px;
    font-size: 14px;
    transition: 0.3s;
}

.search-form input:focus {
    border-color: #951010;
    outline: none;
}

.search-form button {
    position: absolute;
    right: 5px;
    top: 5px;
    height: calc(100% - 10px);
    width: 45px;
    background: #951010;
    border: none;
    color: #fff;
    border-radius: 6px;
    cursor: pointer;
    transition: 0.3s;
}

.search-form button:hover {
    background: #951010;
}

/* Category List */
.category-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.category-list li {
    margin-bottom: 10px;
}

.category-list li:last-child {
    margin-bottom: 0;
}

.category-list a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: #f8f9fa;
    border-radius: 8px;
    color: #555;
    text-decoration: none;
    transition: 0.3s;
    font-weight: 500;
}

.category-list a:hover {
    background: #951010;
    color: #fff;
    transform: translateX(5px);
}

.category-list .count {
    font-size: 12px;
    background: #fff;
    padding: 4px 10px;
    border-radius: 12px;
    color: #666;
    font-weight: 600;
}

.category-list a:hover .count {
    background: rgba(255,255,255,0.2);
    color: #fff;
}

/* Price Filter */
.price-range-wrapper {
    background: #f8f9fa;
    padding: 18px;
    border-radius: 8px;
}

.price-range-slider {
    margin-bottom: 18px;
}

.price-slider {
    width: 100%;
    height: 6px;
    background: #e0e0e0;
    outline: none;
    border-radius: 3px;
    -webkit-appearance: none;
}

.price-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    background: #951010;
    cursor: pointer;
    border-radius: 50%;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.price-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    background: #951010;
    cursor: pointer;
    border-radius: 50%;
    border: none;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.price-range-display {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    font-size: 14px;
    font-weight: 500;
}

.price-amount {
    font-weight: 700;
    color: #951010;
}

.filter-btn {
    width: 100%;
    padding: 12px;
    background: #951010;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.3s;
}

.filter-btn:hover {
    background: #951010;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(231, 76, 60, 0.3);
}

/* Size Filter */
.size-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.size-option {
    cursor: pointer;
}

.size-option input {
    display: none;
}

.size-option span {
    display: block;
    width: 42px;
    height: 42px;
    line-height: 42px;
    text-align: center;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    transition: 0.3s;
    font-weight: 600;
    background: #fff;
}

.size-option input:checked + span {
    background: #951010;
    color: #fff;
    border-color: #951010;
    transform: scale(1.05);
}

.size-option span:hover {
    border-color: #951010;
}

/* Color Filter */
.color-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.color-option {
    cursor: pointer;
}

.color-option input {
    display: none;
}

.color-box {
    display: block;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    transition: 0.3s;
    position: relative;
    border: 3px solid transparent;
}

.color-option input:checked + .color-box {
    border-color: #951010;
    transform: scale(1.1);
}

.color-option input:checked + .color-box::after {
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    font-size: 12px;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.color-box:hover {
    transform: scale(1.1);
}

/* Sidebar Banner */
.sidebar-banner {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.sidebar-banner img {
    width: 100%;
    height: auto;
}

.banner-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 25px;
    background: linear-gradient(to top, rgba(0,0,0,0.85), transparent);
    color: #fff;
}

.banner-content h5 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 6px;
    color: #fff;
}

.banner-content p {
    font-size: 14px;
    margin-bottom: 12px;
    color: #fff;
}

.theme-btn-small {
    display: inline-block;
    padding: 10px 22px;
    background: #951010;
    color: #fff;
    text-decoration: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    transition: 0.3s;
}

.theme-btn-small:hover {
    background: #fff;
    color: #951010;
    transform: translateY(-2px);
}

/* Shop Header */
.shop-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding: 22px 25px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.05);
}

.showing-results p {
    margin: 0;
    color: #555;
    font-size: 14px;
    font-weight: 500;
}

.shop-sorting {
    display: flex;
    align-items: center;
    gap: 12px;
}

.sort-select {
    padding: 11px 16px;
    border: 2px solid #f0f0f0;
    border-radius: 8px;
    font-size: 14px;
    min-width: 200px;
    font-weight: 500;
    transition: 0.3s;
}

.sort-select:focus {
    border-color: #951010;
    outline: none;
}

.view-mode {
    display: flex;
    gap: 6px;
}

.view-mode button {
    width: 42px;
    height: 42px;
    border: 2px solid #e0e0e0;
    background: #fff;
    border-radius: 8px;
    cursor: pointer;
    transition: 0.3s;
    font-size: 16px;
    color: #666;
}

.view-mode button.active,
.view-mode button:hover {
    background: #951010;
    color: #fff;
    border-color: #951010;
}

/* Products Grid */
.products-grid {
    margin-bottom: 40px;
}

/* Shop Page Product Store Items */
.products-grid .product-store-item {
    margin-top: 0;
}

.products-grid .product-store-item .product-image {
    position: relative;
    overflow: hidden;
}

.products-grid .product-store-item .product-image img {
    width: 100%;
    height: 100%;
}

.products-grid .product-store-item .product-image .sale-box {
    position: absolute;
    top: -11px;
    left: -40px;
    transform: rotate(-50deg);
}

.products-grid .product-store-item .product-image .sale-box .box {
    font-size: 14px;
    font-weight: 400;
    color: #fff;
    background-color: #951010;
    line-height: 1;
    padding: 36px 30px 10px;
}

.products-grid .product-store-item .product-image .social-icon {
    position: absolute;
    right: -20px;
    top: 20px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease-in-out;
}

.products-grid .product-store-item .product-image .social-icon li:not(:last-child) {
    margin-bottom: 5px;
}

.products-grid .product-store-item .product-image .social-icon li a {
    display: block;
    width: 40px;
    height: 40px;
    line-height: 40px;
    background-color: #fff;
    color: #222;
    text-align: center;
    transition: all 0.4s ease-in-out;
    position: relative;
}

.products-grid .product-store-item .product-image .social-icon li a:hover {
    background-color: #951010;
    color: #fff;
}

.products-grid .product-store-item .product-image .product-size {
    display: flex;
    align-items: center;
    gap: 15px;
    background-color: rgba(255, 255, 255, 0.8);
    padding: 6px 0;
    justify-content: center;
    position: absolute;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease-in-out;
    bottom: 0;
    left: 0;
    right: 0;
}

.products-grid .product-store-item .product-image .product-size li {
    color: #222;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.products-grid .product-store-item .product-content {
    margin-top: 20px;
}

.products-grid .product-store-item .product-content .content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 5px;
}

.products-grid .product-store-item .product-content .content span {
    font-size: 14px;
    font-weight: 400;
}

.products-grid .product-store-item .product-content .content .star {
    color: #EE9E13;
    font-size: 12px;
}

.products-grid .product-store-item .product-content h5 {
    font-size: 16px;
    font-weight: 600;
    color: #222;
    margin-bottom: 8px;
}

.products-grid .product-store-item .product-content h5 a {
    color: #222;
    text-decoration: none;
    transition: 0.3s;
}

.products-grid .product-store-item .product-content h5 a:hover {
    color: #951010;
}

.products-grid .product-store-item .product-content h6 {
    font-weight: 400;
    color: #951010;
}

.products-grid .product-store-item .product-content h6 del {
    font-size: 12px;
    font-weight: 400;
    color: #999;
}

.products-grid .product-store-item:hover .product-image .social-icon {
    opacity: 1;
    visibility: visible;
    right: 20px;
}

.products-grid .product-store-item:hover .product-image .product-size {
    opacity: 1;
    visibility: visible;
}

/* Pagination */
.pagination-wrapper {
    display: flex;
    justify-content: center;
    margin-top: 50px;
    direction: ltr;
    text-align: left;
}

.pagination {
    display: flex;
    gap: 8px;
    list-style: none;
    padding: 0;
    margin: 0;
    direction: ltr !important;
}

.page-item.disabled .page-link {
    pointer-events: none;
    opacity: 0.4;
}

.page-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: #fff;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    color: #666;
    text-decoration: none;
    font-weight: 600;
    transition: 0.3s;
}

.page-link:hover,
.page-item.active .page-link {
    background: #951010;
    color: #fff;
    border-color: #951010;
    transform: translateY(-2px);
}

/* Responsive Design */
@media (max-width: 991px) {
    .shop-sidebar {
        padding-right: 0;
        margin-bottom: 40px;
    }

    .sidebar-widget {
        padding: 20px;
    }

    .shop-header {
        flex-direction: column;
        gap: 15px;
    }

    .shop-sorting {
        width: 100%;
        flex-direction: column;
    }

    .sort-select {
        width: 100%;
    }
}

@media (max-width: 767px) {
    .shop-section {
        padding: 60px 0;
    }

    .sidebar-widget h4 {
        font-size: 17px;
    }

    .product-content h5 {
        font-size: 15px;
        min-height: auto;
    }

    .current-price {
        font-size: 20px;
    }
}

/* ==========================================
   RTL Support
========================================== */
html[dir="rtl"] .shop-sidebar {
    padding-right: 0;
    padding-left: 30px;
}

html[dir="rtl"] .sidebar-widget h4::before {
    left: auto;
    right: 0;
}

html[dir="rtl"] .search-form button {
    right: auto;
    left: 5px;
    border-radius: 6px;
}

html[dir="rtl"] .search-form input {
    padding: 14px 18px 14px 55px;
}

html[dir="rtl"] .category-list a {
    flex-direction: row-reverse;
}

html[dir="rtl"] .category-list a:hover {
    transform: translateX(-5px);
}

html[dir="rtl"] .price-range-display {
    flex-direction: row-reverse;
}

html[dir="rtl"] .size-filter,
html[dir="rtl"] .color-filter {
    justify-content: flex-start;
}

html[dir="rtl"] .banner-content {
    text-align: right;
}

html[dir="rtl"] .shop-header {
    direction: rtl;
}

html[dir="rtl"] .showing-results p {
    text-align: right;
}

html[dir="rtl"] .shop-sorting {
    flex-direction: row-reverse;
}

html[dir="rtl"] .sale-badge {
    left: auto;
    right: 12px;
}

html[dir="rtl"] .product-actions {
    right: auto;
    left: 12px;
    transform: translateX(-20px);
}

html[dir="rtl"] .product-card:hover .product-actions {
    transform: translateX(0);
}

html[dir="rtl"] .product-content {
    text-align: right;
}

html[dir="rtl"] .product-content .category {
    text-align: right;
}

html[dir="rtl"] .product-rating {
    flex-direction: row-reverse;
}

html[dir="rtl"] .product-price {
    flex-direction: row-reverse;
    justify-content: flex-end;
    direction: ltr;
}

html[dir="rtl"] .current-price {
    margin-left: 10px;
    margin-right: 0;
}

html[dir="rtl"] .add-to-cart-btn {
    flex-direction: row-reverse;
}

html[dir="rtl"] .pagination{
    flex-direction: row-reverse;
}
@media (max-width: 991px) {
    html[dir="rtl"] .shop-sidebar {
        padding-left: 0;
    }
}
