/**
 * Albasy Marketplace — Premium UI/UX v2.0
 * Mega-upgrade : animations, glassmorphism, micro-interactions, search, filters
 * DA : 60% blanc / 30% jaune #FFD600 / 10% vert #00C853
 *
 * @package Albasy_Marketplace
 */

/* ═══════════════════════════════════════════════════════════
   1. PRODUCT CARD — Premium Overlay + Quick-View
═══════════════════════════════════════════════════════════ */

/* Quick-view overlay — slides up on hover */
.alb-product-card__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(26,26,46,0.7) 0%, transparent 60%);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding-bottom: 18px;
    opacity: 0;
    transition: opacity 0.35s ease;
    z-index: 3;
    pointer-events: none;
}
.alb-product-card:hover .alb-product-card__overlay {
    opacity: 1;
    pointer-events: auto;
}

/* Quick-view button — glassmorphism pill */
.alb-quickview-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 20px;
    background: rgba(255,255,255,0.88);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 999px;
    color: #1A1A2E;
    font-size: 0.8rem;
    font-weight: 700;
    font-family: var(--alb-font-body, 'DM Sans', sans-serif);
    text-decoration: none;
    transform: translateY(12px);
    transition: transform 0.35s cubic-bezier(0.34,1.56,0.64,1),
                background 0.2s ease,
                box-shadow 0.2s ease;
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}
.alb-product-card:hover .alb-quickview-btn {
    transform: translateY(0);
}
.alb-quickview-btn:hover {
    background: #FFD600;
    box-shadow: 0 6px 24px rgba(255,214,0,0.4);
}

/* Badge pulse animation */
.alb-badge-pulse {
    animation: alb-badge-pulse-anim 2s ease-in-out infinite;
}
@keyframes alb-badge-pulse-anim {
    0%, 100% { box-shadow: 0 2px 8px rgba(255,214,0,0.40); }
    50%      { box-shadow: 0 2px 16px rgba(255,214,0,0.70); }
}

/* Badge shine sweep */
.alb-badge-shine {
    position: relative;
    overflow: hidden;
}
.alb-badge-shine::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    animation: alb-badge-shine-sweep 3s ease-in-out infinite;
}
@keyframes alb-badge-shine-sweep {
    0%, 100% { left: -100%; }
    50%      { left: 150%; }
}

/* Low stock tag */
.alb-product-card__low-stock {
    background: #FFF8E1;
    color: #F57C00;
    font-size: 0.72rem;
    font-weight: 600;
    padding: 5px 10px;
    text-align: center;
    border-top: 1px solid #FFE082;
    font-family: var(--alb-font-body, 'DM Sans', sans-serif);
    animation: alb-low-stock-blink 2.5s ease infinite;
}
@keyframes alb-low-stock-blink {
    0%, 100% { opacity: 1; }
    50%      { opacity: 0.7; }
}

/* ═══════════════════════════════════════════════════════════
   2. SEARCH PAGE — Premium Filter Panel + Layout
═══════════════════════════════════════════════════════════ */

.alb-search-engine {
    margin-top: 2rem;
}

.alb-search-layout {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
    align-items: flex-start;
}

/* Filter panel — glassmorphism card */
.alb-filters-panel {
    width: 240px;
    flex-shrink: 0;
    padding: 20px;
    border-radius: 16px;
    position: sticky;
    top: 100px;
    background: rgba(255,255,255,0.72) !important;
    backdrop-filter: blur(14px) !important;
    -webkit-backdrop-filter: blur(14px) !important;
    border: 1px solid rgba(255,255,255,0.55) !important;
    box-shadow: 0 4px 24px rgba(0,0,0,0.06);
    transition: box-shadow 0.3s ease;
}
.alb-filters-panel:hover {
    box-shadow: 0 8px 40px rgba(0,0,0,0.10);
}

.alb-filters-title {
    margin: 0 0 16px;
    font-family: var(--alb-font-display, 'Playfair Display', serif);
    font-weight: 700;
    font-size: 1.1rem;
    color: #1A1A2E;
    display: flex;
    align-items: center;
    gap: 8px;
}
.alb-filters-title i {
    color: #FFD600;
}

.alb-filter-label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    font-family: var(--alb-font-body, 'DM Sans', sans-serif);
    font-size: 0.85rem;
    color: #424242;
}

