* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Star Wear Brand Colors */
    --primary:    #F26522;   /* Primary Orange - Brand color */
    --primary-dk: #d4541a;   /* Darker orange for hover */
    --secondary:  #222222;   /* Secondary text */
    --accent:     #F26522;   /* Accent = primary */
    --light:      #FFFFFF;   /* White */
    --dark:       #000000;   /* Main text */
    --gray:       #555555;   /* Mid gray */
    --light-gray: #F2F2F2;   /* Background gray */
    --border:     #E0E0E0;   /* Border color */
    --background: #FFFFFF;   /* Page background */

    --border-radius-sm: 6px;
    --border-radius-md: 12px;
    --border-radius-lg: 20px;

    --shadow-sm: 0 1px 4px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.10);
    --shadow-accent: 0 4px 16px rgba(242,101,34,0.20);

    --transition: all 0.25s ease-in-out;
    --font-heading: 'Tajawal', sans-serif;
    --font-body:    'Tajawal', sans-serif;
}


/* Base Overrides */
body {
    background-color: var(--background);
    color: var(--dark);
    line-height: 1.6;
    direction: rtl;
    text-align: right;
    letter-spacing: 0.02em;
    overflow-x: hidden;
    font-family: var(--font-body);
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.d-flex {
    display: flex;
}

.justify-content-between {
    justify-content: space-between;
}

.align-items-center {
    align-items: center;
}

.py-1 {
    padding-top: 0.25rem;
    padding-bottom: 0.25rem;
}

.small {
    font-size: 0.75rem;
}

.fw-medium {
    font-weight: 500;
}

.me-1 {
    margin-left: 0.25rem;
}

.ms-1 {
    margin-right: 0.25rem;
}

/* Multi-layered Header Styles */
.main-header {
    background-color: var(--light);
    width: 100%;
    z-index: 1000;
}

/* Layer 1: Utility Bar */
.utility-bar {
    background-color: #f9f9f9;
    padding: 8px 0;
    border-bottom: 1px solid #eee;
    font-size: 11px;
    font-weight: 500;
}

.utility-links {
    display: flex;
    list-style: none;
    gap: 15px;
}

.utility-links a {
    color: #333;
    text-decoration: none;
}

.utility-links a:hover {
    text-decoration: underline;
}

.promo-text {
    color: #333;
}

.store-link {
    color: #333;
    text-decoration: none;
    font-weight: 600;
}

/* Layer 2: Brand Header */
.brand-header {
    padding: 20px 0;
}

.header-grid {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
}

.pb-search-form {
    display: flex;
    align-items: center;
    border: 1px solid #ccc;
    padding: 8px 15px;
    max-width: 250px;
    margin-right: 0;
    margin-left: auto;
}

.pb-search-input {
    border: none;
    outline: none;
    width: 100%;
    font-size: 13px;
}

.pb-search-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 14px;
}

.header-logo {
    text-align: center;
}

.pb-logo-text {
    font-family: var(--font-heading);
    font-size: 42px;
    font-weight: 500;
    letter-spacing: 8px;
    color: var(--dark);
    text-decoration: none;
    display: inline-block;
}

.header-actions {
    display: flex;
    justify-content: flex-end;
    gap: 25px;
}

.action-item a {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: #333;
    font-size: 11px;
    font-weight: 500;
    gap: 4px;
}

.action-item i {
    font-size: 20px;
}

/* Layer 3 & 4: Navigation */
.primary-nav,
.secondary-nav {
    border-top: 1px solid #eee;
    text-align: center;
}

.nav-links {
    display: flex;
    justify-content: center;
    list-style: none;
    padding: 12px 0;
    gap: 25px;
}

.nav-links a {
    text-decoration: none;
    color: #000;
    font-size: 13px;
}

.tertiary a {
    font-weight: 400;
}

.categories-bold a {
    font-weight: 700;
    text-transform: uppercase;
}

.nav-links a.active {
    border-bottom: 2px solid #000;
}

.text-new {
    color: #000;
}

.text-sale {
    color: #B00;
}

/* Layer 5: Promo Strips */
.promo-strips {
    background-color: #f7f7f7;
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
    padding: 15px 0;
}

.promo-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    text-align: center;
}

.promo-item {
    display: flex;
    flex-direction: column;
    border-right: 1px solid #ddd;
}

.promo-item:last-child {
    border-right: none;
}

.promo-title {
    font-weight: 700;
    font-size: 12px;
}

.promo-subtext {
    font-size: 11px;
    color: #333;
    margin-top: 2px;
}

