/**
 * Arwad Modules Frontend CSS
 * Consolidated from inline <style> blocks across all modules.
 * Loaded as a single external file to reduce HTML bloat.
 *
 * Modules included:
 *   1. ArwadButton
 *   2. ArwadBlog
 *   3. ShopHero
 *   4. CategoryPills
 *   5. ProductsGrid (includes shared FeaturedBooks card styles)
 *   6. ArwadBreadcrumb
 *   7. FeaturedBooks
 *   8. RelatedProducts
 */

/* ==========================================================================
   1. ARWAD BUTTON
   ========================================================================== */

.arwad_button.et_pb_button:after,
.arwad_button.et_pb_button:before {
    display: none !important;
    content: none !important;
}

.arwad_button.arwad_button--accent:hover {
    transform: translateY(-3px) !important;
    box-shadow: 0 15px 40px rgba(165, 64, 85, 0.4) !important;
}

.arwad_button.arwad_button--ghost:hover {
    background: #42164B !important;
    background-color: #42164B !important;
    color: #ffffff !important;
    border-color: #42164B !important;
    transform: translateY(-2px) !important;
}

.arwad_button .arwad_button__arrow {
    transition: transform 0.3s ease;
}

.arwad_button:hover .arwad_button__arrow {
    transform: translateX(-4px);
}

[dir="rtl"] .arwad_button .arwad_button__arrow {
    transform: scaleX(-1);
}

[dir="rtl"] .arwad_button:hover .arwad_button__arrow {
    transform: scaleX(-1) translateX(4px);
}

/* ==========================================================================
   2. ARWAD BLOG
   ========================================================================== */

.arwad_blog_card {
    background: var(--arwad-text-light);
    border-radius: var(--arwad-radius-md);
    overflow: hidden;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: all var(--arwad-transition-slow);
}

.arwad_blog_card:hover {
    transform: translateY(-4px) !important;
    box-shadow: 0 20px 25px rgba(0, 0, 0, 0.15) !important;
}

.arwad_blog_card:hover .arwad_blog_card__image {
    transform: scale(1.05) !important;
}

.arwad_blog_card__category {
    display: inline-block;
    padding: 4px 12px;
    background: var(--arwad-bg-cream);
    color: var(--arwad-primary);
    font-family: var(--arwad-font-heading);
    font-size: 12px;
    font-weight: 600;
    border-radius: 4px;
    margin-bottom: 12px;
}

.arwad_blog_card__title {
    font-family: var(--arwad-font-heading);
    font-size: 18px;
    font-weight: 700;
    color: var(--arwad-text-primary);
    margin: 0 0 8px 0;
    line-height: 1.4;
}

.arwad_blog_card__title a {
    color: inherit;
    text-decoration: none;
}

.arwad_blog_card:hover .arwad_blog_card__title,
.arwad_blog_card__title a:hover {
    color: var(--arwad-primary) !important;
}

.arwad_blog_card__excerpt {
    font-size: 14px;
    color: var(--arwad-text-secondary);
    line-height: 1.6;
    margin: 0 0 16px 0;
}

.arwad_blog_card__meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 16px;
    border-top: 1px solid var(--arwad-border-light);
}

.arwad_blog_card__date {
    font-family: var(--arwad-font-heading);
    font-size: 13px;
    color: var(--arwad-text-muted);
}

.arwad_blog_card__read-more {
    font-family: var(--arwad-font-heading);
    font-size: 14px;
    font-weight: 600;
    color: var(--arwad-accent);
    text-decoration: none;
    transition: color var(--arwad-transition-slow);
}

.arwad_blog_card__read-more:hover {
    color: var(--arwad-primary) !important;
}

.arwad_blog_card__image-wrapper {
    aspect-ratio: 5/2 !important;
    max-height: 140px;
}

