/* --- المتغيرات العامة والأساسيات --- */
:root {
    --accent-color: #3498db; /* أزرق للعناصر التفاعلية */
    --filters-sidebar-width: 280px; /* لـ left-sidebar (الفلاتر) */
    --cart-summary-width: 300px; /* لملخص العربة في صفحة المتجر */
    --navbar-height: 65px;
    --border-radius: 8px;
    --font-family: "Cairo", sans-serif;
    --success-color: #28a745;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --info-color: #17a2b8;
 
}

.btn {
    padding: 10px 15px;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-family: var(--font-family);
    font-weight: 600;
    transition: background-color 0.2s ease, box-shadow 0.2s ease;
    text-align: center;
}
.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

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

.btn-outline-primary {
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    background-color: transparent;
}
.btn-outline-primary:hover {
    background-color: var(--primary-color);
    color: white;
}
.btn-outline-secondary {
    border: 1px solid var(--secondary-color);
    color: var(--secondary-color);
    background-color: transparent;
}
.btn-outline-secondary:hover {
    background-color: var(--secondary-color);
    color: white;
}
.btn-sm {
    padding: 6px 10px;
    font-size: 0.85em;
}
.btn-lg {
    padding: 12px 25px;
    font-size: 1.1em;
}
.btn-block {
    display: block;
    width: 100%;
}
.btn.disabled,
.btn:disabled {
    background-color: var(--medium-gray) !important;
    color: var(--secondary-color) !important;
    cursor: not-allowed;
    border-color: var(--medium-gray) !important;
}

/* --- Main Layout and Content Wrapper --- */
.content-wrapper {
    display: flex;
    padding-top: 50px;
    flex-grow: 1;
}
.center-content {
    flex-grow: 1;
    padding: 25px;
    overflow-y: auto;
}

/* --- Marketplace Homepage (index.html) --- */
.marketplace-page .center-content {
    margin-right: var(--sidebar-width); /* space for common-nav-sidebar */
        padding: 0;
}
.store-categories-quicklinks {
    display: flex;
    justify-content: space-around;
    align-items: center;
    background-color: var(--card-bg);
    padding: 15px;
    border-radius: var(--border-radius);
    margin-bottom: 25px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}
.category-quicklink {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: var(--secondary-color);
    font-weight: 600;
    font-size: 0.9em;
}
.category-quicklink i {
    font-size: 1.8em;
    color: #6c757d;
    background-color: #f0f2f5;
    width: 50px;
    height: 50px;
    line-height: 50px;
    /* padding: 20px; */
    border-radius: 50%;
    text-align: center;
}
.category-quicklink:hover i,
.category-quicklink:hover span {
    color: var(--accent-color);
}

.hero-slider-section {
    position: relative;
    margin-bottom: 25px;
    border-radius: var(--border-radius); /* افترض أن لديك هذا المتغير */
    overflow: hidden; /* هذا مهم ويجب أن يبقى */
}

.hero-slider {
    display: flex;
    /* transition: transform 0.5s ease-in-out;  يجب أن يبقى هذا */
    /* تأكد من عدم وجود width محدد هنا إذا كانت الشرائح ستحدد العرض */
}

.hero-slider .slide {
    min-width: 100%; /* كل شريحة تأخذ عرض الحاوية بالكامل */
    width: 100%; /* للتأكيد */
    flex-shrink: 0; /* هام جداً: لمنع الشرائح من التقلص */
    height: 350px;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 30px;
    position: relative;
    opacity: 1; /* تأكد أن الشرائح مرئية بشكل افتراضي */
    /* transition: opacity 0.5s ease-in-out;  إذا كنت تريد تأثير تلاشي عند التبديل */
}

/* .hero-slider .slide:not(.active) { */
/* إذا كنت تعتمد على كلاس .active للتحكم في العرض، يمكنك استخدام display: none;
       ولكن هذا يتعارض مع transition: transform.
       معtranslateX، يجب أن تكون جميع الشرائح display: flex (أو block) و flex-shrink: 0
    */
/* } */

.hero-slider .slide::before {
    /* Optional overlay for text readability */
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background: linear-gradient(
        to left,
        rgba(0, 0, 0, 0.5),
        rgba(0, 0, 0, 0.1)
    ); /* RTL gradient */
}

.hero-slider .slide-content {
    position: relative;
    z-index: 1;
    color: white;
    /* max-width: 50%; */
}
.hero-slider .slide-content h2 {
    font-size: 2.2em;
    margin-bottom: 10px;
}
.hero-slider .slide-content p {
    font-size: 1.1em;
    margin-bottom: 20px;
}
.slider-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.4);
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 1.2em;
    cursor: pointer;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
}
.slider-nav.prev {
    right: 15px;
} /* RTL */
.slider-nav.next {
    left: 15px;
} /* RTL */
.slider-dots {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 2;
}
.slider-dots .dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    border: none;
}
.slider-dots .dot.active {
    background-color: var(--accent-color);
}

.clothing-categories-section {
    background-color: var(--card-bg);
    border-radius: var(--border-radius);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.07);
    padding: 10px;
}
.featured-products-section h3,
.clothing-categories-section h3 {
    font-size: 1.5em;
    color: var(--dark-gray);
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.featured-products-section h3 i,
.clothing-categories-section h3 i {
    margin-left: 10px;
    color: var(--primary-color);
}
.view-all-link {
    font-size: 0.7em;
    color: var(--accent-color);
    font-weight: normal;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 9px;
    margin-bottom: 25px;
}
.products-grid.small-grid {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
} /* For homepage sections */

.product-card {
    background-color: var(--card-bg);
    border-radius: var(--border-radius);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.07);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    flex-direction: column;
}
.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}
.product-card .product-image {
    position: relative;
    overflow: hidden; /* For zoom effect if any */
    background-color: var(--light-gray); /* Placeholder bg */
}

.product-card .product-image img {
    width: 100%;
    height: 190px;
    object-fit: cover;
    transition: transform 0.3s ease;
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
}
.product-card:hover .product-image img {
    transform: scale(1.05);
}
.discount-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: var(--danger-color);
    color: white;
    padding: 3px 8px;
    border-radius: 5px;
    font-size: 0.75em;
    font-weight: bold;
}
.product-card .add-to-cart-btn {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-size: 0.9em;
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    transition: opacity 0.2s ease, transform 0.2s ease;
    width: calc(100% - 20px);
}
.product-card:hover .add-to-cart-btn {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}
.product-card .add-to-cart-btn.quick-add {
    /* For homepage quick add */
    width: auto;
    padding: 6px 10px;
    font-size: 0.8em;
    opacity: 1;
    transform: none;
    bottom: 15px;
    left: 8px; /* RTL */
}
.product-card .add-to-cart-btn.quick-add i {
    margin-right: 0;
}

.product-card .product-info {
    padding: 15px 7px ;
    text-align: right;
    flex-grow: 1;
    position: relative;
    /* min-height: 150px; */
}
.product-name {
    font-size: 0.8em;
    color: var(--dark-gray);
    margin-bottom: 50px;
    overflow: hidden;

} /* Fixed height for name */
.product-name a {
    color: inherit;
}
.product-price {
    font-size: 1.1em;
    font-weight: bold;
    color: var(--primary-color);
    direction: ltr;
    position: absolute;
    bottom: 4px;
        width: 92%;
        display: flex;
    flex-direction: row-reverse;
    justify-content: space-between;
    align-items: center;
}
.product-price p{
        width: 100%;
}
.product-price .old-price {
    font-size: 0.8em;
    color: var(--secondary-color);
    text-decoration: line-through;
    margin-right: 8px;
}

