/* General Box Styling */
.box {
    background-color: rgba(0, 100, 0, 0.9); /* Dark Green fallback for no image */
    background-size: cover;
    background-position: center;
    text-transform: uppercase;
    color: white;
    height: 200px;
    border-radius: 15px;
    position: relative;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    backdrop-filter: blur(5px); /* Frosted Glass Effect */
}

.box:hover {
    transform: scale(1.05);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3);
    cursor: pointer;
}

.box-name {
    font-size: 1.5rem;
    font-weight: bold;
    text-shadow: 2px 4px 6px rgba(0, 0, 0, 0.5);
    z-index: 2;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
}

/* Modern Book Card Design */
.product-card {
    border: none;
    border-radius: 20px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    isolation: isolate;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.product-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1));
    z-index: -1;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.product-card:hover::before {
    opacity: 1;
}

.product-card img {
    width: 100%;
    height: auto;
    min-height: 280px;
    object-fit: contain;
    background-color: #f8f9fa;
    transition: transform 0.4s ease;
    padding: 1rem;
}

.product-card:hover img {
    transform: scale(1.05);
}

.product-card-body {
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    transform: translateY(0);
    transition: transform 0.4s ease;
}

.product-card:hover .product-card-body {
    transform: translateY(-10px);
}

.product-card-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 0.5rem;
    font-family: 'Inter', sans-serif;
    line-height: 1.4;
    transition: color 0.3s ease;
}

.product-card:hover .product-card-title {
    color: #2c3e50;
}

.product-card-author {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 1rem;
    font-weight: 500;
}

.product-card-price {
    color: #e74c3c;
    font-size: 1.2rem;
    font-weight: 700;
    display: inline-block;
    padding: 0.5rem 1rem;
    background: rgba(231, 76, 60, 0.1);
    border-radius: 50px;
    transition: all 0.3s ease;
}

.product-card:hover .product-card-price {
    background: rgba(231, 76, 60, 0.2);
    transform: scale(1.05);
}

/* Badge Styling */
.badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    padding: 0.5rem 1rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: white;
    background: linear-gradient(135deg, #3498db, #2ecc71);
    border-radius: 50px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    z-index: 2;
}

/* Category Box Styling */
.category-box {
    background: linear-gradient(135deg, #2c3e50, #3498db);
    height: 200px;
    border-radius: 20px;
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.category-box::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1));
    opacity: 0;
    transition: opacity 0.4s ease;
}

.category-box:hover::before {
    opacity: 1;
}

.category-box:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.category-name {
    font-size: 1.25rem;
    font-weight: 700;
    color: white;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    position: relative;
    z-index: 2;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
    padding: 1rem;
    text-align: center;
    transition: transform 0.3s ease;
}

.category-box:hover .category-name {
    transform: scale(1.05);
}

/* Responsive Design */
@media (max-width: 768px) {
    .product-card img {
        min-height: 220px;
    }

    .product-card-body {
        padding: 1rem;
    }

    .product-card-title {
        font-size: 1rem;
    }

    .product-card-author {
        font-size: 0.8rem;
    }

    .product-card-price {
        font-size: 1.1rem;
    }

    .category-box {
        height: 160px;
    }

    .category-name {
        font-size: 1.1rem;
    }
}