/* Peripheral Reviews Styles */

/* Hero Section */
.peripherals-hero {
    background: var(--secondary-color);
    padding: 120px 0 30px;
    text-align: center;
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid var(--gray-medium);
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    margin: 0 auto;
    padding: 0 2rem;
}

.hero-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.hero-title i {
    color: var(--modern-purple);
    font-size: 2rem;
}

.hero-description {
    font-size: 1.1rem;
    color: var(--text-light);
    max-width: 500px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Filters Section */
.peripherals-filters {
    padding: 25px 0 40px;
    background: var(--secondary-color);
    border-bottom: 1px solid var(--gray-medium);
}

.filters-container h3 {
    color: var(--text-dark);
    margin-bottom: 1.5rem;
    font-size: 1.4rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.filters-container h3 i {
    color: var(--modern-purple);
}

.filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.filter-btn {
    background: var(--gray-medium);
    border: 2px solid var(--gray-dark);
    border-radius: 25px;
    padding: 0.75rem 1.5rem;
    color: var(--text-dark);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
}

.filter-btn:hover {
    border-color: var(--modern-purple);
    background: rgba(147, 51, 234, 0.1);
    transform: translateY(-2px);
}

.filter-btn.active {
    background: linear-gradient(135deg, var(--modern-purple), var(--modern-pink));
    border-color: var(--modern-purple);
    color: white;
    box-shadow: 0 4px 15px rgba(147, 51, 234, 0.3);
}

.filter-btn i {
    font-size: 0.9rem;
}

/* Peripherals Section */
.peripherals-section {
    padding: 60px 0;
    min-height: 60vh;
}

/* Loading State */
.loading-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-light);
}

.loading-spinner {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--modern-purple);
}

.loading-spinner i {
    animation: spin 1s linear infinite;
}

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

/* Error State */
.error-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-light);
}

.error-icon {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    color: var(--danger-color);
}

.error-state h3 {
    color: var(--text-dark);
    margin-bottom: 1rem;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-light);
}

.empty-icon {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    color: var(--text-light);
}

.empty-state h3 {
    color: var(--text-dark);
    margin-bottom: 1rem;
}

/* Peripherals Grid - Compact Design */
.peripherals-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

/* Compact Peripheral Card */
.peripheral-card {
    background: var(--gray-light);
    border-radius: 12px;
    border: 1px solid var(--gray-medium);
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: var(--shadow);
    height: 340px;
    display: flex;
    flex-direction: column;
}

.peripheral-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
    border-color: rgba(147, 51, 234, 0.3);
}

.peripheral-image {
    width: 100%;
    height: 160px;
    overflow: hidden;
    background: var(--gray-medium);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.peripheral-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.peripheral-card:hover .peripheral-image img {
    transform: scale(1.05);
}

.peripheral-image .placeholder-icon {
    font-size: 3rem;
    color: var(--text-light);
    opacity: 0.5;
}

.peripheral-content {
    padding: 1rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.peripheral-header {
    margin-bottom: 0.75rem;
}

.peripheral-name {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.peripheral-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.peripheral-category {
    background: rgba(147, 51, 234, 0.2);
    color: var(--modern-purple);
    padding: 0.2rem 0.6rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
}

.peripheral-price {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--success-color);
}

.promo-tag {
    background: #28a745;
    color: white;
    padding: 0.15rem 0.4rem;
    border-radius: 3px;
    font-size: 0.7rem;
    margin-left: 0.4rem;
    font-weight: 600;
}

.peripheral-preview-description {
    color: var(--text-light);
    line-height: 1.4;
    font-size: 0.9rem;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.view-details-btn {
    margin-top: 0.75rem;
    background: linear-gradient(135deg, var(--modern-purple), var(--modern-pink));
    color: white;
    border: none;
    border-radius: 8px;
    padding: 0.6rem 1rem;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.view-details-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(147, 51, 234, 0.3);
}

/* Pros and Cons */
.pros-cons-container {
    margin-bottom: 1.5rem;
}

.pros-section, .cons-section {
    margin-bottom: 1rem;
}

.pros-title, .cons-title {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.pros-title {
    color: var(--success-color);
}

.pros-title i {
    color: var(--success-color);
}

.cons-title {
    color: var(--warning-color);
}

.cons-title i {
    color: var(--warning-color);
}

.pros-list, .cons-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.pro-item, .con-item {
    font-size: 0.9rem;
    padding: 0.25rem 0;
    position: relative;
    padding-left: 1.2rem;
    color: var(--text-light);
}

.pro-item::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--success-color);
    font-weight: bold;
}

.con-item::before {
    content: '✗';
    position: absolute;
    left: 0;
    color: var(--warning-color);
    font-weight: bold;
}

/* Specifications */
.specifications-section {
    margin-bottom: 1.5rem;
}

.specifications-title {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.specifications-title i {
    color: var(--modern-purple);
}

.specifications-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 0.5rem;
}

.spec-item {
    background: var(--gray-medium);
    padding: 0.5rem;
    border-radius: 8px;
    border: 1px solid var(--gray-dark);
}

.spec-name {
    font-size: 0.8rem;
    color: var(--text-light);
    margin-bottom: 0.2rem;
}

.spec-value {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-dark);
}

/* Modal Popup for Detailed View */
.peripheral-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    overflow-y: auto;
    padding: 2rem 1rem;
}