/* Mobile Adjustments */
@media (max-width: 991px) {
    .header-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .header-search,
    .header-logo,
    .header-actions {
        justify-content: center;
        text-align: center;
    }

    .header-actions {
        order: 2;
    }

    .header-logo {
        order: 1;
    }

    .header-search {
        order: 3;
    }

    .nav-links {
        flex-wrap: wrap;
        gap: 10px;
        padding: 10px;
    }

    .promo-grid {
        grid-template-columns: 1fr 1fr;
        gap: 15px;
    }

    .promo-item:nth-child(even) {
        border-right: none;
    }
}

/* Mobile Side Menu Styling */
.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(44, 24, 16, 0.5);
    z-index: 1001;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.mobile-menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

.mobile-side-menu {
    position: fixed;
    top: 0;
    right: -300px;
    width: 300px;
    height: 100%;
    background-color: var(--background);
    z-index: 1002;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    box-shadow: -5px 0 20px var(--shadow-gold);
}

.mobile-side-menu.active {
    right: 0;
}

.mobile-menu-header {
    padding: 20px;
    border-bottom: 1px solid var(--light-gray);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.close-menu {
    background: none;
    border: none;
    font-size: 1.4rem;
    color: var(--gray);
    cursor: pointer;
}

.mobile-menu-body {
    flex-grow: 1;
    padding: 20px;
    overflow-y: auto;
}

.mobile-nav-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mobile-nav-list li {
    margin-bottom: 15px;
}

.mobile-nav-list a {
    text-decoration: none;
    color: var(--gray);
    font-size: 1.1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    padding: 10px;
    border-radius: 8px;
    transition: background-color 0.2s ease;
}

.mobile-nav-list a:hover,
.mobile-nav-list a.active {
    background-color: var(--light);
    color: var(--primary);
}

.mobile-menu-footer {
    padding: 20px;
    border-top: 1px solid var(--light-gray);
    background-color: var(--light);
}

.social-links {
    display: flex;
    gap: 20px;
    margin-top: 10px;
}

.social-links a {
    color: var(--primary);
    font-size: 1.2rem;
    transition: color 0.2s ease;
}

.social-links a:hover {
    color: var(--secondary);
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    padding: 25px 0;
    text-align: center;
    border-radius: 0 0 15px 15px;
    margin-bottom: 10px;
}

.hero h1 {
    font-size: 2.2rem;
    margin-bottom: 15px;
    font-weight: 800;
    line-height: 1.3;
}

.hero p {
    font-size: 1.1rem;
    max-width: 700px;
    margin: 0 auto 25px;
    opacity: 0.9;
    line-height: 1.6;
}

/* Sections Spacing */
section {
    padding: 0px 0;
}

.section-title {
    font-size: 1.4rem;
    margin-bottom: 15px;
    margin-right: 15px;
    text-align: right;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    padding-bottom: 5px;
    color: var(--dark);
}

.section-title::after {
    display: none;
}

/* New Arrivals Section */
.new-arrivals-section {
    background-color: var(--background)BF7;
    padding: 10px 0;
    margin-bottom: 5px;
}

/* Infinite Scroll Wrapper */
.new-arrivals-wrapper {
    overflow: hidden;
    width: 100%;
    position: relative;
    padding: 5px 0 15px;
    direction: ltr;
}

/* Scroll Track */
.new-arrivals-track {
    display: flex;
    gap: 12px;
    width: max-content;
    padding-right: 12px;
    animation: scroll-right-continuous 30s linear infinite;
    will-change: transform;
}

.new-arrivals-track:hover,
.new-arrivals-track:active,
.new-arrivals-track:focus-within {
    animation-play-state: paused;
}

.new-arrivals-wrapper:active .new-arrivals-track {
    animation-play-state: paused;
}

@keyframes scroll-right-continuous {
    0% {
        transform: translateX(-50%);
    }

    100% {
        transform: translateX(0);
    }
}

.new-arrival-card {
    min-width: 140px;
    max-width: 140px;
    flex-shrink: 0;
    background: var(--background);
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 4px 10px var(--shadow-sm);
    direction: rtl;
    text-align: right;
}

.new-arrival-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px var(--shadow-md);
}

.new-arrival-image {
    width: 100%;
    aspect-ratio: 1;
    overflow: hidden;
    cursor: pointer;
    background-color: var(--light);
    position: relative;
}

@supports not (aspect-ratio: 1) {
    .new-arrival-image {
        padding-top: 100%;
        height: 0;
    }
}

.new-arrival-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.new-arrival-info {
    padding: 8px;
    text-align: right;
}

