/* Modern Pages Shared Styles */

/* Common Header Styles */
.modern-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 15px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.modern-header h1 {
    margin-bottom: 0.5rem;
}

.modern-header p {
    margin-bottom: 0;
    opacity: 0.75;
}

/* Modern Card Styles */
.modern-card {
    border: none;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    overflow: hidden;
}

.modern-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.12);
}

.card-header-modern {
    background: linear-gradient(45deg, #f8f9fa, #e9ecef);
    border-bottom: 2px solid #dee2e6;
    padding: 1.5rem;
    font-weight: 600;
}

/* Status Badges */
.status-badge {
    padding: 0.5rem 1rem;
    border-radius: 25px;
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-pending { background: linear-gradient(45deg, #ffc107, #ffca2c); }
.status-processing { background: linear-gradient(45deg, #17a2b8, #20c997); }
.status-completed { background: linear-gradient(45deg, #28a745, #20c997); }
.status-cancelled { background: linear-gradient(45deg, #dc3545, #e74c3c); }

.payment-paid { background: linear-gradient(45deg, #28a745, #20c997); }
.payment-pending { background: linear-gradient(45deg, #ffc107, #ffca2c); }
.payment-failed { background: linear-gradient(45deg, #dc3545, #e74c3c); }

/* Timeline Styles */
.order-timeline {
    position: relative;
    padding-left: 2rem;
}

.timeline-item {
    position: relative;
    padding-bottom: 1.5rem;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -2rem;
    top: 0.5rem;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #dee2e6;
}

.timeline-item.active::before {
    background: #28a745;
    box-shadow: 0 0 0 4px rgba(40, 167, 69, 0.2);
}

.timeline-item::after {
    content: '';
    position: absolute;
    left: -1.75rem;
    top: 1rem;
    width: 2px;
    height: calc(100% - 0.5rem);
    background: #dee2e6;
}

.timeline-item:last-child::after {
    display: none;
}

/* Product Item Styles */
.product-item {
    padding: 1.5rem;
    border-bottom: 1px solid #f8f9fa;
    transition: background-color 0.3s ease;
}

.product-item:hover {
    background-color: #f8f9fa;
}

.product-item:last-child {
    border-bottom: none;
}

.product-image {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* Quantity Controls */
.quantity-controls {
    display: flex;
    align-items: center;
    border: 2px solid #e9ecef;
    border-radius: 25px;
    overflow: hidden;
    background: white;
}

.quantity-btn {
    border: none;
    background: #f8f9fa;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.quantity-btn:hover {
    background: #e9ecef;
    color: #007bff;
}

.quantity-input {
    border: none;
    width: 50px;
    text-align: center;
    background: white;
    font-weight: 600;
}

/* Shipping Info Styles */
.shipping-info {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 10px;
    padding: 1.5rem;
}

.info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.info-row:last-child {
    border-bottom: none;
}

.info-label {
    font-weight: 600;
    color: #6c757d;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.info-value {
    font-weight: 500;
    color: #495057;
}

/* Price Summary Styles */
.price-summary {
    background: linear-gradient(135deg, #fff 0%, #f8f9fa 100%);
    border-radius: 10px;
    padding: 1.5rem;
}

.price-row {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
}

.price-total {
    border-top: 2px solid #dee2e6;
    margin-top: 1rem;
    padding-top: 1rem;
    font-size: 1.25rem;
    font-weight: 700;
}

/* Action Button Styles */
.action-btn {
    border-radius: 25px;
    padding: 0.75rem 2rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
}

.btn-gradient-primary {
    background: linear-gradient(45deg, #007bff, #0056b3);
    border: none;
    color: white;
}

.btn-gradient-primary:hover {
    background: linear-gradient(45deg, #0056b3, #004085);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,123,255,0.3);
    color: white;
}

.btn-gradient-success {
    background: linear-gradient(45deg, #28a745, #20c997);
    border: none;
    color: white;
}

.btn-gradient-success:hover {
    background: linear-gradient(45deg, #20c997, #17a2b8);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(40,167,69,0.3);
    color: white;
}

.btn-gradient-danger {
    background: linear-gradient(45deg, #dc3545, #c82333);
    border: none;
    color: white;
}

.btn-gradient-danger:hover {
    background: linear-gradient(45deg, #c82333, #a71e2a);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(220,53,69,0.3);
    color: white;
}

.btn-gradient-warning {
    background: linear-gradient(45deg, #ffc107, #e0a800);
    border: none;
    color: #212529;
}

.btn-gradient-warning:hover {
    background: linear-gradient(45deg, #e0a800, #d39e00);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255,193,7,0.3);
    color: #212529;
}

/* Form Styles */
.form-control {
    border-radius: 10px;
    border: 2px solid #e9ecef;
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
}

.form-control:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0,123,255,0.25);
}

.form-label {
    font-weight: 600;
    color: #495057;
    margin-bottom: 0.5rem;
}

/* Payment Method Styles */
.payment-option, .payment-method {
    border: 2px solid #e9ecef;
    border-radius: 10px;
    padding: 1rem;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
    cursor: pointer;
}

.payment-option:hover, .payment-method:hover {
    border-color: #007bff;
    background-color: #f8f9fa;
}

.payment-option.selected, .payment-method.selected {
    border-color: #007bff;
    background-color: rgba(0,123,255,0.1);
}

.payment-method {
    text-align: center;
    background: white;
    padding: 2rem;
    border-radius: 15px;
}

.payment-method:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,123,255,0.2);
}

.payment-method.selected {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,123,255,0.3);
}

/* Payment Section Styles */
.payment-section {
    background: white;
    border-radius: 10px;
    padding: 2rem;
    box-shadow: 0 3px 15px rgba(0,0,0,0.1);
}

#card-element {
    padding: 1rem;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    transition: all 0.3s ease;
}

#card-element:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0,123,255,0.25);
}

/* Security Info */
.security-badge, .security-info {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem;
    background: linear-gradient(45deg, #28a745, #20c997);
    color: white;
    border-radius: 10px;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.security-info {
    padding: 1rem;
    margin-bottom: 2rem;
    text-align: center;
    flex-direction: column;
}

/* Order Item Styles */
.order-item {
    padding: 1rem;
    border-bottom: 1px solid #f8f9fa;
    transition: background-color 0.3s ease;
}

.order-item:hover {
    background-color: #f8f9fa;
}

.order-item:last-child {
    border-bottom: none;
}

/* Offer Card Styles */
.offer-card {
    border: none;
    border-radius: 10px;
    box-shadow: 0 3px 15px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    overflow: hidden;
}

.offer-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

/* Empty State Styles */
.empty-cart, .empty-favorites {
    text-align: center;
    padding: 4rem 2rem;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 15px;
}

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

/* Ensure all product cards have same height */
.product-grid .product-card-link {
    height: 100%;
    display: flex;
}

.product-grid .product-card {
    height: 100%;
    min-height: 420px;
}

/* Text truncation for consistent layout */
.product-grid .product-title {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-height: 1.5rem;
}

.product-grid .product-description {
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-height: 1.4;
    max-height: 2.8rem;
}

/* Payment Icons */
.payment-icons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 1rem;
}

.payment-icons i {
    font-size: 2rem;
    opacity: 0.7;
}

/* Order Summary Styles */
.order-summary {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 10px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

/* Responsive Styles */
@media (max-width: 768px) {
    .modern-header {
        padding: 1.5rem;
        text-align: center;
    }
    
    .modern-header h1 {
        font-size: 1.5rem;
    }
    
    .product-image {
        width: 60px;
        height: 60px;
    }
    
    .info-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }
    
    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 1rem;
    }
    
    .payment-method {
        padding: 1.5rem;
    }
    
    .order-item .product-image {
        width: 40px;
        height: 40px;
    }
}