.category-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(196px, 1fr));
    gap: 20px;
}
.category-card {
    position: relative;
    border-radius: var(--border-radius);
    overflow: hidden;
    /* box-shadow: 0 2px 8px rgba(0, 0, 0, 0.07); */
    transition: transform 0.2s ease;
}
.category-card:hover {
    transform: scale(1.03);
}
.category-card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: var(--border-radius);
}
.category-card-title {
    position: absolute;
    bottom: 7px;
    right: 0;
    left: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent);
    color: white;
    padding: 10px 15px;
    font-weight: 600;
    border-radius: var(--border-radius);
}

/* Mini Cart Sidebar */
.mini-cart-sidebar {
    width: 320px;
    background-color: var(--card-bg);
    border-left: 1px solid var(--border-color);
    position: fixed;
    top: 0;
    left: -320px; /* Initially hidden off-screen for RTL */
    height: 100vh;
    z-index: 1002;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
    transition: left 0.3s ease-in-out;
    display: flex;
    flex-direction: column;
}
.mini-cart-sidebar.active {
    left: 0;
}


.mini-cart-items {
    flex-grow: 1;
    overflow-y: auto;
    margin-bottom: 15px;

}
.mini-cart-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 10px;
    margin-bottom: 10px;
    border-bottom: 1px dashed var(--border-color);
}
.mini-cart-item img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: var(--border-radius);
}
.mini-cart-item .item-details h4 {
    font-size: 0.9em;
    margin-bottom: 3px;
}
.mini-cart-item .item-details p {
    font-size: 0.8em;
    color: var(--secondary-color);
}
.mini-cart-item .item-quantity input {
    width: 40px;
    text-align: center;
    border: 1px solid var(--border-color);
    border-radius: 4px;
}
.mini-cart-item .remove-from-cart-btn {
    margin-right: auto;
    background: none;
    border: none;
    color: var(--danger-color);
    cursor: pointer;
    font-size: 1.1em;
}
.empty-cart-message {
    text-align: center;
    color: var(--secondary-color);
    padding: 20px 0;
}
.mini-cart-summary p {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 0.95em;
}
.mini-cart-summary p span {
    font-weight: bold;
}
.mini-cart-summary .btn {
    margin-top: 10px;
}

/* --- Shop Page (shop.html) --- */
.shop-page .center-content {
    margin-left: var(--filters-sidebar-width);
    margin-right: var(--cart-summary-width);
}
.filters-sidebar {
    width: var(--filters-sidebar-width);
    background-color: var(--card-bg);
    padding: 20px;
    border-left: 1px solid var(--border-color); /* RTL */
    position: fixed;
    top: var(--navbar-height);
    left: 0;
    bottom: 0;
    overflow-y: auto; /* RTL */
}
.filters-sidebar h3 {
    margin-bottom: 20px;
    font-size: 1.3em;
}
.filter-group {
    margin-bottom: 25px;
}
.filter-group h4 {
    font-size: 1em;
    margin-bottom: 10px;
    color: var(--dark-gray);
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 5px;
}
.filter-group ul li {
    margin-bottom: 8px;
}
.filter-group ul li label {
    display: flex;
    align-items: center;
    font-size: 0.9em;
    cursor: pointer;
}
.filter-group ul li input[type="checkbox"] {
    margin-left: 8px;
    accent-color: var(--primary-color);
} /* RTL */
.size-selector,
.color-selector {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}
.size-option,
.color-option {
    padding: 3px 10px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    cursor: pointer;
    background-color: white;
    transition: background-color 0.2s ease, color 0.2s ease,
        border-color 0.2s ease;
}
.size-option.active,
.color-option.active {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}
.color-option {
    width: 28px;
    height: 28px;
    padding: 0;
    font-size: 0; /* Hide text if any */
} /* For color swatches */
.price-range-inputs {
    display: flex;
    align-items: center;
    gap: 5px;
}
.price-range-inputs input {
    width: 45%;
    padding: 8px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-family: var(--font-family);
    text-align: center;
}
.apply-filters-btn {
    margin-top: 20px;
    margin-bottom: 10px;
}
.clear-filters-btn {
    background-color: var(--medium-gray);
    color: var(--dark-gray);
}

.product-listing-area {
    padding-left: 20px;
    padding-right: 20px;
} /* Add some padding */
.shop-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}
.breadcrumb {
    background: none;
    padding: 0;
    margin: 0;
    font-size: 0.9em;
}
.breadcrumb-item a {
    color: var(--accent-color);
}
.breadcrumb-item.active {
    color: var(--secondary-color);
}
.sort-options label {
    margin-left: 5px;
    font-size: 0.9em;
}
.sort-options select {
    padding: 6px 10px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-family: var(--font-family);
    background-color: white;
}
.pagination-nav {
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
}
.pagination {
    display: flex;
    gap: 5px;
}
.page-item .page-link {
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    color: var(--primary-color);
    background-color: white;
    border-radius: var(--border-radius);
}
.page-item.active .page-link {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}
.page-item.disabled .page-link {
    color: var(--secondary-color);
    background-color: var(--light-gray);
    cursor: not-allowed;
}

.cart-summary-sidebar {
    width: var(--cart-summary-width);
    background-color: var(--card-bg);
    padding: 20px;
    border-right: 1px solid var(--border-color); /* RTL */
    position: fixed;
    top: var(--navbar-height);
    left: 0;
    bottom: 0;
    overflow-y: auto; /* RTL */
}
.cart-summary-sidebar h3 {
    font-size: 1.2em;
    margin-bottom: 15px;
}
#cart-items-summary {
    max-height: 300px;
    overflow-y: auto;
    margin-bottom: 15px;
}
.cart-summary-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px dashed var(--border-color);
    font-size: 0.9em;
}
.cart-summary-item img {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 4px;
}
.cart-summary-item .item-details {
    flex-grow: 1;
}
.cart-summary-item .item-name {
    font-weight: 600;
    margin-bottom: 3px;
}
.remove-item-btn {
    background: none;
    border: none;
    color: var(--danger-color);
    font-size: 1.1em;
    cursor: pointer;
}
.cart-total-summary p {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 0.95em;
}
.total-price-label strong {
    font-size: 1.1em;
    color: var(--primary-color);
}
.checkout-btn {
    margin-top: 15px;
}
.empty-cart-message-summary {
    text-align: center;
    color: var(--secondary-color);
    padding: 15px 0;
}
.coupon-section {
    margin-top: 20px;
    display: flex;
    gap: 5px;
}
.coupon-section input {
    flex-grow: 1;
    padding: 8px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
}
.coupon-section button {
    padding: 8px 12px;
    background-color: var(--accent-color);
    color: white;
}