.new-arrival-title {
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    cursor: pointer;
}

.new-arrival-price {
    font-size: 0.85rem;
    font-weight: 800;
    color: var(--primary);
}

.new-badge {
    position: absolute;
    top: 5px;
    right: 5px;
    background: #000;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 3px 8px;
    z-index: 5;
    text-transform: uppercase;
}

/* Pottery Barn Style Square Categories */
.categories-section {
    background-color: var(--background);
    padding: 40px 0;
    margin-bottom: 20px;
}

.categories {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 20px;
    justify-content: center;
}

@media (max-width: 576px) {
    .categories {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
    }

    .category-card h3 {
        font-size: 0.9rem;
        word-break: break-word;
    }
}

.category-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: var(--transition);
    width: 100%;
}

.category-img-container {
    width: 100%;
    aspect-ratio: 1;
    overflow: hidden;
    background: var(--light-gray);
    position: relative;
    /* For absolute centering fallback */
}

@supports not (aspect-ratio: 1) {
    .category-img-container {
        padding-top: 100%;
        height: 0;
    }
}

.category-img,
.category-img-placeholder {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
    position: absolute;
    top: 0;
    left: 0;
}

.category-card:hover .category-img {
    transform: scale(1.05);
}

.category-card h3 {
    font-size: 1.1rem;
    font-weight: 500;
    margin: 0;
    color: var(--dark);
    text-align: center;
    font-family: var(--font-body);
}

.category-card.active h3 {
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 8px;
}

/* Products Section */
.products-section {
    padding: 20px 0;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 20px;
}

@media (max-width: 768px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    .product-title {
        font-size: 1.05rem;
        /* Better readability on mobile */
        white-space: normal;
        /* Allow wrapping for multi-line titles */
        height: 2.8em;
        /* Force 2 lines height */
        display: -webkit-box;
        -webkit-line-clamp: 2;
        line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .product-price {
        font-size: 1.2rem;
    }

    .add-to-cart {
        font-size: 0.95rem;
        padding: 12px 5px;
    }
}

@media (max-width: 480px) {
    .products-grid {
        gap: 10px;
    }

    .add-to-cart {
        font-size: 1rem;
    }
}

.no-products {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    background: var(--background);
    border-radius: 8px;
    color: #666;
    font-size: 1.1rem;
    box-shadow: var(--shadow-sm);
}

.product-card {
    border: none;
    box-shadow: none;
    background: transparent;
    transition: var(--transition);
    overflow: hidden;
    position: relative;
}

.product-card:hover {
    transform: translateY(-5px);
}

.product-image {
    position: relative;
    width: 100%;
    aspect-ratio: 1;
    overflow: hidden;
    background: linear-gradient(45deg, var(--light), var(--background));
    cursor: pointer;
}

@supports not (aspect-ratio: 1) {
    .product-image {
        padding-top: 100%;
        height: 0;
        min-height: 250px;
    }
}

.product-image img {
    display: block;
    max-width: 100%;
}

.image-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    transition: transform 0.5s ease;
    direction: ltr;
}

.image-slide {
    width: 100%;
    height: 100%;
    flex-shrink: 0;
    overflow: hidden;
}

.image-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
    will-change: transform;
}

.product-card:hover .image-slide img {
    transform: scale(1.05);
}

/* أزرار التمرير للصور */
.image-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(255, 255, 255, 0.9);
    color: var(--primary);
    border: 1px solid var(--light-gray);
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 3;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.product-image:hover .image-nav {
    opacity: 1;
}

.image-nav.prev {
    right: 10px;
}

.image-nav.next {
    left: 10px;
}

.image-nav:hover {
    background-color: var(--primary);
    color: white;
}

/* إضافة مؤشر الصور المتعددة */
.image-indicator {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 5px;
    z-index: 3;
}

.image-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.7);
    border: 1px solid var(--primary);
    cursor: pointer;
    transition: var(--transition);
}

.image-dot.active {
    background-color: var(--primary);
    transform: scale(1.2);
}

.product-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    border-radius: 4px;
    font-size: 0.65rem;
    padding: 3px 8px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: var(--background);
    z-index: 2;
    text-transform: uppercase;
}

