/* =========================================================
   WC Easy Order Form — Stylesheet
   ========================================================= */

.wceo-wrap *,
.wceo-wrap *::before,
.wceo-wrap *::after {
    box-sizing: border-box;
}

/* Stacking level kept safe below global header */
.wceo-wrap.wceo-wolt-layout {
    display: flex;
    gap: 32px;
    max-width: 1360px;
    margin: 0 auto;
    padding: 24px 20px 120px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: #1e293b;
    position: relative !important;
    z-index: 1 !important;
}

/* ---------- LEFT SIDEBAR CATEGORIES ---------- */
.wceo-sidebar-nav {
    width: 260px;
    flex: 0 0 260px;
    position: sticky;
    top: 20px;
    height: fit-content;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    padding-right: 8px;
    z-index: 5 !important;
}

.wceo-nav-header {
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid #edf2f7;
}

.wceo-cat-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.wceo-cat-item {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 8px 14px;
    border-radius: 24px;
    border: none;
    background: transparent;
    color: #334155;
    font-size: 14.5px;
    font-weight: 500;
    cursor: pointer;
    text-align: left;
    text-decoration: none !important;
    transition: all 0.2s ease;
}

.wceo-cat-item:hover {
    background: #f1f5f9;
    color: #0f172a;
}

.wceo-cat-item.active {
    background: #e0f2fe;
    color: #0369a1;
    font-weight: 700;
}

/* Category Thumbnails & Breathing Animation */
.wceo-cat-thumb,
.wceo-cat-icon {
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
    min-height: 36px !important;
    border-radius: 50% !important;
    object-fit: cover !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease !important;
    animation: wceoCatPulse 4.5s ease-in-out infinite;
    animation-delay: var(--cat-delay, 0s);
    will-change: transform;
}

@keyframes wceoCatPulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 0 rgba(2, 132, 199, 0);
    }
    50% {
        transform: scale(1.16);
        box-shadow: 0 4px 10px rgba(2, 132, 199, 0.22);
    }
}

/* Hover over list pauses background pulses */
.wceo-cat-list:hover .wceo-cat-thumb,
.wceo-cat-list:hover .wceo-cat-icon {
    animation-play-state: paused !important;
}

/* Hovered item zooms in directly */
.wceo-cat-item:hover .wceo-cat-thumb,
.wceo-cat-item:hover .wceo-cat-icon {
    transform: scale(1.22) !important;
    box-shadow: 0 6px 14px rgba(2, 132, 199, 0.3) !important;
}

.wceo-cat-item.active .wceo-cat-thumb,
.wceo-cat-item.active .wceo-cat-icon {
    transform: scale(1.1) !important;
    animation: none !important;
}

.wceo-cat-icon {
    color: #0284c7;
}

.wceo-cat-fallback {
    background: #e0f2fe;
}

/* ---------- MAIN CONTENT AREA ---------- */
.wceo-main-content {
    flex: 1;
    min-width: 0;
    position: relative;
    z-index: 2;
}

.wceo-search-wrap {
    position: relative;
    width: 100%;
    max-width: 520px;
    margin-bottom: 24px;
    z-index: 10;
}

.wceo-product-search {
    width: 100%;
    min-height: 48px;
    padding: 0 40px 0 46px !important;
    background: #f1f5f9 !important;
    border: 1px solid transparent !important;
    border-radius: 30px !important;
    font-size: 15px !important;
    color: #0f172a !important;
    outline: none !important;
    transition: all 0.2s ease;
}

.wceo-product-search:focus {
    background: #ffffff !important;
    border-color: #cbd5e1 !important;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.05);
}

.wceo-search-icon {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: #64748b;
    pointer-events: none;
    display: flex;
    align-items: center;
}

.wceo-search-clear {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: #e2e8f0;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    cursor: pointer;
}

.wceo-grid-heading {
    font-size: 1.6rem;
    font-weight: 800;
    margin: 0 0 20px;
    color: #0f172a;
    letter-spacing: -0.02em;
}

/* ---------- PRODUCT GRID & CARDS ---------- */
.wceo-product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
}

.wceo-product-card {
    position: relative !important;
    background: #ffffff !important;
    border: 1px solid #edf2f7 !important;
    border-radius: 16px !important;
    padding: 14px 12px 10px !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
    cursor: pointer !important;
    min-height: 295px !important;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.25s ease !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02) !important;
    z-index: 2 !important;
}

.wceo-product-card:hover {
    transform: translateY(-4px) !important;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08) !important;
    border-color: #cbd5e1 !important;
    z-index: 3 !important;
}

/* Floating Plus Button */
.wceo-product-card button.wceo-card-plus-btn,
button.wceo-buy-now-btn.wceo-card-plus-btn {
    position: absolute !important;
    top: 10px !important;
    right: 10px !important;
    width: 36px !important;
    height: 36px !important;
    border-radius: 10px !important;
    background: #e0f2fe !important;
    border: none !important;
    color: #0284c7 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    z-index: 4 !important;
    padding: 0 !important;
    margin: 0 !important;
    transition: all 0.2s ease !important;
}

.wceo-product-card:hover button.wceo-card-plus-btn {
    background: #0284c7 !important;
    color: #ffffff !important;
    transform: scale(1.08) !important;
}

/* Product Image */
.wceo-product-img {
    position: relative !important;
    width: 100% !important;
    height: 150px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin: 4px 0 8px !important;
    overflow: hidden !important;
}

.wceo-product-img img {
    max-width: 95% !important;
    max-height: 95% !important;
    width: auto !important;
    height: auto !important;
    object-fit: contain !important;
    image-rendering: auto !important;
    transform: translateZ(0) scale(1) !important;
    transition: transform 0.3s ease !important;
}