/* --- Product Detail Page (product-detail.html) --- */
.product-detail-page .center-content {
    max-width: 1200px;
    margin: 0 auto;
    margin-right: 0; /* Overrides for centering, needs adjustment based on sidebars */
}
.product-breadcrumb {
    margin: 20px 0;
}
.product-main-details {
    display: flex;
    gap: 30px;
    margin-bottom: 30px;
}
.product-gallery {
    flex: 0 0 45%;
} /* ~45% width for gallery */
.main-image-container {
    position: relative;
    margin-bottom: 15px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    overflow: hidden;
}
.main-image-container img {
    width: 100%;
    aspect-ratio: 1/1.2;
    object-fit: contain;
    background-color: white;
}
.zoom-btn {
    position: absolute;
    top: 10px;
    left: 10px; /* RTL */
    background-color: rgba(255, 255, 255, 0.8);
    border: none;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}
.thumbnail-scroller {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 5px;
}
.thumbnail-img {
    width: 70px;
    height: 90px;
    object-fit: cover;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    cursor: pointer;
    opacity: 0.7;
    transition: border-color 0.2s ease, opacity 0.2s ease;
}
.thumbnail-img.active,
.thumbnail-img:hover {
    border-color: var(--primary-color);
    opacity: 1;
}

.product-information {
    flex: 1;
} /* Remaining width for info */
.pdp-product-name {
    font-size: 1.8em;
    margin-bottom: 10px;
    color: var(--dark-gray);
}
.pdp-rating {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-bottom: 15px;
    font-size: 0.9em;
}
.pdp-rating i.fa-star {
    color: #ffc107;
}
.pdp-rating a {
    color: var(--accent-color);
    text-decoration: underline;
}
.pdp-price {
    font-size: 1.6em;
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 15px;
}
.pdp-price .old-price {
    font-size: 0.7em;
} /* Same as .product-price .old-price */
.pdp-price .discount-badge {
    font-size: 0.6em;
    vertical-align: middle;
    margin-right: 10px;
} /* Same as .discount-badge */
.pdp-description {
    margin-bottom: 20px;
}
.pdp-description h4 {
    font-size: 1.1em;
    margin-bottom: 8px;
}
.pdp-description p {
    font-size: 0.95em;
    line-height: 1.7;
    color: var(--secondary-color);
}
.pdp-options {
    margin-bottom: 20px;
}
.option-group {
    margin-bottom: 15px;
}
.option-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 0.9em;
}
.pdp-quantity-addtocart {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}
.quantity-selector {
    display: flex;
    align-items: center;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    background-color: #fff;
}
.quantity-selector input {
    width: 50px;
    text-align: center;
    border: none;
    outline: none;
    font-size: 1.1em;
    font-weight: bold;
    padding: 8px 0;
}
.quantity-btn {
    background: none;
    border: none;
    font-size: 1.3em;
    color: var(--secondary-color);
    padding: 8px 12px;
    cursor: pointer;
}
.add-to-cart-pdp-btn {
    flex-grow: 1;
}
.wishlist-btn {
    background: none;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    color: var(--secondary-color);
    font-size: 1.3em;
    padding: 10px 12px;
    cursor: pointer;
}
.wishlist-btn.active i,
.wishlist-btn:hover i {
    color: var(--danger-color);
}
.pdp-availability p {
    font-size: 0.9em;
    margin-bottom: 5px;
    color: var(--secondary-color);
}
.pdp-availability p i {
    margin-left: 8px;
    color: var(--success-color);
}

.product-tabs-section {
    margin-top: 30px;
    background-color: var(--card-bg);
    border-radius: var(--border-radius);
    padding: 20px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}
.tabs-nav {
    display: flex;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 20px;
}
.tab-link {
    padding: 10px 20px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1em;
    font-weight: 600;
    color: var(--secondary-color);
    border-bottom: 3px solid transparent;
    margin-bottom: -1px; /* For active state overlap */
    transition: color 0.2s ease, border-color 0.2s ease;
}
.tab-link.active,
.tab-link:hover {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}
.tab-pane {
    display: none;
    animation: fadeInTab 0.3s ease;
}
.tab-pane.active {
    display: block;
}
@keyframes fadeInTab {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}
#tab-specs table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9em;
}
#tab-specs th,
#tab-specs td {
    padding: 8px;
    border: 1px solid var(--border-color);
    text-align: right;
}
#tab-specs th {
    background-color: var(--light-gray);
    font-weight: 600;
}
.review-item {
    border-bottom: 1px dashed var(--border-color);
    padding-bottom: 15px;
    margin-bottom: 15px;
}
.review-author {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}
.review-author img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}
.review-stars i {
    color: #ffc107;
}
.review-text {
    font-size: 0.95em;
    margin-bottom: 5px;
}
.review-date {
    font-size: 0.8em;
    color: var(--secondary-color);
}
#add-review-form .form-group {
    margin-bottom: 15px;
}
#add-review-form label {
    display: block;
    font-weight: 600;
    margin-bottom: 5px;
}
#add-review-form textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-family: var(--font-family);
}

.related-products-section {
    margin-top: 40px;
}

/* --- Order History Page (order-history.html) --- */
.order-history-page .center-content {
    margin-right: var(
        --sidebar-width
    ); /* Space for suggested-products-sidebar */
}
.suggested-products-sidebar {
    width: var(--sidebar-width);
    background-color: var(--card-bg);
    padding: 20px;
    border-left: 1px solid var(--border-color); /* RTL */
    position: fixed;
    top: var(--navbar-height);
    left: 0;
    bottom: 0;
    overflow-y: auto; /* RTL */
}
.suggested-products-sidebar h3 {
    margin-bottom: 20px;
    font-size: 1.2em;
}
.suggested-product {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px dashed var(--border-color);
}
.suggested-product img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: var(--border-radius);
}
.suggested-product .info h4 {
    font-size: 0.95em;
    margin-bottom: 5px;
}
.suggested-product .info .price {
    font-size: 0.9em;
    color: var(--primary-color);
    margin-bottom: 8px;
}
.view-all-suggestions {
    margin-top: 10px;
}

.order-history-header {
    margin-bottom: 25px;
}
.order-history-header h2 {
    font-size: 1.8em;
    margin-bottom: 15px;
}
.order-search-bar {
    display: flex;
    gap: 10px;
}
.order-search-bar input {
    flex-grow: 1;
    padding: 10px 15px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-family: var(--font-family);
}
#search-order-btn {
    background-color: var(--accent-color);
    color: white;
    padding: 10px 20px;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-weight: 600;
    transition: background-color 0.2s ease, color 0.2s ease;
    border: none;
}

