/*
|--------------------------------------------------------------------------
| SaverBiz Blog Category Archive
|--------------------------------------------------------------------------
*/

.dp-category-page {
    --dp-category-primary: #5b35db;
    --dp-category-primary-dark: #4020b4;
    --dp-category-primary-light: #eee9ff;
    --dp-category-heading: #11162b;
    --dp-category-text: #626779;
    --dp-category-border: #e6e7ed;
    --dp-category-background: #f7f7f9;

    padding: 38px 0 80px;
    background: var(--dp-category-background);
}

.dp-category-container {
    width: min(100% - 40px, 1120px);
    margin-inline: auto;
}

/*
|--------------------------------------------------------------------------
| Category Hero
|--------------------------------------------------------------------------
*/

.dp-category-hero {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 50px;
    margin-top: 25px;
    margin-bottom: 38px;
    padding: 46px 50px;
    overflow: hidden;
    border: 1px solid rgba(91, 53, 219, 0.14);
    border-radius: 22px;
    background:
        radial-gradient(
            circle at 90% 10%,
            rgba(91, 53, 219, 0.18),
            transparent 32%
        ),
        linear-gradient(
            135deg,
            #ffffff 0%,
            #f7f4ff 100%
        );
    box-shadow: 0 14px 40px rgba(22, 22, 45, 0.06);
}

.dp-category-hero::before {
    position: absolute;
    top: -80px;
    right: -60px;
    width: 220px;
    height: 220px;
    border: 38px solid rgba(91, 53, 219, 0.06);
    border-radius: 50%;
    content: "";
    pointer-events: none;
}

.dp-category-hero-content {
    position: relative;
    z-index: 1;
    max-width: 760px;
}

.dp-category-eyebrow {
    display: inline-flex;
    min-height: 32px;
    align-items: center;
    margin-bottom: 14px;
    padding: 6px 13px;
    border-radius: 100px;
    background: var(--dp-category-primary-light);
    color: var(--dp-category-primary);
    font-size: 12px;
    font-weight: 800;
    line-height: 1;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.dp-category-title {
    margin: 0;
    color: var(--dp-category-heading);
    font-size: clamp(32px, 4vw, 48px);
    font-weight: 800;
    line-height: 1.14;
    letter-spacing: -0.035em;
}

.dp-category-description {
    max-width: 720px;
    margin: 17px 0 0;
    color: var(--dp-category-text);
    font-size: 16px;
    line-height: 1.75;
}

.dp-category-description p {
    margin: 0;
}

.dp-category-count {
    position: relative;
    z-index: 1;
    display: flex;
    width: 138px;
    min-width: 138px;
    min-height: 138px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(91, 53, 219, 0.14);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.86);
    box-shadow: 0 14px 30px rgba(91, 53, 219, 0.1);
    text-align: center;
}

.dp-category-count strong {
    color: var(--dp-category-primary);
    font-size: 34px;
    font-weight: 800;
    line-height: 1;
}

.dp-category-count span {
    max-width: 90px;
    margin-top: 8px;
    color: var(--dp-category-text);
    font-size: 11px;
    font-weight: 700;
    line-height: 1.35;
    text-transform: uppercase;
}

/*
|--------------------------------------------------------------------------
| Main Archive Layout
|--------------------------------------------------------------------------
*/

.dp-category-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    align-items: start;
    gap: 30px;
}

.dp-category-main-column {
    min-width: 0;
}

/*
|--------------------------------------------------------------------------
| Blog Grid
|--------------------------------------------------------------------------
*/

.dp-blog-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
}

.dp-blog-card {
    display: flex;
    min-width: 0;
    overflow: hidden;
    flex-direction: column;
    margin: 0;
    border: 1px solid var(--dp-category-border);
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 8px 25px rgba(19, 21, 39, 0.045);
    transition:
        transform 0.25s ease,
        box-shadow 0.25s ease,
        border-color 0.25s ease;
}

.dp-blog-card:hover {
    transform: translateY(-5px);
    border-color: rgba(91, 53, 219, 0.32);
    box-shadow: 0 18px 45px rgba(19, 21, 39, 0.1);
}