.arwad_blog_card__image-wrapper img,
.arwad_blog_card__image-wrapper > div {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.arwad_blog__grid {
    gap: var(--arwad-space-6) !important;
}

@media (max-width: 1024px) {
    .arwad_blog__grid {
        grid-template-columns: repeat(3, 1fr) !important;
    }
}

@media (max-width: 768px) {
    .arwad_blog__grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: var(--arwad-space-4) !important;
    }

    .arwad_blog_card__title {
        font-size: 15px;
    }

    .arwad_blog_card__excerpt {
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .arwad_blog__grid {
        grid-template-columns: 1fr !important;
    }
}

/* ==========================================================================
   3. SHOP HERO
   ========================================================================== */

.arwad_shop_hero {
    width: 100%;
    border: none !important;
}

.shop-hero {
    position: relative;
    padding: 48px 0 40px;
    overflow: hidden;
}

.shop-hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.shop-hero-gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--arwad-bg-light) 0%, var(--arwad-bg-cream) 50%, var(--arwad-bg-warm) 100%);
}

.shop-hero-pattern {
    position: absolute;
    inset: 0;
    opacity: 0.04;
    background-image:
        radial-gradient(circle at 20% 30%, var(--arwad-primary) 1px, transparent 1px),
        radial-gradient(circle at 80% 70%, var(--arwad-accent) 1px, transparent 1px);
    background-size: 50px 50px;
}

.shop-hero-glow {
    position: absolute;
    width: 600px;
    height: 600px;
    left: -150px;
    top: -200px;
    background: radial-gradient(circle, rgba(var(--arwad-accent-rgb), 0.12) 0%, transparent 60%);
    pointer-events: none;
}

.shop-hero .container {
    position: relative;
    z-index: 1;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.shop-hero .breadcrumb {
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: var(--arwad-font-heading);
    font-size: 14px;
    direction: rtl;
}

.shop-hero .breadcrumb a {
    color: var(--arwad-text-secondary);
    text-decoration: none;
    transition: color var(--arwad-transition-slow);
}

.shop-hero .breadcrumb a:hover {
    color: var(--arwad-primary);
}

.shop-hero .breadcrumb-separator {
    color: var(--arwad-text-muted);
    margin: 0 4px;
}

.shop-hero .breadcrumb-current {
    color: var(--arwad-primary);
    font-weight: 600;
}

.shop-hero-content {
    text-align: center;
    margin-bottom: 40px;
    animation: shopHeroFadeUp 0.6s ease-out;
}

.shop-hero-title {
    font-family: var(--arwad-font-heading);
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 700;
    margin: 0 0 16px 0;
    background: linear-gradient(135deg, var(--arwad-primary) 0%, var(--arwad-accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
}

.shop-hero-desc {
    font-family: var(--arwad-font-heading);
    font-size: 18px;
    color: var(--arwad-text-secondary);
    max-width: 500px;
    margin: 0 auto;
    line-height: 1.6;
}

@keyframes shopHeroFadeUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 768px) {
    .shop-hero {
        padding: 32px 0 24px;
    }

    .shop-hero-content {
        margin-bottom: 24px;
    }

    .shop-hero-title {
        font-size: clamp(2rem, 6vw, 2.5rem);
    }

    .shop-hero-desc {
        font-size: 16px;
    }
}

/* ==========================================================================
   4. CATEGORY PILLS
   ========================================================================== */

.arwad_category_pills {
    width: 100%;
}

.category-pills {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin-bottom: 40px;
}

.category-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: var(--arwad-text-light);
    border: 1px solid var(--arwad-border-light);
    border-radius: 50px;
    font-family: var(--arwad-font-heading);
    font-size: 14px;
    font-weight: 500;
    color: var(--arwad-primary);
    text-decoration: none;
    cursor: pointer;
    transition: all var(--arwad-transition-slow);
}

.category-pill:hover {
    background: var(--arwad-primary);
    color: var(--arwad-text-light);
    border-color: var(--arwad-primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(var(--arwad-primary-rgb), 0.2);
}

.category-pill.active {
    background: var(--arwad-primary);
    color: var(--arwad-text-light);
    border-color: transparent;
}

.pill-icon {
    font-size: 16px;
}

@media (max-width: 768px) {
    .category-pill {
        padding: 10px 18px;
        font-size: 13px;
    }
}

/* ==========================================================================
   5. PRODUCTS GRID (includes shared card styles)
   ========================================================================== */

.arwad_products_grid {
    width: 100%;
    font-family: var(--arwad-font-heading);
}

.shop-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--arwad-text-light);
    padding: var(--arwad-space-4) var(--arwad-space-6);
    border-radius: var(--arwad-radius-md);
    margin-bottom: var(--arwad-space-6);
    border: 1px solid var(--arwad-border-light);
    flex-wrap: wrap;
    gap: var(--arwad-space-4);
}

