/* Search, Archive & AJAX Results Styles */

.search-card,
.category-card,
.product-card {
    background: var(--weyel-color-white);
    border-radius: var(--weyel-radius-lg);
    box-shadow: var(--weyel-shadow-soft);
    border-left: 6px solid var(--weyel-color-blue);
    transition: transform var(--weyel-transition-base), box-shadow var(--weyel-transition-base);
    overflow: hidden;
}

.product-card {
    display: flex;
    flex-direction: column;
}

.product-card__image {
    height: 200px;
    overflow: hidden;
    background: var(--weyel-color-bg-soft-alt);
}

.product-card__image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 20px;
    transition: transform var(--weyel-transition-slow);
}

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

.search-card__image-wrap {
    background: var(--weyel-color-bg-soft-alt);
    border-right: 1px solid var(--weyel-border-color-light);
}

.object-fit-cover {
    object-fit: cover;
}

.search-card:hover,
.category-card:hover,
.product-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--weyel-shadow-medium);
}

.search-card__title a,
.category-card__body h3 {
    color: var(--weyel-color-text);
    text-decoration: none;
    font-weight: 600;
    font-family: var(--weyel-font-family-base);
    transition: color var(--weyel-transition-base);
}

.search-card__title a:hover {
    color: var(--weyel-color-blue);
}

.search-card__body p,
.category-card__body p {
    font-size: var(--weyel-font-size-md);
    line-height: var(--weyel-line-height-base);
    color: var(--weyel-color-text-muted);
    margin-bottom: 0;
}

.pagination-wrapper .nav-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
}

.pagination-wrapper .page-numbers {
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--weyel-color-white);
    border: 1px solid var(--weyel-border-color-soft);
    color: var(--weyel-color-text);
    text-decoration: none;
    transition: all var(--weyel-transition-base);
}

.pagination-wrapper .page-numbers.current,
.pagination-wrapper .page-numbers:hover:not(.dots) {
    background: var(--weyel-color-blue);
    color: var(--weyel-color-white);
    border-color: var(--weyel-color-blue);
}

/* Modern Post Card for Archives */
.post-card {
    background: var(--weyel-color-white);
    border-radius: var(--weyel-radius-lg);
    box-shadow: var(--weyel-shadow-soft);
    transition: all var(--weyel-transition-base);
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-top: 4px solid var(--weyel-color-blue);
}

.post-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--weyel-shadow-mega);
}

.post-card__image-wrap {
    position: relative;
    height: 220px;
    overflow: hidden;
}

.post-card__image-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--weyel-transition-slow);
}

.post-card:hover .post-card__image-wrap img {
    transform: scale(1.1);
}

.post-card__badge {
    position: absolute;
    top: 20px;
    left: 20px;
    background: var(--weyel-color-blue);
    color: var(--weyel-color-white);
    padding: 6px 14px;
    border-radius: 30px;
    font-size: var(--weyel-font-size-2xs);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    z-index: 2;
}

.post-card__content {
    padding: var(--weyel-space-5);
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.post-card__meta {
    font-size: var(--weyel-font-size-xs);
    color: var(--weyel-color-text-subtle);
    margin-bottom: var(--weyel-space-2);
    display: flex;
    align-items: center;
    gap: 15px;
}

.post-card__title {
    font-size: var(--weyel-font-size-xl-minus);
    font-weight: 700;
    margin-bottom: var(--weyel-space-3);
    line-height: 1.3;
}

.post-card__title a {
    color: var(--weyel-color-text);
    text-decoration: none;
    transition: color var(--weyel-transition-base);
}

.post-card__title a:hover {
    color: var(--weyel-color-blue);
}

.post-card__excerpt {
    font-size: var(--weyel-font-size-md);
    color: var(--weyel-color-text-muted);
    line-height: var(--weyel-line-height-base);
    margin-bottom: var(--weyel-space-5);
}

.post-card__footer {
    margin-top: auto;
}

.btn-link-ci {
    color: var(--weyel-color-blue);
    text-decoration: none;
    font-weight: 700;
    font-size: var(--weyel-font-size-sm-plus);
    display: flex;
    align-items: center;
    gap: 8px;
    transition: gap var(--weyel-transition-fast);
}

.btn-link-ci:hover {
    color: var(--weyel-color-green);
    gap: 12px;
}

/* Category header adjustments */
.archive-header {
    background-color: var(--weyel-color-surface-muted);
    border-bottom: 1px solid var(--weyel-border-color-light);
}

.category-label {
    display: inline-block;
    color: var(--weyel-color-blue);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: var(--weyel-font-size-xs);
    margin-bottom: var(--weyel-space-2);
}

.ajax-search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--weyel-color-white);
    border-radius: var(--weyel-radius-sm);
    box-shadow: var(--weyel-shadow-mega);
    margin-top: 5px;
    z-index: 1000;
    max-height: 400px;
    overflow-y: auto;
    display: none;
}

.ajax-results-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.ajax-result-item {
    border-bottom: 1px solid var(--weyel-border-color-light);
}

.ajax-result-item a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    text-decoration: none;
    color: var(--weyel-color-text);
    transition: background var(--weyel-transition-fast);
}

.ajax-result-item a:hover {
    background-color: var(--weyel-color-bg-soft-alt);
    color: var(--weyel-color-blue);
}

.ajax-result-item .result-title {
    font-weight: 500;
    font-family: var(--weyel-font-family-base);
    font-size: var(--weyel-font-size-sm-plus);
}

.ajax-result-item .result-type {
    font-size: var(--weyel-font-size-2xs);
    padding: 3px 10px;
    border-radius: 12px;
    background-color: var(--weyel-color-blue);
    color: var(--weyel-color-white);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.wp-block-search__input.loading {
    background-image: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 38 38" stroke="%230768b1"><g fill="none" fill-rule="evenodd"><g transform="translate(1 1)" stroke-width="2"><circle stroke-opacity=".5" cx="18" cy="18" r="18"/><path d="M36 18c0-9.94-8.06-18-18-18"><animateTransform attributeName="transform" type="rotate" from="0 18 18" to="360 18 18" dur="1s" repeatCount="indefinite"/></path></g></g></svg>');
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 20px;
}
