/* products.css */
.fw-800 { font-weight: 800; }

/* Breadcrumbs Customization */
.breadcrumb-item + .breadcrumb-item::before {
    content: "\f105";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    font-size: 0.7rem;
    vertical-align: middle;
    color: #ccc;
}

/* Sidebar Filters */
.filter-sidebar {
    position: sticky;
    top: 100px;
    background: var(--white_color);
    padding: 15px;
    border-radius: var(--radius);
}

.filter-section {
    border-bottom: 1px solid var(--border);
    padding-bottom: 1.2rem;
    margin-bottom: 1.2rem;
}

.filter-title {
    font-size: 0.95rem;
    font-weight: 700;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    margin-bottom: 0.8rem;
    transition: 0.3s;
}

.filter-title i {
    font-size: 0.8rem;
    transition: transform 0.3s;
}

.filter-title.collapsed i {
    transform: rotate(180deg);
}

.filter-options {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.scrollable-options {
    max-height: 250px;
    overflow-y: auto;
    padding-right: 5px;
}

.scrollable-options::-webkit-scrollbar {
    width: 4px;
}
.scrollable-options::-webkit-scrollbar-thumb {
    background: #e0e0e0;
    border-radius: 10px;
}

.form-check {
    padding-left: 0;
    margin-bottom: 0;
    display: flex;
    align-items: center;
}

.form-check-input {
    float: right;
    margin-right: 0;
    margin-left: 10px;
    cursor: pointer;
}

.form-check-label {
    font-size: 0.9rem;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
}

.form-check-label .count {
    color: #999;
    font-size: 0.8rem;
}

/* Custom Range Input */
.custom-range::-webkit-slider-thumb {
    background: var(--accent);
}
.custom-range::-moz-range-thumb {
    background: var(--accent);
}

/* Active Filter Tags */
.filter-tag {
    background: #fff;
    border: 1px solid var(--border);
    padding: 6px 14px;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.02);
    cursor: pointer;
    transition: 0.2s;
}

.filter-tag:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.filter-tag i {
    font-size: 0.7rem;
    color: #999;
}

/* Product Cards */
.product-card {
    background: #fff;
    border-radius: var(--radius);
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    height: 100%;
    border: 1px solid transparent;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.08);
    border-color: var(--border);
}

.badge-discount {
    position: absolute;
    top: 15px;
    left: 15px;
    background: var(--accent);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 800;
    padding: 4px 10px;
    border-radius: 5px;
    z-index: 2;
}

.product-img-wrapper {
    position: relative;
    aspect-ratio: 1/1;
    overflow: hidden;
    background: #f9f9f9;
}

.product-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.product-card:hover .product-img-wrapper img {
    transform: scale(1.1);
}

.product-actions {
    position: absolute;
    bottom: -60px;
    left: 10px;
    right: 10px;
    transition: 0.3s ease;
    z-index: 3;
}

.product-card:hover .product-actions {
    bottom: 15px;
}

.color-dot {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid #fff;
    box-shadow: 0 0 0 1px #ddd;
    cursor: pointer;
}

.color-dot.active {
    box-shadow: 0 0 0 1px var(--accent);
}

/* List View Overrides */
.list-view-active .col-md-4 {
    width: 100%;
}

.list-view-active .product-card {
    display: flex;
    flex-direction: row;
    height: auto;
}

.list-view-active .product-img-wrapper {
    width: 150px;
    min-width: 150px;
}

