/* PC Builder Specific Styles */

.pc-builder-container {
    padding: 2rem 0;
    min-height: 100vh;
    background: var(--bg-primary);
}

/* Builder Header */
.builder-header {
    text-align: center;
    margin-bottom: 3rem;
    padding: 2rem 0;
}

.builder-header h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}


.builder-header p {
    font-size: 1.2rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

/* Parts Selection */
.parts-selection {
    max-width: 1400px;
    margin: 0 auto;
}

.selection-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding: 1rem 0;
    border-bottom: 2px solid var(--border-color);
}

.selection-header h2 {
    font-size: 2rem;
    color: var(--text-primary);
    position: relative;
}

.build-percentage-indicator {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-left: 1rem;
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    color: white;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(144, 198, 149, 0.3);
    animation: pulse 2s infinite;
}

.percentage-icon {
    font-size: 1.1rem;
}

.percentage-text {
    white-space: nowrap;
}

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

.build-summary {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.total-price {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-primary);
}

.price-amount {
    color: var(--accent-primary);
    font-size: 1.5rem;
}

.build-recommendation {
    background: rgba(144, 198, 149, 0.1);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    border-left: 4px solid var(--accent-primary);
    font-size: 0.9rem;
    color: var(--text-primary);
    max-width: 300px;
    text-align: center;
}

.build-recommendation.gaming {
    background: rgba(255, 107, 107, 0.1);
    border-left-color: #ff6b6b;
}

.build-recommendation.streaming {
    background: rgba(74, 144, 226, 0.1);
    border-left-color: #4a90e2;
}

.build-recommendation.design {
    background: rgba(255, 193, 7, 0.1);
    border-left-color: #ffc107;
}

.build-recommendation.workstation {
    background: rgba(156, 39, 176, 0.1);
    border-left-color: #9c27b0;
}

.build-recommendation.budget {
    background: rgba(76, 175, 80, 0.1);
    border-left-color: #4caf50;
}

.save-build-btn {
    background: var(--accent-primary);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.save-build-btn:hover {
    background: var(--accent-secondary);
    transform: translateY(-2px);
}

/* Parts Grid */
.parts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

/* Global Search Section */
.global-search-section {
    background: var(--bg-secondary);
    border-radius: 15px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 5px 20px var(--card-shadow);
}

.search-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.global-search-input {
    width: 100%;
    padding: 1rem 3rem 1rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    font-size: 1rem;
    background: var(--bg-primary);
    color: var(--text-primary);
    transition: all 0.3s ease;
}

.global-search-input:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(144, 198, 149, 0.1);
}

.global-search-input::placeholder {
    color: var(--text-secondary);
}

.search-input-wrapper .search-btn {
    position: absolute;
    right: 0.5rem;
    background: var(--accent-primary);
    border: none;
    border-radius: 8px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: white;
}

.search-input-wrapper .search-btn:hover {
    background: var(--accent-secondary);
    transform: scale(1.05);
}

.search-filters {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.search-filter {
    padding: 0.5rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.search-filter:focus {
    outline: none;
    border-color: var(--accent-primary);
}

.search-filter:hover {
    border-color: var(--accent-primary);
}

/* Search Results */
.search-results {
    background: var(--bg-secondary);
    border-radius: 15px;
    margin-top: 1rem;
    box-shadow: 0 5px 20px var(--card-shadow);
    max-height: 500px;
    overflow: hidden;
}

.search-results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.search-results-header h3 {
    font-size: 1.2rem;
    color: var(--text-primary);
    margin: 0;
}

.close-search {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.close-search:hover {
    background: var(--bg-primary);
    color: var(--text-primary);
}

.search-results-grid {
    padding: 1rem;
    max-height: 400px;
    overflow-y: auto;
}

.search-result-item {
    background: var(--bg-primary);
    border-radius: 10px;
    padding: 1rem;
    margin-bottom: 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.search-result-item:hover {
    border-color: var(--accent-primary);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px var(--card-shadow);
}

.search-result-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.5rem;
}

.search-result-name {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 1rem;
}

.search-result-price {
    font-weight: bold;
    color: var(--accent-primary);
    font-size: 1.1rem;
}

.search-result-specs {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.search-result-badges {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* Update badge styles */
.search-result-badge {
    padding: 3px 8px;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: bold;
    display: inline-block;
    margin-right: 5px;
    margin-top: 5px;
}

.search-result-badge.category {
    background: var(--accent-primary);
    color: white;
}

.search-result-badge.feature {
    background: #ff4757;
    color: white;
}

.search-result-badge.discount {
    background: #2ed573;
    color: white;
}

.search-result-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border-color);
}

.search-result-select-btn,
.search-result-view-btn {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    flex: 1;
}

.search-result-select-btn {
    background: var(--accent-primary);
    color: white;
}

.search-result-select-btn:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
}

.search-result-view-btn {
    background: var(--bg-primary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.search-result-view-btn:hover {
    background: var(--bg-secondary);
    border-color: var(--accent-primary);
    transform: translateY(-1px);
}

.no-search-results {
    text-align: center;
    padding: 2rem;
    color: var(--text-secondary);
    font-style: italic;
}

/* Enhanced Part Sections */
.part-section {
    background: var(--bg-secondary);
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: 0 5px 20px var(--card-shadow);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.part-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.part-section:hover::before {
    transform: scaleX(1);
}

.part-section:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px var(--card-shadow);
}

.part-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.part-header h3 {
    font-size: 1.2rem;
    color: var(--text-primary);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.part-header h3::before {
    content: '';
    width: 8px;
    height: 8px;
    background: var(--accent-primary);
    border-radius: 50%;
}

.part-status {
    font-size: 0.9rem;
    color: var(--text-secondary);
    padding: 4px 12px;
    border-radius: 15px;
    background: var(--bg-primary);
    transition: all 0.3s ease;
}

.part-status.selected {
    color: var(--accent-primary);
    background: rgba(144, 198, 149, 0.1);
    font-weight: 600;
}

/* Improved Part Selector */
.part-selector {
    position: relative;
    width: 100%;
    z-index: 100;
    margin-bottom: 1rem;
}

.part-selector-btn {
    width: 100%;
    padding: 1rem;
    background: var(--bg-primary);
    border: 2px solid var(--border-color);
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
    color: var(--text-primary);
    font-size: 1rem;
}

.part-selector-btn:hover {
    border-color: var(--accent-primary);
    background: rgba(144, 198, 149, 0.05);
    transform: translateY(-1px);
}

.part-selector-btn.selected {
    border-color: var(--accent-primary);
    background: rgba(144, 198, 149, 0.1);
    box-shadow: 0 0 0 3px rgba(144, 198, 149, 0.1);
}

.part-selector-btn .selected-part {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
}

.part-selector-btn .part-info {
    flex: 1;
}

.part-selector-btn .part-name {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.2rem;
}

.part-selector-btn .part-specs {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.part-selector-btn .part-price {
    font-weight: bold;
    color: var(--accent-primary);
    font-size: 1.1rem;
}

.part-selector-btn .dropdown-arrow {
    transition: transform 0.3s ease;
    color: var(--text-secondary);
    font-size: 0.8rem;
}

.part-selector-btn.open .dropdown-arrow {
    transform: rotate(180deg);
}

/* Update the part-dropdown styles */
.part-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-top: none;
    border-radius: 0 0 10px 10px;
    max-height: 500px; /* Increased height for better visibility */
    overflow-y: auto;
    z-index: 1000;
    display: none;
    box-shadow: 0 10px 30px var(--card-shadow);
    margin-top: 2px;
    min-height: 50px;
    backdrop-filter: blur(10px);
    padding: 15px; /* Increased padding */
    border: 2px solid var(--border-color);
    border-top: none;
}

.part-dropdown.show {
    display: block !important;
    animation: slideDown 0.3s ease-out;
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(0);
    z-index: 1001;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
        visibility: hidden;
    }
    to {
        opacity: 1;
        transform: translateY(0);
        visibility: visible;
    }
}

.part-option {
    padding: 1.2rem;
    cursor: pointer;
    transition: all 0.2s ease;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    background: var(--bg-secondary);
    margin-bottom: 8px; /* Increased spacing between options */
    border-radius: 10px; /* Increased rounded corners */
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
}

.part-option:hover {
    background: var(--bg-primary);
    transform: translateX(5px);
    border-color: var(--accent-primary);
    box-shadow: 0 5px 15px rgba(144, 198, 149, 0.2);
}
.part-option:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.part-option.selected {
    background: rgba(144, 198, 149, 0.15);
    border-left: 4px solid var(--accent-primary);
    box-shadow: 0 3px 10px rgba(144, 198, 149, 0.2);
}

.part-option-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.5rem;
    flex: 1;
    width: 100%;
    gap: 1rem;
}

.part-option-name {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 1rem;
    line-height: 1.4;
    flex: 1;
}

.part-option-price {
    font-weight: bold;
    color: var(--accent-primary);
    font-size: 1.1rem;
}

.part-option-specs {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 0.8rem;
    opacity: 0.9;
}

.part-option-badge {
    background: #ff4757;
    color: white;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: bold;
    margin-left: 0.5rem;
}

.part-option-recommended {
    background: var(--accent-primary);
    color: white;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: bold;
    margin-left: 0.5rem;
}

/* New Parts Selection Interface Styles */
.parts-selection-interface {
    margin-top: 2rem;
}

.part-category-section {
    margin-bottom: 3rem;
    background: linear-gradient(135deg, var(--bg-secondary), rgba(255, 255, 255, 0.03));
    border-radius: 20px;
    padding: 2rem;
    border: 2px solid rgba(144, 198, 149, 0.15);
    box-shadow: 
        0 10px 30px rgba(0, 0, 0, 0.1),
        0 0 0 1px rgba(144, 198, 149, 0.1);
    backdrop-filter: blur(15px);
    position: relative;
    overflow: hidden;
}

.part-category-section::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, var(--accent-primary), var(--accent-secondary), var(--accent-primary));
    border-radius: 22px;
    z-index: -1;
    opacity: 0.2;
    animation: borderGlow 4s ease-in-out infinite;
}

.category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid rgba(144, 198, 149, 0.2);
}