.alb-filter-select {
    width: 100%;
    padding: 10px 12px;
    border: 1.5px solid #E0E0E0;
    border-radius: 10px;
    margin-bottom: 16px;
    font-family: var(--alb-font-body, 'DM Sans', sans-serif);
    font-size: 0.85rem;
    background: #fff;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%239E9E9E' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
}
.alb-filter-select:focus {
    border-color: #FFD600;
    box-shadow: 0 0 0 3px rgba(255,214,0,0.18);
    outline: none;
}

.alb-filter-input {
    width: 100%;
    padding: 8px 10px;
    border: 1.5px solid #E0E0E0;
    border-radius: 8px;
    font-family: var(--alb-font-body, 'DM Sans', sans-serif);
    font-size: 0.85rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.alb-filter-input:focus {
    border-color: #FFD600;
    box-shadow: 0 0 0 3px rgba(255,214,0,0.18);
    outline: none;
}

.alb-filter-price-row {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-bottom: 16px;
}
.alb-filter-price-sep {
    color: #BDBDBD;
    font-weight: 300;
}

.alb-filter-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    cursor: pointer;
    font-family: var(--alb-font-body, 'DM Sans', sans-serif);
    font-size: 0.85rem;
    color: #424242;
    transition: color 0.15s;
}
.alb-filter-checkbox:hover {
    color: #1A1A2E;
}
.alb-filter-checkbox input[type="checkbox"] {
    accent-color: #FFD600;
    width: 18px;
    height: 18px;
}

.alb-search-results-col {
    flex: 1;
    min-width: 0;
}

.alb-search-meta {
    margin-bottom: 16px;
    color: #888;
    font-size: 0.875rem;
    font-family: var(--alb-font-body, 'DM Sans', sans-serif);
}


/* ═══════════════════════════════════════════════════════════
   3. SEARCH BAR — Premium Pill
═══════════════════════════════════════════════════════════ */

.ape-search-bar-form {
    max-width: 640px;
    margin: 0 auto;
}

.ape-search-bar {
    display: flex;
    align-items: center;
    background: #fff;
    border-radius: 999px;
    border: 2px solid #E0E0E0;
    padding: 4px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden;
}
.ape-search-bar:focus-within {
    border-color: #FFD600;
    box-shadow: 0 0 0 4px rgba(255,214,0,0.15), 0 8px 32px rgba(0,0,0,0.08);
}

.ape-search-cat-select {
    border: none;
    background: transparent;
    padding: 10px 12px;
    font-family: var(--alb-font-body, 'DM Sans', sans-serif);
    font-size: 0.85rem;
    color: #616161;
    outline: none;
    border-right: 1px solid #E0E0E0;
    cursor: pointer;
    min-width: 140px;
}

.ape-search-input-field {
    flex: 1;
    border: none;
    padding: 12px 16px;
    font-family: var(--alb-font-body, 'DM Sans', sans-serif);
    font-size: 0.95rem;
    color: #212121;
    outline: none;
    background: transparent;
}
.ape-search-input-field::placeholder {
    color: #BDBDBD;
}

.ape-search-submit {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    background: #FFD600;
    color: #1A1A2E;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
    transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.ape-search-submit:hover {
    background: #E6C200;
    transform: scale(1.08);
    box-shadow: 0 4px 16px rgba(255,214,0,0.4);
}

/* Suggestions dropdown */
.ape-search-suggestions {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 12px 48px rgba(0,0,0,0.12);
    border: 1px solid #F0F0F0;
    z-index: 100;
    max-height: 400px;
    overflow-y: auto;
    animation: alb-suggestions-in 0.25s ease;
}
@keyframes alb-suggestions-in {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: translateY(0); }
}

.ape-suggestion-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    text-decoration: none;
    color: #212121;
    transition: background 0.15s ease;
    border-bottom: 1px solid #F5F5F5;
}
.ape-suggestion-item:last-child {
    border-bottom: none;
}
.ape-suggestion-item:hover {
    background: #FFFDE7;
}
.ape-suggestion-img {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
}
.ape-suggestion-title {
    font-size: 0.85rem;
    font-weight: 600;
    font-family: var(--alb-font-body, 'DM Sans', sans-serif);
}
.ape-suggestion-price {
    font-size: 0.8rem;
    font-weight: 700;
    color: #FFD600;
    font-family: var(--alb-font-body, 'DM Sans', sans-serif);
    white-space: nowrap;
}
.ape-search-all {
    display: block;
    padding: 12px 16px;
    text-align: center;
    font-weight: 700;
    font-size: 0.85rem;
    color: #1A1A2E;
    text-decoration: none;
    border-top: 1px solid #F0F0F0;
    transition: background 0.15s;
}
.ape-search-all:hover {
    background: #FFFDE7;
}