.product-info {
    padding: 12px 5px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.product-category {
    font-size: 0.75rem;
    color: var(--primary);
    font-weight: 400;
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.product-title {
    font-size: 0.95rem;
    margin-bottom: 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 600;
    color: var(--dark);
    cursor: pointer;
    transition: var(--transition);
    line-height: 1.4;
}

.product-title:hover {
    color: var(--primary);
}

.product-description {
    display: none;
    color: var(--gray);
    font-size: 0.9rem;
    margin-bottom: 15px;
    line-height: 1.5;
    flex-grow: 1;
}

.product-price {
    font-size: 1.1rem;
    color: var(--primary);
    font-weight: 700;
    margin-bottom: 12px;
}

.product-id {
    display: none;
    font-size: 0.8rem;
    color: var(--gray);
    margin-bottom: 10px;
    direction: ltr;
    text-align: left;
}

.product-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
}

/* Quantity Controls - Compact */
.quantity-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border: 1px solid var(--light-gray);
    padding: 6px 12px;
    margin-bottom: 12px;
    border-radius: 50px;
    background-color: var(--light);
}

.quantity-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--gray);
}

.quantity-controls {
    display: flex;
    align-items: center;
    gap: 12px;
}

.qty-btn {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 1px solid var(--primary);
    background: white;
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    font-size: 1rem;
    font-weight: bold;
}

.qty-btn:hover {
    background-color: var(--primary);
    color: white;
}

.qty-value {
    font-weight: 700;
    min-width: 25px;
    text-align: center;
    font-size: 1rem;
    color: var(--dark);
}

.add-to-cart {
    border-radius: 20px;
    padding: 10px;
    font-size: 0.85rem;
    /* background: linear-gradient(135deg, var(--primary), var(--secondary));*/
    background-color: var(--primary);
    color: var(--background);
    border: none;
    width: 100%;
    font-weight: 700;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: center;
}

.add-to-cart:hover {
    /*background: linear-gradient(135deg, var(--secondary), var(--primary));
   */
    transform: translateY(-2px);
    background-color: var(--secondary);
    box-shadow: 0 4px 12px var(--shadow-gold);
}

.add-to-cart.selected {
    background: var(--accent);
}

.add-to-cart.selected:hover {
    background: var(--secondary);
}

/* WhatsApp Send Button */
.whatsapp-send-container {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 200;
}

.whatsapp-send-btn {
    background: linear-gradient(135deg, #0baf9c, #10423c);
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 6px 20px rgba(78, 97, 85, 0.4);
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.4s ease;
}

.whatsapp-send-btn.show {
    opacity: 1;
    transform: translateY(0);
}

.whatsapp-send-btn:hover {
    background: linear-gradient(135deg, #128C7E, #0D6B5C);
    transform: scale(1.05);
    box-shadow: 0 8px 25px rgba(37, 211, 102, 0.6);
}

.whatsapp-send-btn i {
    font-size: 1.3rem;
}

.selected-count {
    background-color: white;
    color: #25D366;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    margin-right: 5px;
    font-size: 0.9rem;
}

/* Image Modal */
.image-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(44, 24, 16, 0.9);
    z-index: 10000;
    justify-content: center;
    align-items: center;
}

.image-modal.active {
    display: flex;
}

.modal-content {
    max-width: 90%;
    max-height: 90%;
    position: relative;
}

.modal-content img {
    width: 100%;
    height: auto;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 8px;
}

.close-modal {
    position: absolute;
    top: -40px;
    left: 0;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    background: none;
    border: none;
}

/* Product Details Modal */
.product-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    padding: 20px;
    backface-visibility: hidden;
    perspective: 1000px;
}

.product-modal.active {
    display: flex;
}

.product-modal-content {
    background-color: white;
    border-radius: 12px;
    width: 100%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 20px 40px rgba(15, 17, 21, 0.1);
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    backface-visibility: hidden;
    transform: translateZ(0);
    will-change: transform;
}

.product-modal-header {
    padding: 20px;
    border-bottom: 1px solid var(--light-gray);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 5;
    background: var(--background);
}

.product-modal-header h2 {
    font-size: 1.6rem;
    color: var(--dark);
    margin: 0;
}

.close-product-modal {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--gray);
    cursor: pointer;
    transition: var(--transition);
}

.close-product-modal:hover {
    color: var(--primary);
    transform: rotate(90deg);
}

.product-modal-body {
    padding: 25px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.product-modal-image {
    border-radius: 12px;
    overflow: hidden;
    height: 350px;
    position: relative;
    background: linear-gradient(45deg, var(--light), var(--background));
}

.modal-image-container {
    width: 100%;
    height: 100%;
    display: flex;
    transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    direction: ltr;
}

.modal-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    flex-shrink: 0;
}

.modal-image-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(255, 255, 255, 0.9);
    color: var(--primary);
    border: 1px solid var(--light-gray);
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 3;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.modal-image-nav:hover {
    opacity: 1;
    background-color: var(--primary);
    color: white;
}

