/* Shop Page Styles */

/* Hero Section */
.shop-hero {
    padding: 5rem 0;
    background: var(--brand-gradient);
    text-align: center;
}

.hero-content {
    max-width: 64rem;
    margin: 0 auto;
}

.hero-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.9);
    max-width: 42rem;
    margin: 0 auto;
    line-height: 1.6;
}

/* Filters Section */
.filters-section {
    padding: 2rem 0;
    background: var(--gray-900);
    border-bottom: 1px solid rgba(139, 92, 246, 0.2);
}

.filters-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: stretch;
}

.search-container {
    position: relative;
    flex: 1;
}

.search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    font-size: 1.125rem;
}

.search-input {
    width: 100%;
    padding: 0.875rem 1rem 0.875rem 3rem;
    background: var(--black);
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: 0.5rem;
    color: var(--text-primary);
    font-size: 1rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.search-input:focus {
    outline: none;
    border-color: var(--accent-purple);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.15);
}

.search-input::placeholder {
    color: var(--text-secondary);
}

.filter-select {
    padding: 0.875rem 1rem;
    background: var(--black);
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: 0.5rem;
    color: var(--text-primary);
    font-size: 1rem;
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.filter-select:focus {
    outline: none;
    border-color: var(--accent-purple);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.15);
}

.filter-select option {
    background: var(--black);
    color: var(--text-primary);
}

.view-toggle {
    display: flex;
    gap: 0.5rem;
}

.view-btn {
    padding: 0.875rem;
    background: var(--black);
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: 0.5rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.view-btn:hover {
    border-color: var(--accent-purple);
    color: var(--accent-purple);
}

.view-btn.active {
    background: var(--brand-gradient);
    border-color: transparent;
    color: var(--white);
}

/* Active Filters */
.active-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
    min-height: 2rem;
}

.filter-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: var(--brand-gradient);
    color: var(--white);
    border-radius: 1.5rem;
    font-size: 0.875rem;
    font-weight: 500;
}

.filter-tag .remove-filter {
    background: none;
    border: none;
    color: var(--white);
    cursor: pointer;
    padding: 0.125rem;
    border-radius: 50%;
    transition: background-color 0.2s ease;
}

.filter-tag .remove-filter:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Products Section */
.products-section {
    padding: 3rem 0;
    background: var(--black);
}

.products-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.products-count {
    font-size: 1.125rem;
    color: var(--text-secondary);
}

.products-count span {
    color: var(--accent-purple);
    font-weight: 600;
}

/* Products Grid */
.products-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-bottom: 3rem;
}

.product-card {
    background: var(--gray-900);
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: 0.75rem;
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
}

