/**
 * Mazaya Archive Styles - Vertical Grid Coupon Design
 *
 * Custom styles for the mazaya archive page
 *
 * @package Tewido_Child
 * @since 1.0.0
 */

/* Sticky Category Filter Navigation */
#mazaya-filter-nav {
    backdrop-filter: blur(10px);
    background-color: rgba(255, 255, 255, 0.95);
}

#mazaya-filter-nav.scrolled {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

/* Category Filter Buttons */
.filter-btn {
    font-weight: 500;
    cursor: pointer;
    border: none;
    outline: none;
    white-space: nowrap;
}

.filter-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.filter-btn:active {
    transform: translateY(0);
}

/* Vertical Grid Coupon Card */
.mazaya-coupon {
    position: relative;
    transition: all 0.3s ease;
    animation: fadeIn 0.4s ease-out;
}

.mazaya-coupon-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.mazaya-coupon-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s ease;
    position: relative;
    height: 100%;
}

.mazaya-coupon:hover .mazaya-coupon-card {
    transform: translateY(-6px);
}

/* Top Section - Image/Discount */
.mazaya-coupon-top {
    position: relative;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.mazaya-coupon-top.mazaya-processing {
    opacity: 0.95;
}

.mazaya-coupon-top.mazaya-processed {
    animation: bgFadeIn 0.6s ease;
}

@keyframes bgFadeIn {
    from {
        opacity: 0.8;
    }

    to {
        opacity: 1;
    }
}

.mazaya-coupon-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
    mix-blend-mode: darken;
}

.mazaya-coupon:hover .mazaya-coupon-image {
    transform: scale(1.1);
}

.mazaya-coupon-discount-big {
    text-align: center;
    color: #fff;
}

.mazaya-coupon-discount-big .discount-percentage {
    font-size: 64px;
    font-weight: 900;
    line-height: 1;
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.3);
}

.mazaya-coupon-discount-big .discount-label {
    font-size: 22px;
    font-weight: 600;
    margin-top: 8px;
    opacity: 0.95;
}

.mazaya-coupon-placeholder {
    color: rgba(255, 255, 255, 0.5);
}

/* Discount Badge Overlay (when image exists) */
.mazaya-coupon-discount-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: linear-gradient(135deg, #B94D63 0%, #6B1F31 100%);
    color: #fff;
    border-radius: 12px;
    padding: 8px 12px;
    box-shadow: 0 4px 12px rgba(185, 77, 99, 0.4);
    z-index: 10;
}

.mazaya-coupon-discount-badge .badge-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    line-height: 1;
}

.mazaya-coupon-discount-badge .discount-num {
    font-size: 24px;
    font-weight: 700;
    line-height: 1;
}

.mazaya-coupon-discount-badge .discount-text {
    font-size: 12px;
    font-weight: 600;
    margin-top: 2px;
}

/* Category Tag */
.mazaya-coupon-category-tag {
    position: absolute;
    bottom: 16px;
    left: 16px;
    background: rgba(0, 0, 0, 0.75);
    color: #fff;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    backdrop-filter: blur(8px);
    z-index: 10;
}


/* Perforation Divider */
.mazaya-coupon-perforation {
    position: relative;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    margin-top: -12px;
}

.perf-circle {
    position: absolute;
    width: 32px;
    height: 32px;
    background: #f9fafb;
    border-radius: 50%;
    top: 50%;
    transform: translateY(-50%);
    z-index: 5;
}

.perf-left {
    left: -16px;
}

.perf-right {
    right: -16px;
}

.perf-dashes {
    width: 100%;
    height: 2px;
    background-image: repeating-linear-gradient(to right,
            #d1d5db 0px,
            #d1d5db 8px,
            transparent 8px,
            transparent 16px);
}

/* Bottom Section - Content */
.mazaya-coupon-bottom {
    padding: 18px 20px 18px 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: #fff;
    position: relative;
}

.mazaya-coupon-title {
    font-size: 18px;
    font-weight: 700;
    color: #1f2937;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 4px;
}

.mazaya-coupon-excerpt {
    color: #6b7280;
    font-size: 13px;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 6px;
}

.mazaya-coupon-meta {
    display: flex;
    flex-direction: column;
    gap: 5px;
    font-size: 12px;
    color: #6b7280;
    padding: 8px 0 0 0;
    border-top: 1px solid #f3f4f6;
}

