/**
 * Archive Pro Widget Styles
 *
 * @package Floreria_Rosify
 */

/* ========== GRID CONTAINER ========== */
.floreria-archive-pro {
    width: 100%;
}

.floreria-archive-grid {
    display: grid;
    gap: 20px;
}

/* ========== PRODUCT CARD ========== */
.floreria-archive-card {
    display: flex;
    flex-direction: column;
    position: relative;
}

/* ========== IMAGE CONTAINER ========== */
.floreria-archive-image {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    background-color: #f5f5f5;
    height: 280px;
}

.floreria-archive-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: opacity 0.3s ease;
}

.floreria-product-link {
    display: block;
    width: 100%;
    height: 100%;
    text-decoration: none;
}

/* ========== IMAGE SLIDER ========== */
.floreria-slider {
    position: relative;
    width: 100%;
    height: 100%;
}

.floreria-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.floreria-slide.active {
    opacity: 1;
    visibility: visible;
    position: relative;
}

.floreria-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* ========== SLIDER NAVIGATION ========== */
.floreria-slider-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 28px;
    height: 28px;
    background: rgba(0, 0, 0, 0.3);
    border: none;
    border-radius: 50%;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease, background-color 0.3s ease;
    z-index: 5;
    padding: 0;
}

.floreria-archive-image:hover .floreria-slider-nav {
    opacity: 1;
}

.floreria-slider-nav:hover {
    background: rgba(0, 0, 0, 0.5);
}

.floreria-slider-nav svg {
    width: 16px;
    height: 16px;
}

.floreria-slider-prev {
    left: 8px;
}

.floreria-slider-next {
    right: 8px;
}

/* ========== SLIDER DOTS ========== */
.floreria-slider-dots {
    position: absolute;
    bottom: 10px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 6px;
    z-index: 5;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.floreria-archive-image:hover .floreria-slider-dots {
    opacity: 1;
}

.floreria-slider-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.floreria-slider-dot:hover {
    transform: scale(1.2);
}

.floreria-slider-dot.active {
    background: #fff;
}

/* ========== QUICK ADD BUTTON ========== */
.floreria-quick-add {
    position: absolute;
    width: 40px;
    height: 40px;
    background: #948650;
    border: none;
    border-radius: 50%;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease, background-color 0.3s ease, transform 0.3s ease;
    z-index: 10;
    padding: 0;
    text-decoration: none;
}

.floreria-archive-card:hover .floreria-quick-add {
    opacity: 1;
}

.floreria-quick-add:hover {
    background: #7a6f42;
    transform: scale(1.1);
}

.floreria-quick-add svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

.floreria-quick-add.loading {
    pointer-events: none;
}

.floreria-quick-add.loading svg {
    animation: floreria-spin 0.8s linear infinite;
}

@keyframes floreria-spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Success state */
.floreria-quick-add.added {
    background: #10b981;
}

/* ========== PRODUCT INFO ========== */
.floreria-archive-info {
    display: flex;
    flex-direction: column;
    padding: 15px 0 0 0;
    gap: 8px;
}

/* ========== TITLE ========== */
.floreria-archive-title {
    margin: 0;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
    color: #353535;
}

.floreria-archive-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}

.floreria-archive-title a:hover {
    color: #948650;
}

/* ========== PRICE ========== */
.floreria-archive-price {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.floreria-price-horizontal {
    flex-direction: row;
}

.floreria-price-vertical {
    flex-direction: column;
    align-items: flex-start;
}

.floreria-sale-price,
.floreria-regular-price {
    display: inline-flex;
    align-items: center;
}

.floreria-sale-price {
    font-size: 16px;
    font-weight: 600;
}

.floreria-archive-price.has-sale .floreria-sale-price {
    color: #FF0000;
}

.floreria-archive-price.no-sale .floreria-sale-price {
    color: #353535;
}

.floreria-regular-price {
    text-decoration: line-through;
    text-decoration-style: solid;
    color: #999;
    font-size: 14px;
}

.floreria-currency-symbol {
    margin-right: 2px;
}

.floreria-currency {
    font-size: 0.7em;
    margin-left: 4px;
    vertical-align: super;
}

/* ========== LOADER / INFINITE SCROLL ========== */
.floreria-archive-loader {
    display: none;
    justify-content: center;
    align-items: center;
    gap: 12px;
    padding: 40px 20px;
    text-align: center;
}

.floreria-archive-loader.active {
    display: flex;
}

.floreria-spinner {
    width: 24px;
    height: 24px;
    border: 3px solid #e5e5e5;
    border-top-color: #948650;
    border-radius: 50%;
    animation: floreria-spin 0.8s linear infinite;
}

.floreria-loading-text {
    color: #6b7280;
    font-size: 14px;
}

/* ========== END MESSAGE ========== */
.floreria-archive-end {
    text-align: center;
    padding: 40px 20px;
    color: #6b7280;
    font-size: 14px;
}

/* ========== SENTINEL (invisible element for IntersectionObserver) ========== */
.floreria-archive-sentinel {
    height: 1px;
    width: 100%;
}

/* ========== NO PRODUCTS ========== */
.floreria-no-products {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: #6b7280;
    font-size: 16px;
}

/* ========== TOAST NOTIFICATION ========== */
.floreria-toast {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: #1f2937;
    color: #fff;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 99999;
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    max-width: 90%;
}

.floreria-toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.floreria-toast-icon {
    width: 20px;
    height: 20px;
    background: #10b981;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.floreria-toast-icon svg {
    width: 12px;
    height: 12px;
    fill: #fff;
}

.floreria-toast-message {
    flex: 1;
}

.floreria-toast-action {
    background: transparent;
    border: none;
    color: #948650;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    padding: 0;
    margin-left: 8px;
    text-decoration: none;
}

.floreria-toast-action:hover {
    text-decoration: underline;
}

/* Error toast */
.floreria-toast.error {
    background: #dc2626;
}

.floreria-toast.error .floreria-toast-icon {
    background: rgba(255, 255, 255, 0.2);
}

/* ========== RESPONSIVE ========== */
@media (max-width: 1024px) {
    .floreria-archive-image {
        height: 240px;
    }

    .floreria-slider-nav {
        opacity: 1;
    }

    .floreria-slider-dots {
        opacity: 1;
    }
}

@media (max-width: 767px) {
    .floreria-archive-image {
        height: 200px;
    }

    .floreria-quick-add {
        opacity: 1;
        width: 36px;
        height: 36px;
    }

    .floreria-quick-add svg {
        width: 18px;
        height: 18px;
    }

    .floreria-archive-title {
        font-size: 13px;
    }

    .floreria-sale-price {
        font-size: 14px;
    }

    .floreria-regular-price {
        font-size: 12px;
    }

    .floreria-slider-nav {
        width: 24px;
        height: 24px;
    }

    .floreria-slider-nav svg {
        width: 14px;
        height: 14px;
    }

    .floreria-toast {
        bottom: 10px;
        padding: 10px 16px;
        font-size: 13px;
    }
}

/* ========== ELEMENTOR EDITOR ========== */
.elementor-editor-active .floreria-quick-add,
.elementor-editor-active .floreria-slider-nav,
.elementor-editor-active .floreria-slider-dots {
    opacity: 1;
}
