/*--------------------------------------------------------------
>>> ARCHIVE & TAXONOMY
--------------------------------------------------------------*/

/* Page Spacing for Archives - Match Shop Page Premium Spacing */
.archive .site-main,
.blog .site-main,
.home .site-main,
.category .site-main,
.tag .site-main,
.author .site-main,
.search-results .site-main,
.post-type-archive-product .site-main,
.tax-product_cat .site-main,
.tax-product_tag .site-main,
.page-template-template-categories .site-main,
.error404 .site-main {
    padding-top: var(--abr-space-2xl);
    padding-bottom: var(--abr-space-2xl);
}

.page-header {
    background: var(--abr-gradient-primary);
    color: #ffffff;
    border-radius: var(--abr-archive-header-radius, var(--abr-radius-lg));
    padding: var(--abr-space-2xl) var(--abr-space-lg);
    margin: var(--abr-space-md) auto var(--abr-space-xl);
    text-align: center;
    position: relative;
    overflow: hidden;
    box-shadow: var(--abr-shadow-md);
    background-size: cover;
    background-position: center;
    transition: all 0.5s ease;
    width: 100%;
}

.page-header.width-container {
    max-width: var(--abr-container-max);
}

.page-header.width-full {
    width: auto;
    max-width: none;
    margin-inline-start: calc(-1 * var(--abr-space-md));
    margin-inline-end: calc(-1 * var(--abr-space-md));
    padding-inline: var(--abr-space-md);
    border-radius: 0;
}

@media (max-width: 639px) {
    .page-header.width-full {
        margin-inline-start: -12px;
        margin-inline-end: -12px;
        padding-inline: 12px;
    }
}


.page-header.width-custom {
    max-width: var(--abr-archive-header-custom-width, 1200px);
}

/* ---------------------------------------------------------
   Author Header Professional Polish
--------------------------------------------------------- */
.page-header.author-header {
    text-align: inherit;
    /* Reset centering for author info */
    padding: var(--abr-space-xl);
}

.abr-author-header-content {
    display: flex;
    align-items: center;
    gap: var(--abr-space-xl);
    max-width: 800px;
    margin: 0 auto;
}

.abr-author-avatar img {
    border-radius: var(--abr-radius-full);
    border: 4px solid rgba(255, 255, 255, 0.2);
    box-shadow: var(--abr-shadow-lg);
    display: block;
}

.abr-author-info {
    flex: 1;
}

.abr-author-info .author-title {
    margin: 0 0 10px 0;
    font-size: 2.25rem;
    color: #ffffff;
}

.author-bio-box {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    padding: 15px 20px;
    border-radius: var(--abr-radius-lg);
    margin-bottom: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.author-description {
    margin: 0;
    font-size: 1rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.9);
}

.author-meta-links {
    display: flex;
    gap: 20px;
    font-size: 0.9rem;
    align-items: center;
}

.author-meta-links span,
.author-meta-links a {
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    opacity: 0.9;
    transition: opacity 0.3s;
}

.author-meta-links a:hover {
    opacity: 1;
    text-decoration: underline;
}

.author-meta-links i {
    font-size: 1.1rem;
    opacity: 0.8;
}

@media (max-width: 767px) {
    .abr-author-header-content {
        flex-direction: column;
        text-align: center;
        gap: var(--abr-space-lg);
    }

    .author-meta-links {
        justify-content: center;
    }
}



.page-header .page-title {
    color: #ffffff;
    font-size: var(--abr-fs-h1, 3rem);
    font-weight: var(--abr-font-heading-weight, 700);
    line-height: 1.15;
    margin: 0 0 0.5rem;
}

.page-header .archive-description,
.page-header .breadcrumbs,
.page-header .aurabricks-breadcrumbs a,
.page-header .aurabricks-breadcrumbs li {
    color: #ffffff;
}

.page-header .aurabricks-breadcrumbs a:hover {
    color: rgba(255, 255, 255, 0.8);
}

/* Header with Background Image */
.page-header.has-bg-image {
    min-height: 320px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    border: none;
    padding: var(--abr-space-3xl) var(--abr-space-lg);
}

.page-header-overlay {
    position: absolute;
    inset: 0;
    background: var(--abr-gradient-primary);
    opacity: 0.8;
    backdrop-filter: blur(4px);
    z-index: 1;
}

.page-header-content {
    position: relative;
    z-index: 2;
    width: 100%;
}

.page-header.has-bg-image .page-title,
.page-header.has-bg-image .archive-description,
.page-header.has-bg-image .breadcrumbs {
    position: relative;
    z-index: 2;
    color: #ffffff;
}