.mazaya-coupon-meta .meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.mazaya-coupon-meta .meta-item svg {
    flex-shrink: 0;
    color: #6b1f31;
}

/* CTA Button - Hidden by default, shows on hover */
.mazaya-coupon-cta {
    position: absolute;
    bottom: 18px;
    left: 20px;
    right: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 11px 16px;
    background: linear-gradient(135deg, #6b1f31 0%, #b94d63 100%);
    color: #fff;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    pointer-events: none;
    z-index: 10;
}

.mazaya-coupon:hover .mazaya-coupon-cta {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
    background: linear-gradient(135deg, #5a1928 0%, #a84356 100%);
    box-shadow: 0 6px 16px rgba(107, 31, 49, 0.4);
}

.mazaya-coupon-cta .cta-text {
    transition: transform 0.3s ease;
}

.mazaya-coupon:hover .mazaya-coupon-cta .cta-text {
    transform: translateX(-4px);
}

.mazaya-coupon-cta .cta-arrow {
    width: 20px;
    height: 20px;
    transition: transform 0.3s ease;
}

.mazaya-coupon:hover .mazaya-coupon-cta .cta-arrow {
    transform: translateX(-6px);
    animation: arrowBounce 0.6s ease-in-out infinite;
}

@keyframes arrowBounce {

    0%,
    100% {
        transform: translateX(-6px);
    }

    50% {
        transform: translateX(-10px);
    }
}

/* Load More Button */
#load-more-mazaya {
    position: relative;
    min-width: 200px;
}

#load-more-mazaya:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Loading Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Dark Mode Support */
.dark #mazaya-filter-nav {
    background-color: rgba(31, 41, 55, 0.95);
    border-color: #374151;
}

.dark .mazaya-coupon-card {
    background: #1f2937;
}

.dark .mazaya-coupon-bottom {
    background: #1f2937;
}

.dark .mazaya-coupon-title {
    color: #f9fafb;
}

.dark .mazaya-coupon-excerpt {
    color: #d1d5db;
}

.dark .mazaya-coupon-meta {
    color: #9ca3af;
    border-color: #374151;
}

.dark .perf-circle {
    background: #111827;
}

.dark .perf-dashes {
    background-image: repeating-linear-gradient(to right,
            #374151 0px,
            #374151 8px,
            transparent 8px,
            transparent 16px);
}

.dark .mazaya-coupon-perforation {
    background: #1f2937;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .mazaya-coupon-top {
        height: 180px;
    }

    .mazaya-coupon-discount-big .discount-percentage {
        font-size: 56px;
    }

    .mazaya-coupon-discount-big .discount-label {
        font-size: 20px;
    }
}

@media (max-width: 768px) {
    #mazaya-filter-nav {
        position: sticky;
        top: 0;
    }

    #mazaya-filter-nav .container {
        padding-left: 12px;
        padding-right: 12px;
    }

    #mazaya-filter-nav .flex {
        gap: 8px;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        -ms-overflow-style: none;
        justify-content: flex-start;
        padding-bottom: 4px;
    }

    #mazaya-filter-nav .flex::-webkit-scrollbar {
        display: none;
    }

    .filter-btn {
        font-size: 14px;
        padding: 8px 16px;
        flex-shrink: 0;
    }

    .mazaya-coupon-top {
        height: 200px;
    }

    .mazaya-coupon-bottom {
        padding: 20px;
    }

    .mazaya-coupon-title {
        font-size: 18px;
        min-height: auto;
    }

    .mazaya-coupon-excerpt {
        font-size: 13px;
    }

    .mazaya-coupon-discount-badge {
        top: 12px;
        right: 12px;
        padding: 10px 14px;
    }

    .mazaya-coupon-discount-badge .discount-num {
        font-size: 28px;
    }
}

@media (max-width: 480px) {
    .mazaya-coupon-cta {
        padding: 12px 16px;
        font-size: 14px;
    }

    .mazaya-coupon-meta {
        gap: 6px;
    }
}

/* No Results Message */
.no-results {
    text-align: center;
    padding: 60px 20px;
    color: #9ca3af;
}

.no-results svg {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    opacity: 0.3;
}

/* Accessibility */
.filter-btn:focus-visible,
.mazaya-coupon-link:focus-visible,
#load-more-mazaya:focus-visible {
    outline: 2px solid #6b1f31;
    outline-offset: 2px;
}


.te-header {
    z-index: 999;
}