/* Shimmer placeholder */
.ape-search-shimmer {
    background: linear-gradient(90deg, #F0F0F0 25%, #E8E8E8 50%, #F0F0F0 75%);
    background-size: 600px 100%;
    animation: alb-shimmer 1.4s infinite linear;
    border-radius: 12px;
    height: 48px;
    margin: 8px 16px;
}


/* ═══════════════════════════════════════════════════════════
   4. CATEGORY SLIDER — Enhanced Animations
═══════════════════════════════════════════════════════════ */

/* Enhance category slide entrance */
.alb-cat-slide {
    animation: alb-cat-entrance 0.5s ease both;
}
.alb-cat-slide:nth-child(1) { animation-delay: 0s; }
.alb-cat-slide:nth-child(2) { animation-delay: 0.08s; }
.alb-cat-slide:nth-child(3) { animation-delay: 0.16s; }
.alb-cat-slide:nth-child(4) { animation-delay: 0.24s; }
.alb-cat-slide:nth-child(5) { animation-delay: 0.32s; }
.alb-cat-slide:nth-child(6) { animation-delay: 0.40s; }

@keyframes alb-cat-entrance {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Category slide name — shimmer text effect on hover */
.alb-cat-slide-name {
    position: relative;
    background: linear-gradient(90deg, #fff 0%, #FFD600 50%, #fff 100%);
    background-size: 200% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    transition: background-position 0.6s ease;
}
.alb-cat-slide:hover .alb-cat-slide-name {
    background-position: -100% 0;
    -webkit-text-fill-color: transparent;
}

/* Category slider dots — enhanced */
.alb-cs-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    border: none;
    background: #D1D5DB;
    cursor: pointer;
    padding: 0;
    transition: all 0.3s cubic-bezier(0.34,1.56,0.64,1);
}
.alb-cs-dot.active {
    background: #FFD600;
    width: 24px;
    border-radius: 999px;
    box-shadow: 0 2px 8px rgba(255,214,0,0.4);
}
.alb-cs-dot:hover:not(.active) {
    background: #9CA3AF;
    transform: scale(1.3);
}

/* Category slider arrows — enhanced */
.alb-cs-arrow {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1.5px solid #E0E0E0;
    background: #fff;
    color: #616161;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    transition: all 0.25s cubic-bezier(0.34,1.56,0.64,1);
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.alb-cs-arrow:hover {
    background: #FFD600;
    border-color: #FFD600;
    color: #1A1A2E;
    transform: scale(1.12);
    box-shadow: 0 4px 16px rgba(255,214,0,0.35);
}
.alb-cs-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 16px;
}
.alb-cs-dots {
    display: flex;
    gap: 6px;
    align-items: center;
}


/* ═══════════════════════════════════════════════════════════
   5. GLOBAL PREMIUM ANIMATIONS — The "Wow" Layer
═══════════════════════════════════════════════════════════ */

/* Smooth page entrance */
.alb-plugin-page .entry-content,
.alb-plugin-page .post-content,
.alb-plugin-page article {
    animation: alb-page-entrance 0.6s ease both;
}
@keyframes alb-page-entrance {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Hover glow border on product cards */
.alb-product-card {
    transition: transform 0.4s ease,
                box-shadow 0.4s ease,
                border-color 0.4s ease;
}
.alb-product-card:hover {
    border-color: #FFD600;
    box-shadow: 0 16px 48px rgba(0,0,0,0.10),
                0 0 0 2px rgba(255,214,0,0.25),
                0 4px 16px rgba(0,0,0,0.06);
}

/* Floating animation for empty states */
@keyframes alb-float {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-8px); }
}

/* Counting animation for stat numbers */
@keyframes alb-number-pop {
    0%   { transform: scale(1); }
    50%  { transform: scale(1.15); color: #FFD600; }
    100% { transform: scale(1); }
}

/* Smooth img loading */
.alb-product-card__img {
    animation: alb-img-load 0.4s ease both;
}
@keyframes alb-img-load {
    from { opacity: 0; filter: blur(8px); }
    to   { opacity: 1; filter: blur(0); }
}

/* Add to cart success animation */
@keyframes alb-cart-success {
    0%   { transform: scale(1); }
    20%  { transform: scale(0.92); }
    50%  { transform: scale(1.08); background: #00C853; color: #fff; }
    100% { transform: scale(1); }
}
.alb-btn-cart.alb-added {
    animation: alb-cart-success 0.5s ease;
}

/* Favorite heart bounce */
@keyframes alb-heart-pop {
    0%   { transform: scale(1); }
    25%  { transform: scale(1.4); }
    50%  { transform: scale(0.9); }
    75%  { transform: scale(1.15); }
    100% { transform: scale(1); }
}


/* ═══════════════════════════════════════════════════════════
   6. PAGINATION — Premium Style
═══════════════════════════════════════════════════════════ */

.alb-pagination {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 32px;
    padding: 16px 0;
}
.alb-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border-radius: 12px;
    background: #fff;
    border: 1.5px solid #E5E7EB;
    color: #374151;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    font-family: var(--alb-font-body, 'DM Sans', sans-serif);
    transition: all 0.25s cubic-bezier(0.34,1.56,0.64,1);
    cursor: pointer;
}
.alb-pagination .page-numbers:hover {
    background: #FFFDE7;
    border-color: #FFD600;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255,214,0,0.2);
}
.alb-pagination .page-numbers.current {
    background: #FFD600;
    color: #1A1A2E;
    border-color: #FFD600;
    box-shadow: 0 4px 16px rgba(255,214,0,0.35);
    transform: scale(1.05);
}
.alb-pagination .page-numbers.dots {
    border: none;
    background: transparent;
    cursor: default;
}
.alb-pagination .page-numbers.dots:hover {
    transform: none;
    box-shadow: none;
}


/* ═══════════════════════════════════════════════════════════
   7. SECTION HEADERS — Premium Titles
═══════════════════════════════════════════════════════════ */

.alb-section-title {
    font-family: var(--alb-font-display, 'Playfair Display', serif);
    font-weight: 700;
    font-size: 1.75rem;
    color: #1A1A2E;
    text-align: center;
    margin-bottom: 2rem;
    position: relative;
    padding-bottom: 12px;
}
.alb-section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, #FFD600, #00C853);
    border-radius: 999px;
}


/* ═══════════════════════════════════════════════════════════
   8. RESPONSIVE — Mobile Adjustments
═══════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
    .alb-search-layout {
        flex-direction: column;
    }
    .alb-filters-panel {
        width: 100%;
        position: static;
    }
    .alb-search-results-col {
        width: 100%;
    }
    .ape-search-cat-select {
        display: none; /* Hide category dropdown on mobile — use filter panel */
    }
    .ape-search-bar {
        border-radius: 14px;
    }
    .ape-search-input-field {
        font-size: 1rem;
    }
    /* Category text effect: disable on mobile for perf */
    .alb-cat-slide-name {
        background: none;
        -webkit-text-fill-color: inherit;
        color: #fff;
    }
}