.modal-image-nav.prev {
    right: 10px;
}

.modal-image-nav.next {
    left: 10px;
}

.modal-image-indicator {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 3;
}

.modal-image-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.7);
    border: 1px solid var(--primary);
    cursor: pointer;
    transition: var(--transition);
}

.modal-image-dot.active {
    background-color: var(--primary);
    transform: scale(1.2);
}

.product-modal-details h3 {
    font-size: 1.8rem;
    margin-bottom: 15px;
    color: var(--dark);
}

.product-modal-category {
    color: var(--primary);
    font-weight: 600;
    margin-bottom: 10px;
    display: inline-block;
    background-color: var(--light);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.9rem;
}

.product-modal-price {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary);
    margin: 15px 0;
}

.product-modal-description {
    color: var(--dark);
    line-height: 1.7;
    margin-bottom: 20px;
    font-size: 1.05rem;
}

.product-modal-id {
    color: var(--gray);
    margin-bottom: 20px;
    font-size: 0.95rem;
    direction: ltr;
    text-align: left;
}

.product-modal-actions {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

/* Loading Spinner */
.loading-spinner {
    text-align: center;
    padding: 30px;
    display: none;
}

.spinner {
    border: 4px solid rgba(139, 69, 19, 0.1);
    border-radius: 50%;
    border-top: 4px solid var(--primary);
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Footer */
footer {
    background: linear-gradient(135deg, var(--dark), var(--primary));
    color: white;
    padding: 30px 0 15px;
    margin-top: 30px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    margin-bottom: 15px;
}

.footer-column h3 {
    font-size: 1.2rem;
    margin-bottom: 10px;
    color: white;
    position: relative;
    padding-bottom: 5px;
}

.footer-column h3::after {
    content: '';
    position: absolute;
    right: 0;
    bottom: 0;
    width: 40px;
    height: 3px;
    background-color: var(--accent);
}

.footer-column ul {
    list-style: none;
}

.footer-column ul li {
    margin-bottom: 8px;
}

.footer-column ul li a {
    color: var(--light-gray);
    text-decoration: none;
    transition: var(--transition);
    font-size: 0.95rem;
}

.footer-column ul li a:hover {
    color: white;
    padding-right: 8px;
}

.contact-info {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    color: var(--light-gray);
    font-size: 0.95rem;
}

.contact-info i {
    color: var(--accent);
}

.copyright {
    text-align: center;
    padding-top: 15px;
    border-top: 1px solid rgba(245, 230, 211, 0.3);
    color: var(--light-gray);
    font-size: 0.85rem;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .container {
        padding: 0 15px;
    }

    .product-modal-body {
        gap: 25px;
    }
}

@media (max-width: 992px) {
    .nav-links {
        gap: 15px;
    }

    .nav-links a {
        font-size: 0.95rem;
    }

    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }

    .product-modal-body {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .product-modal-image {
        height: 300px;
    }
}

@media (max-width: 768px) {
    .header-container {
        padding: 5px 10px;
    }

    .mobile-menu-btn {
        display: block;
    }

    nav#main-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--background);
        padding: 10px;
        border-bottom: 1px solid #eee;
        z-index: 999;
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    }

    nav#main-nav.active {
        display: block;
    }

    .nav-links {
        flex-direction: column;
        gap: 5px;
        text-align: center;
    }

    .nav-links a {
        font-size: 0.9rem;
        padding: 8px 0;
        border-bottom: 1px solid #f9f9f9;
        width: 100%;
    }

    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        padding: 0 10px;
    }

    .category-img,
    .category-img-placeholder {
        width: 65px;
        height: 65px;
    }

    .category-card h3 {
        font-size: 0.75rem;
    }

    .hero-slider-section {
        height: 250px;
    }

    .hero {
        padding: 15px 10px;
        margin-bottom: 5px;
    }

    .hero h1 {
        font-size: 1.4rem;
        margin-bottom: 5px;
    }

    .hero p {
        font-size: 0.8rem;
        margin-bottom: 10px;
    }
}

/* Ad Card Shein Style Fixes & Reponsive */
.ad-card-section {
    margin: 5px 0 15px;
}

.ad-card {
    background: var(--background)fff;
    color: #111;
    padding: 0;
    border-radius: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 12px var(--shadow-sm);
    gap: 0;
    transition: var(--transition);
    border: 1px solid var(--light-gray);
    position: relative;
    overflow: hidden;
    min-height: 100px;
}