.order-tabs-nav {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.order-tab-link {
    padding: 8px 15px;
    background-color: var(--medium-gray);
    color: var(--dark-gray);
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-weight: 600;
    transition: background-color 0.2s ease, color 0.2s ease;
}
.order-tab-link.active,
.order-tab-link:hover {
    background-color: var(--primary-color);
    color: white;
}

.order-list .order-card {
    background-color: var(--card-bg);
    border-radius: var(--border-radius);
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.07);
    animation: fadeInOrder 0.4s ease-out;
}
@keyframes fadeInOrder {
    from {
        opacity: 0;
        transform: translateY(15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
.order-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid var(--border-color);
    background-color: var(--light-gray);
    font-size: 0.9em;
    border-top-left-radius: var(--border-radius);
    border-top-right-radius: var(--border-radius);
}
.order-card-header > div {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.order-card-header strong {
    color: var(--dark-gray);
}
.order-status {
    padding: 6px 14px;
    border-radius: 15px;
    color: white;
    font-size: 0.8em;
    font-weight: bold;
    display: inline-block;
    width: fit-content;
}
.status-processing {
    background-color: var(--warning-color);
    color: var(--dark-gray);
}
.status-shipped {
    background-color: var(--info-color);
}
.status-completed {
    background-color: var(--success-color);
}
.status-cancelled {
    background-color: var(--danger-color);
}

.order-card-body {
    padding: 20px;
}
.delivery-estimate,
.delivery-info {
    font-size: 0.95em;
    margin-bottom: 15px;
}
.order-item {
    display: flex;
    gap: 15px;
}
.order-item img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: var(--border-radius);
}
.order-item-details h4 {
    font-size: 1em;
    margin-bottom: 5px;
}
.order-item-details p {
    font-size: 0.85em;
    color: var(--secondary-color);
    line-height: 1.5;
}

.order-card-actions {
    padding: 15px 20px;
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 10px;
}
.orders-pagination {
    margin-top: 20px;
}

/* --- Responsive (مثال بسيط) --- */
@media (max-width: 1200px) {
    .shop-page .center-content {
        margin-right: 0; /* Hide cart summary, make it a modal or icon click */
    }
    .cart-summary-sidebar {
        left: -100%; /* Hide off-screen for RTL */
        /* Add JS to toggle this with a cart icon click */
    }
    .cart-summary-sidebar.active-mobile {
        left: 0;
        width: 100%;
        max-width: 320px;
    }
}

@media (max-width: 992px) {
    .top-navbar .search-bar {
        display: none;
    }
    .right-sidebar.common-nav-sidebar,
    .filters-sidebar {
        position: fixed;
        z-index: 1001;
        right: -100%; /* RTL */
        transition: right 0.3s ease-in-out;
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
    }
    .right-sidebar.common-nav-sidebar.active-mobile,
    .filters-sidebar.active-mobile {
        right: 0; /* RTL */
    }
    /* Add hamburger menu to toggle sidebars */

    .marketplace-page .center-content,
    .shop-page .center-content,
    .order-history-page .center-content {
        margin-right: 0;
        margin-left: 0;
        padding: 3px;
        padding-bottom: 73px;
                
    }
    .product-main-details {
        flex-direction: column;
    }
    .product-gallery {
        flex: 0 0 auto;
    }

    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(168px, 2fr));
    }
    .products-grid.small-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }

}

