/* Byproducts Section Styles */
#byproducts {
    padding: 80px 0;
    background: linear-gradient(135deg, #f9faf5 0%, #f0f2ea 100%);
}

#byproducts .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

#byproducts .section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1e3a2f;
    text-align: center;
    margin-bottom: 16px;
    letter-spacing: -0.5px;
}

#byproducts .section-sub {
    font-size: 1.1rem;
    color: #5a6b55;
    text-align: center;
    margin-bottom: 48px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.5;
}

/* Product Grid */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
    margin-top: 20px;
}

/* Product Card */
.product-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

.product-img {
    font-size: 4rem;
    text-align: center;
    padding: 40px 20px 20px;
    background: linear-gradient(135deg, #fef7e0 0%, #f9f1d6 100%);
    border-bottom: 2px solid #e8e0c8;
}

.product-info {
    padding: 24px;
}

.product-title {
    font-size: 1.35rem;
    font-weight: 700;
    color: #1e3a2f;
    margin-bottom: 10px;
    line-height: 1.3;
}

.product-desc {
    font-size: 0.9rem;
    color: #6b7a65;
    margin-bottom: 20px;
    line-height: 1.4;
}

/* Quantity Selector */
.quantity-selector {
    margin: 15px 0 10px;
}

.quantity-label {
    font-size: 0.85rem;
    color: #4a5b48;
    margin-bottom: 8px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.quantity-controls {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 5px;
}

.qty-minus,
.qty-plus {
    width: 40px;
    height: 40px;
    border: 2px solid #e0e5da;
    background: white;
    border-radius: 10px;
    cursor: pointer;
    font-size: 1.3rem;
    font-weight: bold;
    color: #1e3a2f;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.qty-minus:hover,
.qty-plus:hover {
    background: #1e3a2f;
    color: white;
    border-color: #1e3a2f;
    transform: scale(1.02);
}

.qty-minus:active,
.qty-plus:active {
    transform: scale(0.98);
}

.qty-input {
    width: 90px;
    height: 40px;
    text-align: center;
    border: 2px solid #e0e5da;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 500;
    padding: 0 8px;
    background: white;
    transition: all 0.2s ease;
}

.qty-input:focus {
    outline: none;
    border-color: #1e3a2f;
    box-shadow: 0 0 0 3px rgba(30, 58, 47, 0.1);
}

/* Remove spinner buttons from number input */
.qty-input::-webkit-inner-spin-button,
.qty-input::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.qty-input[type=number] {
    -moz-appearance: textfield;
}

/* Price Breakdown */
.price-breakdown {
    margin: 15px 0;
    padding: 12px;
    background: linear-gradient(135deg, #f8f9f5 0%, #f1f3ec 100%);
    border-radius: 12px;
    border: 1px solid #e8e5d8;
}

.total-price {
    font-size: 1.2rem;
    font-weight: 800;
    color: #1e3a2f;
    display: flex;
    align-items: center;
    gap: 8px;
}

.total-price span {
    font-size: 1.3rem;
    color: #d97706;
}

.discount-info {
    font-size: 0.85rem;
    color: #059669;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px dashed #d4d9cc;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
}

.discount-info::before {
    content: "🎉";
    font-size: 0.9rem;
}

/* Add to Cart Button */
.add-to-cart {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #1e3a2f 0%, #2c5a48 100%);
    color: white;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    margin-top: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.add-to-cart:hover {
    background: linear-gradient(135deg, #2c5a48 0%, #1e3a2f 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(30, 58, 47, 0.3);
}

.add-to-cart:active {
    transform: translateY(0);
}

/* Responsive Design */
@media (max-width: 768px) {
    #byproducts {
        padding: 60px 0;
    }
    
    #byproducts .section-title {
        font-size: 2rem;
    }
    
    #byproducts .section-sub {
        font-size: 1rem;
        margin-bottom: 32px;
        padding: 0 16px;
    }
    
    .product-grid {
        grid-template-columns: 1fr;
        gap: 24px;
        padding: 0 16px;
    }
    
    .product-card {
        max-width: 100%;
    }
    
    .product-img {
        font-size: 3rem;
        padding: 30px 20px 15px;
    }
    
    .product-info {
        padding: 20px;
    }
    
    .product-title {
        font-size: 1.2rem;
    }
    
    .quantity-controls {
        gap: 10px;
    }
    
    .qty-minus,
    .qty-plus {
        width: 36px;
        height: 36px;
        font-size: 1.2rem;
    }
    
    .qty-input {
        width: 80px;
        height: 36px;
    }
    
    .total-price {
        font-size: 1.1rem;
    }
    
    .total-price span {
        font-size: 1.2rem;
    }
    
    .add-to-cart {
        padding: 12px;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    #byproducts {
        padding: 40px 0;
    }
    
    #byproducts .section-title {
        font-size: 1.75rem;
    }
    
    .product-grid {
        gap: 20px;
    }
    
    .product-info {
        padding: 16px;
    }
    
    .quantity-controls {
        gap: 8px;
    }
    
    .qty-minus,
    .qty-plus {
        width: 32px;
        height: 32px;
        font-size: 1rem;
    }
    
    .qty-input {
        width: 70px;
        height: 32px;
        font-size: 0.9rem;
    }
    
    .price-breakdown {
        padding: 10px;
    }
    
    .total-price {
        font-size: 1rem;
    }
    
    .discount-info {
        font-size: 0.75rem;
    }
}

/* Animation for discount notification */
@keyframes discountPulse {
    0% {
        opacity: 0;
        transform: translateY(-5px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.discount-info {
    animation: discountPulse 0.3s ease-out;
}

/* Loading state */
.product-card.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Success state for add to cart */
.add-to-cart.success {
    background: #059669;
    transform: scale(0.98);
}

/* Tooltip for discount tiers */
.bulk-tiers-hint {
    font-size: 0.7rem;
    color: #8b9a82;
    margin-top: 5px;
    text-align: center;
    cursor: help;
}

/* Optional: Add a badge for best value */
.best-value-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: #f59e0b;
    color: white;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Optional: Add to product card if needed */
.product-card {
    position: relative;
}