/* =========================================================================
   LegacyWater Products - ATS Custom | Default Styles
   ========================================================================= */

/* --- Wrapper --- */
.lwp-products-wrapper {
    width: 100%;
}

/* --- Filter Bar --- */
.lwp-filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 30px;
    justify-content: center;
}

.lwp-filter-btn {
    display: inline-flex;
    align-items: center;
    padding: 8px 22px;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    color: #3a3a3a;
    background-color: #f0f4f8;
    border: 2px solid transparent;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    outline: none;
    white-space: nowrap;
}

.lwp-filter-btn:hover,
.lwp-filter-btn.active {
    color: #ffffff;
    background-color: #0078d4;
    border-color: #0078d4;
}

/* --- Grid --- */
.lwp-products-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

/* --- Product Item (animation wrapper) --- */
.lwp-product-item {
    display: flex;
    opacity: 1;
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.lwp-product-item.lwp-hidden {
    display: none;
}

/* --- Product Card --- */
.lwp-product-card {
    display: flex;
    flex-direction: column;
    width: 100%;
    background: #ffffff;
    border: 1px solid #e8edf2;
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s ease;
    position: relative;
}

.lwp-product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.1);
    border-color: #d0d8e0;
}

/* Horizontal layout */
.lwp-product-card.lwp-card-horizontal {
    flex-direction: row;
}

.lwp-card-horizontal .lwp-product-image {
    width: 40%;
    min-width: 160px;
    flex-shrink: 0;
}

.lwp-card-horizontal .lwp-product-body {
    flex: 1;
}

/* --- Product Image --- */
.lwp-product-image {
    position: relative;
    overflow: hidden;
    height: 280px;
    background: #f5f7fa;
}

.lwp-product-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

/* Image hover animations */
.lwp-img-hover-zoom-in:hover img {
    transform: scale(1.08);
}

.lwp-img-hover-zoom-out img {
    transform: scale(1.08);
}

.lwp-img-hover-zoom-out:hover img {
    transform: scale(1);
}

/* --- Product Body --- */
.lwp-product-body {
    display: flex;
    flex-direction: column;
    padding: 20px 24px 24px;
    flex: 1;
}

/* --- Category Badge --- */
.lwp-product-category {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: #0078d4;
    background-color: rgba(0, 120, 212, 0.08);
    padding: 4px 12px;
    border-radius: 50px;
    margin-bottom: 12px;
    align-self: flex-start;
}

/* --- Product Title --- */
.lwp-product-title {
    font-size: 18px;
    font-weight: 700;
    color: #1a1a2e;
    margin: 0 0 10px 0;
    padding: 0;
    line-height: 1.3;
    transition: color 0.3s ease;
}

/* --- Product Description --- */
.lwp-product-description {
    font-size: 14px;
    line-height: 1.6;
    color: #6b7280;
    margin: 0 0 16px 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* --- Product Footer (Price + Button) --- */
.lwp-product-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: auto;
    flex-wrap: wrap;
}

/* --- Price --- */
.lwp-product-price {
    font-size: 22px;
    font-weight: 800;
    color: #0078d4;
    line-height: 1.2;
    white-space: nowrap;
}

/* --- Buy Now Button --- */
.lwp-buy-now-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    padding: 10px 24px;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    color: #ffffff;
    background: linear-gradient(135deg, #25d366 0%, #128c7e 100%);
    border: none;
    border-radius: 50px;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s ease;
    white-space: nowrap;
    box-shadow: 0 4px 14px rgba(37, 211, 102, 0.3);
}

.lwp-buy-now-btn:hover {
    background: linear-gradient(135deg, #20bd5a 0%, #0f7a6d 100%);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.4);
    transform: translateY(-1px);
    color: #ffffff;
    text-decoration: none;
}

.lwp-buy-now-btn:active {
    transform: translateY(0);
}

.lwp-btn-icon {
    display: inline-flex;
    align-items: center;
    margin-right: 8px;
    font-size: 18px;
    line-height: 1;
}

.lwp-btn-icon svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

.lwp-btn-text {
    display: inline-block;
}

/* =========================================================================
   Responsive Defaults
   ========================================================================= */

@media (max-width: 1024px) {
    .lwp-products-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .lwp-product-image {
        height: 240px;
    }
}

@media (max-width: 767px) {
    .lwp-products-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .lwp-product-image {
        height: 220px;
    }

    .lwp-product-body {
        padding: 16px 18px 20px;
    }

    .lwp-product-title {
        font-size: 16px;
    }

    .lwp-product-price {
        font-size: 20px;
    }

    .lwp-product-footer {
        flex-direction: column;
        align-items: stretch;
    }

    .lwp-buy-now-btn {
        width: 100%;
        justify-content: center;
    }

    .lwp-filter-bar {
        gap: 8px;
    }

    .lwp-filter-btn {
        padding: 6px 16px;
        font-size: 13px;
    }

    .lwp-card-horizontal {
        flex-direction: column;
    }

    .lwp-card-horizontal .lwp-product-image {
        width: 100%;
    }
}
