/**
 * One Elementor - One Archive Products Widget
 * K-Beauty style archive grid + filter
 */

.oe-archive-products {
    width: 100%;
}

/* =========================
   Filter Bar
   ========================= */
.oe-archive-filter-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 24px;
}

.oe-archive-search {
    position: relative;
}

.oe-archive-search-input {
    width: 100%;
    height: 44px;
    padding: 0 16px 0 40px;
    border-radius: 999px;
    border: 1px solid rgba(0, 0, 0, 0.06);
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 8px 24px rgba(199, 144, 255, 0.15);
    font-size: 14px;
    color: #333;
    outline: none;
    transition: box-shadow 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.oe-archive-search-input {
    border-radius: 50px !important;
    border-color: #fda9d6 !important;
    max-width: 400px;
    padding-left: 40px !important;
  }

.oe-archive-search-input::placeholder {
    color: #b8b8c6;
}

.oe-archive-search-input:focus {
    background: #ffffff;
    border-color: #f668d5;
    box-shadow: 0 10px 30px rgba(246, 104, 213, 0.3);
}

.oe-archive-search-icon {
    position: absolute;
    top: 50%;
    left: 14px;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    opacity: 0.6;
    pointer-events: none;
}

.oe-archive-search-icon svg {
    width: 100%;
    height: 100%;
    display: block;
}

.oe-archive-sort {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.oe-archive-sort-label {
    font-size: 13px;
    color: #9a9ab0;
}

.oe-archive-sort-group {
    display: inline-flex;
    padding: 4px;
    gap: 10px
}

.oe-archive-sort-btn {
    min-width: 76px;
    padding: 6px 14px;
    border-radius: 999px;
    border: none;
    background: transparent;
    font-size: 13px;
    color: #9a9ab0;
    cursor: pointer;
    transition: all 0.2s ease;
}
.oe-archive-sort-btn:hover {
    color: #fff !important;
}
.oe-archive-sort-btn.is-active {
    background: linear-gradient(135deg, #ff5fd1, #9b6bff);
    color: #ffffff;
    box-shadow: 0 10px 24px rgba(255, 95, 209, 0.4);
}

.oe-archive-sort-btn:not(.is-active):hover {
    color: #6c6c87;
}

/* =========================
   Products Grid
   ========================= */
.oe-archive-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 24px;
    grid-auto-rows: 1fr;
    align-items: stretch;
}

/* =========================
   Product Card
   ========================= */
.oe-archive-product-card {
    background: #ffffff;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(126, 87, 194, 0.18);
    display: flex;
    flex-direction: column;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    position: relative;
    height: 100%;
}

.oe-archive-product-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 26px 60px rgba(126, 87, 194, 0.24);
}

.oe-archive-product-media {
    position: relative;
    padding: 0;
}

.oe-archive-product-image {
    border-radius: 24px 24px 0 0;
    overflow: hidden;
    background: #f4f5fb;
    height: 248px;
}

.oe-archive-product-image a {
    display: flex;
    height: 100%;
}

.oe-archive-product-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.oe-archive-badge {
    position: absolute;
    top: 26px;
    left: 26px;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.94);
    color: #397c5a;
    font-size: 11px;
    font-weight: 600;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.12);
}

.oe-archive-favorite {
    position: absolute;
    top: 26px;
    right: 26px;
    width: 34px;
    height: 34px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.94);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.12);
    cursor: pointer;
    border: none;
    padding: 0;
    margin: 0;
    outline: none;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.oe-archive-favorite:focus {
    outline: 2px solid rgba(246, 104, 213, 0.5);
    outline-offset: 2px;
}

.oe-archive-favorite:focus:not(:focus-visible) {
    outline: none;
}

.oe-archive-favorite svg {
    width: 16px;
    height: 16px;
    stroke: #d0c5e5;
    fill: #ffffff;
    transition: all 0.2s ease;
}

.oe-archive-favorite.is-active svg {
    stroke: #fb2c36;
    fill: #fb2c36;
}