.results-count {
    font-size: var(--arwad-text-sm);
    color: var(--arwad-text-secondary);
}

.results-count strong {
    color: var(--arwad-text-primary);
}

.toolbar-actions {
    display: flex;
    align-items: center;
    gap: var(--arwad-space-4);
}

.sort-dropdown {
    display: flex;
    align-items: center;
    gap: var(--arwad-space-2);
}

.sort-dropdown label {
    font-size: var(--arwad-text-sm);
    color: var(--arwad-text-muted);
}

.sort-dropdown select {
    padding: 8px 12px;
    border: 1px solid var(--arwad-border-light);
    border-radius: var(--arwad-radius-md);
    font-family: var(--arwad-font-heading);
    font-size: var(--arwad-text-sm);
    background: var(--arwad-text-light);
    cursor: pointer;
}

/* Filter toggle — hidden on desktop, full-width on mobile */
.filter-toggle-btn,
.mobile-filter-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    gap: var(--arwad-space-2);
    width: 100%;
    padding: 12px var(--arwad-space-4);
    background: var(--arwad-primary);
    color: var(--arwad-text-light) !important;
    border: none;
    border-radius: var(--arwad-radius-md);
    font-family: var(--arwad-font-heading);
    font-size: var(--arwad-text-sm);
    font-weight: var(--arwad-font-semibold);
    cursor: pointer;
    transition: all var(--arwad-transition-slow);
    margin-bottom: var(--arwad-space-4);
}

.filter-toggle-btn:hover,
.mobile-filter-toggle:hover {
    background: var(--arwad-primary-light);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(var(--arwad-primary-rgb), 0.3);
}

.filter-toggle-btn svg,
.mobile-filter-toggle svg {
    flex-shrink: 0;
}

@media (max-width: 992px) {
    .filter-toggle-btn,
    .mobile-filter-toggle {
        display: flex !important;
    }
}

.arwad-products-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--arwad-space-6);
}

.arwad-products-grid.products-grid--cols-2 {
    grid-template-columns: repeat(2, 1fr) !important;
}

.arwad-products-grid.products-grid--cols-3 {
    grid-template-columns: repeat(3, 1fr) !important;
}

.arwad-products-grid.products-grid--cols-4 {
    grid-template-columns: repeat(4, 1fr) !important;
}

.arwad-products-grid.products-grid--cols-5 {
    grid-template-columns: repeat(5, 1fr) !important;
}

.arwad-products-grid.is-list {
    grid-template-columns: 1fr !important;
}

/* --- Shared FeaturedBooks Card --- */

.featured-book-card {
    background: var(--arwad-text-light);
    border-radius: var(--arwad-radius-md);
    overflow: hidden;
    box-shadow: var(--arwad-shadow-md);
    transition: all var(--arwad-transition-slow);
}

.featured-book-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(var(--arwad-primary-rgb), 0.12);
}

.featured-book-card__image {
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 2/3;
    background: linear-gradient(135deg, var(--arwad-bg-primary) 0%, var(--arwad-bg-tertiary) 100%);
    overflow: hidden;
    position: relative;
}

.featured-book-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--arwad-transition-slow);
}

.featured-book-card:hover .featured-book-card__image img {
    transform: scale(1.05);
}

.featured-book-card__overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(var(--arwad-primary-rgb), 0.85) 0%, rgba(var(--arwad-accent-rgb), 0.85) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity var(--arwad-transition-slow);
    pointer-events: none;
    z-index: 10;
}