@media (max-width: 768px) {
    .hero-slider .slide {
        height: 200px;
    }
    .hero-slider .slide-content h2 {
        font-size:1.1em;
    }
    .slider-nav{display: none;}
    .btn {
        padding: 4px 5px;
        font-size: 11px;
    }

    .hero-slider .slide-content p {
        font-size: 0.9em;
    }
    .store-categories-quicklinks {
        flex-wrap: wrap;
        gap: 15px;
    }
    .category-quicklink {
        flex-basis: 40%;
    }

    .order-card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    .order-card-actions {
        flex-wrap: wrap;
    }

    .pdp-product-name {
        font-size: 1.5em;
    }
    .pdp-price {
        font-size: 1.3em;
    }
    .pdp-quantity-addtocart {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    .add-to-cart-pdp-btn {
        width: 100%;
    }
    .wishlist-btn {
        width: 100%;
        text-align: center;
    }
    .tabs-nav {
        flex-wrap: wrap;
    }
    .tab-link {
        flex-basis: 50%;
        text-align: center;
    }
}

/* Add more specific styles and responsive adjustments as needed */
/* --- Product Card Enhancements: Actions & Rating --- */

/* Container for top-right action icons on product image */
.product-action-icons {
    position: absolute;
    top: 10px;
    /* For RTL, icons on the left side of image */
    left: 10px;
    display: flex;
    flex-direction: column; /* Stack icons vertically if preferred */
    gap: 8px;
    z-index: 3; /* Above image but below potential overlays if any */
}

.action-icon {
    background-color: rgba(
        255,
        255,
        255,
        0.85
    ); /* Semi-transparent white background */
    color: var(--secondary-color, #6c757d); /* Default icon color */
    border: 1px solid var(--border-color, #dee2e6);
    border-radius: 50%;
    width: 32px;
    height: 32px;
    font-size: 0.9em; /* Adjust icon size */
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: background-color 0.2s ease, color 0.2s ease, transform 0.1s ease;
}

.action-icon:hover {
    background-color: white;
    color: var(--primary-color, #007bff); /* Highlight color on hover */
}
.action-icon:active {
    transform: scale(0.95);
}

.action-icon.favorite-product-btn.active i.fas.fa-heart {
    color: #e91e63; /* Red color for active favorite */
}
.action-icon.favorite-product-btn.active {
    background-color: #ffebee; /* Light pinkish background for active favorite */
}

/* Product Rating Styles */
.product-rating {
    display: flex;
    align-items: center;
    gap: 3px; /* Small gap between stars */
    margin-bottom: 8px; /* Space below rating */
    font-size: 0.85em; /* Adjust size of stars and text */
}

.product-rating i {
    color: #ffc107; /* Standard gold/yellow for stars */
}

.product-rating .rating-count {
    margin-right: 6px; /* Space before rating count text, RTL */
    font-size: 0.9em; /* Slightly smaller than stars */
    color: var(--secondary-color, #6c757d);
}
/* ============================================================= */
/* == CSS لتنسيق Tailwind Pagination الافتراضي بدون Tailwind == */
/* ============================================================= */

/* ١. الحاوية الرئيسية والتوسيط */
.pagination-container {
    text-align: center;
    margin-top: 2rem;
    font-family: Arial, sans-serif; /* تحديد خط واضح */
}
.pagination-summary { /* يخفي الملخص الذي ينتجه Tailwind */
    display: none;
}
.pagination-container nav[aria-label="Pagination Navigation"] {
    display: flex;
    justify-content: center; /* توسيط كل شيء */
}


/* ٢. إخفاء العناصر غير الضرورية (مثل نسخة الهاتف والملخص المكرر) */
.sm\:hidden { /* إخفاء النسخة المخصصة للهواتف */
    display: none !important;
}
.hidden.sm\:flex-1 { /* هذا هو الـ div الرئيسي الذي سنعمل عليه */
    display: flex !important;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}
.hidden.sm\:flex-1 > div:first-child { /* إخفاء نص "Showing..." */
    display: none;
}


/* ٣. تصميم الحاوية الفعلية للأزرار والأرقام */
.relative.z-0.inline-flex {
    display: flex;
    align-items: center;
}

/* إزالة التأثيرات الافتراضية */
.shadow-sm,
.rounded-md {
    box-shadow: none !important;
    border-radius: 0 !important;
}

/* ٤. تصميم الروابط والأرقام */
nav[aria-label="Pagination Navigation"] a,
nav[aria-label="Pagination Navigation"] span[aria-current="page"] > span,
nav[aria-label="Pagination Navigation"] span[aria-disabled="true"] > span {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px 15px;
    border: none !important;
    background-color: transparent !important;
    color: #555 !important;
    font-size: 1rem;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.2s ease;
    margin: 0 !important; /* إزالة -ml-px */
}

/* حالة الـ Hover */
nav[aria-label="Pagination Navigation"] a:hover {
    color: #007bff !important;
    background-color: transparent !important;
}

/* حالة الصفحة النشطة */
nav[aria-label="Pagination Navigation"] span[aria-current="page"] > span {
    color: #007bff !important;
    font-weight: bold;
    font-size: 1.1rem;
}


/* ٥. تخصيص الأسهم وإزالة الأيقونات SVG */
/* إخفاء SVG الافتراضي */
nav svg.w-5.h-5 {
    display: none !important;
}

/* استبدال الروابط (السابق والتالي) بالأسهم الكبيرة */
nav span[aria-label="pagination.previous"] > span,
nav a[aria-label="pagination.next"] {
    position: relative;
}

nav span[aria-label="pagination.previous"] > span::before,
nav a[aria-label="pagination.next"]::before {
    font-family: 'Arial', sans-serif;
    font-size: 2rem;
    font-weight: 200;
    line-height: 1;
}

/* السهم الأيسر (السابق) */
nav span[aria-label="pagination.previous"] > span::before {
    content: '<';
}

/* السهم الأيمن (التالي) */
nav a[aria-label="pagination.next"]::before {
    content: '>';
}

/* حالة التعطيل للأسهم */
nav span[aria-disabled="true"] {
    opacity: 0.4;
    cursor: not-allowed;
}

/* النص المكتوب يدوياً الذي أضفته (ملخص النتائج) */
.pagination-summary {
    display: block; /* إعادة إظهاره */
    color: #888;
    font-size: 0.9em;
    margin-bottom: 1rem;
}
/* ================================================= */
/* ==   تصميم السلة الجانبية (Mini Cart Sidebar)  == */
/* ================================================= */

/* طبقة الخلفية المعتمة (Overlay) */
.mini-cart-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1040;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}
.mini-cart-sidebar.active + .mini-cart-overlay {
    opacity: 1;
    visibility: visible;
}


/* الحاوية الرئيسية للسلة */
.mini-cart-sidebar {
    position: fixed;
    top: 0;
    left: 0; /* يبدأ من اليسار (لأن الموقع عربي) ثم يتم تحريكه للخارج */
    width: 380px; /* عرض مناسب */
    max-width: 90%;
    height: 100%;
    background-color: #ffffff;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    transform: translateX(-100%); /* إخفاء السلة خارج الشاشة إلى اليسار */
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    z-index: 1050;
    direction: rtl; /* اتجاه المحتوى من اليمين لليسار */
}
/* عند إضافة كلاس "active"، تتحرك السلة لتظهر */
.mini-cart-sidebar.active {
    transform: translateX(0);
}


/* رأس السلة (العنوان وزر الإغلاق) */
.mini-cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #e9e9e9;
}
.mini-cart-header h3 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 600;
}
.mini-cart-header h3 i {
    margin-left: 8px;
}
.close-mini-cart-btn {
    background: none;
    border: none;
    font-size: 22px;
    cursor: pointer;
    color: #888;
    padding: 5px;
}


/* حاوية عناصر السلة (مع شريط تمرير) */
.mini-cart-items {
    flex-grow: 1;
    overflow-y: auto; /* إضافة شريط تمرير تلقائي إذا زادت العناصر */
    padding: 15px 20px;
}


/* تصميم كل عنصر داخل السلة */
.mini-cart-item {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #f0f0f0;
}
.mini-cart-item:last-child {
    border-bottom: none;
}
.mini-cart-item img {
    width: 70px;
    height: 70px;
    object-fit: cover;
    border-radius: 8px;
    margin-left: 15px; /* مسافة لليسار لأننا في وضع RTL */
}
.mini-cart-item .item-details {
    flex-grow: 1;
}
.mini-cart-item .item-details h4 {
    font-size: 1rem;
    font-weight: 500;
    margin: 0 0 5px;
    color: #222;
}
.mini-cart-item .item-details p {
    font-size: 0.9rem;
    color: #777;
    margin: 0;
}
.mini-cart-item .item-quantity input {
    width: 50px;
    text-align: center;
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 5px;
    margin: 0 10px;
}

.empty-cart-message {
    text-align: center;
    color: #888;
    padding: 40px 0;
}


/* تصميم الجزء السفلي (الإجمالي والأزرار) */
.mini-cart-summary {
    padding: 20px;
    border-top: 1px solid #e9e9e9;
    background-color: #fafafa;
}
.mini-cart-summary .total-line {
    display: flex;
    justify-content: space-between;
    font-size: 1.1rem;
    font-weight: bold;
    margin-bottom: 15px;
}
.mini-cart-summary .btn {
    display: block;
    width: 100%;
    padding: 12px;
    text-align: center;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
}
.mini-cart-summary .btn-primary {
    background-color: #007bff;
    color: #fff;
    border: none;
    margin-bottom: 10px;
}
.mini-cart-summary .btn-secondary {
    background-color: #6c757d;
    color: #fff;
    border: none;
}
.promo-category-card {
    grid-column: span 2; /* اجعل هذا الكارد يأخذ عرض خانتين في الـ grid */
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    display: block;
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.promo-category-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.7); /* اجعل الصورة أغمق قليلاً ليظهر النص فوقها بوضوح */
}

.promo-category-card .promo-content {
    position: absolute;
    bottom: 20px;
    right: 20px;
    color: white;
    text-align: right;
}

.promo-category-card h3 {
    margin: 0;
    font-size: 1.8rem;
    font-weight: 700;
}

.promo-category-card p {
    margin: 5px 0 15px 0;
    font-size: 1rem;
}

.promo-category-card .promo-link {
    background-color: #007bff;
    color: white;
    padding: 8px 16px;
    border-radius: 5px;
    font-weight: 600;
    transition: background-color 0.2s ease;
}

.promo-category-card:hover .promo-link {
    background-color: #0056b3;
}
.product-price-actions {
    display: flex; /*  <--  أهم خاصية */
    justify-content: space-between; /*  لتوزيع العناصر على الأطراف */
    align-items: center; /*  للمحاذاة الرأسية في المنتصف */
    margin-top: 8px;
    gap: 10px; /*  مسافة بين حاوية السعر وحاوية الأيقونات */
}

/* حاوية الأسعار */
.price-container {
    display: flex;
    align-items: baseline; /*  لمحاذاة خط الأساس للأسعار (يبدو أفضل) */
    gap: 8px; /* مسافة بين السعر الحالي والسعر القديم */
}

/* السعر الحالي */
.price-container .current-price {
    font-size: 1.1rem;
    font-weight: 700;
    color: #333;
    display: flex;
    align-items: center;
}

/* السعر القديم (المشطوب) */
.price-container .old-price {
    font-size: 0.9rem;
    color: #888;
    text-decoration: line-through; /*  لإضافة خط الشطب */
    display: flex;
    align-items: center;
}
.price-container .price-icon {
    width: 16px; /*  تحديد حجم أيقونة العملة */
    height: 16px;
    margin-left: 4px;
    fill: #007bff; /*  للتأكد من لون الأيقونة */
}
.price-container .old-price .price-icon {
     fill: #888; /* لون باهت لأيقونة السعر المشطوب */
}


/*  [الجزء الجديد] تنسيق حاوية الأيقونات الإضافية */
.action-icons {
    display: flex;
    align-items: center;
    gap: 8px; /* مسافة بين الأيقونات */
    width: 100%;
}

.action-icons .icon-btn {
    background-color: transparent;
    border: none;
    padding: 5px;
    cursor: pointer;
    font-size: 18px; /* حجم الأيقونات */
    color: #555; /* لون رمادي داكن */
    transition: color 0.2s ease, transform 0.15s ease;
}

/* تأثيرات الـ Hover و Active */
.action-icons .icon-btn:hover {
    color: #007bff; /* تغيير اللون عند المرور */
}
.action-icons .icon-btn:active {
    transform: scale(0.85); /* تصغير عند النقر */
}

/* تنسيق خاص لأيقونة القلب عندما تكون في المفضلة */
.action-icons .favorite-btn .favorited {
    color: #e44d5f; /* لون أحمر مميز */
}
.action-icons .favorite-btn:hover .favorited {
     color: #c23e4f; /* لون أحمر أغمق عند المرور */
}
/* ===================================================== */
/*   تنسيق سلايدر التصنيفات الجديد (Category Pills)   */
/* ===================================================== */

.category-pills-slider-section {
    display: flex; /* 1. تحويل الحاوية إلى Flexbox */
    align-items: center; /* للمحاذاة الرأسية */
    gap: 12px; /* المسافة بين الأزرار */
    
    /* 2. السماح بالتمرير الأفقي */
    overflow-x: auto; 
    overflow-y: hidden; /* إخفاء أي تمرير رأسي */


    
    padding: 0 1px 16px;
}

/* لإخفاء شريط التمرير في متصفحات Webkit (Chrome, Safari) */

.category-pills-slider-section::-webkit-scrollbar {
    height: 6px;
    background-color: #c7e0ff;
}
.category-pills-slider-section::-webkit-scrollbar-thumb {
    background-color: var(--medium-gray);
    border-radius: 3px;
}

/* تنسيق كل زر/حبة (Pill) */
.category-pills-slider-section .category-pill-item {
    display: block;
    white-space: nowrap; /* 4. منع كسر النص إلى سطر جديد */
    
    padding: 8px 18px; /* مسافات داخلية مريحة */
    border-radius: 20px; /* حواف دائرية بالكامل */
    background-color: #fff; /* لون خلفية رمادي فاتح */
    
    color: #333; /* لون الخط */
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    
    transition: background-color 0.2s ease, color 0.2s ease;
}


/* تنسيق الزر النشط (Active) أو عند المرور (Hover) */
.category-pills-slider-section .category-pill-item.active,
.category-pills-slider-section .category-pill-item:hover {
    background-color: #007bff; /* اللون الأزرق المميز */
    color: #ffffff; /* لون الخط أبيض */
}
.store-categories-quicklinks-section{
    background-color: #c7e0ff;
    padding-top: 23px;
}
.discover-section{
    background-color: #c7e0ff;
}
/* ========================================================= */
/* ===== CSS Styling for Product Detail Page (Modern) ====== */
/* ========================================================= */

/* ------ General Layout & Container ------ */
.product-detail-page .container {
    max-width: 1200px; /* تحديد عرض أقصى للصفحة */
    margin: 0 auto;
    padding: 20px;
}

.product-main-details {
    display: grid;
    grid-template-columns: 1fr; /* عمود واحد على الهاتف */
    gap: 30px;
    margin-bottom: 40px;
}

/* On larger screens, use two columns */
@media (min-width: 768px) {
    .product-main-details {
        grid-template-columns: 1fr 1fr; /* عمودان متساويان */
        gap: 40px;
    }
}
@media (min-width: 992px) {
    .product-main-details {
        grid-template-columns: 2fr 3fr; /* عمود الصور أصغر قليلاً */
        gap: 50px;
    }
}


/* ------ 1. Product Gallery ------ */
.product-gallery .main-image-container {
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 15px;
    position: relative;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}
.product-gallery .main-image-container img {
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 5; /* نسبة طول إلى عرض حديثة للصور */
    object-fit: cover;
    display: block;
}

.product-gallery .thumbnail-scroller {
    display: grid;
    grid-template-columns: repeat(4, 1fr); /* 4 صور مصغرة في الصف */
    gap: 10px;
}
.product-gallery .thumbnail-img {
    width: 100%;
    border-radius: 8px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color 0.2s ease, transform 0.2s ease;
}
.product-gallery .thumbnail-img:hover {
    transform: scale(1.05);
}
.product-gallery .thumbnail-img.active {
    border-color: #007bff; /* إبراز الصورة النشطة */
    box-shadow: 0 0 8px rgba(0, 123, 255, 0.5);
}


/* ------ 2. Product Information ------ */
.product-information .pdp-product-name {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: #111;
}
.product-information .pdp-price {
    font-size: 1.8rem;
    font-weight: 600;
    color: #007bff;
    margin-bottom: 20px;
    display: flex;
    align-items: baseline;
    gap: 15px;
}
.product-information .pdp-price .old-price {
    font-size: 1.2rem;
    color: #888;
    text-decoration: line-through;
}

.product-information .pdp-description {
    color: #555;
    line-height: 1.6;
    margin-bottom: 25px;
    font-size: 1rem;
}

/* -- Product Options (Colors & Sizes) -- */
.pdp-options .option-group {
    margin-bottom: 20px;
}
.pdp-options label {
    font-weight: 600;
    display: block;
    margin-bottom: 10px;
}
.pdp-color-selector, .pdp-size-selector {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.pdp-options .option-btn {
    border-radius: 8px;
    border: 1px solid #ddd;
    background-color: #fff;
    cursor: pointer;
    transition: all 0.2s ease;
}
.pdp-options .option-btn.active {
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.3);
}
/* -- Color options -- */
.pdp-color-selector .color-option {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    
}
/* -- Size options -- */
.pdp-size-selector .size-option {
    min-width: 45px;
    height: 35px;
    padding: 5px 15px;
    font-weight: 600;
    
}

/* -- Add to Cart Section -- */
.pdp-quantity-addtocart {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: 30px;
}
.pdp-quantity-addtocart .add-to-cart-pdp-btn {
    flex-grow: 1; /* جعل الزر يأخذ المساحة المتبقية */
}
.pdp-quantity-addtocart .wishlist-btn {
    font-size: 22px;
}

/* -- Meta Info -- */
.pdp-meta-info {
    margin-top: 25px;
    font-size: 0.9rem;
    color: #777;
    border-top: 1px solid #eee;
    padding-top: 15px;
}

/* ------ 3. Product Tabs Section ------ */
.product-tabs-section {
    background-color: #fff;
    border-radius: 12px;
    padding: 30px;
    margin-top: 50px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
}
.tabs-nav {
    display: flex;
    gap: 20px;
    border-bottom: 1px solid #e0e0e0;
    margin-bottom: 25px;
}
.tab-link {
    background: none;
    border: none;
    font-size: 1.1rem;
    font-weight: 600;
    color: #666;
    padding: 10px 0;
    position: relative;
    cursor: pointer;
    border-bottom: 3px solid transparent; /* خط شفاف للتحريك */
    transition: color 0.3s ease, border-color 0.3s ease;
}
.tab-link.active, .tab-link:hover {
    color: #007bff;
}
.tab-link.active {
    border-bottom-color: #007bff; /* إظهار الخط الأزرق للتاب النشط */
}

.tab-pane {
    display: none;
    line-height: 1.7;
    color: #444;
}
.tab-pane.active {
    display: block;
    animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}


/* ------ 4. Related Products Section ------ */
.related-products-section {
    margin-top: 60px;
    padding-top: 40px;
    border-top: 1px solid #f0f0f0;
}
.related-products-section h3 {
    text-align: center;
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 30px;
}
/* ========================================================= */
/* =========== CSS Styling for Review Section ============ */
/* ========================================================= */

/* ------ Review Item (كل تقييم على حدة) ------ */
.review-item {
    padding: 20px 0; /* مسافات داخلية عمودية */
    border-bottom: 1px solid #eef0f3; /* خط فاصل خفيف جداً */
}
/* لا نضع خطاً بعد آخر تقييم */
.review-item:last-of-type {
    border-bottom: none;
    padding-bottom: 0;
}

/* حاوية معلومات كاتب التقييم */
.review-author {
    display: flex;
    align-items: center;
    gap: 12px; /* مسافة بين الصورة والاسم والنجوم */
    margin-bottom: 10px;
}
.review-author img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}
.review-author strong {
    font-weight: 600;
    color: #1a202c; /* لون أسود أنيق */
}