@media (max-width: 480px) {
    .alb-filters-panel {
        padding: 14px;
    }
    .alb-filters-title {
        font-size: 1rem;
    }
    .alb-product-card__overlay {
        display: none; /* No hover on mobile */
    }
}


/* ═══════════════════════════════════════════════════════════
   9. AUTH FORMS — Login + Registration
═══════════════════════════════════════════════════════════ */

.alb-form-label {
    display: block;
    font-family: var(--alb-font-body, 'DM Sans', sans-serif);
    font-size: 0.875rem;
    font-weight: 600;
    color: #424242;
    margin-bottom: 0.4rem;
}

.alb-login-input {
    width: 100%;
    padding: 12px 14px;
    border: 1.5px solid #E0E0E0;
    border-radius: 12px;
    font-family: var(--alb-font-body, 'DM Sans', sans-serif);
    font-size: 0.9rem;
    color: #212121;
    background: #FAFAFA;
    transition: border-color 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
    box-sizing: border-box;
}
.alb-login-input:focus {
    border-color: #FFD600;
    box-shadow: 0 0 0 4px rgba(255,214,0,0.12);
    background: #fff;
    outline: none;
}
.alb-login-input::placeholder {
    color: #BDBDBD;
}

.alb-login-submit-btn {
    width: 100%;
    padding: 14px 1.5rem;
    border: none;
    border-radius: 999px;
    background: #FFD600;
    color: #1A1A2E;
    font-family: var(--alb-font-body, 'DM Sans', sans-serif);
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 4px 16px rgba(255,214,0,0.3);
}
.alb-login-submit-btn:hover {
    background: #E6C200;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(255,214,0,0.4);
}
.alb-login-submit-btn:active {
    transform: translateY(0);
}

