/* ==================== FONTS & RESET ==================== */
@import url("https://cdn.jsdelivr.net/gh/rastikerdar/vazirmatn@v33.003/Vazirmatn-font-face.css");

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --primary-color: #2d6a4f;
    --primary-hover: #1b4332;
    --bg-color: #fcfcfc;
    --card-bg: #ffffff;
    --text-main: #2b2b2b;
    --text-muted: #8c8c8c;
    --border-color: #f0f0f0;
}

body {
    font-family: var(--font-fa) !important;
    background-color: var(--bg-color);
    color: var(--text-main);
    direction: rtl;
    line-height: 1.6;
}

/* ==================== LAYOUT CONTAINER ==================== */

.main-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 32px 16px;
}

/* ==================== BREADCRUMB ==================== */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-muted);
    margin: 2rem auto;
    max-width: var(--container-width);
}

.breadcrumb a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.2s;
}

.breadcrumb a:hover {
    color: var(--text-main);
}

/* ==================== PAGE HEADER ==================== */
.page-header {
    text-align: center;
    margin-bottom: 40px;
}

.page-header h1 {
    font-size: 26px;
    font-weight: 700;
    color: #111827;
    margin-bottom: 8px;
}

.page-header p {
    font-size: 14px;
    color: var(--text-muted);
}

/* ==================== CATEGORIES GRID ==================== */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin: 0 auto;
    margin-bottom: 32px;
    max-width: var(--container-width);
}

.category-card {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 24px 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    text-decoration: none;
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        border-color 0.2s ease;
}

.category-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05);
    border-color: #e5e7eb;
}

.icon-wrapper {
    width: 96px;
    height: 96px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}

.icon-wrapper img {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: 50%;
}

/* Brands page: logos usually have padding/whitespace, so show them
   smaller and un-cropped instead of zoomed/cover like category photos */
.brands-grid .icon-wrapper img {
    width: 140PX;
    height: 140PX;
    object-fit: contain;
    border-radius: 0;
}

/* SVG Fallback icon style if img is missing */
.icon-wrapper svg {
    width: 40px;
    height: 40px;
    fill: none;
    stroke: #9ca3af;
    stroke-width: 1.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.category-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 4px;
}

.category-count {
    font-size: 12px;
    color: var(--text-muted);
}

/* ==================== CTA BANNER ==================== */
.cta-banner {
    max-width: var(--container-width);
    margin: 0 auto;
    margin-bottom: 32px;
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 20px 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
}

.cta-content {
    display: flex;
    align-items: center;
    gap: 16px;
}

.cta-icon-svg {
    width: 36px;
    height: 36px;
    stroke: var(--primary-color);
    fill: none;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.cta-text h4 {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 2px;
}

.cta-text p {
    font-size: 13px;
    color: var(--text-muted);
}

.cta-btn {
    background-color: var(--primary-color);
    color: #ffffff;
    padding: 10px 24px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: background-color 0.2s;
    white-space: nowrap;
}

.cta-btn:hover {
    background-color: var(--primary-hover);
}

/* Pagination */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-bottom: 40px;
}

.page-link {
    min-width: 32px;
    height: 32px;
    padding: 0 6px;
    border-radius: 6px;
    background: #fff;
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    color: #495057;
    transition: all 0.2s;
}

.page-link.active {
    background: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}

.page-link:hover:not(.active) {
    background: #e9ecef;
}

/* ==========================================================================
   Categories Page Responsive Styles
   Files: categories-responsive.css
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Breakpoint: Large Screens & Laptops (Max-width: 1200px)
   -------------------------------------------------------------------------- */
/* ==================== RESPONSIVE ==================== */
@media (max-width: 1024px) {
    .categories-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .categories-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .cta-banner {
        flex-direction: column;
        text-align: center;
        gap: 16px;
    }
    .cta-content {
        flex-direction: column;
    }
}

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

/* --------------------------------------------------------------------------
   2. Breakpoint: Tablets (Max-width: 768px)
   -------------------------------------------------------------------------- */
@media (max-width: 768px) {
    .page-header {
        margin-bottom: 28px;
    }

    .page-header h1 {
        font-size: 22px;
    }

    .page-header p {
        font-size: 13px;
    }

    /* Grid change: 2 columns on tablets */
    .categories-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 14px;
        margin-bottom: 24px;
    }

    .category-card {
        padding: 18px 12px;
        border-radius: 12px;
    }

    .icon-wrapper {
        width: 80px;
        height: 80px;
        margin-bottom: 12px;
    }

    .icon-wrapper img {
        width: 100%;
        height: 100%;
    }

    .category-title {
        font-size: 14px;
    }

    .category-count {
        font-size: 11px;
    }

    /* CTA Banner responsiveness */
    .cta-banner {
        flex-direction: column;
        text-align: center;
        padding: 20px 16px;
        gap: 16px;
    }

    .cta-content {
        flex-direction: column;
        gap: 10px;
    }

    .cta-text h4 {
        font-size: 14px;
    }

    .cta-text p {
        font-size: 12px;
    }

    .cta-btn {
        width: 100%;
        text-align: center;
    }

    /* Pagination responsiveness */
    .pagination {
        gap: 4px;
        flex-wrap: wrap;
    }

    .page-link {
        min-width: 30px;
        height: 30px;
        font-size: 12px;
    }
}

/* --------------------------------------------------------------------------
   3. Breakpoint: Small Mobile Devices (Max-width: 480px)
   -------------------------------------------------------------------------- */
@media (max-width: 480px) {
    .breadcrumb {
        font-size: 12px;
        margin: 16px;
    }

    /* Grid change: 1 column on small mobiles */
    .categories-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .category-card {
        align-items: center;
        justify-content: flex-start;
        padding: 12px 16px;
        gap: 16px;
    }

    .icon-wrapper {
        width: 60px;
        height: 60px;
        margin-bottom: 0;
        flex-shrink: 0;
    }

    .icon-wrapper img {
        width: 80px;
        height: 80px;
    }

    .category-card-text {
        display: flex;
        flex-direction: column;
    }
}