/* حاوية نجوم التقييم */
.review-author .star-rating {
    color: #ffc107; /* لون النجوم الأصفر */
    font-size: 0.9em;
}

/* نص التقييم نفسه */
.review-text {
    color: #4a5568; /* لون رمادي داكن للنص */
    line-height: 1.6;
    margin: 0;
}

/* تاريخ التقييم */
.review-date {
    display: block;
    margin-top: 10px;
    font-size: 0.8rem;
    color: #a0aec0; /* لون رمادي فاتح */
}

/* ------ فورم إضافة تقييم جديد ------ */
.add-review-form {
    margin-top: 30px;
    background-color: #f7f9fc; /* خلفية مميزة قليلاً */
    padding: 25px;
    border-radius: 12px;
}
.add-review-form h4 {
    font-weight: 700;
    margin-top: 0;
    margin-bottom: 20px;
    color: #1a202c;
}
.add-review-form .form-group {
    margin-bottom: 15px;
}
.add-review-form label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #2d3748;
}

/* -- حقل النص لإضافة التعليق -- */
.add-review-form textarea {
    width: 100%;
    padding: 12px;
    border-radius: 8px;
    border: 1px solid #cbd5e0;
    font-family: inherit; /* استخدام نفس خط الموقع */
    font-size: 1rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.add-review-form textarea:focus {
    outline: none;
    border-color: #007bff; /* تغيير لون الحدود عند التركيز */
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.25); /* إضافة ظل خفيف */
}