.alb-auth-msg {
    border-radius: 12px;
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    font-family: var(--alb-font-body, 'DM Sans', sans-serif);
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 8px;
    animation: alb-msg-shake 0.4s ease;
}
.alb-auth-msg--error {
    background: #FEE2E2;
    color: #991B1B;
    border: 1px solid #FECACA;
}
.alb-auth-msg--success {
    background: #DCFCE7;
    color: #166534;
    border: 1px solid #BBF7D0;
}
@keyframes alb-msg-shake {
    0%, 100% { transform: translateX(0); }
    20%      { transform: translateX(-6px); }
    40%      { transform: translateX(6px); }
    60%      { transform: translateX(-4px); }
    80%      { transform: translateX(4px); }
}

/* ═══════════════════════════════════════════════════════════
   10. REDUCED MOTION — Accessibility
═══════════════════════════════════════════════════════════ */

@media (prefers-reduced-motion: reduce) {
    .alb-badge-pulse,
    .alb-badge-shine::after,
    .alb-cat-slide,
    .alb-product-card__img,
    .alb-product-card::before,
    .alb-low-stock-blink,
    .alb-plugin-page .entry-content,
    .alb-plugin-page article {
        animation: none !important;
    }
    .alb-product-card__overlay { transition: none; }
    .alb-quickview-btn { transition: none; transform: none; }
}


/* ═══════════════════════════════════════════════════════════
   12. WC ARCHIVE / CATEGORY — Grid compatibility
   WooCommerce wraps products in ul.products > li.product.
   Make these transparent so .alb-products-grid acts as the grid parent
   and .alb-product-card is the visual grid item.
═══════════════════════════════════════════════════════════ */

/* Make WC ul/li structure transparent to our grid */
.alb-products-grid ul.products {
    display: contents;
    list-style: none;
    margin: 0;
    padding: 0;
}
.alb-products-grid ul.products > li.product {
    display: contents;
}

/* WC archive page wrapper — clean up */
.alb-plugin-page .woocommerce-products-header {
    padding: 24px 20px 0;
}
.alb-plugin-page .woocommerce-products-header__title {
    font-family: var(--alb-font-heading, 'Playfair Display', serif);
    font-size: 1.8rem;
    font-weight: 700;
    color: #1A1A2E;
    text-align: center;
    margin-bottom: 8px;
}

/* Result count & ordering — styled consistently */
.alb-plugin-page .woocommerce-result-count,
.alb-plugin-page .woocommerce-ordering {
    font-family: var(--alb-font-body, 'DM Sans', sans-serif);
    font-size: 0.85rem;
    color: #555;
}
.alb-plugin-page .woocommerce-ordering select {
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    padding: 8px 14px;
    font-family: var(--alb-font-body, 'DM Sans', sans-serif);
    font-size: 0.85rem;
    background: #fff;
    transition: border-color 0.2s ease;
    cursor: pointer;
}
.alb-plugin-page .woocommerce-ordering select:focus {
    outline: none;
    border-color: #FFD600;
    box-shadow: 0 0 0 3px rgba(255,214,0,0.15);
}

/* WC before-shop-loop bar — flex layout */
.alb-plugin-page .woocommerce-notices-wrapper + .woocommerce-result-count,
.alb-plugin-page p.woocommerce-result-count {
    margin-bottom: 0;
}

/* WC pagination — use Albasy premium style */
.alb-plugin-page nav.woocommerce-pagination {
    text-align: center;
    margin: 32px 0 16px;
}
.alb-plugin-page nav.woocommerce-pagination ul {
    display: inline-flex;
    gap: 6px;
    list-style: none;
    padding: 0;
    margin: 0;
}
.alb-plugin-page nav.woocommerce-pagination ul li a,
.alb-plugin-page nav.woocommerce-pagination ul li span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border-radius: 12px;
    font-family: var(--alb-font-body, 'DM Sans', sans-serif);
    font-weight: 600;
    font-size: 0.85rem;
    color: #1A1A2E;
    background: #f4f4f4;
    text-decoration: none;
    transition: all 0.25s ease;
}
.alb-plugin-page nav.woocommerce-pagination ul li a:hover {
    background: #FFD600;
    color: #1A1A2E;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255,214,0,0.3);
}
.alb-plugin-page nav.woocommerce-pagination ul li span.current {
    background: #1A1A2E;
    color: #FFD600;
}

