.store-header {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-color) 100%);
    color: var(--white);
    padding: 60px 0;
    text-align: center;
}

.store-header h1 {
    font-size: 40px;
    font-weight: 900;
    margin-bottom: 10px;
}

/* Ads Slider */
.store-slider-container {
    position: relative;
    width: 100%;
    height: 400px;
    overflow: hidden;
    background-color: #f1f5f9;
}

@media (max-width: 768px) {
    .store-slider-container {
        height: 250px;
    }
}

.store-slider-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
}

.slide-item {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.8s ease, visibility 0.8s ease;
    z-index: 1;
}

.slide-item.active {
    opacity: 1;
    visibility: visible;
    z-index: 2;
}

.slide-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Glassmorphic overlay for slide text */
.slide-overlay-content {
    position: absolute;
    bottom: 30px;
    right: 40px;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 20px 30px;
    border-radius: 15px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    max-width: 500px;
    z-index: 3;
    animation: slideUp 0.8s ease forwards;
    text-align: right;
}

@media (max-width: 768px) {
    .slide-overlay-content {
        bottom: 15px;
        right: 15px;
        left: 15px;
        padding: 12px 20px;
        max-width: 100%;
    }
}

.slide-title {
    font-size: 24px;
    font-weight: 800;
    color: var(--primary-dark);
    margin-bottom: 8px;
}

@media (max-width: 768px) {
    .slide-title {
        font-size: 18px;
        margin-bottom: 4px;
    }
}

.slide-desc {
    font-size: 15px;
    color: var(--text-dark);
    opacity: 0.9;
    line-height: 1.5;
}

@media (max-width: 768px) {
    .slide-desc {
        font-size: 13px;
    }
}

/* Slide Navigation Controls */
.slider-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(5px);
    border: none;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: var(--primary-dark);
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.slider-arrow:hover {
    background: var(--primary-color);
    color: var(--white);
}

.slider-arrow.prev {
    right: 20px;
}

.slider-arrow.next {
    left: 20px;
}

@media (max-width: 768px) {
    .slider-arrow {
        width: 35px;
        height: 35px;
        font-size: 14px;
    }
    .slider-arrow.prev { right: 10px; }
    .slider-arrow.next { left: 10px; }
}

.slider-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
}

@media (max-width: 768px) {
    .slider-dots {
        bottom: 10px;
    }
}

.slider-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s;
    border: 1px solid rgba(0, 0, 0, 0.2);
}

.slider-dot.active {
    background: var(--primary-color);
    width: 25px;
    border-radius: 10px;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Breadcrumb Styling */
.breadcrumb-container {
    margin-top: 25px;
    margin-bottom: 10px;
}

.breadcrumb {
    display: flex;
    align-items: center;
    list-style: none;
    padding: 0;
    margin: 0;
    gap: 8px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-gray);
}

.breadcrumb a {
    color: var(--text-gray);
    display: flex;
    align-items: center;
    gap: 6px;
    transition: color 0.2s ease;
}

.breadcrumb a:hover {
    color: var(--primary-color);
}

.breadcrumb .separator {
    color: #a0aec0;
    font-size: 10px;
    display: flex;
    align-items: center;
}

.breadcrumb .active {
    color: var(--primary-color);
    font-weight: 700;
}

/* Premium Categories Section */
.store-categories-section {
    margin-top: 30px;
    margin-bottom: 40px;
    text-align: center;
}

.categories-title {
    font-size: 24px;
    font-weight: 800;
    color: var(--secondary-color);
    margin-bottom: 20px;
    position: relative;
    display: inline-block;
    padding-bottom: 8px;
}

.categories-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: var(--primary-color);
    border-radius: 3px;
}

.categories-scroll-container {
    position: relative;
    width: 100%;
}

/* Horizontal scroll fade effect at the edges */
.categories-scroll-container::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 50px;
    background: linear-gradient(to right, var(--white), transparent);
    pointer-events: none;
    z-index: 2;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.categories-scroll-container::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    height: 100%;
    width: 50px;
    background: linear-gradient(to left, var(--white), transparent);
    pointer-events: none;
    z-index: 2;
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* Enable fade gradients on scroll or when content overflows */
.categories-scroll-container.has-overflow::after,
.categories-scroll-container.has-overflow::before {
    opacity: 1;
}

.categories-grid {
    display: flex;
    justify-content: flex-start;
    align-items: flex-start;
    gap: 20px;
    overflow-x: auto;
    padding: 15px 10px;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Hide scrollbar for Firefox */
    -ms-overflow-style: none;  /* Hide scrollbar for IE */
}

.categories-grid::-webkit-scrollbar {
    display: none; /* Hide scrollbar for Chrome/Safari/Opera */
}

.category-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    width: 120px;
    flex-shrink: 0; /* Prevent shrinking in horizontal strip */
    text-decoration: none;
    color: inherit;
}

.category-icon-wrapper {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background-color: #f3f4f6; /* Beautiful gray background */
    border: 2px solid transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    color: var(--primary-color);
    margin-bottom: 12px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    overflow: hidden;
}

.category-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.category-name {
    font-size: 15px;
    font-weight: 700;
    color: var(--secondary-color);
    text-align: center;
    transition: color 0.3s;
}

/* Hover effects */
.category-card:hover .category-icon-wrapper {
    transform: translateY(-8px);
    background-color: var(--white);
    border-color: var(--primary-color);
    box-shadow: 0 10px 20px rgba(11, 128, 122, 0.15);
}

.category-card:hover .category-img {
    transform: scale(1.1);
}