/*
|--------------------------------------------------------------------------
| Featured First Article
|--------------------------------------------------------------------------
*/

.dp-blog-card:first-child {
    display: grid;
    grid-column: 1 / -1;
    grid-template-columns: minmax(0, 1.15fr) minmax(300px, 0.85fr);
}

.dp-blog-card:first-child .dp-blog-card-media {
    height: 100%;
    min-height: 330px;
}

.dp-blog-card:first-child .dp-blog-card-content {
    justify-content: center;
    padding: 30px;
}

.dp-blog-card:first-child .dp-blog-card-title {
    min-height: 0;
    font-size: 27px;
    line-height: 1.35;
    -webkit-line-clamp: 3;
}

.dp-blog-card:first-child .dp-blog-card-excerpt {
    font-size: 15px;
    -webkit-line-clamp: 4;
}

.dp-blog-card-featured {
    position: absolute;
    top: 14px;
    left: 14px;
    padding: 8px 12px;
    border-radius: 100px;
    background: var(--dp-category-primary);
    box-shadow: 0 5px 18px rgba(64, 32, 180, 0.28);
    color: #ffffff;
    font-size: 10px;
    font-weight: 800;
    line-height: 1;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

/*
|--------------------------------------------------------------------------
| Blog Card Image
|--------------------------------------------------------------------------
*/

.dp-blog-card-media {
    position: relative;
    display: block;
    height: 215px;
    overflow: hidden;
    background: #ececf1;
}

.dp-blog-card-image {
    display: block;
    width: 100%;
    height: 100%;
    margin: 0;
    object-fit: cover;
    transition: transform 0.45s ease;
}

.dp-blog-card:hover .dp-blog-card-image {
    transform: scale(1.045);
}

.dp-blog-card-placeholder {
    display: flex;
    width: 100%;
    height: 100%;
    align-items: center;
    justify-content: center;
    padding: 30px;
    background:
        radial-gradient(
            circle at 80% 20%,
            rgba(255, 255, 255, 0.2),
            transparent 28%
        ),
        linear-gradient(
            135deg,
            var(--dp-category-primary-dark),
            var(--dp-category-primary)
        );
    color: #ffffff;
    text-align: center;
}

.dp-blog-card-placeholder span {
    font-size: 23px;
    font-weight: 800;
    line-height: 1.3;
}

.dp-blog-card-category {
    position: absolute;
    bottom: 14px;
    left: 14px;
    max-width: calc(100% - 28px);
    overflow: hidden;
    padding: 7px 12px;
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 100px;
    background: rgba(255, 255, 255, 0.93);
    box-shadow: 0 5px 15px rgba(12, 13, 28, 0.12);
    color: var(--dp-category-primary-dark);
    font-size: 11px;
    font-weight: 800;
    line-height: 1;
    text-overflow: ellipsis;
    text-transform: uppercase;
    white-space: nowrap;
}

/*
|--------------------------------------------------------------------------
| Blog Card Content
|--------------------------------------------------------------------------
*/

.dp-blog-card-content {
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: 22px;
}

.dp-blog-card-meta {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 11px;
    color: #85899a;
    font-size: 12px;
    font-weight: 600;
}

.dp-blog-card-title {
    display: -webkit-box;
    overflow: hidden;
    min-height: 58px;
    margin: 0;
    color: var(--dp-category-heading);
    font-size: 20px;
    font-weight: 800;
    line-height: 1.43;
    letter-spacing: -0.018em;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.dp-blog-card-title a {
    color: inherit;
    text-decoration: none;
}

.dp-blog-card-title a:hover {
    color: var(--dp-category-primary);
}

.dp-blog-card-excerpt {
    display: -webkit-box;
    overflow: hidden;
    margin: 12px 0 20px;
    color: var(--dp-category-text);
    font-size: 14px;
    line-height: 1.7;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}

.dp-blog-card-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: fit-content;
    margin-top: auto;
    color: var(--dp-category-primary);
    font-size: 13px;
    font-weight: 800;
    text-decoration: none;
    transition:
        color 0.2s ease,
        gap 0.2s ease;
}

.dp-blog-card-link:hover {
    gap: 12px;
    color: var(--dp-category-primary-dark);
}

/*
|--------------------------------------------------------------------------
| Sidebar
|--------------------------------------------------------------------------
*/

.dp-category-sidebar {
    position: sticky;
    top: 105px;
    display: grid;
    gap: 24px;
    min-width: 0;
}

.admin-bar .dp-category-sidebar {
    top: 137px;
}

.dp-sidebar-card {
    overflow: hidden;
    padding: 23px;
    border: 1px solid var(--dp-category-border);
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 8px 25px rgba(19, 21, 39, 0.045);
}

.dp-sidebar-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 15px;
    margin-bottom: 19px;
}