.category-header h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    letter-spacing: 0.5px;
    margin: 0;
}

.category-status {
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, rgba(144, 198, 149, 0.2), rgba(255, 255, 255, 0.1));
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-secondary);
    border: 1px solid rgba(144, 198, 149, 0.3);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.category-status.selected {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    color: white;
    box-shadow: 0 5px 15px rgba(144, 198, 149, 0.3);
}

.parts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
}

.part-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
    border-radius: 15px;
    padding: 1.5rem;
    border: 2px solid rgba(144, 198, 149, 0.2);
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.part-card::before {
    content: '';
    position: absolute;
    top: -1px;
    left: -1px;
    right: -1px;
    bottom: -1px;
    background: linear-gradient(45deg, var(--accent-primary), var(--accent-secondary));
    border-radius: 16px;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.part-card:hover {
    transform: translateY(-5px) scale(1.02);
    border-color: rgba(144, 198, 149, 0.4);
    box-shadow: 
        0 15px 35px rgba(0, 0, 0, 0.2),
        0 0 0 2px rgba(144, 198, 149, 0.2);
}

.part-card:hover::before {
    opacity: 0.3;
}

.part-card.selected {
    background: linear-gradient(135deg, rgba(144, 198, 149, 0.15), rgba(255, 255, 255, 0.1));
    border-color: var(--accent-primary);
    box-shadow: 
        0 10px 25px rgba(144, 198, 149, 0.3),
        0 0 0 2px rgba(144, 198, 149, 0.4);
    transform: translateY(-3px);
}

.part-card.selected::before {
    opacity: 0.4;
}

.part-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
    flex-wrap: wrap; /* Allow wrapping if content is too long */
    gap: 0.5rem 1rem; /* Gap between rows and columns */
}

.part-card-name {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.3;
    margin-bottom: 0.5rem;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    flex-basis: 100%; /* Take full width on small screens */
}

.part-card-price-section {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap; /* Allow badges to wrap if many */
    justify-content: flex-end; /* Align to the right */
    margin-top: -0.5rem; /* Pull up a bit to align with name */
    margin-left: auto; /* Push to the right */
}

.part-card-price {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--accent-primary);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    letter-spacing: 0.5px;
    white-space: nowrap;
}

/* Global styles for all part card badges */
.part-card-badge {
    display: inline-block;
    padding: 0.3rem 0.6rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: white;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15);
    white-space: nowrap;
}

/* Specific badge colors */
.part-card-badge.new {
    background: linear-gradient(135deg, #4ECDC4, #44A08D);
}

.part-card-badge.best-seller {
    background: linear-gradient(135deg, #FFD700, #FFA500);
    color: #333;
}

.part-card-badge.price-drop {
    background: linear-gradient(135deg, #FF6B6B, #EE5A52);
}

.part-card-specs {
    margin-bottom: 1rem;
}

.spec-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.9rem;
    line-height: 1.4;
}

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

.spec-label {
    color: var(--text-secondary);
    font-weight: 500;
    opacity: 0.8;
}

.spec-value {
    color: var(--text-primary);
    font-weight: 600;
    text-align: right;
}

.part-card-description {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.5;
    opacity: 0.8;
    margin-bottom: 1rem;
}

.part-card-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

.select-part-btn {
    flex: 1;
    padding: 0.8rem 1.5rem; /* Increased padding */
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem; /* Larger font size */
    font-weight: 700; /* Bolder font */
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(144,198,149,0.15);
    transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
    text-transform: uppercase;
    letter-spacing: 1px;
    width: 100%;
    display: block;
}
.select-part-btn:hover, .select-part-btn:focus {
  background: linear-gradient(90deg, var(--accent-secondary), var(--accent-primary));
  color: #fff;
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 4px 16px rgba(144,198,149,0.25);
}

.select-part-btn.selected {
    background: linear-gradient(135deg, #4CAF50, #45a049);
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.4);
}

.remove-part-btn {
    padding: 0.8rem 1.5rem; /* Increased padding */
    background: linear-gradient(90deg, #ff6b6b, #ee5a52);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 700; /* Bolder font */
    font-size: 1.1rem; /* Larger font size */
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 4px 12px rgba(255, 107, 107, 0.3);
    width: 100%;
    display: block;
}
.remove-part-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.4);
}

.part-card-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(144, 198, 149, 0.4);
}