.category-card:hover .category-name {
    color: var(--primary-color);
}

/* Active Category state */
.category-card.active .category-icon-wrapper {
    background-color: var(--primary-color);
    color: var(--white);
    border-color: var(--primary-color);
    box-shadow: 0 10px 25px rgba(11, 128, 122, 0.3);
    transform: translateY(-8px) scale(1.05);
}

.category-card.active .category-name {
    color: var(--primary-color);
    font-weight: 800;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 60px;
}

.product-card {
    background: var(--white);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s, box-shadow 0.3s;
    display: flex;
    flex-direction: column;
    position: relative; /* Support absolute children */
}

.product-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(11, 128, 122, 0.15);
}

.product-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-bottom: 1px solid var(--border-color);
}

.product-info {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.product-category {
    font-size: 13px;
    color: var(--primary-color);
    font-weight: 700;
    margin-bottom: 5px;
}

.product-name {
    font-size: 18px;
    font-weight: 800;
    color: var(--secondary-color);
    margin-bottom: 10px;
}

.product-price {
    font-size: 22px;
    font-weight: 900;
    color: var(--primary-dark);
    margin-bottom: 15px;
    margin-top: auto;
}

.add-to-cart-btn {
    width: 100%;
    padding: 12px;
    border: none;
    background: rgba(11, 128, 122, 0.1);
    color: var(--primary-color);
    border-radius: 10px;
    font-family: inherit;
    font-weight: 800;
    cursor: pointer;
    transition: 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.add-to-cart-btn:hover {
    background: var(--primary-color);
    color: var(--white);
}

/* Floating Cart */
.cart-float {
    position: fixed;
    bottom: 30px;
    left: 30px;
    background: var(--secondary-color);
    color: var(--white);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    box-shadow: 0 10px 25px rgba(10, 36, 66, 0.4);
    cursor: pointer;
    z-index: 100;
    transition: 0.3s;
}

.cart-float:hover {
    transform: scale(1.1);
}

.cart-counter {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--error-color);
    color: var(--white);
    font-size: 14px;
    font-weight: bold;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Cart Modal */
.cart-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    display: flex;
    justify-content: flex-end;
    /* Align right for Arabic */
    opacity: 0;
    visibility: hidden;
    transition: 0.3s;
}

.cart-modal.active {
    opacity: 1;
    visibility: visible;
}

.cart-sidebar {
    background: var(--white);
    width: 100%;
    max-width: 400px;
    height: 100%;
    transform: translateX(-100%);
    transition: 0.4s cubic-bezier(0.175, 0.885, 0.32, 1);
    display: flex;
    flex-direction: column;
}

/* Since body is dir=rtl, right=left practically, but let's be explicit and slide from left for visual balance */
[dir="rtl"] .cart-sidebar {
    transform: translateX(100%);
}

[dir="rtl"] .cart-modal.active .cart-sidebar {
    transform: translateX(0);
}

.cart-header {
    padding: 25px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cart-header h3 {
    font-size: 22px;
    color: var(--secondary-color);
}

.close-cart {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--text-gray);
}

.cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 25px;
}

.cart-item {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

.cart-item-img {
    width: 70px;
    height: 70px;
    border-radius: 10px;
    object-fit: cover;
}

.cart-item-info {
    flex: 1;
}

.cart-item-title {
    font-weight: 800;
    color: var(--secondary-color);
    margin-bottom: 5px;
    font-size: 15px;
}

.cart-item-price {
    font-weight: 700;
    color: var(--primary-color);
}

.qty-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
}

.qty-btn {
    width: 25px;
    height: 25px;
    border-radius: 5px;
    border: 1px solid var(--border-color);
    background: var(--bg-color);
    cursor: pointer;
}

.remove-item {
    color: var(--error-color);
    background: none;
    border: none;
    cursor: pointer;
    font-size: 18px;
    margin-top: 5px;
}

.cart-footer {
    padding: 25px;
    border-top: 1px solid var(--border-color);
    background: var(--bg-color);
}

.cart-total {
    display: flex;
    justify-content: space-between;
    font-size: 20px;
    font-weight: 900;
    color: var(--secondary-color);
    margin-bottom: 20px;
}

.checkout-btn {
    width: 100%;
    padding: 15px;
    font-size: 18px;
    text-align: center;
    border-radius: 12px;
}

/* Mobile Adjustments for Store */
@media (max-width: 768px) {
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 15px;
    }

    .product-img {
        height: 130px;
    }

    .product-info {
        padding: 12px;
    }

    .product-name {
        font-size: 14px;
        margin-bottom: 8px;
    }

    .product-price {
        font-size: 16px;
        margin-bottom: 10px;
    }

    .add-to-cart-btn {
        padding: 8px;
        font-size: 13px;
    }

    .store-header h1 {
        font-size: 30px;
    }
}

@media (max-width: 400px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .product-img {
        height: 110px;
    }

    .product-name {
        font-size: 12px;
    }

    .product-price {
        font-size: 14px;
    }

    .add-to-cart-btn {
        font-size: 12px;
        padding: 6px;
    }
}

/* Discount Badge & Pricing */
.discount-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: var(--error-color);
    color: var(--white);
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 800;
    z-index: 5;
    direction: ltr;
    box-shadow: 0 4px 10px rgba(220, 38, 38, 0.3);
    animation: pulseBadge 2s infinite;
}

@keyframes pulseBadge {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.product-price {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.product-price .original-price {
    text-decoration: line-through;
    font-size: 14px;
    color: var(--text-gray);
    font-weight: 500;
}

.product-price .sale-price {
    color: var(--primary-dark);
}