.featured-book-card__image:hover .featured-book-card__overlay {
    opacity: 1;
}

.featured-book-card__read-more {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    background: var(--arwad-text-light);
    color: var(--arwad-primary);
    font-family: var(--arwad-font-heading);
    font-size: var(--arwad-text-sm);
    font-weight: var(--arwad-font-semibold);
    border-radius: var(--arwad-radius-md);
    transform: translateY(10px);
    transition: transform var(--arwad-transition-slow);
}

.featured-book-card__image:hover .featured-book-card__read-more {
    transform: translateY(0);
}

.featured-book-card__new-badge {
    position: absolute;
    top: var(--arwad-space-3);
    left: var(--arwad-space-3);
    z-index: 5;
    padding: 4px 12px;
    background: var(--arwad-accent);
    color: var(--arwad-text-light);
    font-family: var(--arwad-font-heading);
    font-size: var(--arwad-text-xs);
    font-weight: var(--arwad-font-bold);
    border-radius: var(--arwad-radius-md);
}

.featured-book-card__body {
    padding: var(--arwad-space-4);
    display: flex;
    flex-direction: column;
    gap: var(--arwad-space-2);
}

.featured-book-card__badge {
    position: absolute;
    top: var(--arwad-space-3);
    right: var(--arwad-space-3);
    z-index: 5;
    padding: 4px 12px;
    background: var(--arwad-primary);
    color: var(--arwad-text-light);
    font-size: var(--arwad-text-xs);
    font-weight: var(--arwad-font-semibold);
    border-radius: var(--arwad-radius-md);
    font-family: var(--arwad-font-heading);
}

.featured-book-card__title {
    margin: 0;
    font-family: var(--arwad-font-heading);
    font-size: var(--arwad-text-base);
    font-weight: var(--arwad-font-bold);
    line-height: 1.4;
    color: var(--arwad-primary);
}

.featured-book-card__title a {
    color: inherit;
    text-decoration: none;
    transition: color var(--arwad-transition-slow);
}

.featured-book-card__title a:hover {
    color: var(--arwad-accent);
}

.featured-book-card__author {
    margin: 0;
    font-family: var(--arwad-font-heading);
    font-size: var(--arwad-text-sm);
    font-weight: var(--arwad-font-medium);
    color: var(--arwad-text-secondary);
    line-height: 1.4;
}

.featured-book-card__author a,
.featured-book-card__author .book-author-link {
    color: var(--arwad-text-secondary);
    text-decoration: none;
}

.featured-book-card__author a:hover,
.featured-book-card__author .book-author-link:hover {
    color: var(--arwad-accent);
}

.featured-book-card__price {
    font-family: var(--arwad-font-heading);
    font-size: var(--arwad-text-lg);
    font-weight: var(--arwad-font-bold);
    color: var(--arwad-accent);
}

.featured-book-card__price del {
    font-size: var(--arwad-text-sm);
    color: var(--arwad-text-muted);
    font-weight: var(--arwad-font-normal);
}

.featured-book-card__price ins {
    text-decoration: none;
}

.featured-book-card__stars {
    display: flex;
    align-items: center;
    gap: 1px;
    font-size: var(--arwad-text-base);
    line-height: 1;
    min-height: 1.25em;
}

.featured-book-card__stars .star-filled {
    color: var(--arwad-warm);
}

.featured-book-card__stars .star-empty {
    color: #d4d4d4;
}

.featured-book-card__stars .stars-count {
    font-size: var(--arwad-text-xs);
    color: var(--arwad-text-muted);
    margin-inline-start: var(--arwad-space-1);
    font-family: var(--arwad-font-heading);
}

.featured-book-card__divider {
    height: 1px;
    background: rgba(0, 0, 0, 0.08);
    width: 100%;
    margin: var(--arwad-space-2) 0;
}

