/* Build Your PC Page Styling */

/* Universal box-sizing for consistent sizing */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

/* Main Structure Styles */
body.build-pc-page {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f8f9fa;
    overflow-x: hidden;
}

body.build-pc-page.dark {
    background-color: #1a1a1a;
    color: #f0f0f0;
}

.container {
    max-width: 1400px;
    margin: 70px auto 0;
    padding: 30px;
}

body.build-pc-page .top-nav {
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

body.build-pc-page.dark .top-nav {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* Hero Section */
.build-pc-hero {
    position: relative;
    background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.8)), url('../images/pc-builder-bg.jpg');
    background-size: cover;
    background-position: center;
    height: 380px;
    border-radius: 16px;
    margin-bottom: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.build-pc-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(63, 81, 181, 0.7), rgba(142, 36, 170, 0.7));
    z-index: 1;
}

.hero-content {
    position: relative;
    text-align: center;
    z-index: 2;
    color: #ffffff;
    padding: 20px;
    max-width: 800px;
}

.hero-content h1 {
    font-size: 3.2rem;
    margin-bottom: 20px;
    background: linear-gradient(120deg, #ffffff, #e0e0e0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
    text-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    letter-spacing: 1px;
}

.hero-content p {
    font-size: 1.4rem;
    margin-bottom: 35px;
    opacity: 0.9;
    line-height: 1.5;
    max-width: 80%;
    margin-left: auto;
    margin-right: auto;
}

.start-building-btn {
    display: inline-block;
    background: linear-gradient(120deg, #3f51b5, #8e24aa);
    color: white;
    padding: 15px 40px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.start-building-btn:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.start-building-btn i {
    margin-left: 8px;
}

/* PC Builder Section */
.pc-builder-section {
    padding: 40px 0;
}

.builder-container {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

/* Component Selection */
.component-selection {
    width: 100%;
}

.component-selection h2 {
    font-size: 1.8rem;
    margin-bottom: 20px;
    color: #333;
    border-bottom: 2px solid #3f51b5;
    padding-bottom: 10px;
}

body.dark .component-selection h2 {
    color: #f0f0f0;
    border-bottom-color: #8e24aa;
}

.component-category {
    background-color: #ffffff;
    border-radius: 12px;
    margin-bottom: 30px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: all 0.3s ease;
}

body.dark .component-category {
    background-color: #2d2d2d;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.component-category:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

body.dark .component-category:hover {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.4);
}

.component-header {
    display: flex;
    align-items: center;
    padding: 18px 25px;
    background: linear-gradient(120deg, #3f51b5, #8e24aa);
    color: white;
    justify-content: flex-start;
    flex-wrap: nowrap;
    gap: 15px;
}

.component-header i {
    font-size: 1.8rem;
    margin-right: 20px;
}

.component-header h3 {
    margin: 0;
    font-size: 1.3rem;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.flex-spacer {
    flex-grow: 1;
}

/* Sort button styling in component headers */
.component-header .sort-container {
    margin-left: auto;
    min-width: 130px;
}

.component-header .sort-btn {
    height: 38px;
    padding: 8px 10px;
    border-radius: 6px;
    white-space: nowrap;
    font-size: 0.9rem;
}

.component-header .sort-dropdown {
    right: 0;
    left: auto;
    z-index: 100;
}

/* Fix for price range header and input text color */
.component-header .price-range-header {
    color: #333;
}

.component-header .price-range-inputs {
    color: #333;
}

.component-header .price-range-inputs input {
    color: #333;
}

body.dark .component-header .price-range-header,
body.dark .component-header .price-range-inputs,
body.dark .component-header .price-range-inputs input {
    color: #f0f0f0;
}

body.dark .component-header .price-range-inputs input {
    background-color: #444;
    border-color: #555;
}

.component-options {
    padding: 25px;
    background: transparent;
}

.component-filters {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.component-filters select {
    padding: 8px 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    background-color: #f5f5f5;
    font-size: 0.9rem;
    flex-grow: 1;
    min-width: 120px;
    outline: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

body.dark .component-filters select {
    background-color: #333;
    border-color: #444;
    color: #f0f0f0;
}

.component-filters select:focus {
    border-color: #8e24aa;
    box-shadow: 0 0 0 2px rgba(142, 36, 170, 0.2);
}

.component-items {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 25px;
    margin-top: 25px;
}

.component-grid {
    grid-column: 1;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    max-height: 650px;
    overflow-y: auto;
    padding: 0 2px;
}

.component-grid-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
    position: relative;
    padding-bottom: 10px;
    background: transparent;
}

.more-products-indicator {
    text-align: center;
    margin-top: 5px;
    margin-bottom: 0;
    cursor: pointer;
    color: #8e24aa;
    font-size: 1.2rem;
    opacity: 0.8;
    transition: all 0.3s ease;
    line-height: 1;
}

.more-products-indicator:hover {
    opacity: 1;
    transform: translateY(2px);
}

.selected-preview {
    grid-column: 2;
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    height: 400px;
}

body.dark .selected-preview {
    background-color: #232342;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.preview-image-container {
    width: 100%;
    height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
}

.preview-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.preview-info {
    text-align: center;
    width: 100%;
}

.preview-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 5px;
    color: #333;
}

body.dark .preview-title {
    color: #f0f0f0;
}

.preview-subtitle {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 10px;
}

body.dark .preview-subtitle {
    color: #aaa;
}

.no-selection-message {
    color: #666;
    font-style: italic;
    text-align: center;
}

body.dark .no-selection-message {
    color: #aaa;
}

/* Removed Component Card Styles - Now in product-cards.css */

@keyframes cosmic-gradient {
    0% { background-position: 0% 50% }
    50% { background-position: 100% 50% }
    100% { background-position: 0% 50% }
}

/* Build Summary */
.build-summary {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
}

.summary-container {
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
    padding: 20px;
    position: relative;
}

body.dark .summary-container {
    background-color: #2d2d2d;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.3);
}

.build-summary h2 {
    font-size: 1.5rem;
    margin-bottom: 20px;
    color: #333;
    border-bottom: 2px solid #3f51b5;
    padding-bottom: 10px;
}

body.dark .build-summary h2 {
    color: #f0f0f0;
    border-bottom-color: #8e24aa;
}

.selected-components {
    margin-bottom: 20px;
    min-height: 150px;
}

.empty-build-message {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    height: 150px;
    color: #999;
    text-align: center;
}

.empty-build-message i {
    font-size: 2rem;
    margin-bottom: 10px;
    color: #3f51b5;
}

body.dark .empty-build-message i {
    color: #8e24aa;
}

.selected-component-item {
    display: flex;
    align-items: center;
    padding: 10px;
    border-bottom: 1px solid #eee;
    transition: background-color 0.2s ease;
}

body.dark .selected-component-item {
    border-bottom-color: #444;
}

.selected-component-item:hover {
    background-color: #f9f9f9;
}

body.dark .selected-component-item:hover {
    background-color: #333;
}

.selected-component-image {
    width: 40px;
    height: 40px;
    object-fit: contain;
    margin-right: 10px;
    background-color: white;
    padding: 2px;
    border-radius: 4px;
}

body.dark .selected-component-image {
    background-color: #444;
}

.selected-component-details {
    flex-grow: 1;
}

.selected-component-name {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 2px;
    color: #333;
}

body.dark .selected-component-name {
    color: #f0f0f0;
}

.selected-component-price {
    font-size: 0.8rem;
    color: #8e24aa;
    font-weight: 600;
}

.remove-component {
    color: #ff5252;
    cursor: pointer;
    font-size: 0.9rem;
    margin-left: 5px;
    transition: all 0.2s ease;
}

.remove-component:hover {
    transform: scale(1.2);
}

/* Compatibility Check */
.compatibility-check, 
.performance-meter {
    background-color: #f9f9f9;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
}

body.dark .compatibility-check,
body.dark .performance-meter {
    background-color: #333;
}

.compatibility-check h3,
.performance-meter h3 {
    display: flex;
    align-items: center;
    font-size: 1.1rem;
    margin: 0 0 10px;
    color: #333;
}

body.dark .compatibility-check h3,
body.dark .performance-meter h3 {
    color: #f0f0f0;
}

.compatibility-check h3 i,
.performance-meter h3 i {
    margin-right: 8px;
    color: #3f51b5;
}

body.dark .compatibility-check h3 i,
body.dark .performance-meter h3 i {
    color: #8e24aa;
}

.compatibility-status {
    font-size: 0.9rem;
    color: #4caf50;
}

.compatibility-warning {
    color: #ff9800;
}

.compatibility-error {
    color: #f44336;
}

/* Performance Meter */
.performance-ratings {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.rating-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
    color: #666;
}

body.dark .rating-item {
    color: #ccc;
}

.rating-stars {
    display: flex;
    gap: 3px;
}

.rating-stars i.fas {
    color: #ffc107;
}

.rating-stars i.far {
    color: #e0e0e0;
}

body.dark .rating-stars i.far {
    color: #555;
}

/* Price Summary */
.price-summary {
    background-color: #f5f5f5;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
}

body.dark .price-summary {
    background-color: #333;
}

.subtotal, .tax, .total {
    display: flex;
    justify-content: space-between;
    padding: 5px 0;
}

.total {
    border-top: 1px solid #ddd;
    margin-top: 5px;
    padding-top: 10px;
    font-weight: 600;
    font-size: 1.1rem;
    color: #333;
}

body.dark .total {
    border-top-color: #444;
    color: #f0f0f0;
}

/* Action Buttons */
.build-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 15px;
}

.save-build-btn, .share-build-btn, .add-to-cart-btn, .help-btn {
    padding: 10px 15px;
    border: none;
    border-radius: 5px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.save-build-btn i, .share-build-btn i, .add-to-cart-btn i, .help-btn i {
    margin-right: 8px;
}

.save-build-btn {
    background-color: #4caf50;
    color: white;
    flex: 1;
}

.save-build-btn:hover {
    background-color: #3d8b40;
}

.share-build-btn {
    background-color: #2196f3;
    color: white;
    flex: 1;
}

.share-build-btn:hover {
    background-color: #1976d2;
}

.add-to-cart-btn {
    background: linear-gradient(120deg, #3f51b5, #8e24aa);
    color: white;
    flex: 2;
}

.add-to-cart-btn:hover {
    background: linear-gradient(120deg, #303f9f, #7b1fa2);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.help-section {
    text-align: center;
    margin-top: 10px;
}

.help-btn {
    background-color: transparent;
    color: #666;
    border: 1px solid #ddd;
    padding: 8px 15px;
    font-size: 0.9rem;
    width: 100%;
}

body.dark .help-btn {
    color: #ccc;
    border-color: #444;
}

.help-btn:hover {
    background-color: #f5f5f5;
    color: #333;
}

body.dark .help-btn:hover {
    background-color: #333;
    color: #f0f0f0;
}

/* Modals */
.modal {
    display: none;
    position: fixed;
    z-index: 1100;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.3s;
}

.modal-content {
    background-color: #fefefe;
    margin: 10% auto;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
    width: 80%;
    max-width: 600px;
    position: relative;
    animation: slideIn 0.3s;
}

body.dark .modal-content {
    background-color: #2d2d2d;
    color: #f0f0f0;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.4);
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 1.5rem;
    color: #aaa;
    cursor: pointer;
    transition: color 0.2s ease;
}

.close-modal:hover {
    color: #333;
}

body.dark .close-modal:hover {
    color: #f0f0f0;
}

/* Help Modal */
.help-content {
    padding: 15px 0;
}

.help-content h3 {
    margin-top: 0;
    color: #333;
    font-size: 1.1rem;
}

body.dark .help-content h3 {
    color: #f0f0f0;
}

.help-content ol {
    padding-left: 20px;
}

.help-content li {
    margin-bottom: 8px;
    color: #666;
}

body.dark .help-content li {
    color: #ccc;
}

.help-content strong {
    color: #3f51b5;
}

body.dark .help-content strong {
    color: #8e24aa;
}

.contact-support {
    color: #2196f3;
    text-decoration: none;
}

.contact-support:hover {
    text-decoration: underline;
}

/* Save Build Modal */
.save-build-form {
    padding: 10px 0;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #333;
}

body.dark .form-group label {
    color: #f0f0f0;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    background-color: #f5f5f5;
    font-size: 0.9rem;
}

body.dark .form-group input,
body.dark .form-group textarea {
    background-color: #333;
    border-color: #444;
    color: #f0f0f0;
}

.form-group textarea {
    height: 80px;
    resize: vertical;
}

.confirm-save-btn {
    width: 100%;
    padding: 12px;
    background-color: #4caf50;
    color: white;
    border: none;
    border-radius: 5px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.confirm-save-btn:hover {
    background-color: #3d8b40;
}

/* Share Build Modal */
.share-build-content {
    padding: 15px 0;
}

.share-link-container {
    display: flex;
    margin: 15px 0;
}

.share-link-container input {
    flex-grow: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px 0 0 5px;
    background-color: #f5f5f5;
    font-size: 0.9rem;
}

body.dark .share-link-container input {
    background-color: #333;
    border-color: #444;
    color: #f0f0f0;
}

.copy-link-btn {
    padding: 10px 15px;
    background-color: #3f51b5;
    color: white;
    border: none;
    border-radius: 0 5px 5px 0;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.copy-link-btn:hover {
    background-color: #303f9f;
}

.social-share-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 20px;
}

.social-share-buttons button {
    flex: 1;
    padding: 10px 0;
    border: none;
    border-radius: 5px;
    color: white;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.social-share-buttons button i {
    margin-right: 8px;
}

.facebook-share {
    background-color: #1877f2;
}

.facebook-share:hover {
    background-color: #166fe5;
}

.twitter-share {
    background-color: #1da1f2;
}

.twitter-share:hover {
    background-color: #0d95e8;
}

.email-share {
    background-color: #ea4335;
}

.email-share:hover {
    background-color: #d73925;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

/* Responsive Styling */
@media (max-width: 1200px) {
    .builder-container {
        flex-direction: column;
    }
    
    .build-summary {
        position: static;
        width: 100%;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .hero-content h1 {
        font-size: 1.8rem;
    }
    
    .hero-content p {
        font-size: 1rem;
    }
    
    .component-items {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
    
    .component-filters {
        flex-direction: column;
    }
    
    .component-filters select {
        width: 100%;
    }
    
    .build-actions {
        flex-direction: column;
    }
    
    .save-build-btn, .share-build-btn, .add-to-cart-btn {
        width: 100%;
    }
    
    .modal-content {
        width: 95%;
        margin: 20% auto;
    }
}

@media (max-width: 480px) {
    .component-header {
        padding: 10px;
    }
    
    .component-header i {
        font-size: 1.2rem;
    }
    
    .component-header h3 {
        font-size: 1rem;
    }
    
    .component-items {
        grid-template-columns: 1fr;
    }
}
