/* PC Builder Specific Styles */

/* Header Navigation */
.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 20px;
}

.header-nav {
    display: flex;
    gap: 1rem;
}

.header-nav .nav-link {
    text-decoration: none;
    color: #64748b;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    transition: all 0.2s;
}

.header-nav .nav-link:hover {
    color: #3b82f6;
    background: #f1f5f9;
}

.header-nav .nav-link.active {
    color: #3b82f6;
    background: #f1f5f9;
}

/* Build Summary */
.build-summary {
    background: #fff;
    border-radius: 1rem;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    border: 1px solid #e2e8f0;
}

.summary-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.build-summary h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
}

.whatsapp-build-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: #25D366;
    color: white;
    border: none;
    border-radius: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.875rem;
}

.whatsapp-build-btn:hover {
    background: #20BA5A;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3);
}

.whatsapp-build-btn i {
    font-size: 1.125rem;
}

.summary-stats {
    display: flex;
    gap: 2rem;
}

.stat {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.stat-label {
    font-size: 0.875rem;
    color: #64748b;
    font-weight: 500;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #059669;
}

.power-warning {
    grid-column: 1 / -1;
    padding: 1rem;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.9rem;
    font-weight: 500;
    margin-top: 0.5rem;
}

.power-warning.error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #ef4444;
}

.power-warning i {
    font-size: 1.25rem;
    color: #ef4444;
}

.power-warning span {
    flex: 1;
    line-height: 1.5;
}

/* Selected Components */
.selected-components {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.component-slot {
    background: #fff;
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    border: 1px solid #e2e8f0;
    transition: all 0.2s;
}

.component-slot:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.slot-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #e2e8f0;
}

.slot-header i {
    font-size: 1.25rem;
    color: #3b82f6;
}

.slot-header span {
    font-weight: 600;
    color: #1e293b;
}

.slot-content {
    min-height: 60px;
    display: flex;
    align-items: center;
}

.empty-slot {
    color: #64748b;
    font-style: italic;
    margin: 0;
}

.selected-part {
    display: flex;
    align-items: center;
    gap: 1rem;
    width: 100%;
}

.selected-part-image {
    width: 50px;
    height: 50px;
    object-fit: contain;
    border-radius: 0.5rem;
    background: #f8fafc;
}

.selected-part-info {
    flex: 1;
}

.selected-part-name {
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 0.25rem;
}

.selected-part-price {
    color: #059669;
    font-weight: 600;
}

.selected-part-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.whatsapp-selected-btn {
    background: #25D366;
    color: white;
    border: none;
    border-radius: 0.5rem;
    padding: 0.5rem;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.whatsapp-selected-btn:hover {
    background: #20BA5A;
    transform: scale(1.05);
}

.whatsapp-selected-btn i {
    font-size: 1rem;
}

.remove-part {
    background: #ef4444;
    color: white;
    border: none;
    border-radius: 0.5rem;
    padding: 0.5rem;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.875rem;
}

.remove-part:hover {
    background: #dc2626;
}

/* Parts Grid for Builder */
.builder-parts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.builder-part-card {
    background: white;
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    border: 1px solid #e2e8f0;
    transition: all 0.2s;
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

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

.builder-part-card.selected {
    border-color: #3b82f6;
    background: #f8fafc;
}

.builder-part-card.selected::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: #3b82f6;
}

.part-actions {
    position: absolute;
    top: 1rem;
    right: 1rem;
    display: flex;
    gap: 0.5rem;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.2s;
}

.builder-part-card:hover .part-actions {
    opacity: 1;
    transform: translateY(0);
}

.add-to-build {
    background: #3b82f6;
    color: white;
    border: none;
    border-radius: 0.5rem;
    padding: 0.5rem;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.875rem;
}

.add-to-build:hover {
    background: #2563eb;
}

.add-to-build.added {
    background: #059669;
}

.add-to-build.added:hover {
    background: #047857;
}

.whatsapp-btn {
    background: #25D366;
    color: white;
    border: none;
    border-radius: 0.5rem;
    padding: 0.5rem 0.75rem;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.whatsapp-btn:hover {
    background: #20BA5A;
    transform: scale(1.05);
}

.whatsapp-btn i {
    font-size: 1.125rem;
}

/* Build Actions */
.build-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 0.5rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

.btn-primary {
    background: #3b82f6;
    color: white;
}

.btn-primary:hover {
    background: #2563eb;
}

.btn-secondary {
    background: #64748b;
    color: white;
}

.btn-secondary:hover {
    background: #475569;
}

/* Compatibility Issues */
.compatibility-issues {
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 0.75rem;
    padding: 1.5rem;
    margin: 1rem 0;
}

.issues-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    color: #dc2626;
}

.issues-header i {
    font-size: 1.25rem;
}

.issues-header h3 {
    margin: 0;
    font-size: 1.125rem;
    font-weight: 600;
}

.issue-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: white;
    border-radius: 0.5rem;
    margin-bottom: 0.5rem;
    border-left: 4px solid #dc2626;
}