/* Valu Card */
.valu-promo-card h3 {
    font-size: 2.2rem;
    text-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.triple-zero span {
    line-height: 1;
}

/* Marquee Animation */
.marquee-content {
    animation: marquee 20s linear infinite;
    white-space: nowrap;
}

@keyframes marquee {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}

.features-marquee:hover .marquee-content {
    animation-play-state: paused;
}

/* Popular Search Pills */
.search-pill {
    transition: 0.2s;
    font-weight: 700;
    font-size: 0.8rem;
    background: var(--white_color);
}

.search-pill:hover {
    background: var(--hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-soft);
    color: var(--accent) !important;
}

/* Mobile Filter */
.offcanvas-filter {
    width: 85% !important;
    max-width: 350px !important;
}

@media (max-width: 991.98px) {
    .product-img-wrapper {
        aspect-ratio: 1/1.1;
    }
}
@media (max-width: 450.98px) {
    .list-view-active .product-card {
        flex-direction: column;
    }
    .list-view-active .product-img-wrapper {
        width: 100%;
    }
}

/* ========== صفحة تفاصيل المنتج (ألوان من :root في style.css) ========== */
.product-detail-section {
    background: var(--bg);
}

.product-gallery-wrap {
    background: var(--white_color);
    border-radius: var(--radius-lg);
    padding: 1rem;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-soft);
}

.product-gallery-main {
    border-radius: var(--radius);
    overflow: hidden;
    cursor: pointer;
    background: var(--hover);
}

.product-gallery-main__ratio {
    position: relative;
    aspect-ratio: 1;
    overflow: hidden;
}

.product-gallery-main__ratio img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.product-gallery-wrap .gallery-main-prev,
.product-gallery-wrap .gallery-main-next {
    width: 40px;
    height: 40px;
    margin-top: 0;
    top: 50%;
    background: var(--white_color);
    border-radius: 50%;
    color: var(--dark-bg);
    box-shadow: var(--shadow-soft);
    border: 1px solid var(--border);
}

.product-gallery-wrap .gallery-main-prev::after,
.product-gallery-wrap .gallery-main-next::after {
    font-size: 14px;
    font-weight: 700;
}

.product-gallery-wrap .gallery-main-prev:hover,
.product-gallery-wrap .gallery-main-next:hover {
    background: var(--accent);
    color: var(--white_color);
    border-color: var(--accent);
}

.product-gallery-thumbs {
    height: 88px;
}

.product-gallery-thumbs .swiper-slide {
    width: auto;
    opacity: 0.55;
    transition: opacity 0.2s;
}

.product-gallery-thumbs .swiper-slide-thumb-active {
    opacity: 1;
}

.product-gallery-thumb__inner {
    border-radius: var(--radius-sm);
    overflow: hidden;
    border: 2px solid transparent;
    aspect-ratio: 1;
    background: var(--hover);
    transition: border-color 0.2s;
}

.product-gallery-thumbs .swiper-slide-thumb-active .product-gallery-thumb__inner {
    border-color: var(--accent);
}

.product-gallery-thumb__inner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.product-info-card {
    background: var(--white_color);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-soft);
}

@media (min-width: 992px) {
    .product-info-card {
        padding: 2rem;
    }
}

.product-badge-exclusive {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.35rem 0.75rem;
    border-radius: 50px;
    background: var(--hover);
    color: var(--text-muted);
    border: 1px solid var(--border);
    margin-bottom: 1rem;
}

.product-title {
    font-size: clamp(1.35rem, 2.5vw, 1.75rem);
    font-weight: 800;
    color: var(--text);
    line-height: 1.35;
    margin-bottom: 1rem;
}

.product-price-wrap {
    margin-bottom: 1rem;
}

.product-price {
    font-size: 1.65rem;
    font-weight: 800;
    color: var(--accent);
}

.product-stock {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--success);
    margin-bottom: 1.5rem;
}

.product-stock i {
    font-size: 1.1rem;
}

.product-option-block,
.product-qty-row {
    margin-bottom: 1.25rem;
}

.product-option-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.product-color-swatches {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
}

.color-swatch {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid var(--border);
    background: var(--swatch, #ccc);
    cursor: pointer;
    padding: 0;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.06);
    transition: transform 0.15s, box-shadow 0.15s;
}

.color-swatch:hover {
    transform: scale(1.06);
}