.featured-book-card__footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.featured-book-card__cart-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--arwad-space-2);
    padding: 8px 14px;
    background: var(--arwad-primary);
    color: var(--arwad-text-light) !important;
    border-radius: var(--arwad-radius-md);
    border: none;
    text-decoration: none;
    cursor: pointer;
    transition: all var(--arwad-transition-slow);
    flex-shrink: 0;
    font-family: var(--arwad-font-heading);
    font-size: var(--arwad-text-xs);
    font-weight: var(--arwad-font-semibold);
    white-space: nowrap;
}

.featured-book-card__cart-btn:hover {
    background: var(--arwad-primary-light);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(var(--arwad-primary-rgb), 0.3);
    color: var(--arwad-text-light) !important;
}

.featured-book-card__cart-btn svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.featured-book-card__body .added_to_cart,
.featured-book-card .added_to_cart,
.featured-book-card__footer .added_to_cart {
    display: none !important;
}

.featured-book-card__image-placeholder {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    font-family: var(--arwad-font-heading);
    font-size: var(--arwad-text-lg);
    color: var(--arwad-text-muted);
}

.featured-books-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: var(--arwad-space-12) var(--arwad-space-6);
    color: var(--arwad-text-secondary);
    background: var(--arwad-bg-secondary);
    border-radius: var(--arwad-radius-md);
    border: 2px dashed var(--arwad-bg-tertiary);
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: var(--arwad-space-2);
    margin-top: var(--arwad-space-10);
    flex-wrap: wrap;
}

.page-btn {
    min-width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--arwad-border-light);
    border-radius: var(--arwad-radius-md);
    background: var(--arwad-text-light);
    font-family: var(--arwad-font-heading);
    font-size: var(--arwad-text-sm);
    color: var(--arwad-text-primary);
    cursor: pointer;
    transition: all var(--arwad-transition-base);
    text-decoration: none;
}

.page-btn:hover {
    border-color: var(--arwad-primary);
    color: var(--arwad-primary);
}

.page-btn.active {
    background: var(--arwad-primary);
    border-color: var(--arwad-primary);
    color: var(--arwad-text-light);
}

.page-btn[aria-disabled="true"] {
    opacity: 0.5;
    pointer-events: none;
}

.page-dots {
    color: var(--arwad-text-muted);
    padding: 0 var(--arwad-space-2);
}

/* ProductsGrid responsive */
@media (max-width: 1024px) {
    .arwad-products-grid,
    .arwad-products-grid[class*="products-grid--cols-"] {
        grid-template-columns: repeat(3, 1fr) !important;
    }
}



@media (max-width: 768px) {
    .arwad-products-grid,
    .arwad-products-grid[class*="products-grid--cols-"] {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: var(--arwad-space-4) !important;
    }

    .shop-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .toolbar-actions {
        justify-content: space-between;
    }

    .featured-book-card__body {
        padding: var(--arwad-space-3);
    }

    .featured-book-card__title {
        font-size: var(--arwad-text-sm);
    }

    .featured-book-card__price {
        font-size: var(--arwad-text-base);
    }

    .featured-book-card__cart-btn {
        padding: 6px 10px;
        font-size: 0.7rem;
    }

    .featured-book-card__cart-btn svg {
        width: 14px;
        height: 14px;
    }

    .featured-book-card__stars {
        font-size: var(--arwad-text-sm);
    }

    .featured-book-card__footer {
        gap: var(--arwad-space-2);
    }
}

@media (max-width: 480px) {
    .arwad-products-grid,
    .arwad-products-grid[class*="products-grid--cols-"] {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media (max-width: 420px) {
    .featured-book-card__footer {
        flex-direction: column;
        align-items: stretch;
    }

    .featured-book-card__cart-btn {
        justify-content: center;
        width: 100%;
    }
}

/* ==========================================================================
   6. ARWAD BREADCRUMB
   ========================================================================== */

.arwad_breadcrumb {
    width: 100%;
}

.arwad-breadcrumb-nav {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--arwad-font-heading);
    font-size: 14px;
    direction: rtl;
    margin-bottom: 24px;
}

.arwad-breadcrumb-home {
    color: var(--arwad-text-secondary);
    text-decoration: none;
    transition: color var(--arwad-transition-slow);
}

.arwad-breadcrumb-home:hover {
    color: var(--arwad-primary);
}

.arwad-breadcrumb-separator {
    color: var(--arwad-text-muted);
    margin: 0 4px;
}

.arwad-breadcrumb-current {
    color: var(--arwad-primary);
    font-weight: 600;
}

/* ==========================================================================
   7. FEATURED BOOKS (grid-specific overrides)
   ========================================================================== */

.arwad_featured_books {
    width: 100%;
}

.arwad-featured-books {
    width: 100%;
    font-family: var(--arwad-font-heading);
}

.featured-books-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--arwad-space-6);
}