.peripheral-modal.active {
    display: flex;
    align-items: flex-start;
    justify-content: center;
}

.modal-content {
    background: var(--gray-light);
    border-radius: 15px;
    width: 100%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    margin: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    border-bottom: 1px solid var(--gray-medium);
    position: sticky;
    top: 0;
    background: var(--gray-light);
    z-index: 10;
}

.modal-title {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-light);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: all 0.3s ease;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    background: var(--gray-medium);
    color: var(--text-dark);
}

.modal-body {
    padding: 2rem;
}

.modal-peripheral-header {
    display: flex;
    gap: 2rem;
    margin-bottom: 2rem;
}

.modal-peripheral-image {
    width: 200px;
    height: 200px;
    border-radius: 12px;
    overflow: hidden;
    background: var(--gray-medium);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.modal-peripheral-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.modal-peripheral-image .placeholder-icon {
    font-size: 4rem;
    color: var(--text-light);
    opacity: 0.5;
}

.modal-peripheral-info {
    flex: 1;
}

.modal-peripheral-name {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.modal-peripheral-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.modal-peripheral-category {
    background: rgba(147, 51, 234, 0.2);
    color: var(--modern-purple);
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
}

.modal-peripheral-price {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--success-color);
}

.modal-peripheral-description {
    color: var(--text-light);
    line-height: 1.6;
    margin-bottom: 2rem;
}

/* Modal Pros and Cons */
.modal-pros-cons-container {
    margin-bottom: 2rem;
}

.modal-pros-cons-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.modal-pros-section, .modal-cons-section {
    background: var(--gray-medium);
    padding: 1.5rem;
    border-radius: 12px;
}

.modal-pros-title, .modal-cons-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.modal-pros-title {
    color: var(--success-color);
}

.modal-pros-title i {
    color: var(--success-color);
}

.modal-cons-title {
    color: var(--warning-color);
}

.modal-cons-title i {
    color: var(--warning-color);
}

.modal-pros-list, .modal-cons-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.modal-pro-item, .modal-con-item {
    font-size: 0.95rem;
    padding: 0.5rem 0;
    position: relative;
    padding-left: 1.5rem;
    color: var(--text-light);
    line-height: 1.4;
}

.modal-pro-item::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--success-color);
    font-weight: bold;
    font-size: 1.1rem;
}

.modal-con-item::before {
    content: '✗';
    position: absolute;
    left: 0;
    color: var(--warning-color);
    font-weight: bold;
    font-size: 1.1rem;
}

/* Modal Specifications */
.modal-specifications-section {
    margin-bottom: 2rem;
}

.modal-specifications-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.modal-specifications-title i {
    color: var(--modern-purple);
}

.modal-specifications-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.75rem;
}

.modal-spec-item {
    background: var(--gray-medium);
    padding: 0.75rem;
    border-radius: 8px;
    border: 1px solid var(--gray-dark);
}

.modal-spec-name {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 0.3rem;
}

.modal-spec-value {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-dark);
    line-height: 1.3;
}

/* Modal Action Button */
.modal-buy-button {
    width: 100%;
    background: linear-gradient(135deg, var(--modern-purple), var(--modern-pink));
    color: white;
    border: none;
    border-radius: 10px;
    padding: 1rem;
    font-weight: 600;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.modal-buy-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(147, 51, 234, 0.3);
}

.modal-buy-button i {
    font-size: 1rem;
}

/* Compact Buy Button for Modal Header */
.modal-buy-button-compact {
    background: linear-gradient(135deg, var(--modern-purple), var(--modern-pink));
    color: white;
    border: none;
    border-radius: 8px;
    padding: 0.6rem 1rem;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    margin-top: 0.75rem;
    width: auto;
}