.ad-card::before {
    content: 'تمور ومكسرات';
    position: absolute;
    top: 5px;
    left: 10px;
    font-size: 2rem;
    font-weight: 900;
    color: rgba(15, 17, 21, 0.03);
    letter-spacing: 3px;
    pointer-events: none;
    line-height: 1;
}

.ad-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px var(--shadow-gold);
    border-color: var(--primary);
}

.ad-card-content {
    flex-grow: 1;
    padding: 15px 20px;
    z-index: 2;
    border-right: 4px solid var(--primary);
}

.ad-card-title {
    font-size: 1.1rem;
    font-weight: 900;
    margin-bottom: 5px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--dark);
    text-transform: uppercase;
}

.ad-card-title i {
    color: var(--accent);
    font-size: 1.3rem;
}

.ad-card-text {
    font-size: 0.85rem;
    color: var(--gray);
    line-height: 1.4;
    max-width: 550px;
    font-weight: 500;
}

.ad-card-action {
    flex-shrink: 0;
    padding: 15px 20px;
    z-index: 2;
    background: var(--light);
    height: 100%;
    display: flex;
    align-items: center;
}

.ad-whatsapp-btn {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: var(--background);
    padding: 10px 20px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(15, 17, 21, 0.1);
    letter-spacing: 0.5px;
    font-size: 0.85rem;
    white-space: nowrap;
}

.ad-whatsapp-btn:hover {
    background: linear-gradient(135deg, var(--secondary), var(--primary));
    transform: scale(1.02) translateY(-2px);
    color: var(--background);
    box-shadow: 0 6px 16px var(--shadow-gold);
}

.ad-whatsapp-btn i {
    font-size: 1.4rem;
    color: var(--background)fff;
}

@media (max-width: 992px) {
    .ad-card {
        flex-direction: column;
        text-align: center;
    }

    .ad-card-content {
        padding: 15px 10px;
        border-right: none;
        border-bottom: 3px solid var(--primary);
        width: 100%;
    }

    .ad-card-title {
        justify-content: center;
        font-size: 1.1rem;
    }

    .ad-card-text {
        margin: 0 auto;
    }

    .ad-card-action {
        width: 100%;
        padding: 10px;
        justify-content: center;
        background: var(--background);
    }

    .ad-whatsapp-btn {
        width: 100%;
        justify-content: center;
    }

    .ad-card::before {
        display: none;
    }
}

@media (max-width: 576px) {
    .container {
        padding: 0 8px;
    }

    .hero {
        padding: 30px 15px;
        border-radius: 0;
    }

    .products-grid {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .product-card {
        max-width: 100%;
    }

    .product-info {
        padding: 8px 4px;
    }

    .product-title {
        font-size: 0.85rem;
    }

    .product-price {
        font-size: 0.95rem;
    }

    .add-to-cart {
        padding: 8px 5px;
        font-size: 0.75rem;
    }

    .category-card {
        min-width: auto;
        padding: 6px 12px;
        gap: 6px;
    }

    .product-modal-content {
        margin: 10px;
    }

    .product-modal-header {
        padding: 15px;
    }

    .product-modal-body {
        padding: 20px;
    }

    .product-modal-actions {
        flex-direction: column;
    }

    .whatsapp-send-btn {
        padding: 12px 15px;
        font-size: 0.85rem;
        bottom: 10px;
        left: 10px;
    }

    .selected-count {
        width: 22px;
        height: 22px;
        font-size: 0.8rem;
    }

    .ad-card-content {
        padding: 20px 15px;
    }

    .ad-card-title {
        font-size: 1.3rem;
    }
}

@media (max-width: 400px) {
    .products-grid {
        gap: 5px;
    }

    .container {
        padding: 0 5px;
    }

    .logo span {
        font-size: 1.3rem;
    }

    .search-box input {
        width: 130px;
        padding: 7px 30px 7px 12px;
    }

    .search-box input:focus {
        width: 150px;
    }

    .hero h1 {
        font-size: 1.6rem;
    }

    .hero p {
        font-size: 0.95rem;
    }

    .category-card {
        min-width: auto;
        padding: 5px 10px;
        gap: 5px;
    }

    .category-icon {
        font-size: 1.4rem;
    }

    .category-card h3 {
        font-size: 0.9rem;
    }
}

/* Breaking News Ticker Styles */
.news-ticker-bar {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: var(--light);
    width: 100%;
    height: 40px;
    display: flex;
    align-items: center;
    overflow: hidden;
    position: relative;
    box-shadow: 0 2px 5px rgba(15, 17, 21, 0.1);
    z-index: 900;
    direction: ltr;
}

.ticker-label {
    background: linear-gradient(135deg, var(--dark), var(--primary));
    color: var(--light);
    height: 100%;
    padding: 0 15px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 800;
    font-size: 0.85rem;
    position: relative;
    z-index: 10;
    flex-shrink: 0;
}

.ticker-label i {
    font-size: 1rem;
    color: var(--accent);
}

.ticker-track-container {
    flex-grow: 1;
    overflow: hidden;
    height: 100%;
    display: flex;
    align-items: center;
}

.ticker-track {
    display: flex;
    gap: 80px;
    white-space: nowrap;
    animation: ticker-scroll 25s linear infinite;
    will-change: transform;
}

.ticker-item {
    display: inline-flex;
    align-items: center;
    font-weight: 600;
    font-size: 0.9rem;
    padding: 0 10px;
    direction: rtl;
}

.ticker-item a {
    color: inherit;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: all 0.2s ease;
}

.ticker-item a:hover {
    text-decoration: underline;
    color: var(--accent);
}

.ticker-item span {
    color: inherit;
}

.ticker-item i {
    font-size: 0.75rem;
}

.news-ticker-bar:hover .ticker-track {
    animation-play-state: paused;
}

@keyframes ticker-scroll {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

/* Hero Slider Styles */
.hero-slider-section {
    position: relative;
    width: 100%;
    height: 350px;
    overflow: hidden;
    direction: ltr;
    background: linear-gradient(135deg, var(--light), var(--light-gray));
}

@media (max-width: 768px) {
    .hero-slider-section {
        height: 220px;
    }
}

.hero-slider-track {
    display: flex;
    width: 100%;
    height: 100%;
    transition: transform 0.5s ease-in-out;
}

.hero-slide {
    min-width: 100%;
    height: 100%;
    position: relative;
}

.hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.hero-slide-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;

    pointer-events: none;
}

.hero-slide-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: white;
    width: 90%;
    max-width: 800px;
    z-index: 2;
    text-shadow: 0 2px 10px rgba(44, 24, 16, 0.3);
    direction: rtl;
}