.page-header.has-bg-image .page-title {
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.page-header.has-bg-image .archive-description {
    color: rgba(255, 255, 255, 0.9);
}

/* Category Index specific override for consistency */
.categories-index-header.has-bg-image {
    margin-bottom: var(--abr-space-2xl);
}

.archive-description {
    max-width: 800px;
    margin: var(--abr-space-sm) auto 0;
    color: var(--abr-color-gray);
    font-size: var(--abr-fs-md);
    line-height: 1.6;
}

/* Animations for premium feel */
.page-header {
    animation: abrTransitionFadeUp 0.8s cubic-bezier(0.165, 0.84, 0.44, 1);
}

@keyframes abrTransitionFadeUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* No Results Section - Decoupled Empty State Component */
.abr-empty-state {
    padding: var(--abr-space-3xl) var(--abr-space-lg);
    background: var(--abr-glass-bg, rgba(255, 255, 255, 0.6));
    border-radius: var(--abr-radius-lg, 16px);
    border: 1px solid var(--abr-glass-border, rgba(0, 0, 0, 0.05));
    text-align: center;
    max-width: var(--abr-container-max, 1200px);
    margin: var(--abr-space-xl) auto;
    box-shadow: var(--abr-shadow-sm);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.abr-empty-state__inner {
    max-width: 600px;
    margin: 0 auto;
}

.abr-empty-state__icon {
    display: flex;
    justify-content: center;
    margin-bottom: var(--abr-space-md);
    color: var(--abr-color-primary);
    opacity: 0.4;
    animation: abr-bounce 2s infinite ease-in-out;
}

.abr-empty-state__title {
    font-size: 1.85rem;
    font-weight: 800;
    color: var(--abr-color-dark, #1e293b);
    margin-bottom: 12px;
}

.abr-empty-state__content {
    font-size: 1rem;
    color: var(--abr-color-gray, #64748b);
    line-height: 1.6;
}

.abr-search-none {
    max-width: 480px;
    margin: var(--abr-space-lg) auto 0;
}

@keyframes abr-bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-8px);
    }
}

/* Categories Index Page Premium Grid - Luxury Overhaul */
.abr-categories-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    margin-top: var(--abr-space-2xl);
    padding-bottom: var(--abr-space-2xl);
}

.abr-cat-index-card {
    height: 100%;
    opacity: 0;
    animation: abrTransitionFadeUp 0.8s cubic-bezier(0.19, 1, 0.22, 1) forwards;
}

#page .abr-cat-card-link {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: var(--abr-glass-bg);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid var(--abr-glass-border);
    border-radius: 35px;
    overflow: hidden;
    transition: all 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    text-decoration: none;
    position: relative;
    transform-style: preserve-3d;
}

.abr-cat-card-link:hover {
    transform: translateY(-15px);
    box-shadow: 0 40px 80px rgba(0, 0, 0, 0.12);
    border-color: rgba(var(--abr-color-primary-rgb), 0.3);
    background: rgba(255, 255, 255, 0.98);
}

.abr-cat-card-visual {
    height: 300px;
    overflow: hidden;
    position: relative;
    background: #f1f5f9;
}

.abr-cat-card-image {
    width: 100%;
    height: 100%;
}

.abr-cat-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 1.5s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.abr-cat-card-link:hover .abr-cat-card-image img {
    transform: scale(1.12);
}

.abr-cat-card-image-placeholder {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--abr-gradient-primary);
}

.abr-cat-card-image-placeholder span {
    font-size: 110px;
    font-weight: 900;
    color: rgba(255, 255, 255, 0.15);
    text-transform: uppercase;
    transition: transform 0.6s ease;
}

.abr-cat-card-link:hover .abr-cat-card-image-placeholder span {
    transform: scale(1.1);
}

/* Luxury Overlay */
.abr-cat-card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.4));
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.5s ease;
}

.abr-cat-card-link:hover .abr-cat-card-overlay {
    opacity: 1;
}

.abr-discover-btn {
    background: #fff;
    color: var(--abr-color-dark);
    padding: 14px 28px;
    border-radius: 50px;
    font-weight: 800;
    font-size: 0.95rem;
    transform: translateY(30px);
    transition: all 0.5s cubic-bezier(0.165, 0.84, 0.44, 1);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.abr-cat-card-link:hover .abr-discover-btn {
    transform: translateY(0);
}

.abr-cat-card-content {
    padding: 40px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.abr-cat-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.abr-cat-card-title {
    margin: 0;
    font-size: 1.75rem;
    color: var(--abr-color-dark);
    font-weight: 900;
    letter-spacing: -0.02em;
}

.abr-cat-count-badge {
    background: rgba(var(--abr-color-primary-rgb), 0.1);
    color: var(--abr-color-primary);
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    font-size: 1.1rem;
    font-weight: 900;
    flex-shrink: 0;
    margin-inline-start: 20px;
}

.abr-cat-card-desc {
    color: var(--abr-color-gray);
    font-size: 1.05rem;
    line-height: 1.7;
    margin-bottom: 30px;
    opacity: 0.85;
}

.abr-cat-card-footer {
    margin-top: auto;
}

.abr-cat-explore-link {
    font-size: 0.9rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--abr-color-primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.abr-cat-explore-link::after {
    content: '';
    width: 40px;
    height: 2px;
    background: currentColor;
    transition: width 0.4s ease;
}

.abr-cat-card-link:hover .abr-cat-explore-link::after {
    width: 80px;
}

/* Categories Index Mobile Adjustments */
@media (max-width: 991px) {
    .abr-categories-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
    }
}

@media (max-width: 639px) {
    .abr-categories-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .abr-cat-card-visual {
        height: 240px;
    }

    .abr-cat-card-content {
        padding: 30px;
    }
}

/* Mobile Adjustments for general archive spacing */
@media (max-width: 768px) {
    .page-header {
        padding: var(--abr-space-lg) var(--abr-space-sm);
        margin-bottom: var(--abr-space-lg);
    }

    .page-header .page-title {
        font-size: var(--abr-fs-2xl);
    }
}

/* Touch-safe Optimizations: Disable heavy hover scales & shifts on touch devices */
@media (hover: none) {
    #page .abr-cat-card-link:hover {
        transform: none;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
        border-color: var(--abr-glass-border);
    }
    .abr-cat-card-link:hover .abr-cat-card-image img {
        transform: none;
    }
    #page .widget-area .widget:hover,
    #page .sidebar-widget:hover,
    #page .sidebar-widget .widget:hover {
        transform: none;
    }
}