/* -- زر إرسال التقييم -- */
.add-review-form button[type="submit"] {
    display: inline-block;
    background-color: #007bff; /* اللون الأساسي الأزرق */
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 12px 25px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.1s ease;
}
.add-review-form button[type="submit"]:hover {
    background-color: #0056b3; /* لون أغمق عند المرور */
}
.add-review-form button[type="submit"]:active {
    transform: scale(0.98); /* تأثير الضغط */
}

/* ------ التقييم باستخدام النجوم في الفورم (جزء إضافي تفاعلي) ------ */
.rating-input {
  direction: ltr; /* نجعل النجوم من اليسار لليمين للتحكم الصحيح */
  display: inline-flex;
  flex-direction: row-reverse;
  justify-content: flex-end;
}
.rating-input > input {
  display: none;
}
.rating-input > label {
  cursor: pointer;
  width: 1em;
  font-size: 2rem; /* حجم النجوم */
  color: #ddd; /* لون النجمة الفارغة */
  transition: color 0.2s;
}
.rating-input > input:checked ~ label, /* نجمة محددة وكل ما بعدها */
.rating-input > label:hover, /* نجمة عند المرور وكل ما بعدها */
.rating-input > label:hover ~ label {
  color: #ffc107; /* اللون الأصفر للنجوم المحددة */
}
/* ======================================================== */
/*          Floating Cart Button Styling                    */
/* ======================================================== */

.floating-cart-btn {
    position: fixed; /* تثبيته على الشاشة */
    bottom: 80px;    /* مسافة من الأسفل (فوق الفوتر السفلي للهاتف) */
    left: 20px;      /* مسافة من اليسار */
    
    width: 60px;
    height: 60px;
    background-color: #007bff; /* لون أزرق مميز */
    color: white;
    border-radius: 50%; /* دائري */
    
    border: none;
    cursor: pointer;
    
    display: flex;
    justify-content: center;
    align-items: center;
    
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    z-index: 1005; /* للتأكد من أنه فوق المحتوى */
    
    /* تأثيرات الحركة */
    transform: scale(0);
    opacity: 0;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.3s ease;
}

/* حالة ظهور الزر */
.floating-cart-btn.visible {
    transform: scale(1);
    opacity: 1;
}

.floating-cart-btn i {
    font-size: 28px;
    line-height: 1;
}

/* عداد المنتجات على الزر */
.floating-cart-btn .cart-count {
    position: absolute;
    top: 0;
    right: 0;
    
    background-color: #dc3545; /* أحمر */
    color: white;
    
    width: 22px;
    height: 22px;
    border-radius: 50%;
    
    display: flex;
    justify-content: center;
    align-items: center;
    
    font-size: 0.8rem;
    font-weight: bold;
    border: 2px solid #007bff; /* حدود بنفس لون الزر */
}

/* === New App-Like Product Detail Page (PDP) CSS === */