.part-card-badge.best-value {
    background: linear-gradient(135deg, #FFD700, #FFA500);
    color: #333;
}

.part-card-badge.popular {
    background: linear-gradient(135deg, #FF6B6B, #EE5A52);
}

.part-card-badge.new {
    background: linear-gradient(135deg, #4ECDC4, #44A08D);
}

/* Responsive Design */
@media (max-width: 768px) {
    .parts-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .part-card {
        padding: 1.2rem;
    }
    
    .category-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .category-header h3 {
        font-size: 1.3rem;
    }
    
    .part-card-name {
        font-size: 1.1rem;
    }
    
    .part-card-price {
        font-size: 1.2rem;
    }
}

@media (max-width: 480px) {
    .part-category-section {
        padding: 1.5rem;
        margin-bottom: 2rem;
    }
    
    .part-card {
        padding: 1rem;
    }
    
    .part-card-actions {
        flex-direction: column;
    }
    
    .select-part-btn,
    .remove-part-btn {
        width: 100%;
    }
}

/* Animation for part cards */
@keyframes cardAppear {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.part-card {
    animation: cardAppear 0.6s ease-out;
}

.part-card:nth-child(1) { animation-delay: 0.1s; }
.part-card:nth-child(2) { animation-delay: 0.2s; }
.part-card:nth-child(3) { animation-delay: 0.3s; }
.part-card:nth-child(4) { animation-delay: 0.4s; }
.part-card:nth-child(5) { animation-delay: 0.5s; }
.part-card:nth-child(6) { animation-delay: 0.6s; }

/* Loading state for parts grids */
.parts-grid.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 200px;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(144, 198, 149, 0.3);
    border-top: 3px solid var(--accent-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Empty state for parts grids */
.parts-grid.empty {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 150px;
    text-align: center;
}

.empty-message {
    color: var(--text-secondary);
    font-size: 1.1rem;
    opacity: 0.7;
}

/* Enhanced hover effects */
.part-card:hover .part-card-name {
    color: var(--accent-primary);
    transition: color 0.3s ease;
}

.part-card:hover .part-card-price {
    transform: scale(1.05);
    transition: transform 0.3s ease;
}

/* Selection indicator */
.part-card.selected::after {
    content: '✓';
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: var(--accent-primary);
    color: white;
    width: 25px;
    height: 25px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.8rem;
    box-shadow: 0 2px 8px rgba(144, 198, 149, 0.4);
    animation: checkmarkAppear 0.3s ease-out;
}

@keyframes checkmarkAppear {
    from {
        opacity: 0;
        transform: scale(0);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
} 

/* Enhanced Build Summary */
.build-summary-panel {
    background: linear-gradient(135deg, var(--bg-secondary), rgba(255, 255, 255, 0.05));
    border-radius: 25px;
    padding: 3rem;
    box-shadow:
        0 20px 50px rgba(0, 0, 0, 0.2),
        0 0 0 2px rgba(144, 198, 149, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    margin-top: 2.5rem;
    position: relative;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    z-index: 10;
    border: 4px solid rgba(144, 198, 149, 0.25);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(20px);
    overflow: hidden;
}

.build-summary-panel::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, var(--accent-primary), var(--accent-secondary), var(--accent-primary));
    border-radius: 27px;
    z-index: -1;
    opacity: 0.2;
    animation: borderGlow 4s ease-in-out infinite;
}

.build-summary-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    border-radius: 15px 15px 0 0;
}

.build-summary-panel::after {
    content: '';
    position: absolute;
    top: 10px;
    right: 10px;
    width: 20px;
    height: 20px;
    background: var(--accent-primary);
    border-radius: 50%;
    opacity: 0.3;
}

.build-summary-panel h3 {
    margin-bottom: 1.5rem;
    color: var(--text-primary);
    text-align: center;
    font-size: 1.5rem;
    font-weight: 600;
}

.selected-parts {
    margin-bottom: 2rem;
    min-height: 100px;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: relative;
    z-index: 5;
    padding: 1.5rem;
    animation: fadeIn 0.6s ease-out;
    border: 3px solid rgba(144, 198, 149, 0.3);
    border-radius: 20px;
    background: linear-gradient(135deg, rgba(144, 198, 149, 0.05), rgba(255, 255, 255, 0.02));
    box-shadow: 
        0 0 0 1px rgba(144, 198, 149, 0.1),
        0 8px 25px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

.selected-parts::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, var(--accent-primary), var(--accent-secondary), var(--accent-primary));
    border-radius: 22px;
    z-index: -1;
    opacity: 0.3;
    animation: borderGlow 3s ease-in-out infinite;
}

.selected-parts::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(144, 198, 149, 0.1), transparent);
    border-radius: 20px;
    pointer-events: none;
    opacity: 0.5;
}

.selected-parts-header {
    text-align: center;
    margin-bottom: 2rem;
    padding: 1.3rem 2rem;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    color: white;
    border-radius: 18px;
    font-weight: 800;
    font-size: 1.4rem;
    box-shadow: 0 8px 25px rgba(144, 198, 149, 0.4);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    position: relative;
    overflow: hidden;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.selected-parts-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

@keyframes borderGlow {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.6; }
}

.no-parts-message {
    text-align: center;
    color: var(--text-secondary);
    font-style: italic;
    padding: 3rem 2rem;
    background: linear-gradient(135deg, var(--bg-primary), rgba(255, 255, 255, 0.02));
    border-radius: 15px;
    border: 2px dashed rgba(255, 255, 255, 0.2);
    font-size: 1.1rem;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.no-parts-message::before {
    content: '🔧';
    font-size: 3rem;
    display: block;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.selected-part-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 2rem;
    background: linear-gradient(135deg, rgba(144, 198, 149, 0.08), rgba(255, 255, 255, 0.05));
    border-radius: 20px;
    margin-bottom: 1.5rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 3px solid rgba(144, 198, 149, 0.25);
    border-left: 8px solid var(--accent-primary);
    box-shadow: 
        0 8px 25px rgba(0, 0, 0, 0.12),
        0 0 0 1px rgba(144, 198, 149, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(15px);
    transform: translateY(0);
}

.selected-part-item::before {
    content: '';
    position: absolute;
    top: -1px;
    left: -1px;
    right: -1px;
    bottom: -1px;
    background: linear-gradient(45deg, var(--accent-primary), var(--accent-secondary));
    border-radius: 21px;
    z-index: -1;
    opacity: 0.2;
    transition: opacity 0.3s ease;
}

.selected-part-item .checkmark {
    content: '✓';
    position: absolute;
    top: 15px;
    right: 15px;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: bold;
    box-shadow: 0 6px 15px rgba(144, 198, 149, 0.5);
    z-index: 2;
    animation: pulse 2s infinite;
}

.selected-part-item::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(144, 198, 149, 0.08), rgba(255, 255, 255, 0.03));
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    border-radius: 18px;
}

.selected-part-item:hover {
    border-left-color: var(--accent-secondary);
    transform: translateX(10px) translateY(-3px);
    box-shadow: 
        0 15px 40px rgba(0, 0, 0, 0.2),
        0 0 0 2px rgba(144, 198, 149, 0.3);
    border-color: rgba(144, 198, 149, 0.5);
}

.selected-part-item:hover::before {
    opacity: 0.4;
}

.selected-part-item:hover::after {
    opacity: 1;
}

.selected-part-info {
    flex: 1;
    padding-right: 1.5rem;
    position: relative;
    z-index: 1;
}

.selected-part-name {
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 0.6rem;
    font-size: 1.3rem;
    line-height: 1.4;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
    letter-spacing: 0.5px;
}

.selected-part-specs {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    line-height: 1.6;
    opacity: 0.95;
    font-weight: 500;
}

.selected-part-badge {
    display: inline-block;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    color: white;
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    margin-top: 0.5rem;
    box-shadow: 0 3px 10px rgba(144, 198, 149, 0.3);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.selected-part-price-section {
    text-align: right;
    min-width: 100px;
    position: relative;
    z-index: 1;
}

.selected-part-price {
    font-weight: 900;
    color: var(--accent-primary);
    font-size: 1.6rem;
    margin-bottom: 0.4rem;
    text-shadow: 0 3px 6px rgba(144, 198, 149, 0.3);
    letter-spacing: 1px;
}

.selected-part-discount {
    color: #e74c3c;
    font-size: 0.85rem;
    font-weight: 700;
    background: linear-gradient(135deg, rgba(231, 76, 60, 0.15), rgba(231, 76, 60, 0.05));
    padding: 0.3rem 0.6rem;
    border-radius: 12px;
    display: inline-block;
    border: 1px solid rgba(231, 76, 60, 0.2);
    box-shadow: 0 2px 8px rgba(231, 76, 60, 0.15);
}

.build-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.order-build-btn {
    background: var(--accent-primary);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.1rem;
}

.order-build-btn:hover {
    background: var(--accent-secondary);
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(144, 198, 149, 0.3);
}

.reset-build-btn {
    background: transparent;
    color: var(--text-secondary);
    border: 2px solid var(--border-color);
    padding: 15px 30px;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.1rem;
}

.reset-build-btn:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
    transform: translateY(-2px);
}

/* Compatibility Section */
.compatibility-section {
    background: var(--bg-secondary);
    border-radius: 15px;
    padding: 2rem;
    margin-top: 2rem;
    box-shadow: 0 5px 20px var(--card-shadow);
}

.compatibility-section h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.compatibility-status {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.compatibility-message {
    padding: 0.8rem;
    border-radius: 8px;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.compatibility-message.success {
    background: rgba(76, 175, 80, 0.1);
    color: #4caf50;
    border-left: 4px solid #4caf50;
}

.compatibility-message.warning {
    background: rgba(255, 193, 7, 0.1);
    color: #ffc107;
    border-left: 4px solid #ffc107;
}

.compatibility-message.error {
    background: rgba(244, 67, 54, 0.1);
    color: #f44336;
    border-left: 4px solid #f44336;
}

.compatibility-message.info {
    background: rgba(33, 150, 243, 0.1);
    color: #2196f3;
    border-left: 4px solid #2196f3;
}

/* Loading Animation */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 768px) {
    .builder-header h1 {
        font-size: 2rem;
    }
    
    .parts-grid {
        grid-template-columns: 1fr;
    }
    
    .selection-header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .selection-header h2 {
        font-size: 1.5rem;
    }
    
    .build-percentage-indicator {
        margin-left: 0;
        margin-top: 0.5rem;
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
    }
    
    .build-summary {
        flex-direction: column;
        gap: 1rem;
    }
    
    .build-actions {
        flex-direction: column;
    }
    
    .order-build-btn,
    .reset-build-btn {
        width: 100%;
    }
    
    .search-filters {
        flex-direction: column;
    }
    
    .search-filter {
        width: 100%;
    }
    
    .search-results-grid {
        max-height: 300px;
    }
}

@media (max-width: 480px) {
    .pc-builder-container {
        padding: 1rem 0;
    }
    
    .builder-header {
        padding: 1rem 0;
    }
    
    .part-section {
        padding: 1rem;
    }
    
    .build-summary-panel {
        padding: 1rem;
    }
    
    .global-search-section {
        padding: 1rem;
    }
    
    .search-results-header {
        padding: 0.5rem 1rem;
    }
    
    .search-results-grid {
        padding: 0.5rem;
    }
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

.selected-part-item.fade-in {
    animation: fadeIn 0.8s ease-out;
    animation-fill-mode: both;
}

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

.slide-up {
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Performance Indicators */
.performance-indicator {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 0.5rem;
}

.performance-excellent {
    background: #4caf50;
}

.performance-good {
    background: #8bc34a;
}

.performance-average {
    background: #ffc107;
}

.performance-poor {
    background: #f44336;
}

/* Tooltip Styles */
.tooltip {
    position: relative;
    cursor: help;
}

.tooltip::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--text-primary);
    color: var(--bg-secondary);
    padding: 0.5rem;
    border-radius: 5px;
    font-size: 0.8rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 1000;
}

.tooltip:hover::after {
    opacity: 1;
}

/* Progress Bar */
.build-progress {
    width: 100%;
    height: 8px;
    background: var(--bg-primary);
    border-radius: 4px;
    overflow: hidden;
    margin: 1rem 0;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
    border-radius: 4px;
    transition: width 0.3s ease;
}

/* Notification Styles */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    color: white;
    font-weight: 600;
    z-index: 1000;
    animation: slideInRight 0.3s ease-out;
}

.notification.success {
    background: #4caf50;
}

.notification.warning {
    background: #ff9800;
}

.notification.error {
    background: #f44336;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
} 

/* New Parts Selection Interface Styles */
.parts-selection-interface {
    margin-top: 2rem;
}

.part-category-section {
    margin-bottom: 3rem;
    background: linear-gradient(135deg, var(--bg-secondary), rgba(255, 255, 255, 0.03));
    border-radius: 20px;
    padding: 2rem;
    border: 2px solid rgba(144, 198, 149, 0.15);
    box-shadow: 
        0 10px 30px rgba(0, 0, 0, 0.1),
        0 0 0 1px rgba(144, 198, 149, 0.1);
    backdrop-filter: blur(15px);
    position: relative;
    overflow: hidden;
}

.part-category-section::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, var(--accent-primary), var(--accent-secondary), var(--accent-primary));
    border-radius: 22px;
    z-index: -1;
    opacity: 0.2;
    animation: borderGlow 4s ease-in-out infinite;
}