.hero-slide-content h2 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 10px;
    color: var(--background);
}

.hero-slide-content p {
    font-size: 1.1rem;
    margin-bottom: 20px;
    opacity: 0.9;
}

.slider-cta {
    display: inline-block;
    padding: 10px 25px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: var(--background);
    font-weight: 700;
    text-decoration: none;
    border-radius: 25px;
    transition: all 0.3s;
}

.slider-cta:hover {
    background: linear-gradient(135deg, var(--secondary), var(--primary));
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--shadow-gold);
}

.slider-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 45px;
    height: 45px;
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s;
}

.slider-arrow:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-50%) scale(1.1);
}

.slider-arrow.prev {
    left: 20px;
}

.slider-arrow.next {
    right: 20px;
}

.slider-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 10;
}

.slider-dot {
    width: 10px;
    height: 10px;
    background: rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s;
}

.slider-dot.active {
    background: var(--primary);
    transform: scale(1.3);
}

@media (max-width: 768px) {
    .hero-slide-content h2 {
        font-size: 1.5rem;
    }

    .slider-arrow {
        width: 35px;
        height: 35px;
    }
}

/* Mobile Nav Toggle & Side Nav */
.mobile-nav-toggle {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--dark);
    display: none;
    align-items: center;
    padding: 0 10px;
}

.mobile-side-nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 85%;
    max-width: 320px;
    height: 100vh;
    background: var(--light);
    z-index: 2000;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
    transition: right 0.3s ease-in-out;
    display: flex;
    flex-direction: column;
}

.mobile-side-nav.active {
    right: 0;
}

