/* =========================================
   Epichef Frontend Styles - Premium Theme
   ========================================= */

:root {
    --ec-red: #d63638;
    --ec-beige: #FEF5E6;
    --ec-cream: #FEEED4;
    --ec-text: #333;
    --ec-scallop-size: 12px;
}

body {
    background-color: var(--ec-beige);
    /* Global Background Match */
}

/* --- 1. Hero Banner --- */
.epichef-hero-banner {
    width: 100%;
    margin-bottom: 40px;
    background: var(--ec-beige);
}

.epichef-banner-img {
    width: 100%;
    height: auto;
    display: block;
}

/* --- 2. Intro Section --- */
.epichef-intro-section {
    text-align: center;
    padding: 80px 20px 100px;
    background: var(--ec-beige);
}

.epichef-title-wrapper {
    background-image: url(https://ahura.xyz/epichef/wp-content/uploads/2025/12/CRAFTED-Underline.png);
    padding: 0rem 0rem 0.5rem 0rem;
    background-position: bottom center;
    background-repeat: no-repeat;
    background-size: 80% 3%;
    text-align: center;
    margin-bottom: 1%;
    display: inline-block;
}

.epichef-page-title {
    font-family: "Bayon", Sans-serif;
    font-size: 56px !important;
    font-weight: 400 !important;
    text-transform: uppercase !important;
    font-style: normal !important;
    text-decoration: none !important;
    margin: 0;
    display: inline-block;
}

.epichef-page-desc {
    color: #525252;
    max-width: 700px;
    margin: 15px auto 35px;
    line-height: 150%;
    font-family: 'Open Sauce Sans';
    font-size: 18px;
    font-weight: 400;
    margin-bottom: 0;
}

.epichef-btn-download {
    background: var(--ec-red);
    color: #fff;
    border: none;
    padding: 12px 30px;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.5px;
    cursor: pointer;
    font-size: 13px;
    border-radius: 4px;
    /* Slight round, mostly rect */
    transition: transform 0.2s, background 0.2s;
    display: inline-flex;
    align-items: center;
}

.epichef-btn-download:hover {
    background: #b92b2d;
    /* transform: translateY(-2px); */
}

/* --- 3. Filter Strip (Scalloped) --- */
.epichef-filter-strip {
    background: #fdf0d5;
    /* Slightly darker/richer beige for contrast */
    padding: 30px 0;
    position: relative;
    margin-bottom: 50px;
}

/* Scallop Decorators */
.epichef-scallop-top,
.epichef-scallop-bottom {
    position: absolute;
    left: 0;
    width: 100%;
    height: 10px;
    background-size: 20px 20px;
    background-repeat: repeat-x;
}

.epichef-scallop-top {
    top: -10px;
    background-image: radial-gradient(circle at 10px 0, transparent 10px, #fdf0d5 10.5px);
}

.epichef-scallop-bottom {
    bottom: -10px;
    background-image: radial-gradient(circle at 10px 10px, #fdf0d5 10px, transparent 10.5px);
}

.epichef-cat-filter {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 100px;
}

.epichef-filter-link {
    text-decoration: none;
    color: #323232 !important;
    text-transform: uppercase;
    font-weight: 400;
    font-size: 32px;
    padding-bottom: 0;
    border-bottom: 0;
    font-family: 'Bayon';
    transition: all 0.2s;
}

.epichef-filter-link:hover,
.epichef-filter-link.active {
    color: var(--ec-red) !important;
}

/* --- 4. Product Grid --- */
.epichef-main-content {
    padding-bottom: 80px;
}

.epichef-archive-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(342px, 1fr));
    gap: 24px;
    width: 100%;
}

.epichef-card {
    background: #fff;
    /* White cards on beige bg */
    border-radius: 4px;
    /* Sharp-ish corners */
    overflow: hidden;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.epichef-link-wrapper {
    text-decoration: none;
    color: inherit;
    display: block;
    height: 100%;
}

.epichef-card-image {
    background: #FEEED4;
    /* Inner image bg cream */
    height: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.epichef-card-image img {
    height: 65%;
    object-fit: contain;
    width: 180px;
    transition: transform 0.4s ease;
    filter: drop-shadow(5px 9px 23px #0000001A) drop-shadow(18px 37px 41px #00000017) drop-shadow(41px 83px 56px #0000000D) drop-shadow(73px 148px 66px #00000003) drop-shadow(114px 231px 72px #00000000);
}

.epichef-card:hover .epichef-card-image img {
    transform: translate3d(0, 45px, 0) scale(1.1) rotate(-14.19deg);
    /* Subtle zoom */
}

.epichef-card-content {
    padding: 20px;
    display: flex;
    justify-content: space-between;
    z-index: 9;
    position: relative;
    background: white;
    position: relative;
    align-items: center;
}

.epichef-card-title {
    margin: 0;
    font-size: 16px;
    font-weight: 800;
    text-transform: uppercase;
    color: #222;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.epichef-card-meta {
    font-size: 14px;
    color: #777;
    margin: 0;
    font-weight: 400;
    font-family: 'Open Sauce Sans';
}

.epichef-card-action {
    display: flex;
    justify-content: flex-end;
    /* Arrow to right */
    padding-right: 0;
    margin: 0;
}

.epichef-card:hover .epichef-arrow-box {
    background: var(--ec-red);
}

/* --- 5. Pagination --- */
.epichef-pagination {
    margin-top: 60px;
    text-align: center;
}

.epichef-pagination .page-numbers {
    display: inline-block;
    width: 35px;
    height: 35px;
    line-height: 35px;
    margin: 0 5px;
    color: #404040;
    text-decoration: none;
    font-weight: 600;
    font-size: 20px;
    border-radius: 0;
    font-family: 'Bayon';
    border-radius: 0px;
}

.epichef-pagination .page-numbers.current,
.epichef-pagination .page-numbers:hover {
    color: var(--ec-red);
    border-radius: 0px;
    background: #fff;
}


/* --- 6. Popup Modal --- */
.epichef-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
    backdrop-filter: blur(2px);
}

.epichef-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.epichef-modal {
    background: #fff;
    padding: 40px;
    width: 90%;
    max-width: 480px;
    border-radius: 8px;
    position: relative;
    transform: translateY(20px);
    transition: transform 0.3s;
    text-align: center;
}

.epichef-modal-overlay.active .epichef-modal {
    transform: translateY(0);
}

.epichef-close-modal {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 24px;
    cursor: pointer;
    color: #888;
}

.epichef-close-modal:hover {
    color: var(--ec-red);
}

/* --- 7. Single Product Variant Switcher (Keep Existing) --- */
.epichef-variant-switcher {
    display: flex;
    gap: 10px;
    margin: 20px 0;
}

.epichef-variant-btn {
    padding: 8px 16px;
    border: 1px solid #ddd;
    background: #fff;
    cursor: pointer;
    border-radius: 4px;
    font-weight: 600;
    font-size: 13px;
}

.epichef-variant-btn.active {
    border-color: var(--ec-red);
    background: var(--ec-red);
    color: #fff;
}

.epichef-info-grid-item.hidden {
    display: none;
}

button.epichef-btn-download.epichef-trigger-popup p {
    margin: 0;
}

.epichef-narrow-container {
    margin: 0 auto;
    max-width: 1440px;
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

button.epichef-btn-download.epichef-trigger-popup {
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0;
    gap: 15px;
}


section.epichef-filter-strip {
    background-image: url('https://ahura.xyz/epichef/wp-content/uploads/2025/12/Background-element-4-scaled.png') !important;
    background-size: 100% 100% !important;
    background-position: center center;
    background: transparent;
}

.epichef-card-info-wrapper {
    text-align: left;
    min-width: 0;
}

.epichef-card-info-wrapper h3.epichef-card-title {
    margin: 0;
    font-size: 24px;
    font-family: 'Bayon';
    line-height: 150%;
    font-weight: 400;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
    max-width: 100%;
}



/* --- EPICHEF CARD HOVER ANIMATION --- */

/* 1. Base State */
.epichef-arrow-box {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #333;
    /* Dark background from design */
    transition: background-color 0.3s ease;
    overflow: hidden;
    /* Crucial: hides the arrow when it moves out */
    position: relative;
    padding: 10px 15px;
}

.epichef-arrow-box svg {
    display: block;
    position: relative;
    transition: transform 0.3s ease;
    /* Smooth movement */
    z-index: 2;
}

/* 2. Hover Background Change */
.epichef-card:hover .epichef-arrow-box {
    background-color: #d63638;
    /* Brand Red on Hover */
}

/* 3. The Left-to-Right Animation */
.epichef-card:hover .epichef-arrow-box svg {
    animation: slideRight 0.4s forwards;
}

@keyframes slideRight {
    0% {
        transform: translateX(0);
        opacity: 1;
    }

    49% {
        transform: translateX(30px);
        /* Move OUT to the right */
        opacity: 0;
    }

    50% {
        transform: translateX(-30px);
        /* Instantly jump to LEFT (invisible) */
        opacity: 0;
    }

    100% {
        transform: translateX(0);
        /* Slide IN to center */
        opacity: 1;
    }
}

/* Optional: Slight Lift on Card Hover for premium feel */
.epichef-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

img.epichef-absoulute-card-image {
    position: absolute;
    width: 100%;
    top: -5px;
    z-index: 1;
    left: 0;
    right: 0;
}


@media screen and (min-width: 768px) and (max-width: 1440px) {
    .epichef-archive-grid {
        padding: 0 5%;
    }
}


@media screen and (max-width: 768px) {
    .epichef-banner-img {
        width: 100%;
        height: 400px;
        display: block;
        object-fit: cover;
        object-position: left;
    }

    .epichef-page-desc {
        font-size: 14px;
    }

    .epichef-page-title {
        font-size: 28px !important;
    }

    .epichef-intro-section {
        text-align: center;
        padding: 30px 20px 80px;
    }

    .epichef-btn-download {
        padding: 10px 20px !important;
        text-transform: uppercase;
        font-weight: 400 !important;
        font-size: 18px !important;
    }

    button.epichef-btn-download.epichef-trigger-popup svg {
        width: 18px;
        height: 18px;
    }

    .epichef-archive-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        padding: 0 5%;
    }

    .epichef-card-info-wrapper h3.epichef-card-title {
        font-size: 20px;
    }

    .epichef-filter-link {
        font-size: 25px;
    }

    .epichef-cat-filter {
        display: flex;
        flex-wrap: unset;
        gap: 50px;
        overflow-x: scroll;
        flex-direction: row;
        width: 100%;
        padding: 0 0 0 5%;
        justify-content: flex-start;
    }

    section.epichef-filter-strip {
        background-size: 1500px 100% !important;
    }
}

@media screen and (max-width: 580px) {

    img.epichef-absoulute-card-image {
        display: none;
    }

    .epichef-link-wrapper {
        display: grid;
        grid-template-columns: 35% 65%;
    }

    .epichef-card-content {
        padding: 020px;
        display: flex;
        flex-direction: unset;
        z-index: 9;
        position: relative;
        background: white;
        align-items: center;
        gap: 1rem;
        justify-content: space-between;
    }

    .epichef-card-image img {
        height: 80px;
        object-fit: contain;
        width: 180px;
        transition: transform 0.4s ease;
    }

    .epichef-card-image {
        background: #FEEED4;
        height: 115px;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 0;
    }

    .epichef-card-meta {
        font-size: 12px;
    }

    .epichef-card-info-wrapper h3.epichef-card-title {
        font-size: 18px;
    }

    .epichef-card-action {
        display: none;
        opacity: 0;
        pointer-events: none;
    }

    .epichef-card:hover .epichef-card-image img {
        transform: translate3d(0, 19px, 0) scale(1.1) rotate(-14.19deg);
    }

    .epichef-filter-link {
        font-size: 20px;
		white-space:nowrap;
    }

    .epichef-cat-filter {
        gap: 30px;
        padding: 0 0 0 5%;
        justify-content: flex-start;
    }
}