/* ==================== DYNAMIC SHOP STYLES ==================== */
/* Styles for dynamically loaded products from backend */

/* Category Filter Buttons */
#categories-filter {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

.category-btn {
    padding: 12px 24px;
    border: 2px solid rgba(143, 188, 63, 0.3);
    background: transparent;
    color: #8fbc3f;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.category-btn:hover {
    background: rgba(143, 188, 63, 0.1);
    border-color: #8fbc3f;
    transform: translateY(-2px);
}

.category-btn.active {
    background: linear-gradient(135deg, #8fbc3f, #7aa635);
    color: white;
    border-color: #8fbc3f;
    box-shadow: 0 4px 15px rgba(143, 188, 63, 0.3);
}

.category-count {
    opacity: 0.8;
    font-size: 12px;
    padding: 2px 8px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
}

.category-btn.active .category-count {
    background: rgba(255, 255, 255, 0.3);
}

/* Product Cards */
.product-card {
    background: linear-gradient(to bottom, #ffffff, #fafafa);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    position: relative;
    height: 100%;
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(143, 188, 63, 0.1);
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.product-card.featured {
    border: 2px solid #8fbc3f;
    box-shadow: 0 4px 20px rgba(143, 188, 63, 0.2);
}

.product-card.out-of-stock {
    opacity: 0.65;
}

.product-card.out-of-stock::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.7);
    z-index: 1;
    pointer-events: none;
}

/* Product Image */
.product-image {
    height: 280px;
    overflow: hidden;
    background: linear-gradient(135deg, #f5f9f0, #fef8f0);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.product-card:hover .product-image img {
    transform: scale(1.1);
}

.product-image-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    font-size: 5rem;
    color: rgba(143, 188, 63, 0.3);
}

/* Product Badges */
.product-badge {
    position: absolute;
    top: 15px;
    padding: 8px 16px;
    border-radius: 25px;
    font-size: 12px;
    font-weight: 700;
    z-index: 10;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
}

.featured-badge {
    background: linear-gradient(135deg, #ffd700, #ffed4e);
    color: #333;
    right: 15px;
    animation: pulse 2s infinite;
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

.out-of-stock-badge {
    background: linear-gradient(135deg, #dc3545, #c82333);
    color: white;
    right: 15px;
    top: 15px;
}

/* Product Info */
.product-info {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.product-category {
    display: inline-block;
    font-size: 12px;
    color: #8fbc3f;
    background: rgba(143, 188, 63, 0.1);
    padding: 6px 14px;
    border-radius: 20px;
    margin-bottom: 12px;
    font-weight: 600;
    align-self: flex-start;
}

.product-name {
    font-size: 18px;
    font-weight: 700;
    color: #2c3e50;
    margin: 10px 0;
    line-height: 1.4;
    min-height: 50px;
}

.product-description {
    font-size: 14px;
    color: #7f8c8d;
    margin-bottom: 15px;
    line-height: 1.6;
    flex-grow: 1;
}

.product-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 15px;
    font-size: 13px;
    color: #95a5a6;
    padding-top: 10px;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.product-meta span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.product-meta i {
    color: #8fbc3f;
}

/* Discount Bar (below SKU) */
.discount-bar {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, #ff6b35, #e85d2f);
    color: white;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 12px;
    box-shadow: 0 2px 8px rgba(255, 107, 53, 0.3);
}

.discount-bar i {
    font-size: 11px;
}

/* Product Price */
.product-price-section {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.product-price {
    font-size: 24px;
    font-weight: 800;
    color: #8fbc3f;
    direction: ltr;
}

.product-price-original {
    font-size: 16px;
    color: #95a5a6;
    text-decoration: line-through;
    direction: ltr;
}

/* Buttons */
.btn-add-to-cart {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #8fbc3f, #7aa635);
    color: white;
    border: none;
    border-radius: 12px;
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-add-to-cart:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(143, 188, 63, 0.4);
    background: linear-gradient(135deg, #7aa635, #6a9530);
}

.btn-add-to-cart:active {
    transform: translateY(-1px);
}

.btn-out-of-stock {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #95a5a6, #7f8c8d);
    color: white;
    border: none;
    border-radius: 12px;
    font-weight: 700;
    font-size: 15px;
    cursor: not-allowed;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

/* Loading States */
.spinner-border {
    width: 3rem;
    height: 3rem;
    border-width: 0.3rem;
}

/* Responsive */
@media (max-width: 768px) {
    .product-card {
        margin-bottom: 20px;
    }

    .product-image {
        height: 220px;
    }

    .product-name {
        font-size: 16px;
        min-height: auto;
    }

    .product-price {
        font-size: 20px;
    }

    .category-btn {
        padding: 10px 18px;
        font-size: 13px;
    }
}

/* Animation on load */
[data-aos="fade-up"] {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

[data-aos="fade-up"].aos-animate {
    opacity: 1;
    transform: translateY(0);
}

/* Empty state */
.alert {
    border-radius: 15px;
    padding: 30px;
}

.alert i {
    font-size: 3rem;
    opacity: 0.5;
}