.mobile-nav-header {
    padding: 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.pb-logo-text-small {
    font-family: var(--font-heading);
    font-size: 20px;
    font-weight: 700;
    letter-spacing: 2px;
}

.close-mobile-nav {
    background: none;
    border: none;
    font-size: 32px;
    cursor: pointer;
}

.mobile-nav-body {
    padding: 20px;
    overflow-y: auto;
}

.mobile-links {
    list-style: none;
    padding: 0;
    margin: 0;
    text-align: right;
}

.mobile-links li {
    margin-bottom: 20px;
}

.mobile-links a {
    text-decoration: none;
    color: var(--dark);
    font-size: 18px;
    font-weight: 500;
}

.mobile-links .section-title {
    font-weight: 700;
    text-transform: uppercase;
    font-size: 12px;
    color: #999;
    margin-bottom: 10px;
}

.mobile-links .divider {
    height: 1px;
    background: #eee;
    margin: 20px 0;
}

@media (max-width: 991px) {
    .mobile-nav-toggle {
        display: flex;
    }

    .primary-nav,
    .header-search,
    .action-item.d-none,
    .secondary-nav {
        display: none !important;
    }

    .brand-header {
        padding: 15px 0;
    }

    .header-grid {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .header-actions {
        order: 1;
        gap: 15px;
    }

    .header-logo {
        order: 2;
        flex: 1;
        text-align: center;
    }

    .pb-logo-text {
        font-size: 20px;
        letter-spacing: 2px;
        white-space: nowrap;
    }

    .action-item span {
        display: none;
    }

    .action-item i {
        font-size: 22px;
    }

    .promo-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
        padding: 0 10px;
    }

    .promo-item {
        border-right: none;
        padding: 15px 5px;
        border-bottom: 1px solid #eee;
        font-size: 0.95rem;
        /* Increased for readability */
        font-weight: 500;
    }

    .promo-item i {
        font-size: 1.1rem;
        margin-bottom: 5px;
    }

    .promo-item:nth-child(even) {
        border-left: 1px solid #eee;
    }

    .promo-item:nth-last-child(-n+2) {
        border-bottom: none;
    }
}

/* WhatsApp Float Button */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: #25D366;
    color: white;
    padding: 15px 25px;
    border-radius: 50px;
    display: none;
    align-items: center;
    gap: 12px;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.3);
    z-index: 1000;
    border: none;
    font-weight: 600;
    transition: var(--transition);
}

.whatsapp-float.show {
    display: flex;
}

.whatsapp-float:hover {
    transform: translateY(-5px);
    background: #128C7E;
}

.selected-count {
    background: white;
    color: #25D366;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: bold;
}

/* Cart Drawer */
.pb-cart-drawer {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    max-width: 400px;
    height: 100vh;
    background: white;
    z-index: 3000;
    transition: right 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    display: flex;
    flex-direction: column;
    box-shadow: -5px 0 25px rgba(0, 0, 0, 0.1);
}

.pb-cart-drawer.active {
    right: 0;
}

.drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.drawer-overlay.active {
    opacity: 1;
    visibility: visible;
}

.drawer-header {
    padding: 25px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.drawer-header h3 {
    margin: 0;
    font-size: 1.25rem;
    font-family: var(--font-heading);
}

#close-cart-drawer {
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: #999;
}

.drawer-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.drawer-item {
    display: flex;
    gap: 15px;
    padding-bottom: 20px;
    border-bottom: 1px solid #f5f5f5;
    margin-bottom: 20px;
    position: relative;
    text-align: right;
}

.item-img {
    width: 80px;
    height: 80px;
    background: #f9f9f9;
}

.item-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.item-details h4 {
    font-size: 0.95rem;
    margin: 0 0 5px 0;
    font-weight: 500;
}

.item-price {
    display: block;
    color: var(--dark);
    font-weight: 600;
    margin-bottom: 10px;
}

.remove-item {
    position: absolute;
    top: 0;
    left: 0;
    background: none;
    border: none;
    font-size: 1.2rem;
    color: #ccc;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.item-qty-control {
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid #eee;
    width: fit-content;
    padding: 2px 10px;
    border-radius: 4px;
}

.item-qty-control button {
    background: none;
    border: none;
    cursor: pointer;
    color: #666;
    padding: 5px;
}

.drawer-footer {
    padding: 25px;
    border-top: 1px solid #eee;
    background: #fff;
}

.total-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
    font-weight: bold;
    font-size: 1.1rem;
}

.total-price {
    color: var(--dark);
}

.whatsapp-checkout-btn {
    width: 100%;
    background: #25D366;
    color: white;
    border: none;
    padding: 15px;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 1rem;
    transition: var(--transition);
}

.whatsapp-checkout-btn:hover {
    background: #128C7E;
}

.empty-cart-msg {
    text-align: center;
    padding: 50px 0;
    color: #999;
}

.empty-cart-msg i {
    font-size: 3rem;
    margin-bottom: 15px;
    color: #eee;
}

/* News Ticker Mobile Readability */
@media (max-width: 768px) {
    .news-ticker-bar {
        padding: 10px 0;
    }

    .ticker-label {
        padding: 0 10px;
        font-size: 0.75rem;
    }

    .ticker-item {
        font-size: 0.95rem;
        /* Increased for mobile users */
        font-weight: 500;
        padding: 0 15px;
    }
}

/* Header Polish & Spacing Fix */
.pb-search-form {
    margin-right: auto !important;
    margin-left: 0 !important;
}

.header-actions {
    justify-content: flex-start !important;
}