@media (max-width: 1024px) {
    .featured-books-grid {
        grid-template-columns: repeat(3, 1fr) !important;
    }
}

@media (max-width: 768px) {
    .featured-books-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: var(--arwad-space-4) !important;
    }
}

@media (max-width: 480px) {
    .featured-books-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

/* ==========================================================================
   8. RELATED PRODUCTS
   ========================================================================== */

.arwad_related_products {
    width: 100%;
}

.arwad_related_products .arwad-related-products-section > h2 {
    margin: 0 0 var(--arwad-space-6);
    color: var(--arwad-primary);
    font-family: var(--arwad-font-heading);
    font-size: var(--arwad-text-xl);
    font-weight: var(--arwad-font-bold);
}

.arwad_related_products .arwad-related-products-grid {
    display: grid !important;
    gap: var(--arwad-space-6) !important;
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
    direction: rtl !important;
    justify-content: start !important;
    justify-items: stretch !important;
}

/* Custom module cards use their own class so they don't inherit Woo loop layout rules. */
.arwad_related_products .arwad-related-products-grid > .arwad-related-product {
    float: none !important;
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
    min-width: 0 !important;
}

.arwad_related_products .arwad-related-products-grid.products-grid--cols-1 {
    grid-template-columns: 1fr;
}

.arwad_related_products .arwad-related-products-grid.products-grid--cols-2 {
    grid-template-columns: repeat(2, 1fr);
}

.arwad_related_products .arwad-related-products-grid.products-grid--cols-3 {
    grid-template-columns: repeat(3, 1fr);
}

.arwad_related_products .arwad-related-products-grid.products-grid--cols-4 {
    grid-template-columns: repeat(4, 1fr);
}

.arwad_related_products .arwad-related-products-grid.products-grid--cols-5 {
    grid-template-columns: repeat(5, 1fr);
}

.arwad_related_products .arwad-related-products-grid.products-grid--cols-6 {
    grid-template-columns: repeat(6, 1fr);
}

@media (max-width: 1024px) {
    .arwad_related_products .arwad-related-products-grid,
    .arwad_related_products .arwad-related-products-grid[class*="products-grid--cols-"] {
        grid-template-columns: repeat(3, 1fr) !important;
    }
}

@media (max-width: 768px) {
    .arwad_related_products .arwad-related-products-grid,
    .arwad_related_products .arwad-related-products-grid[class*="products-grid--cols-"] {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: var(--arwad-space-4) !important;
    }
}

@media (max-width: 480px) {
    .arwad_related_products .arwad-related-products-grid,
    .arwad_related_products .arwad-related-products-grid[class*="products-grid--cols-"] {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media (max-width: 420px) {
    .arwad_related_products .featured-book-card__footer {
        flex-direction: column;
        align-items: stretch;
    }

    .arwad_related_products .featured-book-card__cart-btn {
        justify-content: center;
        width: 100%;
    }
}

/* ==========================================================================
   CART NOTIFICATION ANIMATIONS (from FeaturedBooks footer script)
   ========================================================================== */

@keyframes slideInLeft {
    0% {
        transform: translateX(-100%);
        opacity: 0;
    }
    100% {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes fadeOut {
    0% {
        opacity: 1;
        transform: translateY(0);
    }
    100% {
        opacity: 0;
        transform: translateY(10px);
    }
}

/* ==========================================================================
   9. SHOP FILTERS  (matches Forminator form style from theme)
   ========================================================================== */

.arwad_shop_filters {
    width: 100%;
}

.arwad-shop-filters {
    width: 100%;
    font-family: var(--arwad-font-heading);
}

/* Sidebar container — matches .forminator-custom-form wrapper */
.shop-sidebar {
    background: var(--arwad-text-light);
    border-radius: var(--arwad-radius-md);
    padding: var(--arwad-space-8);
    height: fit-content;
    position: sticky;
    top: var(--arwad-space-12);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--arwad-border-light);
}

/* Header — title + actions */
.filter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--arwad-space-6);
    padding-bottom: var(--arwad-space-4);
    border-bottom: 1px solid var(--arwad-border-light);
}

.filter-header h3 {
    font-family: var(--arwad-font-heading);
    font-size: var(--arwad-text-base);
    font-weight: var(--arwad-font-bold);
    color: var(--arwad-text-primary);
    margin: 0;
}

.clear-filters {
    font-family: var(--arwad-font-heading);
    font-size: var(--arwad-text-sm);
    font-weight: var(--arwad-font-medium);
    color: var(--arwad-accent);
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    transition: color var(--arwad-transition-fast);
}

.clear-filters:hover {
    color: var(--arwad-primary);
    text-decoration: underline;
}

.apply-filters {
    width: 100%;
    margin-top: var(--arwad-space-4);
    padding: 14px var(--arwad-space-8);
    background: var(--arwad-primary);
    color: var(--arwad-text-light);
    border: none;
    border-radius: var(--arwad-radius-md);
    font-family: var(--arwad-font-heading);
    font-size: var(--arwad-text-sm);
    font-weight: var(--arwad-font-semibold);
    cursor: pointer;
    transition: all var(--arwad-transition-slow);
}

.apply-filters:hover {
    background: var(--arwad-primary-light);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(var(--arwad-primary-rgb), 0.3);
}

/* Filter groups — spacing with subtle dividers */
.filter-group {
    margin-bottom: var(--arwad-space-5);
    padding-bottom: var(--arwad-space-5);
    border-bottom: 1px solid var(--arwad-border-light);
}

.filter-group:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

/* Section titles — matches .forminator-label */
.filter-title {
    font-family: var(--arwad-font-heading);
    font-size: var(--arwad-text-base);
    font-weight: var(--arwad-font-semibold);
    margin-bottom: var(--arwad-space-3);
    color: var(--arwad-text-primary);
}

/* Search input — matches .forminator-input */
.search-box {
    position: relative;
}

.search-box input {
    width: 100%;
    padding: var(--arwad-space-3) var(--arwad-space-4);
    padding-left: 40px;
    border: 1px solid var(--arwad-bg-tertiary);
    border-radius: var(--arwad-radius-md);
    font-family: var(--arwad-font-body);
    font-size: var(--arwad-text-sm);
    color: var(--arwad-text-primary);
    background: var(--arwad-text-light);
    transition: border-color var(--arwad-transition-fast), box-shadow var(--arwad-transition-fast);
    box-sizing: border-box;
}

.search-box input:focus {
    outline: none;
    border-color: var(--arwad-primary);
    box-shadow: 0 0 0 3px rgba(var(--arwad-primary-rgb), 0.1);
}

.search-box svg {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--arwad-text-muted);
}

/* Checkbox list */
.filter-list {
    display: flex;
    flex-direction: column;
    gap: var(--arwad-space-2);
}

/* Checkbox row — matches .forminator-checkbox */
.filter-checkbox {
    display: flex;
    align-items: center;
    gap: var(--arwad-space-2);
    cursor: pointer;
    font-family: var(--arwad-font-body);
    font-size: var(--arwad-text-sm);
    color: var(--arwad-text-secondary);
    margin-bottom: 0;
}

.filter-checkbox input {
    display: none;
}

/* Checkmark box — matches .forminator-checkbox-box (20x20, 2px border) */
.checkmark {
    width: 20px;
    height: 20px;
    border: 2px solid var(--arwad-bg-tertiary);
    border-radius: var(--arwad-radius-sm);
    position: relative;
    transition: all var(--arwad-transition-fast);
    flex-shrink: 0;
    background: var(--arwad-text-light);
}

.filter-checkbox input:checked + .checkmark {
    background: var(--arwad-primary);
    border-color: var(--arwad-primary);
}

.filter-checkbox input:checked + .checkmark::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 6px;
    width: 5px;
    height: 9px;
    border: solid var(--arwad-text-light);
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.label-text {
    flex: 1;
    color: var(--arwad-text-primary);
}

.count {
    color: var(--arwad-text-muted);
    font-size: var(--arwad-text-xs);
}

/* Price inputs — matches .forminator-input */
.price-inputs {
    display: flex;
    align-items: center;
    gap: var(--arwad-space-2);
}

.price-inputs input {
    flex: 1;
    padding: var(--arwad-space-3) var(--arwad-space-4);
    border: 1px solid var(--arwad-bg-tertiary);
    border-radius: var(--arwad-radius-md);
    font-family: var(--arwad-font-body);
    font-size: var(--arwad-text-sm);
    color: var(--arwad-text-primary);
    background: var(--arwad-text-light);
    text-align: center;
    transition: border-color var(--arwad-transition-fast), box-shadow var(--arwad-transition-fast);
    box-sizing: border-box;
}

.price-inputs input:focus {
    outline: none;
    border-color: var(--arwad-primary);
    box-shadow: 0 0 0 3px rgba(var(--arwad-primary-rgb), 0.1);
}

.price-inputs span {
    color: var(--arwad-text-muted);
    font-size: var(--arwad-text-sm);
}

/* Close button — hidden on desktop, shown on mobile */
.filter-close-btn {
    display: none;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: none;
    border: 1px solid var(--arwad-bg-tertiary);
    border-radius: var(--arwad-radius-md);
    color: var(--arwad-text-primary);
    cursor: pointer;
    transition: all var(--arwad-transition-fast);
    padding: 0;
    flex-shrink: 0;
}

.filter-close-btn:hover {
    background: var(--arwad-accent);
    border-color: var(--arwad-accent);
    color: var(--arwad-text-light);
}

.filter-header__actions {
    display: flex;
    align-items: center;
    gap: var(--arwad-space-3);
}

/* Backdrop overlay */
.filter-backdrop {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    transition: opacity var(--arwad-transition-slow);
}

.filter-backdrop.active {
    display: block;
    opacity: 1;
}

/* Body scroll lock when drawer is open */
body.filter-drawer-open {
    overflow: hidden !important;
}

/* Force header behind backdrop when filter drawer is open */
body.filter-drawer-open .arwad-header,
body.filter-drawer-open .arwad-top-bar,
body.filter-drawer-open #main-header,
body.filter-drawer-open .et-l--header,
body.filter-drawer-open .arwad_site_header,
body.filter-drawer-open .arwad_top_bar {
    z-index: 1 !important;
}

@media (max-width: 992px) {
    .filter-close-btn {
        display: flex !important;
    }

    /* When inside the Divi module (not yet opened), hide it */
    .arwad-shop-filters .shop-sidebar {
        display: none !important;
    }

    /* When moved to body by JS */
    body > .shop-sidebar {
        display: block !important;
        position: fixed !important;
        top: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        left: auto !important;
        width: 300px !important;
        max-width: 85vw !important;
        height: 100vh !important;
        height: 100dvh !important;
        z-index: 1001 !important;
        border-radius: 0 !important;
        overflow-y: auto !important;
        overflow-x: hidden !important;
        transform: translateX(100%) !important;
        transition: transform 0.3s ease !important;
        border: none !important;
        box-shadow: -4px 0 20px rgba(0, 0, 0, 0.15) !important;
        padding: var(--arwad-space-4) !important;
        margin: 0 !important;
    }

    body > .shop-sidebar.active {
        transform: translateX(0) !important;
    }
}
