/* EVxDEV Shop Styles */
/* =================== */

/* Shop Header */
.shop-header {
    padding: calc(var(--nav-height) + var(--space-3xl)) 0 var(--space-2xl);
    background: var(--color-bg-secondary);
    border-bottom: 1px solid var(--color-border);
}

.shop-header-content {
    text-align: center;
}

.shop-header h1 {
    margin-bottom: var(--space-sm);
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.shop-header p {
    font-size: 1.1rem;
}

/* Shop Layout */
.shop-main {
    padding: var(--space-2xl) 0 var(--space-4xl);
}

.shop-layout {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: var(--space-2xl);
}

/* Filters Sidebar */
.shop-filters {
    position: sticky;
    top: calc(var(--nav-height) + var(--space-lg));
    height: fit-content;
}

.filter-section {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    margin-bottom: var(--space-lg);
}

.filter-section h3 {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: var(--space-md);
    color: var(--color-text);
}

.filter-options {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.filter-option {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    cursor: pointer;
    padding: var(--space-sm);
    border-radius: var(--radius-sm);
    transition: background var(--transition-fast);
}

.filter-option:hover {
    background: var(--color-bg-tertiary);
}

.filter-option input[type="radio"] {
    appearance: none;
    width: 18px;
    height: 18px;
    border: 2px solid var(--color-border);
    border-radius: 50%;
    cursor: pointer;
    position: relative;
    transition: all var(--transition-fast);
}

.filter-option input[type="radio"]:checked {
    border-color: var(--color-primary);
}

.filter-option input[type="radio"]:checked::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 8px;
    height: 8px;
    background: var(--color-primary);
    border-radius: 50%;
}

.filter-option span {
    font-size: 0.9rem;
    color: var(--color-text-secondary);
}

.filter-option:has(input:checked) span {
    color: var(--color-text);
}

/* Price Range */
.price-range {
    padding: var(--space-sm) 0;
}

.price-range input[type="range"] {
    width: 100%;
    height: 4px;
    background: var(--color-bg-tertiary);
    border-radius: 2px;
    appearance: none;
    cursor: pointer;
}

.price-range input[type="range"]::-webkit-slider-thumb {
    appearance: none;
    width: 18px;
    height: 18px;
    background: var(--gradient-primary);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 0 10px rgba(0, 255, 136, 0.3);
}

.price-labels {
    display: flex;
    justify-content: space-between;
    margin-top: var(--space-sm);
    font-size: 0.85rem;
    color: var(--color-text-secondary);
}

/* Products Section */
.shop-products {
    min-width: 0;
}

.products-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-lg);
}

.products-count {
    font-size: 0.9rem;
    color: var(--color-text-secondary);
}

.sort-select {
    padding: var(--space-sm) var(--space-md);
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    font-family: var(--font-main);
    font-size: 0.9rem;
    color: var(--color-text);
    cursor: pointer;
    appearance: none;
    padding-right: var(--space-2xl);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23a0a0b0' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
}

.sort-select:focus {
    outline: none;
    border-color: var(--color-primary);
}

/* Products Grid */
.products-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-lg);
}

/* Shop Product Card */
.shop-product-card {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all var(--transition-base);
    position: relative;
    display: flex;
    flex-direction: column;
}

.shop-product-card:hover {
    transform: translateY(-4px);
    border-color: var(--color-border-hover);
    box-shadow: var(--shadow-md);
}

.shop-product-card.featured {
    border-color: rgba(0, 255, 136, 0.3);
}

.shop-product-card.featured:hover {
    box-shadow: 0 0 30px rgba(0, 255, 136, 0.15);
}

.shop-product-card .product-badge {
    position: absolute;
    top: var(--space-md);
    left: var(--space-md);
    padding: var(--space-xs) var(--space-sm);
    background: var(--gradient-primary);
    color: var(--color-bg);
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-radius: var(--radius-sm);
    z-index: 1;
}

.shop-product-card .product-badge.soon {
    background: linear-gradient(135deg, #ff9500 0%, #ff6b00 100%);
}

/* Coming Soon Products */
.shop-product-card.coming-soon {
    opacity: 0.75;
}

.shop-product-card.coming-soon .product-image {
    filter: grayscale(30%);
}

.shop-product-card.coming-soon .add-to-cart {
    background: var(--color-bg-tertiary);
    color: var(--color-text-muted);
    cursor: not-allowed;
    box-shadow: none;
}

.shop-product-card.coming-soon .add-to-cart:hover {
    transform: none;
    box-shadow: none;
}

.shop-product-card .product-image {
    background: var(--color-bg);
    padding: var(--space-xl);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 180px;
}

.shop-product-card .product-image svg {
    width: 100%;
    max-width: 180px;
    height: auto;
}

.shop-product-card .product-image img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: var(--radius-md);
    transition: transform var(--transition-base);
}

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