.category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid rgba(144, 198, 149, 0.2);
}

.category-header h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    letter-spacing: 0.5px;
    margin: 0;
}

.category-status {
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, rgba(144, 198, 149, 0.2), rgba(255, 255, 255, 0.1));
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-secondary);
    border: 1px solid rgba(144, 198, 149, 0.3);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.category-status.selected {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    color: white;
    box-shadow: 0 5px 15px rgba(144, 198, 149, 0.3);
}

.parts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
}

.part-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
    border-radius: 15px;
    padding: 1.5rem;
    border: 2px solid rgba(144, 198, 149, 0.2);
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.part-card::before {
    content: '';
    position: absolute;
    top: -1px;
    left: -1px;
    right: -1px;
    bottom: -1px;
    background: linear-gradient(45deg, var(--accent-primary), var(--accent-secondary));
    border-radius: 16px;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.part-card:hover {
    transform: translateY(-5px) scale(1.02);
    border-color: rgba(144, 198, 149, 0.4);
    box-shadow: 
        0 15px 35px rgba(0, 0, 0, 0.2),
        0 0 0 2px rgba(144, 198, 149, 0.2);
}

.part-card:hover::before {
    opacity: 0.3;
}

.part-card.selected {
    background: linear-gradient(135deg, rgba(144, 198, 149, 0.15), rgba(255, 255, 255, 0.1));
    border-color: var(--accent-primary);
    box-shadow: 
        0 10px 25px rgba(144, 198, 149, 0.3),
        0 0 0 2px rgba(144, 198, 149, 0.4);
    transform: translateY(-3px);
}

.part-card.selected::before {
    opacity: 0.4;
}

.part-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
    flex-wrap: wrap; /* Allow wrapping if content is too long */
    gap: 0.5rem 1rem; /* Gap between rows and columns */
}