.issue-item.incompatible {
    border-left-color: #dc2626;
}

.issue-item i {
    color: #dc2626;
    font-size: 1rem;
}

/* Compatibility Warnings */
.compatibility-warnings {
    background: #fffbeb;
    border: 1px solid #fed7aa;
    border-radius: 0.75rem;
    padding: 1.5rem;
    margin: 1rem 0;
}

.warnings-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    color: #d97706;
}

.warnings-header i {
    font-size: 1.25rem;
}

.warnings-header h3 {
    margin: 0;
    font-size: 1.125rem;
    font-weight: 600;
}

.warning-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: white;
    border-radius: 0.5rem;
    margin-bottom: 0.5rem;
    border-left: 4px solid #d97706;
}

.warning-item i {
    color: #d97706;
    font-size: 1rem;
}

/* Build Summary States */
.build-summary.compatible {
    border-left: 4px solid #059669;
}

.build-summary.has-issues {
    border-left: 4px solid #dc2626;
}

/* Installment Options */
.build-installments {
    background: #fff;
    border-radius: 1rem;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    border: 1px solid #e2e8f0;
}

.installment-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    font-weight: 600;
    color: #1e293b;
    font-size: 0.95rem;
}

.installment-header i {
    color: #3b82f6;
}

.installment-options {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.installment-option {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    padding: 0.75rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.installment-bank {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: #1e293b;
    font-size: 0.9rem;
}

.bank-logo {
    width: 24px;
    height: 24px;
    object-fit: contain;
    border-radius: 4px;
}

.installment-bank i {
    color: #3b82f6;
}

.installment-details {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.25rem;
}

.installment-period {
    font-size: 0.75rem;
    color: #64748b;
}

.installment-amount {
    font-size: 1rem;
    font-weight: 700;
    color: #059669;
}

/* RTL Support for Installments */
body.rtl .installment-option {
    flex-direction: row-reverse;
}

body.rtl .installment-details {
    align-items: flex-start;
}

/* Coupon Section */
.coupon-section {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e2e8f0;
}

.coupon-input-group {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.coupon-input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 0.5rem;
    font-size: 0.95rem;
    transition: all 0.2s;
    text-transform: uppercase;
}

.coupon-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.coupon-input:disabled {
    background-color: #e8f5e9;
    border-color: #10b981;
    cursor: not-allowed;
}

.coupon-apply-btn {
    padding: 0.75rem 1.5rem;
    background: #3b82f6;
    color: white;
    border: none;
    border-radius: 0.5rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
}

.coupon-apply-btn:hover:not(:disabled) {
    background: #2563eb;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.coupon-apply-btn:disabled {
    background: #10b981;
    cursor: not-allowed;
    opacity: 0.9;
}

.coupon-remove-btn {
    padding: 0.75rem;
    background: #ef4444;
    color: white;
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
}

.coupon-remove-btn:hover {
    background: #dc2626;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.coupon-message {
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.75rem;
}

.coupon-message.success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #10b981;
}

.coupon-message.error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #ef4444;
}

.discount-info {
    background: #f0fdf4;
    border: 1px solid #10b981;
    border-radius: 0.5rem;
    padding: 1rem;
    margin-top: 0.75rem;
}

.discount-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.discount-row:last-child {
    margin-bottom: 0;
    padding-top: 0.5rem;
    border-top: 1px solid #d1fae5;
}

.discount-label {
    font-size: 0.95rem;
    color: #065f46;
    font-weight: 500;
}

.discount-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: #059669;
}

.final-price {
    font-size: 1.25rem;
    color: #047857;
}

/* RTL Support for Coupon */
body.rtl .coupon-input-group {
    flex-direction: row-reverse;
}

body.rtl .discount-row {
    flex-direction: row-reverse;
}

/* Responsive */
@media (max-width: 768px) {
    .header .container {
        flex-direction: column;
        gap: 1rem;
    }
    
    .header-nav {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .summary-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .whatsapp-build-btn {
        width: 100%;
        justify-content: center;
    }
    
    .installment-option {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .installment-details {
        align-items: flex-start;
        width: 100%;
    }
    
    .coupon-input-group {
        flex-direction: column;
    }
    
    .coupon-apply-btn {
        width: 100%;
        justify-content: center;
    }
    
    .summary-stats {
        flex-direction: column;
        gap: 1rem;
    }
    
    .selected-components {
        grid-template-columns: 1fr;
    }
    
    .builder-parts-grid {
        grid-template-columns: 1fr;
    }
    
    .build-actions {
        flex-direction: column;
    }
    
    .part-actions {
        position: static;
        opacity: 1;
        transform: none;
        margin-top: 0.5rem;
        justify-content: flex-end;
    }
    
    .builder-part-card:hover .part-actions {
        transform: none;
    }
}