.shop-product-card .product-details {
    padding: var(--space-lg);
    display: flex;
    flex-direction: column;
    flex: 1;
}

.shop-product-card h3 {
    font-size: 1rem;
    margin-bottom: var(--space-sm);
}

.shop-product-card > .product-details > p {
    font-size: 0.85rem;
    line-height: 1.5;
    margin-bottom: var(--space-md);
    color: var(--color-text-secondary);
}

.product-specs {
    list-style: none;
    margin-bottom: var(--space-lg);
    flex: 1;
}

.product-specs li {
    font-size: 0.8rem;
    color: var(--color-text-muted);
    padding: var(--space-xs) 0;
    padding-left: var(--space-md);
    position: relative;
}

.product-specs li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 4px;
    background: var(--color-primary);
    border-radius: 50%;
}

.product-gift {
    background: linear-gradient(135deg, rgba(0, 255, 136, 0.15) 0%, rgba(0, 212, 255, 0.15) 100%);
    border: 1px solid rgba(0, 255, 136, 0.3);
    border-radius: var(--radius-md);
    padding: var(--space-sm) var(--space-md);
    font-size: 0.85rem;
    color: var(--color-primary);
    text-align: center;
    margin-bottom: var(--space-md);
}

.product-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: var(--space-md);
    border-top: 1px solid var(--color-border);
    margin-top: auto;
}

.shop-product-card .product-price {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-text);
    font-family: var(--font-mono);
}

.shop-product-card .add-to-cart {
    padding: var(--space-sm) var(--space-md);
    font-size: 0.85rem;
}

/* Cart Sidebar */
.cart-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 1001;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-base);
}

.cart-overlay.open {
    opacity: 1;
    visibility: visible;
}

.cart-sidebar {
    position: fixed;
    top: 0;
    right: 0;
    width: 400px;
    max-width: 100%;
    height: 100vh;
    background: var(--color-bg);
    border-left: 1px solid var(--color-border);
    z-index: 1002;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform var(--transition-base);
}

.cart-sidebar.open {
    transform: translateX(0);
}

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

.cart-header h2 {
    font-size: 1.25rem;
}

.cart-close {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    color: var(--color-text-secondary);
    cursor: pointer;
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.cart-close:hover {
    background: var(--color-bg-tertiary);
    color: var(--color-text);
}

.cart-items {
    flex: 1;
    overflow-y: auto;
    padding: var(--space-md);
}

.cart-item {
    display: flex;
    gap: var(--space-md);
    padding: var(--space-md);
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-sm);
}

.cart-item-image {
    width: 60px;
    height: 60px;
    background: var(--color-bg-tertiary);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.cart-item-image svg {
    width: 40px;
    height: 40px;
    color: var(--color-primary);
}

.cart-item-details {
    flex: 1;
    min-width: 0;
}

.cart-item-name {
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: var(--space-xs);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cart-item-price {
    font-size: 0.85rem;
    color: var(--color-primary);
    font-family: var(--font-mono);
}

.cart-item-actions {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    margin-top: var(--space-sm);
}

.qty-btn {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-bg-tertiary);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    color: var(--color-text);
    cursor: pointer;
    transition: all var(--transition-fast);
    font-size: 1rem;
    font-weight: 500;
}

.qty-btn:hover {
    background: var(--color-bg-card-hover);
    border-color: var(--color-border-hover);
}

.cart-item-qty {
    width: 32px;
    text-align: center;
    font-size: 0.9rem;
    font-weight: 500;
}

.cart-item-remove {
    margin-left: auto;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    color: var(--color-text-muted);
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
}

.cart-item-remove:hover {
    background: rgba(255, 107, 107, 0.1);
    color: var(--color-warning);
}

.cart-empty {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--space-3xl);
    text-align: center;
    color: var(--color-text-muted);
}

.cart-empty.show {
    display: flex;
    flex: 1;
}

.cart-empty svg {
    margin-bottom: var(--space-md);
    opacity: 0.5;
}