.part-card-name {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.3;
    margin-bottom: 0.5rem;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    flex-basis: 100%; /* Take full width on small screens */
}

.part-card-price-section {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap; /* Allow badges to wrap if many */
    justify-content: flex-end; /* Align to the right */
    margin-top: -0.5rem; /* Pull up a bit to align with name */
    margin-left: auto; /* Push to the right */
}

.part-card-price {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--accent-primary);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    letter-spacing: 0.5px;
    white-space: nowrap;
}

/* Global styles for all part card badges */
.part-card-badge {
    display: inline-block;
    padding: 0.3rem 0.6rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: white;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15);
    white-space: nowrap;
}

/* Specific badge colors */
.part-card-badge.new {
    background: linear-gradient(135deg, #4ECDC4, #44A08D);
}

.part-card-badge.best-seller {
    background: linear-gradient(135deg, #FFD700, #FFA500);
    color: #333;
}

.part-card-badge.price-drop {
    background: linear-gradient(135deg, #FF6B6B, #EE5A52);
}

.part-card-specs {
    margin-bottom: 1rem;
}

.spec-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.9rem;
    line-height: 1.4;
}

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

.spec-label {
    color: var(--text-secondary);
    font-weight: 500;
    opacity: 0.8;
}

.spec-value {
    color: var(--text-primary);
    font-weight: 600;
    text-align: right;
}

.part-card-description {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.5;
    opacity: 0.8;
    margin-bottom: 1rem;
}

.part-card-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

.select-part-btn {
    flex: 1;
    padding: 0.8rem 1.5rem; /* Increased padding */
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem; /* Larger font size */
    font-weight: 700; /* Bolder font */
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(144,198,149,0.15);
    transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
    text-transform: uppercase;
    letter-spacing: 1px;
    width: 100%;
    display: block;
}
.select-part-btn:hover, .select-part-btn:focus {
  background: linear-gradient(90deg, var(--accent-secondary), var(--accent-primary));
  color: #fff;
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 4px 16px rgba(144,198,149,0.25);
}

.select-part-btn.selected {
    background: linear-gradient(135deg, #4CAF50, #45a049);
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.4);
}

.remove-part-btn {
    padding: 0.8rem 1.5rem; /* Increased padding */
    background: linear-gradient(90deg, #ff6b6b, #ee5a52);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 700; /* Bolder font */
    font-size: 1.1rem; /* Larger font size */
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 4px 12px rgba(255, 107, 107, 0.3);
    width: 100%;
    display: block;
}
.remove-part-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.4);
}

.part-card-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(144, 198, 149, 0.4);
}