.modal-buy-button-compact:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(147, 51, 234, 0.3);
}

.modal-buy-button-compact i {
    font-size: 0.8rem;
}

/* Modal Responsive */
@media (max-width: 768px) {
    .peripheral-modal {
        padding: 1rem 0.5rem;
    }
    
    .modal-content {
        max-width: 100%;
        margin: 0;
    }
    
    .modal-header {
        padding: 1rem 1.5rem;
    }
    
    .modal-title {
        font-size: 1.3rem;
    }
    
    .modal-body {
        padding: 1.5rem;
    }
    
    .modal-peripheral-header {
        flex-direction: column;
        gap: 1.5rem;
    }
    
    .modal-peripheral-image {
        width: 100%;
        height: 200px;
    }
    
    .modal-peripheral-name {
        font-size: 1.5rem;
    }
    
    .modal-peripheral-price {
        font-size: 1.4rem;
    }
    
    .modal-pros-cons-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .modal-specifications-list {
        grid-template-columns: 1fr;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2rem;
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .hero-title i {
        font-size: 1.5rem;
    }
    
    .hero-description {
        font-size: 1rem;
        padding: 0 1rem;
    }
    
    .peripherals-hero {
        padding: 100px 0 20px;
    }
    
    .peripherals-filters {
        padding: 20px 0 30px;
    }
    
    .peripherals-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 1.25rem;
    }
    
    .filter-buttons {
        justify-content: center;
    }
    
    .filter-btn {
        font-size: 0.9rem;
        padding: 0.6rem 1.2rem;
    }
    
    .peripheral-card {
        margin: 0 0.5rem;
        height: 320px;
    }
    
    .peripheral-image {
        height: 140px;
    }
    
    .peripheral-name {
        font-size: 1.1rem;
    }
    
    .peripheral-price {
        font-size: 1rem;
    }
    
    .filters-container h3 {
        font-size: 1.2rem;
        text-align: center;
    }
    
    .filter-buttons {
        justify-content: center;
        margin-top: 1rem;
    }
}

@media (max-width: 480px) {
    .peripherals-hero {
        padding: 80px 0 15px;
    }
    
    .hero-title {
        font-size: 1.8rem;
    }
    
    .hero-title i {
        font-size: 1.3rem;
    }
    
    .peripherals-filters {
        padding: 15px 0 25px;
    }
    
    .filters-container h3 {
        font-size: 1.1rem;
        text-align: center;
        margin-bottom: 1rem;
    }
    
    .peripherals-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .peripheral-card {
        margin: 0;
        height: 300px;
    }
    
    .peripheral-content {
        padding: 0.75rem;
    }
    
    .peripheral-name {
        font-size: 1rem;
    }
    
    .peripheral-preview-description {
        font-size: 0.85rem;
        -webkit-line-clamp: 2;
    }
    
    .view-details-btn {
        padding: 0.5rem 0.75rem;
        font-size: 0.85rem;
    }
}

/* Dark theme specific adjustments */
[data-theme="dark"] .peripheral-card {
    background: var(--gray-light);
    border-color: var(--gray-medium);
}

[data-theme="dark"] .peripheral-image {
    background: var(--gray-medium);
}

[data-theme="dark"] .spec-item {
    background: var(--secondary-color);
    border-color: var(--gray-medium);
}

/* Light theme specific adjustments */
[data-theme="light"] .peripheral-card {
    background: white;
    border-color: rgba(0, 0, 0, 0.1);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .peripheral-card:hover {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

[data-theme="light"] .peripheral-image {
    background: rgba(0, 0, 0, 0.05);
}

[data-theme="light"] .spec-item {
    background: rgba(0, 0, 0, 0.05);
    border-color: rgba(0, 0, 0, 0.1);
}

/* Animation for filtering */
.peripheral-card.hiding {
    opacity: 0;
    transform: scale(0.9);
    transition: all 0.3s ease;
}

.peripheral-card.showing {
    opacity: 1;
    transform: scale(1);
    transition: all 0.3s ease;
}

/* Focus styles for accessibility */
.filter-btn:focus,
.buy-button:focus {
    outline: 2px solid var(--modern-purple);
    outline-offset: 2px;
}

/* Print styles */
@media print {
    .peripherals-hero,
    .peripherals-filters {
        display: none;
    }
    
    .peripheral-card {
        break-inside: avoid;
        margin-bottom: 1rem;
        box-shadow: none;
        border: 1px solid #ccc;
    }
}