/* Index Page Specific Styles */

/* Pricing Rules Section */
.pricing-rules {
    margin: 30px 0;
    padding: 20px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 15px;
    border: 1px solid #dee2e6;
}

.pricing-rules h3 {
    color: #333;
    margin-bottom: 20px;
    font-size: 1.3em;
    display: flex;
    align-items: center;
    gap: 10px;
}

.pricing-rules h3:before {
    content: "🏷️";
    font-size: 1.2em;
}

.rule-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.rule-card {
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    padding: 18px 15px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.rule-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(102, 126, 234, 0.15);
    border-color: #667eea;
}

.rule-card.selected {
    border-color: #28a745;
    background: #f0fff0;
    box-shadow: 0 10px 20px rgba(40, 167, 69, 0.15);
}

.rule-card .quantity-range {
    font-size: 1.2em;
    font-weight: bold;
    color: #495057;
    margin-bottom: 10px;
    background: #f8f9fa;
    padding: 5px 10px;
    border-radius: 20px;
    display: inline-block;
}

.rule-card .offer-badge {
    background: #ff6b6b;
    color: white;
    padding: 5px 15px;
    border-radius: 25px;
    font-size: 1em;
    font-weight: bold;
    display: inline-block;
    margin: 10px 0;
    animation: pulse 2s infinite;
}

.rule-card .free-units {
    color: #28a745;
    font-weight: bold;
    font-size: 1.3em;
    margin: 10px 0;
}

.rule-card .price-info {
    color: #666;
    font-size: 1em;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px dashed #dee2e6;
}

.rule-card .price-info strong {
    color: #28a745;
    font-size: 1.2em;
}

.rule-card .savings {
    color: #28a745;
    font-weight: bold;
    margin-top: 8px;
    font-size: 0.95em;
    background: #e8f5e9;
    padding: 5px;
    border-radius: 15px;
}

/* Quantity Input Group */
.quantity-input-group {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.quantity-input-group label {
    font-weight: bold;
    color: #495057;
    font-size: 1.1em;
}

.quantity-input-group input {
    width: 100px;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1.1em;
    text-align: center;
    font-weight: bold;
}

.quantity-input-group input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 10px rgba(102, 126, 234, 0.2);
}

.quantity-input-group .stock-info {
    color: #6c757d;
    font-size: 0.95em;
    margin-left: auto;
}

/* Offer Details Display */
.offer-details {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    padding: 20px;
    border-radius: 12px;
    margin: 20px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    border: 1px solid #90caf9;
}

.offer-details .offer-text {
    font-size: 1.2em;
    color: #0d47a1;
    font-weight: bold;
}

.offer-details .free-badge-large {
    background: #28a745;
    color: white;
    padding: 8px 20px;
    border-radius: 30px;
    font-weight: bold;
    font-size: 1.1em;
    box-shadow: 0 4px 10px rgba(40, 167, 69, 0.3);
}

/* Free Items Display */
.free-items-display {
    background: #fff3cd;
    border: 1px solid #ffeeba;
    color: #856404;
    padding: 15px;
    border-radius: 10px;
    margin: 15px 0;
    text-align: center;
    font-size: 1.1em;
    font-weight: bold;
}

.free-items-display span {
    color: #28a745;
    font-size: 1.3em;
    margin: 0 5px;
}

/* Price Display */
.price-section {
    margin-bottom: 25px;
    padding: 20px;
    background: linear-gradient(135deg, #f6f9fc 0%, #e6f0f9 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.current-price {
    font-size: 2.5em;
    font-weight: bold;
    color: #28a745;
}

.current-price:before {
    content: "Price: ";
    font-size: 0.5em;
    color: #666;
    font-weight: normal;
    margin-right: 5px;
}

.original-price {
    font-size: 1.3em;
    color: #999;
    text-decoration: line-through;
}

.original-price:before {
    content: "Was: ";
    font-size: 0.8em;
    color: #999;
    font-weight: normal;
    text-decoration: none;
    margin-right: 5px;
}

.discount-badge {
    background: #ff6b6b;
    color: white;
    padding: 5px 15px;
    border-radius: 25px;
    font-size: 1em;
    font-weight: bold;
}

/* Unit text */
.unit-text {
    font-size: 0.6em;
    color: #666;
    font-weight: normal;
    margin-left: 5px;
}

/* Responsive adjustments */
@media screen and (max-width: 768px) {
    .rule-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .quantity-input-group {
        flex-direction: column;
        align-items: stretch;
    }
    
    .quantity-input-group .stock-info {
        margin-left: 0;
        text-align: center;
    }
    
    .offer-details {
        flex-direction: column;
        text-align: center;
    }
}

@media screen and (max-width: 480px) {
    .rule-grid {
        grid-template-columns: 1fr;
    }
    
    .price-section {
        flex-direction: column;
        text-align: center;
    }
    
    .current-price {
        font-size: 2em;
    }
}

/* Animations */
@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.rule-card {
    animation: slideIn 0.3s ease-out;
}