.oe-archive-product-body {
    padding: 20px 20px 10px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
}

.oe-archive-product-title {
    font-size: 15px;
    font-weight: 600;
    color: #1d2040;
    margin: 0;
}

.oe-archive-product-title a {
    color: inherit;
    text-decoration: none;
}

.oe-archive-product-subtitle {
    font-size: 13px;
    color: #a0a1b8;
}

.oe-archive-product-footer {
    padding: 0 20px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: auto;
}

.oe-archive-price {
    font-size: 16px;
    font-weight: 700;
    color: #e60076;
}

.oe-archive-price del {
    font-weight: 400;
    font-size: 13px;
    color: #b0b0c5;
    margin-right: 6px;
}

.oe-archive-add-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 999px;
    border: none;
    background: linear-gradient(135deg, #f3369f, #b047ff);
    color: #ffffff;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.oe-archive-add-btn span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
}

.oe-archive-add-btn svg {
    width: 14px;
    height: 14px;
}

.oe-archive-product-card:hover .oe-archive-add-btn {
    transform: translateY(-1px);

}

/* Floating add button on image hover */
.oe-archive-add-fab {
    position: absolute;
    right: 22px;
    bottom: 18px;
    width: 36px;
    height: 36px;
    border-radius: 999px;
    border: none;
    background: linear-gradient(135deg, #f3369f, #b047ff);
    box-shadow: 0 10px 24px rgba(243, 54, 159, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    transform: translateY(6px);
    transition: opacity 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
    color: #ffffff;
}

.oe-archive-add-fab svg {
    width: 16px;
    height: 16px;
}
.oe-archive-add-btn {
    display: inline-flex !important;
  }

.oe-archive-product-card:hover .oe-archive-add-fab {
    opacity: 1;
    transform: translateY(0);
}

.oe-archive-add-fab:hover {
    box-shadow: 0 14px 30px rgba(243, 54, 159, 0.7);
}

.oe-archive-product-description {
    font-size: 13px;
    line-height: 1.5;
    color: #7a7a93;
}

/* Pagination */
.oe-archive-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 32px;
}

.oe-archive-pagination .oe-archive-page,
.oe-archive-pagination .dots {
    min-width: 36px;
    height: 36px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    text-decoration: none;
}

.oe-archive-pagination .oe-archive-page {
    padding: 0 14px;
    background: #ffffff;
    color: #6c6c87;
    border: 1px solid #e1e1ee;
    transition: all 0.2s ease;
}

.oe-archive-pagination .oe-archive-page:hover {
    background: linear-gradient(135deg, #f3369f, #b047ff);
    color: #ffffff;
    border-color: transparent;
    box-shadow: 0 8px 20px rgba(176, 71, 255, 0.35);
}

.oe-archive-pagination .oe-archive-page.current {
    background: linear-gradient(135deg, #f3369f, #b047ff);
    color: #ffffff;
    border-color: transparent;
}

/* Reuse existing Add-to-cart popup styles */
.oe-archive-product-card .oe-atc-popup.modal {
    z-index: 9999;
}

/* =========================
   Empty / No Results
   ========================= */
.oe-archive-empty {
    text-align: center;
    padding: 40px 20px;
    font-size: 14px;
    color: #9a9ab0;
}

/* =========================
   Responsive
   ========================= */
@media (max-width: 1199px) {
    .oe-archive-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 20px;
    }
}

@media (max-width: 991px) {
    .oe-archive-filter-bar {
        align-items: stretch;
    }

    .oe-archive-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 575px) {
    .oe-archive-filter-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .oe-archive-sort {
        justify-content: flex-start;
    }

    .oe-archive-grid {
        grid-template-columns: repeat(1, minmax(0, 1fr));
    }

    .oe-archive-product-footer {
        flex-direction: column;
        align-items: stretch;
    }

    .oe-archive-price {
        width: 100%;
    }

    .oe-archive-add-btn {
        width: 100%;
        justify-content: center;
    }
}