.dp-sidebar-card-header h2 {
    margin: 5px 0 0;
    color: var(--dp-category-heading);
    font-size: 21px;
    font-weight: 800;
    line-height: 1.3;
    letter-spacing: -0.02em;
}

.dp-sidebar-eyebrow {
    display: block;
    color: var(--dp-category-primary);
    font-size: 10px;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.dp-sidebar-header-icon {
    display: inline-flex;
    width: 38px;
    min-width: 38px;
    height: 38px;
    align-items: center;
    justify-content: center;
    border-radius: 11px;
    background: var(--dp-category-primary-light);
    color: var(--dp-category-primary);
    font-size: 17px;
    font-weight: 900;
}

/*
|--------------------------------------------------------------------------
| Featured Brands
|--------------------------------------------------------------------------
*/

.dp-sidebar-brand-list {
    display: grid;
    gap: 8px;
}

.dp-sidebar-brand-item {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 12px;
    padding: 10px;
    border: 1px solid transparent;
    border-radius: 13px;
    background: #fafafd;
    color: var(--dp-category-heading);
    text-decoration: none;
    transition:
        background 0.2s ease,
        border-color 0.2s ease,
        transform 0.2s ease;
}

.dp-sidebar-brand-item:hover {
    transform: translateX(3px);
    border-color: rgba(91, 53, 219, 0.18);
    background: #f5f1ff;
    color: var(--dp-category-heading);
}

.dp-sidebar-brand-logo {
    display: flex;
    width: 48px;
    min-width: 48px;
    height: 48px;
    overflow: hidden;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--dp-category-border);
    border-radius: 11px;
    background: #ffffff;
}

.dp-sidebar-brand-logo img {
    display: block;
    width: 100%;
    height: 100%;
    padding: 5px;
    object-fit: contain;
}

.dp-sidebar-brand-placeholder {
    display: flex;
    width: 100%;
    height: 100%;
    align-items: center;
    justify-content: center;
    background: var(--dp-category-primary-light);
    color: var(--dp-category-primary);
    font-size: 18px;
    font-weight: 900;
}

.dp-sidebar-brand-content {
    display: flex;
    min-width: 0;
    flex: 1;
    flex-direction: column;
}