.wceo-product-card:hover .wceo-product-img img {
    transform: translateZ(0) scale(1.04) !important;
}

/* Transparent Zoom Button */
.wceo-zoom-btn {
    position: absolute !important;
    bottom: 4px !important;
    right: 4px !important;
    width: 28px !important;
    height: 28px !important;
    border-radius: 8px !important;
    background: rgba(255, 255, 255, 0.65) !important;
    backdrop-filter: blur(4px) !important;
    -webkit-backdrop-filter: blur(4px) !important;
    border: 1px solid rgba(255, 255, 255, 0.8) !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08) !important;
    color: #334155 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    opacity: 0.9 !important;
    transition: all 0.2s ease !important;
    z-index: 5 !important;
    padding: 0 !important;
}

.wceo-zoom-btn:hover {
    background: rgba(255, 255, 255, 0.95) !important;
    color: #0284c7 !important;
    transform: scale(1.1) !important;
}

/* Product Info */
.wceo-product-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
    margin-top: auto;
}

.wceo-product-price {
    font-size: 0.96rem;
    font-weight: 700;
    color: #0369a1;
}

.wceo-product-name {
    margin: 0;
    font-size: 0.98rem;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.wceo-product-sku {
    margin: 0;
    font-size: 0.72rem;
    color: #94a3b8;
}

.wceo-product-short-description {
    margin: 2px 0;
    color: #64748b;
    font-size: 0.78rem;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 1;
    overflow: hidden;
}

/* Bottom Bar (Desktop view) */
.wceo-card-bottom-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 8px;
    padding-top: 6px;
    border-top: 1px solid #f8fafc;
    font-size: 0.76rem;
    color: #94a3b8;
}

/* ---------- RECENTLY VIEWED PRODUCTS ---------- */
.wceo-recently-viewed {
    margin-top: 50px;
    padding-top: 24px;
    border-top: 1px solid #e2e8f0;
}

.wceo-recent-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0 0 16px;
    color: #0f172a;
}

.wceo-recent-list {
    display: flex;
    gap: 14px;
    overflow-x: auto;
    padding-bottom: 12px;
}

.wceo-recent-card {
    flex: 0 0 180px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.wceo-recent-card:hover {
    background: #ffffff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.wceo-recent-card img {
    width: 44px;
    height: 44px;
    object-fit: contain;
    border-radius: 8px;
}

.wceo-recent-card div {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.wceo-recent-card strong {
    font-size: 0.8rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #1e293b;
}

.wceo-recent-card span {
    font-size: 0.75rem;
    color: #0369a1;
    font-weight: 700;
}

/* ---------- LIGHTBOX MODAL ---------- */
.wceo-lightbox-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.82);
    backdrop-filter: blur(6px);
    z-index: 9999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.wceo-lightbox-content {
    max-width: 580px;
    width: 100%;
    background: #fff;
    border-radius: 16px;
    padding: 16px;
    text-align: center;
}

.wceo-lightbox-content img {
    max-width: 100%;
    max-height: 70vh;
    object-fit: contain;
}

.wceo-lightbox-close {
    position: absolute;
    top: 20px;
    right: 25px;
    font-size: 38px;
    color: #fff;
    cursor: pointer;
}

/* ---------- SITE HEADER DROPDOWN PROTECTION ---------- */
header,
#site-header,
.site-header,
.main-header,
.elementor-location-header,
nav.main-navigation,
.nav-menu,
.sub-menu,
.dropdown-menu {
    position: relative;
    z-index: 99999 !important;
}

/* =========================================================
   MOBILE RESPONSIVENESS (< 768px)
   ========================================================= */
@media (max-width: 768px) {
    .wceo-wrap.wceo-wolt-layout {
        flex-direction: column;
        padding: 12px 12px 120px !important;
        gap: 14px;
    }

    .wceo-sidebar-nav {
        width: 100%;
        flex: none;
        position: sticky;
        top: 0;
        z-index: 50;
        background: #ffffff;
        padding: 8px 0 10px;
        margin: 0 -12px;
        padding-left: 12px;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
        max-height: none;
        overflow-x: auto;
        white-space: nowrap;
        display: flex;
        gap: 8px;
    }

    .wceo-nav-header,
    .wceo-cat-list {
        display: flex;
        flex-direction: row;
        gap: 8px;
        padding: 0;
        border: none;
        margin: 0;
    }

    .wceo-cat-item {
        width: auto;
        padding: 6px 14px;
        border-radius: 20px;
        background: #f1f5f9;
        font-size: 13px;
        flex-shrink: 0;
    }

    .wceo-cat-thumb,
    .wceo-cat-icon {
        width: 28px !important;
        height: 28px !important;
        min-width: 28px !important;
        min-height: 28px !important;
    }

    .wceo-cat-item.active {
        background: #0284c7;
        color: #ffffff;
    }
    
    .wceo-cat-item.active .wceo-cat-icon {
        color: #ffffff;
    }

    /* Hide 1pc and duplicate price on mobile */
    .wceo-card-bottom-bar {
        display: none !important;
    }

    .wceo-product-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 10px !important;
    }

    .wceo-product-card {
        min-height: 240px !important;
        padding: 10px 8px 10px !important;
    }

    .wceo-product-img {
        height: 115px !important;
    }

    .wceo-product-name {
        font-size: 0.88rem !important;
    }

    .wceo-product-price {
        font-size: 0.9rem !important;
    }

    .wceo-product-card button.wceo-card-plus-btn {
        width: 30px !important;
        height: 30px !important;
        top: 6px !important;
        right: 6px !important;
    }
}