.part-card-badge.best-value {
    background: linear-gradient(135deg, #FFD700, #FFA500);
    color: #333;
}

.part-card-badge.popular {
    background: linear-gradient(135deg, #FF6B6B, #EE5A52);
}

.part-card-badge.new {
    background: linear-gradient(135deg, #4ECDC4, #44A08D);
}

/* Responsive Design */
@media (max-width: 768px) {
    .parts-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .part-card {
        padding: 1.2rem;
    }
    
    .category-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .category-header h3 {
        font-size: 1.3rem;
    }
    
    .part-card-name {
        font-size: 1.1rem;
    }
    
    .part-card-price {
        font-size: 1.2rem;
    }
}

@media (max-width: 480px) {
    .part-category-section {
        padding: 1.5rem;
        margin-bottom: 2rem;
    }
    
    .part-card {
        padding: 1rem;
    }
    
    .part-card-actions {
        flex-direction: column;
    }
    
    .select-part-btn,
    .remove-part-btn {
        width: 100%;
    }
}

/* Animation for part cards */
@keyframes cardAppear {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.part-card {
    animation: cardAppear 0.6s ease-out;
}

.part-card:nth-child(1) { animation-delay: 0.1s; }
.part-card:nth-child(2) { animation-delay: 0.2s; }
.part-card:nth-child(3) { animation-delay: 0.3s; }
.part-card:nth-child(4) { animation-delay: 0.4s; }
.part-card:nth-child(5) { animation-delay: 0.5s; }
.part-card:nth-child(6) { animation-delay: 0.6s; }

/* Loading state for parts grids */
.parts-grid.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 200px;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(144, 198, 149, 0.3);
    border-top: 3px solid var(--accent-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Empty state for parts grids */
.parts-grid.empty {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 150px;
    text-align: center;
}

.empty-message {
    color: var(--text-secondary);
    font-size: 1.1rem;
    opacity: 0.7;
}

/* Enhanced hover effects */
.part-card:hover .part-card-name {
    color: var(--accent-primary);
    transition: color 0.3s ease;
}

.part-card:hover .part-card-price {
    transform: scale(1.05);
    transition: transform 0.3s ease;
}

/* Selection indicator */
.part-card.selected::after {
    content: '✓';
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: var(--accent-primary);
    color: white;
    width: 25px;
    height: 25px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.8rem;
    box-shadow: 0 2px 8px rgba(144, 198, 149, 0.4);
    animation: checkmarkAppear 0.3s ease-out;
}

@keyframes checkmarkAppear {
    from {
        opacity: 0;
        transform: scale(0);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
} 

/* Enhanced scrolling for parts grids */
.parts-grid {
    max-height: 600px; /* Limit height to show ~3 rows */
    overflow-y: auto; /* Enable vertical scrolling */
    padding-right: 10px; /* Space for scrollbar */
    scrollbar-width: thin; /* Firefox */
    scrollbar-color: var(--accent-primary) transparent; /* Firefox */
}

/* Custom scrollbar styling for Webkit browsers */
.parts-grid::-webkit-scrollbar {
    width: 8px;
}

.parts-grid::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

.parts-grid::-webkit-scrollbar-thumb {
    background: linear-gradient(45deg, var(--accent-primary), var(--accent-secondary));
    border-radius: 4px;
    transition: all 0.3s ease;
}

.parts-grid::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(45deg, var(--accent-secondary), var(--accent-primary));
    box-shadow: 0 0 10px rgba(144, 198, 149, 0.5);
}

/* Responsive adjustments for scrolling */
@media (max-width: 768px) {
    .parts-grid {
        max-height: 500px; /* Slightly smaller on tablets */
    }
}

@media (max-width: 480px) {
    .parts-grid {
        max-height: 400px; /* Even smaller on mobile */
        padding-right: 5px;
    }
    
    .parts-grid::-webkit-scrollbar {
        width: 6px;
    }
} 

/* --- PC Builder Tabbed Layout --- */
.pc-builder-tabs-layout {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
  margin-top: 2rem;
}

.parts-tabs-bar {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  min-width: 160px;
  background: var(--bg-secondary);
  border-radius: 12px;
  padding: 1rem 0.5rem;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  height: fit-content;
}

.tab-btn {
  background: none;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-size: 1.1rem;
  font-weight: 600;
  padding: 0.7rem 1.2rem;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
  text-align: left;
  display: flex; /* Make it a flex container */
  align-items: center; /* Vertically align items */
  gap: 0.7rem; /* Space between icon and text */
}
.tab-btn.active svg,
.tab-btn:hover svg {
  stroke: white;
}

.tab-btn svg {
  stroke: var(--text-secondary);
  transition: stroke 0.2s;
}

.tab-btn span {
  flex-grow: 1; /* Allow text to take available space */
}
.tab-btn.active, .tab-btn:hover {
  background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
  color: #fff;
}

.tab-contents {
  flex: 1 1 0%;
  min-width: 0;
}

.tab-content {
  display: none;
  animation: fadeIn 0.4s;
}
.tab-content.active {
  display: block;
}

/* --- Redesigned & Compact Selected Parts Panel --- */
.selected-parts-panel {
  min-width: 240px;
  max-width: 320px;
  background: linear-gradient(135deg, var(--bg-secondary), rgba(255,255,255,0.04));
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  padding: 1rem 0.5rem;
  margin-left: 1rem;
  position: sticky;
  top: 1rem;
  align-self: flex-start;
  z-index: 2;
  font-size: 0.97rem;
}
.selected-parts-header {
  text-align: center;
  margin-bottom: 1rem;
  padding: 0.7rem 1rem;
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  color: white;
  border-radius: 10px;
  font-weight: 700;
  font-size: 1.05rem;
  box-shadow: 0 2px 8px rgba(144, 198, 149, 0.18);
  text-transform: uppercase;
  letter-spacing: 1px;
  position: relative;
  overflow: hidden;
}
.selected-parts-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.selected-part-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 0.7rem 0.7rem 0.7rem 0.9rem;
  background: linear-gradient(135deg, rgba(144, 198, 149, 0.06), rgba(255,255,255,0.03));
  border-radius: 8px;
  margin-bottom: 0.2rem;
  border: 2px solid rgba(144, 198, 149, 0.13);
  box-shadow: 0 2px 8px rgba(144, 198, 149, 0.07);
  font-size: 0.97rem;
  min-height: 38px;
  position: relative;
}
.selected-part-info {
  flex: 1;
  padding-right: 0.5rem;
  min-width: 0;
}
.selected-part-name {
  font-weight: 700;
  color: var(--text-primary);
  font-size: 1.01rem;
  margin-bottom: 0.1rem;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.selected-part-specs {
  font-size: 0.92rem;
  color: var(--text-secondary);
  margin-bottom: 0.1rem;
  line-height: 1.3;
  opacity: 0.92;
  font-weight: 400;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.selected-part-price-section {
  text-align: right;
  min-width: 60px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.2rem;
}
.selected-part-price {
  font-weight: 800;
  color: var(--accent-primary);
  font-size: 1.01rem;
  margin-bottom: 0.1rem;
  letter-spacing: 0.5px;
}
.selected-parts-total {
  text-align: right;
  font-weight: 700;
  color: var(--accent-primary);
  font-size: 1.08rem;
  margin-top: 0.7rem;
  margin-bottom: 0.2rem;
}
.remove-part-btn {
  padding: 0.2rem 0.6rem;
  background: linear-gradient(135deg, #ff6b6b, #ee5a52);
  color: white;
  border: none;
  border-radius: 7px;
  font-weight: 600;
  font-size: 0.92rem;
  cursor: pointer;
  transition: all 0.2s;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 2px 6px rgba(255, 107, 107, 0.13);
  margin-top: 0.1rem;
}
.remove-part-btn:hover {
  background: linear-gradient(135deg, #ee5a52, #ff6b6b);
  color: #fff;
  transform: translateY(-1px) scale(1.04);
}
.no-parts-message {
  text-align: center;
  color: var(--text-secondary);
  font-style: italic;
  padding: 1.2rem 0.5rem;
  background: linear-gradient(135deg, var(--bg-primary), rgba(255,255,255,0.01));
  border-radius: 8px;
  border: 1.5px dashed rgba(255,255,255,0.13);
  font-size: 0.98rem;
  margin-bottom: 0.5rem;
}
@media (max-width: 700px) {
  .selected-parts-panel {
    min-width: 0;
    max-width: 100%;
    padding: 0.7rem 0.2rem;
    margin-left: 0;
    border-radius: 8px;
  }
  .selected-part-item {
    padding: 0.5rem 0.5rem 0.5rem 0.7rem;
    font-size: 0.93rem;
  }
  .selected-parts-header {
    font-size: 0.98rem;
    padding: 0.5rem 0.5rem;
    border-radius: 7px;
  }
} 

/* Overall Build Suitability Display */
.overall-suitability-display {
    background: linear-gradient(135deg, var(--bg-secondary), rgba(255, 255, 255, 0.05));
    border-radius: 20px;
    padding: 2.5rem;
    margin-bottom: 2.5rem;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    border: 2px solid rgba(144, 198, 149, 0.2);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(15px);
    text-align: center;
}

.overall-suitability-display::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, var(--accent-primary), var(--accent-secondary), var(--accent-primary));
    border-radius: 22px;
    z-index: -1;
    opacity: 0.15;
    animation: borderGlow 4s ease-in-out infinite;
}

.overall-suitability-display .display-title {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1.8rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    letter-spacing: 0.5px;
}

.suitability-categories {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
}

.suitability-category-item {
    background: linear-gradient(135deg, var(--bg-primary), rgba(255, 255, 255, 0.02));
    border-radius: 15px;
    padding: 1.2rem;
    border: 1px solid rgba(144, 198, 149, 0.1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.8rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.suitability-category-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.category-icon {
    font-size: 2.2rem;
    line-height: 1;
}

.category-label {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.suitability-bar-container {
    width: 100%;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 10px;
    height: 10px;
    overflow: hidden;
    margin-top: 0.5rem;
    border: 1px solid rgba(144, 198, 149, 0.3);
}

.suitability-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
    border-radius: 10px;
    transition: width 0.5s ease-out, background 0.3s ease;
}

.suitability-percentage {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--accent-primary);
    margin-top: 0.5rem;
}

/* Responsive adjustments for overall suitability */
@media (max-width: 768px) {
    .overall-suitability-display {
        padding: 1.5rem;
        margin-bottom: 2rem;
        border-radius: 15px;
    }
    .overall-suitability-display .display-title {
        font-size: 1.4rem;
        margin-bottom: 1.5rem;
    }
    .suitability-categories {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 1rem;
    }
    .suitability-category-item {
        padding: 1rem;
    }
    .category-icon {
        font-size: 1.8rem;
    }
    .category-label {
        font-size: 1rem;
    }
    .suitability-percentage {
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {
    .overall-suitability-display {
        padding: 1rem;
        margin-bottom: 1.5rem;
        border-radius: 12px;
    }
    .overall-suitability-display .display-title {
        font-size: 1.2rem;
        margin-bottom: 1rem;
    }
    .suitability-categories {
        grid-template-columns: 1fr;
    }
    .suitability-category-item {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        padding: 0.8rem 1rem;
    }
    .category-info {
        display: flex;
        align-items: center;
        gap: 0.8rem;
    }
    .suitability-bar-container {
        width: 120px;
    }
    .suitability-percentage {
        margin-top: 0;
        margin-left: auto;
    }
}

/* Components list layout */
.components-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}
@media (max-width: 1024px) { /* tablets */
  .components-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 640px) { /* mobile */
  .components-list {
    grid-template-columns: 1fr;
  }
}

.component-row {
  background: var(--bg-secondary);
  border: 2px solid var(--border-color);
  border-radius: 12px;
  padding: 1rem;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.5rem 1rem;
  align-items: center;
}
.component-info {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}
.component-info .component-icon img { width: 64px; height: 64px; object-fit: contain; display: block; }
@media (max-width: 640px){
  .component-info .component-icon img { width: 56px; height: 56px; }
}
.component-icon { font-size: 3.2rem; }
.component-title { font-weight: 700; color: var(--text-primary); }
.component-required { background: #e74c3c22; color: #e74c3c; border: 1px solid #e74c3c44; padding: 2px 8px; border-radius: 999px; font-size: 0.75rem; font-weight: 700; }
.component-actions { justify-self: end; }
.component-select-btn { background: var(--accent-primary); color: #fff; border: none; border-radius: 8px; padding: 8px 14px; font-weight: 700; cursor: pointer; }
.component-select-btn:hover { background: var(--accent-secondary); }
.component-status { grid-column: 1 / -1; color: var(--text-secondary); padding-left: 2rem; }

/* Visual feedback for selected component rows */
.component-row.selected {
  background: linear-gradient(135deg, rgba(144, 198, 149, 0.08), rgba(255,255,255,0.04));
}

/* Modal controls */
.modal-search-filter { display: flex; gap: 0.5rem; flex-wrap: wrap; align-items: center; }
.modal-searchv-filter .search-input { flex: 1 1 260px; }
.compat-only { display: inline-flex; align-items: center; gap: 0.4rem; color: var(--text-secondary); font-size: 0.9rem; }

/* Modal search styling */
.modal-search-filter .search-input{
  background: var(--bg-primary);
  border: 2px solid var(--border-color);
  color: var(--text-primary);
  padding: 0.65rem 0.8rem;
  border-radius: 10px;
  height: 40px;
  line-height: 1;
  transition: all .2s ease;
}
.modal-search-filter .search-input::placeholder{ color: var(--text-secondary); opacity: .85; }
.modal-search-filter .search-input:focus{
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(144,198,149,.12);
}

/* Modal select styling */
.pretty-select{
  background: var(--bg-primary);
  border: 2px solid var(--border-color);
  color: var(--text-primary);
  border-radius: 10px;
  padding: 0.55rem 0.8rem;
  height: 40px;
  line-height: 1;
  cursor: pointer;
  transition: all .2s ease;
}
.pretty-select:focus{
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(144,198,149,.12);
}

.component-row.selected {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(144, 198, 149, 0.12);
  /* Add more prominent border styling */
  border: 2px solid var(--accent-primary); /* Thicker, accent-colored border */
  box-shadow: 0 0 15px rgba(144, 198, 149, 0.4); /* More visible glow */
  transform: translateY(-2px); /* Slight lift */
  transition: all 0.3s ease; /* Smooth transition */
}

.component-select-btn.selected-in-row {
  background: linear-gradient(90deg, #4CAF50, #45a049); /* Green for selected */
  cursor: default;
  pointer-events: none; /* Make button unclickable once selected */
  box-shadow: 0 4px 12px rgba(76, 175, 80, 0.4);
}

/* Progress header */
.build-progress-wrap{background:var(--bg-secondary);border:1px solid var(--border-color);border-radius:10px;padding:0.6rem 0.8rem;margin-bottom:1rem}
.build-progress-header{display:flex;justify-content:space-between;align-items:center;color:var(--text-secondary);font-weight:600}
.build-progress-bar{height:8px;background:rgba(255,255,255,0.08);border-radius:6px;overflow:hidden;margin-top:6px}
#progressFill{height:100%;width:0;background:linear-gradient(90deg,var(--accent-primary),var(--accent-secondary));transition:width .3s}

/* Component cards */
.component-card{position:relative;border:1px solid var(--border-color);background:var(--bg-secondary);border-radius:10px;padding:1rem}
.component-card .component-actions{display:flex;gap:.5rem}
.storage-slots{grid-column:1 / -1}

.component-details{margin-top:.5rem;color:var(--text-secondary);font-size:.92rem}

/* Summary numbers */
.build-summary-numbers{margin:0.5rem 0;border:1px solid var(--border-color);border-radius:8px;padding:.6rem}
.build-summary-numbers .row{display:flex;justify-content:space-between;padding:.2rem 0;color:var(--text-secondary)}
.build-summary-numbers .row.total{font-weight:800;color:var(--text-primary)}

/* Part Selection Modal */
.modal{display:none;position:fixed;inset:0;background:rgba(0,0,0,0.6);backdrop-filter:blur(2px);align-items:center;justify-content:center;z-index:2000;opacity:0;transition:opacity .2s}
.modal.show{display:flex;opacity:1}
.modal-content{background:var(--bg-secondary);border:3px solid var(--accent-primary);border-radius:14px;box-shadow:0 20px 60px rgba(0,0,0,0.45);width:min(1100px,95vw);max-height:90vh;overflow:hidden}
.modal-header{display:flex;align-items:center;justify-content:space-between;padding:1rem 1.2rem;border-bottom:1px solid var(--border-color);color:var(--text-primary)}
.modal-body{padding:1rem 1.2rem;}
.close-btn{background:none;border:none;color:var(--text-secondary);font-size:1.5rem;cursor:pointer}
.close-btn:hover{color:var(--text-primary)}

/* --- Modal list layout (compact rows like image 2) --- */
.parts-grid.modal-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr); /* 2 items per row */
  gap: 1rem;
  align-items: stretch;
}
.part-card.modal-row{
  display: grid;
  grid-template-columns: 64px 1fr auto;
  align-items: center;
  gap: 1rem;
  border: 1px solid var(--border-color);
  background: var(--bg-primary);
  padding: 0.9rem 1rem;
  border-radius: 12px;
}
.part-card.modal-row .part-thumb{
  width: 64px; height: 64px; border-radius: 8px; background: rgba(255,255,255,0.04); display:flex; align-items:center; justify-content:center; overflow:hidden;
}
.part-card.modal-row .part-thumb img{ max-width: 100%; max-height: 100%; object-fit: contain; }
.part-card.modal-row .modal-row-title{ font-weight: 700; color: var(--text-primary); margin-bottom: 4px; }
.part-card.modal-row .modal-row-specs{ font-size: .9rem; color: var(--text-secondary); }
.part-card.modal-row .modal-row-right{ text-align: right; display:flex; flex-direction:column; gap:.25rem; }
.part-card.modal-row .modal-row-price{ color: var(--accent-primary); font-weight: 800; }
.part-card.modal-row .modal-row-price-iqd{ color: var(--text-secondary); font-size:.85rem }
.part-card.modal-row .part-card-actions{ margin-top: .25rem; }
.part-card.modal-row .select-part-btn{ width: 110px; padding: .55rem .8rem; }



@media (max-width: 600px) {
  .parts-grid.modal-list {
    grid-template-columns: 2fr;
  }
}

/* Storage Selection Styles */
.storage-selection-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.storage-filters {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.storage-filters .filter-btn {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-color);
    background: var(--bg-primary);
    color: var(--text-secondary);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.9rem;
}

.storage-filters .filter-btn:hover {
    border-color: var(--accent-primary);
    color: var(--text-primary);
}

.storage-filters .filter-btn.active {
    background: var(--accent-primary);
    color: white;
    border-color: var(--accent-primary);
}

.storage-type-badge {
    display: inline-block;
    padding: 0.2rem 0.5rem;
    background: var(--accent-secondary);
    color: white;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-top: 0.25rem;
}
.storage-summary {
    display: inline-block;       /* Shrinks background to text size */
    padding: 0.2rem 0.4rem;      /* Small padding around text */
    background: rgba(144, 198, 149, 0.1);
    border-radius: 6px;
    margin-top: 0.5rem;
}

.storage-summary .capacity {
    font-weight: 600;
    color: var(--accent-primary);
}

.storage-summary .price {
    display: inline-block;
    font-weight: 600;
    color: var(--text-primary);
    background: rgba(144, 198, 149, 0.1);
    border-radius: 6px;
    padding: 0.2rem 0.4rem;
}


.storage-slots {
    margin-top: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.storage-slot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    background: var(--bg-primary);
    border-radius: 8px;
    transition: all 0.2s ease;
}

.storage-slot:hover {
    border-color: var(--accent-primary);
    box-shadow: 0 2px 8px rgba(144, 198, 149, 0.1);
}

.storage-slot-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 1;
}

.storage-slot-image {
    width: 48px;
    height: 48px;
    border-radius: 6px;
    object-fit: contain;
    background: rgba(255, 255, 255, 0.04);
}

.storage-slot-details {
    flex: 1;
}

.storage-slot-name {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
    font-size: 0.9rem;
}

.storage-slot-specs {
    color: var(--text-secondary);
    font-size: 0.8rem;
    margin-bottom: 0.25rem;
}

.storage-slot-price {
    color: var(--accent-primary);
    font-weight: 600;
    font-size: 0.9rem;
}

.remove-storage-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 4px;
    transition: all 0.2s ease;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.remove-storage-btn:hover {
    background: rgba(255, 0, 0, 0.1);
    color: #ff4444;
}

/* Responsive adjustments for storage slots */
@media (max-width: 768px) {
    .storage-filters {
        flex-wrap: wrap;
    }
    
    .storage-slot-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .storage-slot-image {
        width: 40px;
        height: 40px;
    }
}

.section-separator {
  grid-column: 1 / -1; /* Span across all columns */
  display: flex;
  align-items: center;
  text-align: center;
  margin: 2rem 0;
  position: relative;
}

.section-separator h2 {
  position: relative;
  display: inline-block;
  padding: 0 1.5rem;
  background: var(--bg-primary);
  color: var(--text-primary);
  font-size: 1.5rem;
  font-weight: 700;
  z-index: 1;
}

.section-separator::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  border-top: 2px solid var(--border-color);
  transform: translateY(-50%);
  z-index: 0;
}

@media (max-width: 1024px) { /* tablets */
  .section-separator h2 {
    font-size: 1.3rem;
    padding: 0 1rem;
  }
}
@media (max-width: 640px) { /* mobile */
  .section-separator h2 {
    font-size: 1.1rem;
    padding: 0 0.8rem;
  }
}