.color-swatch.is-active {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.product-qty-control {
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: var(--white_color);
}

.qty-btn {
    width: 40px;
    height: 42px;
    border: none;
    background: var(--hover);
    color: var(--text);
    font-size: 1.25rem;
    line-height: 1;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.qty-btn:hover {
    background: var(--border);
    color: var(--accent);
}

.qty-input {
    width: 48px;
    height: 42px;
    border: none;
    text-align: center;
    font-weight: 700;
    color: var(--text);
    background: transparent;
    -moz-appearance: textfield;
}

.qty-input::-webkit-outer-spin-button,
.qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.product-actions-stack {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.btn-product-cart {
    width: 100%;
    padding: 0.75rem 1rem;
    font-weight: 700;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--white_color);
    color: var(--text);
    transition: border-color 0.2s, background 0.2s;
}

.btn-product-cart:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--accent_light);
}

.btn-product-buy {
    width: 100%;
    padding: 0.85rem 1rem;
    font-weight: 800;
    border-radius: var(--radius-sm);
    border: none;
    background: var(--dark-bg);
    color: var(--dark-text);
    transition: background 0.2s, transform 0.15s;
}

.btn-product-buy:hover {
    background: var(--dark-bg-2);
    color: var(--dark-text);
}

.product-secondary-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1.25rem;
    margin-bottom: 1.5rem;
}

.icon-action {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    padding: 0;
    transition: color 0.2s;
}

.icon-action:hover {
    color: var(--accent);
}

.product-shipping-notes {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.product-shipping-notes li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.product-shipping-notes i {
    color: var(--accent);
    font-size: 1rem;
}

/* أكورديون */
.product-accordion-wrap .accordion-item {
    border-color: var(--border);
    background: var(--white_color);
    border-radius: var(--radius-sm);
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.product-accordion-wrap .accordion-button {
    font-weight: 700;
    color: var(--text);
    background: var(--white_color);
    box-shadow: none !important;
}

.product-accordion-wrap .accordion-button:not(.collapsed) {
    color: var(--accent);
    background: var(--accent_light);
}

.product-accordion-wrap .accordion-body {
    color: var(--text-muted);
    line-height: 1.75;
}

.product-desc-list {
    margin: 0.75rem 0 0;
    padding-right: 1.25rem;
    list-style: disc;
    color: var(--text);
}

.product-payment-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}

.payment-icons {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.75rem;
    color: var(--text-muted);
}

.payment-icons .fa-cc-visa {
    color: #1a1f71;
}

.payment-icons .fa-cc-mastercard {
    color: #eb001b;
}

/* Related */
.related-products-title {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--text);
}

.related-nav-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--white_color);
    color: var(--text);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.related-nav-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--accent_light);
}

.related-products-section .product-card .text-danger,
.related-products-section .text-danger.fw-bold {
    color: var(--accent) !important;
}

[dir="rtl"] .related-products-section .badge-discount {
    left: auto;
    right: 15px;
}

/* Lightbox */
.product-lightbox-modal .modal-dialog {
    max-width: min(1140px, 96vw);
}

.product-lightbox-content {
    background: var(--dark-bg);
    border-radius: var(--radius);
    overflow: hidden;
    position: relative;
}

.product-lightbox-close {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    z-index: 10;
    opacity: 0.9;
}

[dir="rtl"] .product-lightbox-close {
    left: auto;
    right: 0.75rem;
}

.product-lightbox-swiper {
    width: 100%;
    min-height: min(70vh, 640px);
    padding: 2.5rem 0 0;
}

.product-lightbox-swiper .swiper-slide {
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-lightbox-swiper .swiper-zoom-container {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-lightbox-swiper img {
    max-width: 100%;
    max-height: min(68vh, 600px);
    width: auto;
    height: auto;
    object-fit: contain;
}

.product-lightbox-prev,
.product-lightbox-next {
    color: var(--dark-text);
    width: 44px;
    height: 44px;
    margin-top: 0;
    top: 50%;
    background: rgba(255, 255, 255, 0.12);
    border-radius: 50%;
}

.product-lightbox-prev::after,
.product-lightbox-next::after {
    font-size: 1.1rem;
}

.product-lightbox-prev:hover,
.product-lightbox-next:hover {
    background: var(--accent);
}

[dir="rtl"] .breadcrumb-item + .breadcrumb-item::before {
    content: "\f104";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
}