/* Hide WooCommerce default elements we've replaced */
.alb-plugin-page .woocommerce .products .product .button.add_to_cart_button,
.alb-plugin-page .woocommerce .products .product .added_to_cart {
    display: none !important;
}

/* Category page — hero-style header */
.alb-plugin-page .term-description {
    font-family: var(--alb-font-body, 'DM Sans', sans-serif);
    font-size: 0.95rem;
    color: #666;
    text-align: center;
    max-width: 640px;
    margin: 0 auto 24px;
    line-height: 1.6;
}

/* Breadcrumb on WC pages */
.alb-plugin-page .acd-breadcrumb {
    padding: 16px 20px;
    font-family: var(--alb-font-body, 'DM Sans', sans-serif);
    font-size: 0.82rem;
}
.alb-plugin-page .acd-breadcrumb a {
    color: #888;
    text-decoration: none;
    transition: color 0.2s ease;
}
.alb-plugin-page .acd-breadcrumb a:hover {
    color: #FFD600;
}
.alb-plugin-page .acd-breadcrumb-sep {
    margin: 0 8px;
    color: #ccc;
    font-size: 0.7rem;
}

/* ═══════════════════════════════════════════════════════════
   13. WC ARCHIVE — LAYOUT PLEINE LARGEUR + GRILLE
   Architecture correcte :
   .alb-products-grid = container grid (display:grid)
   ul.products = display:contents (transparent)
   li.product  = display:contents (transparent)
   .alb-product-card = item visuel
   Cible body.tax-product_cat (WooCommerce natif, non-cacheable)
   ET body.alb-plugin-page pour double sécurité
═══════════════════════════════════════════════════════════ */

/* ── 1. Sidebar masquée ── */
body.tax-product_cat #secondary,
body.tax-product_cat aside.widget-area,
body.tax-product_cat .widget-area,
body.alb-plugin-page #secondary,
body.alb-plugin-page aside.widget-area {
    display: none !important;
}

/* ── 2. Parents pleine largeur ── */
body.tax-product_cat #page,
body.tax-product_cat #content,
body.tax-product_cat .site-content,
body.tax-product_cat .content-area,
body.tax-product_cat #primary,
body.tax-product_cat .site-main,
body.tax-product_cat #main,
body.tax-product_cat main,
body.tax-product_cat .col-full,
body.tax-product_cat .hentry,
body.tax-product_cat article {
    width: 100% !important;
    max-width: 100% !important;
    float: none !important;
    overflow: visible !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    flex: 1 1 100% !important;
    box-sizing: border-box !important;
}

/* ── 3. Container WooCommerce ── */
body.tax-product_cat .woocommerce,
body.alb-plugin-page .woocommerce {
    width: 100% !important;
    max-width: 1400px !important;
    margin: 0 auto !important;
    padding: 0 24px !important;
    box-sizing: border-box !important;
}

/* ── 4. Container grille = alb-products-grid (PAS ul.products) ── */
body.tax-product_cat .alb-products-grid,
body.alb-plugin-page .alb-products-grid {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 18px !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    padding: 20px 0 !important;
    margin: 0 !important;
}

/* ── 5. ul.products et li.product = transparents (display:contents) ── */
/* NE PAS mettre display:grid ici — ça casserait l'architecture */
body.tax-product_cat .alb-products-grid ul.products,
body.alb-plugin-page .alb-products-grid ul.products {
    display: contents !important;
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
}
body.tax-product_cat .alb-products-grid ul.products > li.product,
body.alb-plugin-page .alb-products-grid ul.products > li.product {
    display: contents !important;
    margin: 0 !important;
    padding: 0 !important;
    float: none !important;
    width: auto !important;
}

/* ── 6. Responsive ── */
@media (max-width: 1100px) {
    body.tax-product_cat .alb-products-grid,
    body.alb-plugin-page .alb-products-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    }
}
@media (max-width: 768px) {
    body.tax-product_cat .alb-products-grid,
    body.alb-plugin-page .alb-products-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 12px !important;
        padding: 12px 0 !important;
    }
    body.tax-product_cat .woocommerce,
    body.alb-plugin-page .woocommerce {
        padding: 0 12px !important;
    }
}
@media (max-width: 420px) {
    body.tax-product_cat .alb-products-grid,
    body.alb-plugin-page .alb-products-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 8px !important;
        padding: 8px 0 !important;
    }
}