/*  لإزالة الـ padding من layout الصفحة بالكامل */
.pdp-mobile-view-wrapper .center-content {
    padding: 0;
    padding-bottom: 95px; /* مساحة كافية للشريط السفلي العائم */
}
/* إخفاء البريدكرومب على الشاشات الصغيرة جداً */
@media (max-width: 768px) {
    .product-breadcrumb {
        display: none;
    }
}
.pdp-gallery-section { position: relative; }
.pdp-header-actions {
    position: absolute; top: 15px; left: 15px; right: 15px;
    display: flex; justify-content: space-between; z-index: 10;
}
.pdp-header-actions .action-btn {
    width: 36px; height: 36px;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(8px);
    border-radius: 50%; border: none;
    display: flex; justify-content: center; align-items: center;
    font-size: 18px; color: #333;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    position: relative;
    text-decoration: none;
}
.pdp-header-actions .right-actions { display: flex; gap: 10px; }
.action-btn.cart-btn .cart-count {
    position: absolute; top: -4px; right: -4px;
    background: #dc3545; color: white;
    font-size: 10px; font-weight: bold;
    border-radius: 50%; width: 16px; height: 16px;
    display: flex; justify-content: center; align-items: center;
}
.pdp-main-image-slider {
    display: flex; overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.pdp-main-image-slider::-webkit-scrollbar { display: none; }
.pdp-main-image-slider .slide {
    flex: 0 0 100%; width: 100%;
}
.pdp-main-image-slider .slide img { width: 100%; height: 100%;  }

.slider-pagination {
    position: absolute; bottom: 50px; left: 50%;
    transform: translateX(-50%); display: flex; gap: 6px;
}
.slider-pagination .dot {
    width: 8px; height: 8px;
    background: rgba(0,0,0,0.3);
    border-radius: 50%; transition: all 0.3s ease;
    border: none; padding: 0;
}
.slider-pagination .dot.active { background: #fff; width: 8px; }

.wishlist-btn-float {
    /* نفس تصميم الأزرار الأخرى ولكن بخصائص مختلفة */
    position: absolute; bottom: 48px;
    left: 20px; z-index: 11;
    width: 40px; height: 40px; background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(8px); border-radius: 50%; border: none;
    display: flex; justify-content: center; align-items: center; font-size: 20px;
}
/* --- Details Section --- */
.pdp-details-section { 
    background-color: white;
    padding: 18px;
    margin-top: -33px;
    z-index: 9999;
    position: relative;
    border-top-left-radius: 22px;
    border-top-right-radius: 22px;
 }
.pdp-info-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 10px; }
.pdp-title { font-size: 1.4rem; font-weight: 700; margin: 0; }
.pdp-category { font-size: 0.9rem; color: #888; }
.quantity-selector-alt {     background-color: #f0f0f0;display: flex; align-items: center; border: 1px solid #eee; border-radius: 7px; padding: 5px; }
.quantity-selector-alt input { width: 30px; text-align: center; border: none; font-weight: 600; background: none; }
.quantity-btn-alt {     line-height: 28px;width: 28px; height: 28px; border-radius: 50%; border: none; background: #f0f0f0; font-size: 1.1rem; }

.pdp-rating-summary { display: flex; align-items: center; gap: 8px; font-size: 0.9rem; color: #555; margin-bottom: 20px; }
.pdp-rating-summary i { color: #ffc107; }

.pdp-option-group { margin-bottom: 20px; }
.pdp-option-group h4 { font-size: 1rem; font-weight: 600; margin-bottom: 10px; }

/* ... Styles for option selectors ... */
.pdp-color-selector, .pdp-size-selector { display: flex; flex-wrap: wrap; gap: 10px; }
.option-btn {
    border-radius: 20px; border: 1px solid #ddd;
    background-color: #fff; cursor: pointer; transition: all 0.2s ease;
    font-weight: 600; display: flex; justify-content: center; align-items: center;
}
.option-btn.active { border-color: #111; background-color: #111; color: #fff; }
.color-option {
    width: 32px; height: 32px; border-radius: 50%;
    position: relative;
}
.color-option i { display: none; color: #fff; } /* Hide check by default */
.color-option.active i { display: block; }
.size-option { min-width: 45px; height: 45px;padding: 5px 15px;}
.pdp-divider { border: none; border-top: 1px solid #f0f0f0; margin: 25px 0; }
.pdp-description p { color: #555; line-height: 1.7; }
#read-more-desc { color: #007bff; font-weight: 600; cursor: pointer; text-decoration: none; }

/* --- Reviews Snippet --- */
.pdp-reviews-section { border-bottom: 1px solid #f0f0f0; padding-bottom: 20px; margin-bottom: 20px; }
.pdp-reviews-section h4 { /* Same as option h4 */ }
.review-item-snippet { margin-top: 15px; }
.review-header { display: flex; align-items: center; gap: 10px; margin-bottom: 5px; }
.review-header .star-rating { color: #ffc107; font-size: 0.9rem; }
.review-text-snippet { font-size: 0.95rem; color: #333; margin: 0; }
.review-date-snippet { font-size: 0.8rem; color: #999; margin-top: 5px; }

/* --- Related Products Alt --- */
.related-products-section-alt { padding: 0 20px; }
.products-scroller { display: flex; gap: 15px; overflow-x: auto; padding-bottom: 70px; scrollbar-width: none; }
.products-scroller::-webkit-scrollbar { display: none; }
.products-scroller .product-card { flex: 0 0 160px; }

/* --- Floating Footer Bar --- */
.pdp-footer-bar {
    position: fixed; bottom: 0; left: 0; right: 0;
    background: #fff; padding: 10px 20px;
    display: flex; justify-content: space-between; align-items: center;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.08); z-index: 1000;
}
.price-container-alt { display: flex; flex-direction: column; }
.price-container-alt span { font-size: 0.8rem; color: #777; }
.price-container-alt strong { font-size: 1.2rem; font-weight: 700; color: #111; }
.add-to-cart-footer-btn { 
        flex-grow: 1;
    font-size: 1rem;
    padding: 12px;
    display: flex;
    justify-content: space-between;
 }
 /* --- 1. الأنماط الجديدة لشارة "نفذت الكمية" --- */
.product-image {
    position: relative; /* ضروري لتحديد موضع الشارة */
}

.stock-badge {
    position: absolute;
    top: 10px;      /* مسافة من الأعلى */
    left: 10px;     /* مسافة من اليسار (ستظهر في الأعلى يسار بسبب RTL) */
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.6rem;
    font-weight: bold;
    color: white;
    z-index: 2; /* لتكون فوق الصورة */
}

.out-of-stock-badge {
    background-color: #dc3545; /* لون أحمر للخطر */
    box-shadow: 0 2px 5px rgba(220, 53, 69, 0.5);
}

/* --- 2. الأنماط الجديدة لزر "إضافة للسلة" المعطل --- */
.add-to-cart-btn.quick-add:disabled {
    background-color: #adb5bd; /* لون رمادي باهت */
    cursor: not-allowed;     /* تغيير شكل المؤشر */
    color: #f8f9fa;
}

.add-to-cart-btn.quick-add:disabled:hover {
    /* إلغاء تأثير الـ hover عند التعطيل */
    transform: none;
    box-shadow: none;
}

/* --- 3. (اختياري) إضافة تعتيم على المنتج بالكامل --- */
.product-card.out-of-stock .product-image img {
    opacity: 0.6;
    filter: grayscale(80%); /* يجعل الصورة رمادية قليلاً */
}
.action-sheet-content {
    width: 100%;
    max-width: 100%;
    margin-top: auto;
    border-radius: 0;
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
    padding-bottom: env(safe-area-inset-bottom, 20px);
    bottom: 0;
    margin-bottom: 0;
}
/* --- تصميم أدوات التحكم بالكمية داخل السلة الجانبية --- */
.mini-cart-item .item-details {
    display: flex;
    flex-direction: column;
    gap: 8px; /* مسافة بين اسم المنتج والأزرار */
}

.mini-cart-quantity-control {
    display: flex;
    align-items: center;
    width: fit-content;
}
.mini-cart-quantity-control .quantity-btn-mini {
    width: 26px;
    height: 26px;
    border: 1px solid #ddd;
    background: #f7f7f7;
    cursor: pointer;
    font-weight: bold;
    color: #555;
    padding: 0;
    line-height: 26px;
}
.mini-cart-quantity-control .quantity-input-mini {
    width: 35px;
    height: 26px;
    text-align: center;
    border: 1px solid #ddd;
    border-left: none;
    border-right: none;
    font-size: 0.9rem;
    font-weight: 600;
}
.mini-cart-item .item-price-total {
    font-weight: bold;
    text-align: left;
    margin-right: auto;
    padding-left: 10px;
}