.cart-empty p {
    font-size: 1rem;
    margin-bottom: var(--space-xs);
    color: var(--color-text-secondary);
}

.cart-empty span {
    font-size: 0.85rem;
}

.cart-footer {
    padding: var(--space-lg);
    border-top: 1px solid var(--color-border);
    background: var(--color-bg-secondary);
}

.cart-footer.hidden {
    display: none;
}

.cart-subtotal {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-sm);
}

.cart-subtotal span:first-child {
    font-size: 0.95rem;
    color: var(--color-text-secondary);
}

.cart-total {
    font-size: 1.5rem;
    font-weight: 700;
    font-family: var(--font-mono);
}

.cart-shipping {
    font-size: 0.8rem;
    color: var(--color-text-muted);
    margin-bottom: var(--space-lg);
}

.cart-checkout {
    width: 100%;
    margin-bottom: var(--space-sm);
}

.cart-continue {
    width: 100%;
}

/* Checkout Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    z-index: 1003;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-lg);
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-base);
}

.modal-overlay.open {
    opacity: 1;
    visibility: visible;
}

.modal {
    width: 100%;
    max-width: 700px;
    max-height: 90vh;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xl);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transform: scale(0.95);
    transition: transform var(--transition-base);
}

.modal-overlay.open .modal {
    transform: scale(1);
}

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

.modal-header h2 {
    font-size: 1.25rem;
}

.modal-close {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    color: var(--color-text-secondary);
    cursor: pointer;
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.modal-close:hover {
    background: var(--color-bg-tertiary);
    color: var(--color-text);
}

.checkout-form {
    padding: var(--space-lg);
    overflow-y: auto;
    flex: 1;
}

.form-section {
    margin-bottom: var(--space-xl);
}

.form-section h3 {
    font-size: 1rem;
    margin-bottom: var(--space-md);
    padding-bottom: var(--space-sm);
    border-bottom: 1px solid var(--color-border);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-md);
}

/* Checkout Summary */
.checkout-summary {
    background: var(--color-bg-secondary);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    margin-bottom: var(--space-lg);
}

.checkout-summary h3 {
    font-size: 1rem;
    margin-bottom: var(--space-md);
}

.summary-items {
    margin-bottom: var(--space-md);
}

.summary-item {
    display: flex;
    justify-content: space-between;
    padding: var(--space-sm) 0;
    font-size: 0.9rem;
    color: var(--color-text-secondary);
}

.summary-item span:last-child {
    font-family: var(--font-mono);
}

.summary-totals {
    border-top: 1px solid var(--color-border);
    padding-top: var(--space-md);
}

.summary-row {
    display: flex;
    justify-content: space-between;
    padding: var(--space-xs) 0;
    font-size: 0.9rem;
    color: var(--color-text-secondary);
}

.summary-row.total {
    padding-top: var(--space-sm);
    margin-top: var(--space-sm);
    border-top: 1px solid var(--color-border);
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--color-text);
}

.summary-row.total span:last-child {
    font-family: var(--font-mono);
    color: var(--color-primary);
}

.checkout-actions {
    text-align: center;
}

.checkout-note {
    font-size: 0.8rem;
    color: var(--color-text-muted);
    margin-bottom: var(--space-md);
}

.checkout-actions .btn {
    width: 100%;
}

/* Active nav link */
.nav-link.active {
    color: var(--color-primary);
}

.nav-link.active::after {
    width: 100%;
}

/* Responsive */
@media (max-width: 1200px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 1024px) {
    .shop-layout {
        grid-template-columns: 200px 1fr;
        gap: var(--space-lg);
    }
}

@media (max-width: 768px) {
    .shop-layout {
        grid-template-columns: 1fr;
    }
    
    .shop-filters {
        position: static;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: var(--space-md);
    }
    
    .filter-section {
        margin-bottom: 0;
    }
    
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-md);
    }
    
    .cart-sidebar {
        width: 100%;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .shop-filters {
        grid-template-columns: 1fr;
    }
    
    .products-grid {
        grid-template-columns: 1fr;
    }
    
    .products-header {
        flex-direction: column;
        gap: var(--space-sm);
        align-items: flex-start;
    }
    
    .shop-product-card .product-actions {
        flex-direction: column;
        gap: var(--space-sm);
    }
    
    .shop-product-card .add-to-cart {
        width: 100%;
    }
}

