/* Shop Section Styles */

.shop-section {
    padding: var(--spacing-xl) 0;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.product-card {
    background-color: var(--white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
    position: relative;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.product-image {
    position: relative;
    width: 100%;
    height: 250px; /* Restored original height */
    overflow: hidden;
}

.product-image img {
    width: 75%; /* Reduced to 75% of original size */
    height: auto;
    object-fit: contain;
    transition: transform 0.5s ease;
    margin: 0 auto;
    display: block;
}

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

.out-of-stock-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
}

.product-details {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.product-info {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.5rem;
}

.product-text {
    flex: 1;
}

.product-sticker {
    width: 80px;
    height: 80px;
    margin-left: 10px;
    flex-shrink: 0;
}

.product-sticker img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.product-name {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--gray-dark);
}

.product-scent {
    font-size: 0.9rem;
    color: var(--gray);
    margin-bottom: 1rem;
}

.product-description {
    font-size: 0.9rem;
    margin-bottom: 1rem;
    color: var(--gray-dark);
}

/* Create a wrapper for price and button to keep them together */
.product-bottom {
    margin-top: auto;
}

.product-price {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--gray-dark);
    margin-bottom: 1rem;
}

.product-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.add-to-cart-btn {
    background-color: var(--turquoise);
    color: white;
    border: 1px solid var(--turquoise);
    padding: 0.6rem 1.2rem;
    border-radius: 4px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
}

.add-to-cart-btn:hover {
    background: none;
    color: var(--turquoise);
}

.add-to-cart-btn.disabled {
    background-color: var(--gray);
    cursor: not-allowed;
}

.product-category {
    position: absolute;
    top: 10px;
    left: 10px;
    background-color: var(--turquoise);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
}

/* Enhanced animations and visual feedback for adding to cart */
@keyframes addedToCart {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.added-to-cart {
    animation: addedToCart 0.8s ease;
}

/* Added to cart overlay */
.added-to-cart-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    animation: fadeInOut 1.5s ease forwards;
    z-index: 10;
}

@keyframes fadeInOut {
    0% { opacity: 0; }
    20% { opacity: 1; }
    80% { opacity: 1; }
    100% { opacity: 0; }
}

.added-to-cart-icon {
    width: 50px;
    height: 50px;
    background-color: var(--turquoise);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
    transform: scale(0);
    animation: popIn 0.5s ease forwards;
}

@keyframes popIn {
    0% { transform: scale(0); }
    60% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

.added-to-cart-icon i {
    color: white;
    font-size: 1.5rem;
}

.added-to-cart-text {
    color: white;
    font-weight: 600;
    font-size: 1.2rem;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    opacity: 0;
    transform: translateY(10px);
    animation: slideUp 0.5s ease 0.2s forwards;
}

@keyframes slideUp {
    0% { opacity: 0; transform: translateY(10px); }
    100% { opacity: 1; transform: translateY(0); }
}

/* Button success state */
.add-to-cart-btn.success {
    background-color: #4CAF50;
    transition: background-color 0.3s ease;
}

.add-to-cart-btn.success:hover {
    background-color: #3e8e41;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
        gap: 1.5rem;
    }
    
    .product-image {
        height: 200px;
    }
}

@media (max-width: 480px) {
    .product-grid {
        grid-template-columns: 1fr;
        max-width: 320px;
        margin-left: auto;
        margin-right: auto;
    }
}