.product-card:hover {
    border-color: rgba(139, 92, 246, 0.5);
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.product-image-container {
    position: relative;
    overflow: hidden;
}

.product-image {
    width: 100%;
    height: 16rem;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.product-card:hover .product-image {
    transform: scale(1.1);
}

.product-placeholder {
    width: 100%;
    height: 16rem;
    background: var(--gray-800);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 3rem;
}

.condition-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.condition-badge.new {
    background: var(--accent-green);
    color: var(--white);
}

.condition-badge.used {
    background: var(--accent-yellow);
    color: var(--black);
}
.condition-badge.refurbished{
    background: var(--accent-pink);
    color: black;
}

.quick-actions {
    position: absolute;
    top: 1rem;
    left: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    opacity: 0;
    transform: translateX(-10px);
    transition: all 0.3s ease;
}

.product-card:hover .quick-actions {
    opacity: 1;
    transform: translateX(0);
}

.quick-action-btn {
    width: 2.5rem;
    height: 2.5rem;
    background: rgba(0, 0, 0, 0.8);
    border: none;
    border-radius: 50%;
    color: var(--white);
    cursor: pointer;
    transition: all 0.2s ease;
}

.quick-action-btn:hover {
    background: var(--accent-purple);
    transform: scale(1.1);
}

.product-content {
    padding: 1.5rem;
}

.product-category {
    font-size: 0.875rem;
    color: var(--accent-purple);
    font-weight: 500;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.product-name {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    line-height: 1.3;
}

.product-link {
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.2s ease;
}

.product-link:hover {
    color: var(--accent-purple);
}

.product-description {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    line-height: 1.5;
    font-size: 0.875rem;
}

.product-meta {
    margin-bottom: 1.5rem;
    display: flex;
    justify-content: space-between;
}

.product-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.product-old-price {
    font-size: 1rem;
    color: var(--text-muted);
    text-decoration: line-through;
    margin-top: 0.25rem;
}

.product-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.btn-full {
    width: 100%;
    justify-content: center;
}

/* Products List View */
.products-list {
    display: none;
    flex-direction: column;
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.product-list-item {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 1.5rem;
    background: var(--gray-900);
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: 0.75rem;
    padding: 1.5rem;
    transition: all 0.3s ease;
}

.product-list-item:hover {
    border-color: rgba(139, 92, 246, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.product-list-image {
    width: 8rem;
    height: 8rem;
    overflow: hidden;
    border-radius: 0.5rem;
}

.product-list-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-list-content {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.product-list-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.75rem;
}

.product-list-header .product-name {
    margin: 0;
    flex: 1;
}

.product-list-header .product-name a {
    color: var(--text-primary);
    text-decoration: none;
    font-size: 1.25rem;
    font-weight: 600;
    line-height: 1.3;
    transition: color 0.2s ease;
}

.product-list-header .product-name a:hover {
    color: var(--accent-purple);
}

.product-list-header .condition-badge {
    margin-left: 1rem;
    flex-shrink: 0;
}

.product-list-item .product-description {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    line-height: 1.5;
    font-size: 0.875rem;
}

.product-list-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.product-list-meta .product-category {
    font-size: 0.875rem;
    color: var(--accent-purple);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.product-list-meta .product-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    text-align: right;
}

.product-list-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    justify-content: center;
}

/* No Products */
.no-products {
    text-align: center;
    padding: 4rem 2rem;
}

.no-products-icon {
    font-size: 4rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.no-products h3 {
    font-size: 1.5rem;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
}

.no-products p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
    max-width: 32rem;
    margin-left: auto;
    margin-right: auto;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-top: 3rem;
}

.pagination-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: var(--gray-900);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    color: var(--text-primary);
    text-decoration: none;
    transition: all 0.2s ease;
}

.pagination-btn:hover {
    background: var(--accent-purple);
    border-color: var(--accent-purple);
    color: var(--white);
}

.pagination-pages {
    display: flex;
    gap: 0.5rem;
}

.pagination-page {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    background: var(--gray-900);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    color: var(--text-primary);
    text-decoration: none;
    transition: all 0.2s ease;
}

.pagination-page:hover {
    background: var(--accent-purple);
    border-color: var(--accent-purple);
    color: var(--white);
}

.pagination-page.active {
    background: var(--brand-gradient);
    border-color: transparent;
    color: var(--white);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    backdrop-filter: blur(4px);
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: var(--bg-card);
    border-radius: 0.75rem;
    max-width: 90vw;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.modal-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 0.25rem;
    transition: all 0.2s ease;
}

.modal-close:hover {
    background: var(--gray-800);
    color: var(--text-primary);
}

.modal-body {
    padding: 1.5rem;
    max-height: 70vh;
    overflow-y: auto;
}

/* Loading Overlay */
.loading-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 999;
    backdrop-filter: blur(4px);
}

.loading-overlay.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.loading-spinner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    color: var(--white);
}

.loading-spinner i {
    font-size: 2rem;
    color: var(--accent-purple);
}

.loading-spinner span {
    font-size: 1rem;
    color: var(--text-secondary);
}

/* Responsive Design */
@media (min-width: 640px) {
    .filters-container {
        flex-direction: row;
        align-items: center;
    }
    
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 768px) {
    .hero-title {
        font-size: 3.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.375rem;
    }
    
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .product-list-item {
        grid-template-columns: auto 1fr auto;
    }
}

@media (min-width: 1024px) {
    .hero-title {
        font-size: 4rem;
    }
    
    .products-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 1280px) {
    .hero-title {
        font-size: 4.5rem;
    }
    
    .products-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Animation Classes */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

.slide-in-left {
    opacity: 0;
    transform: translateX(-30px);
    transition: all 0.6s ease;
}

.slide-in-left.visible {
    opacity: 1;
    transform: translateX(0);
}

/* Hover Effects */
.product-card:hover .product-image {
    transform: scale(1.05);
}

.quick-action-btn:hover {
    transform: scale(1.1);
}

/* Focus States for Accessibility */
.search-input:focus,
.filter-select:focus,
.view-btn:focus,
.quick-action-btn:focus {
    outline: 2px solid var(--accent-purple);
    outline-offset: 2px;
}

/* Print Styles */
@media print {
    .filters-section,
    .quick-actions,
    .product-actions,
    .pagination {
        display: none;
    }
    
    .product-card {
        break-inside: avoid;
        page-break-inside: avoid;
    }
}

/* Ensure list view product names don't have underlines */
.products-list .product-name a {
    text-decoration: none !important;
}

.products-list .product-name a:hover {
    text-decoration: none !important;
}

/* Better price positioning in list view */
.products-list .product-meta {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    align-items: flex-start;
}

.products-list .product-price {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.products-list .product-old-price {
    font-size: 1rem;
    color: var(--text-muted);
    text-decoration: line-through;
    margin: 0;
}

/* Additional list view improvements */
.products-list .product-list-item {
    align-items: center;
}

.products-list .product-list-content {
    padding: 0 1rem;
}

.products-list .product-list-header {
    margin-bottom: 1rem;
}

.products-list .product-description {
    margin-bottom: 1.5rem;
    max-width: 100%;
}

.products-list .product-list-meta {
    margin-bottom: 0;
}

.products-list .product-category {
    margin-bottom: 0.5rem;
}

.products-list .product-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    line-height: 1;
}

/* Ensure proper spacing in list view */
.products-list .product-list-actions {
    padding-left: 1rem;
    border-left: 1px solid rgba(139, 92, 246, 0.2);
}

/* Responsive adjustments for list view */
@media (max-width: 768px) {
    .product-list-item {
        grid-template-columns: 1fr;
        gap: 1rem;
        text-align: center;
    }
    
    .product-list-image {
        width: 100%;
        height: 12rem;
    }
    
    .product-list-actions {
        border-left: none;
        border-top: 1px solid rgba(139, 92, 246, 0.2);
        padding-left: 0;
        padding-top: 1rem;
        flex-direction: row;
        justify-content: center;
    }
    
    .product-list-actions .btn {
        flex: 1;
        max-width: 150px;
    }
}