.dp-sidebar-brand-content strong {
    overflow: hidden;
    color: var(--dp-category-heading);
    font-size: 13px;
    font-weight: 800;
    line-height: 1.4;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dp-sidebar-brand-content small {
    margin-top: 3px;
    color: var(--dp-category-text);
    font-size: 10px;
    font-weight: 600;
    line-height: 1.3;
}

.dp-sidebar-item-arrow {
    color: var(--dp-category-primary);
    font-size: 14px;
    font-weight: 800;
    transition: transform 0.2s ease;
}

.dp-sidebar-brand-item:hover .dp-sidebar-item-arrow {
    transform: translateX(3px);
}

.dp-sidebar-view-all {
    display: flex;
    min-height: 44px;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 16px;
    padding: 10px 14px;
    border: 1px solid rgba(91, 53, 219, 0.2);
    border-radius: 11px;
    background: var(--dp-category-primary-light);
    color: var(--dp-category-primary-dark);
    font-size: 12px;
    font-weight: 800;
    text-decoration: none;
    transition:
        background 0.2s ease,
        color 0.2s ease;
}

.dp-sidebar-view-all:hover {
    background: var(--dp-category-primary);
    color: #ffffff;
}

/*
|--------------------------------------------------------------------------
| Latest Coupons
|--------------------------------------------------------------------------
*/

.dp-sidebar-coupon-list {
    display: grid;
    gap: 11px;
}

.dp-sidebar-coupon-item {
    position: relative;
    display: block;
    padding: 14px;
    border: 1px solid var(--dp-category-border);
    border-radius: 13px;
    background:
        linear-gradient(
            135deg,
            #ffffff 0%,
            #fbfaff 100%
        );
    color: var(--dp-category-heading);
    text-decoration: none;
    transition:
        transform 0.2s ease,
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

.dp-sidebar-coupon-item:hover {
    transform: translateY(-2px);
    border-color: rgba(91, 53, 219, 0.3);
    box-shadow: 0 9px 22px rgba(34, 29, 71, 0.08);
    color: var(--dp-category-heading);
}

.dp-sidebar-coupon-status {
    display: inline-flex;
    min-height: 22px;
    align-items: center;
    margin-bottom: 8px;
    padding: 4px 8px;
    border-radius: 100px;
    background: #eaf9ef;
    color: #168348;
    font-size: 9px;
    font-weight: 900;
    line-height: 1;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.dp-sidebar-coupon-item h3 {
    display: -webkit-box;
    overflow: hidden;
    margin: 0 0 12px;
    color: var(--dp-category-heading);
    font-size: 13px;
    font-weight: 800;
    line-height: 1.5;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.dp-sidebar-coupon-footer {
    display: flex;
    min-width: 0;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--dp-category-border);
}

.dp-sidebar-coupon-brand {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 8px;
    color: var(--dp-category-text);
    font-size: 10px;
    font-weight: 700;
}

.dp-sidebar-coupon-brand img {
    display: block;
    width: 27px;
    min-width: 27px;
    height: 27px;
    padding: 2px;
    border: 1px solid var(--dp-category-border);
    border-radius: 7px;
    background: #ffffff;
    object-fit: contain;
}

.dp-sidebar-coupon-brand span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dp-sidebar-coupon-arrow {
    color: var(--dp-category-primary);
    font-size: 14px;
    font-weight: 900;
    transition: transform 0.2s ease;
}

.dp-sidebar-coupon-item:hover .dp-sidebar-coupon-arrow {
    transform: translateX(3px);
}

/*
|--------------------------------------------------------------------------
| Pagination
|--------------------------------------------------------------------------
*/

.dp-category-pagination {
    margin-top: 48px;
}

.dp-category-pagination .nav-links {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
}

.dp-category-pagination .page-numbers {
    display: inline-flex;
    min-width: 42px;
    height: 42px;
    align-items: center;
    justify-content: center;
    padding: 0 14px;
    border: 1px solid var(--dp-category-border);
    border-radius: 10px;
    background: #ffffff;
    color: var(--dp-category-heading);
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    transition:
        background 0.2s ease,
        color 0.2s ease,
        border-color 0.2s ease;
}

.dp-category-pagination .page-numbers:hover,
.dp-category-pagination .page-numbers.current {
    border-color: var(--dp-category-primary);
    background: var(--dp-category-primary);
    color: #ffffff;
}

/*
|--------------------------------------------------------------------------
| Empty State
|--------------------------------------------------------------------------
*/

.dp-category-empty {
    padding: 65px 30px;
    border: 1px solid var(--dp-category-border);
    border-radius: 20px;
    background: #ffffff;
    text-align: center;
}

.dp-category-empty-icon {
    display: inline-flex;
    width: 58px;
    height: 58px;
    align-items: center;
    justify-content: center;
    margin-bottom: 18px;
    border-radius: 50%;
    background: var(--dp-category-primary-light);
    color: var(--dp-category-primary);
    font-size: 25px;
}

.dp-category-empty h2 {
    margin: 0 0 10px;
    color: var(--dp-category-heading);
    font-size: 27px;
}

.dp-category-empty p {
    margin: 0 auto 25px;
    color: var(--dp-category-text);
    font-size: 15px;
    line-height: 1.7;
}

.dp-category-button {
    display: inline-flex;
    min-height: 46px;
    align-items: center;
    justify-content: center;
    padding: 11px 22px;
    border-radius: 9px;
    background: var(--dp-category-primary);
    color: #ffffff;
    font-size: 14px;
    font-weight: 800;
    text-decoration: none;
}

.dp-category-button:hover {
    background: var(--dp-category-primary-dark);
    color: #ffffff;
}

/*
|--------------------------------------------------------------------------
| Smaller Desktop
|--------------------------------------------------------------------------
*/

@media (max-width: 1180px) {
    .dp-category-layout {
        grid-template-columns: minmax(0, 1fr) 305px;
        gap: 24px;
    }

    .dp-blog-card:first-child {
        grid-template-columns: minmax(0, 1fr) 320px;
    }
}

/*
|--------------------------------------------------------------------------
| Tablet
|--------------------------------------------------------------------------
*/

@media (max-width: 991px) {
    .dp-category-page {
        padding-top: 28px;
    }

    .dp-category-hero {
        padding: 38px;
    }

    .dp-category-layout {
        grid-template-columns: 1fr;
    }

    .dp-category-sidebar,
    .admin-bar .dp-category-sidebar {
        position: static;
        top: auto;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .dp-blog-card:first-child {
        grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.9fr);
    }
}

/*
|--------------------------------------------------------------------------
| Mobile
|--------------------------------------------------------------------------
*/

@media (max-width: 767px) {
    .dp-category-page {
       padding: 10px 0px 10px 0px;
    }

    .dp-category-container {
        width: min(100% - 28px, 1240px);
    }

    .dp-category-hero {
        display: block;
        margin-top: 18px;
        margin-bottom: 26px;
        padding: 29px 24px;
        border-radius: 17px;
    }

    .dp-category-title {
        font-size: 31px;
        line-height: 1.2;
    }

    .dp-category-description {
        margin-top: 13px;
        font-size: 14px;
        line-height: 1.7;
    }

    .dp-category-count {
        width: fit-content;
        min-width: 0;
        min-height: 0;
        flex-direction: row;
        gap: 7px;
        margin-top: 20px;
        padding: 10px 15px;
        border-radius: 100px;
    }

    .dp-category-count strong {
        font-size: 18px;
    }

    .dp-category-count span {
        max-width: none;
        margin: 0;
        font-size: 10px;
    }

    .dp-blog-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .dp-blog-card:first-child {
        display: flex;
        grid-column: auto;
    }

    .dp-blog-card:first-child .dp-blog-card-media {
        height: 225px;
        min-height: 0;
    }

    .dp-blog-card:first-child .dp-blog-card-content {
        padding: 19px;
    }

    .dp-blog-card:first-child .dp-blog-card-title {
        font-size: 19px;
        line-height: 1.43;
        -webkit-line-clamp: 2;
    }

    .dp-blog-card:first-child .dp-blog-card-excerpt {
        font-size: 14px;
        -webkit-line-clamp: 3;
    }

    .dp-blog-card-media {
        height: 225px;
    }

    .dp-blog-card-content {
        padding: 19px;
    }

    .dp-blog-card-title {
        min-height: auto;
        font-size: 18px;
    }

    .dp-blog-card-excerpt {
        margin-bottom: 17px;
    }

    .dp-category-sidebar {
        grid-template-columns: 1fr;
    }

    .dp-sidebar-card {
        padding: 20px;
    }

    .dp-category-pagination {
        margin-top: 35px;
    }

    .dp-category-pagination .page-numbers {
        min-width: 38px;
        height: 38px;
        padding: 0 11px;
    }
}

@media (max-width: 420px) {
    .dp-blog-card-media,
    .dp-blog-card:first-child .dp-blog-card-media {
        height: 205px;
    }

    .dp-category-pagination .prev,
    .dp-category-pagination .next {
        width: 100%;
    }
}