/* Advanced Shop Page Styles */

/* Shop Page Layout */
.shop-page {
    padding: 40px 0;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    min-height: 100vh;
}

.shop-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Shop Header */
.shop-header {
    text-align: center;
    margin-bottom: 60px;
    position: relative;
}

.shop-title {
    font-size: 3.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, #1e293b 0%, #3b82f6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 20px;
    position: relative;
}

.shop-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 4px;
    background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
    border-radius: 2px;
}

.shop-subtitle {
    font-size: 1.25rem;
    color: #64748b;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Advanced Filters */
.shop-filters {
    background: white;
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 40px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border: 1px solid #e2e8f0;
}

.filters-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.filters-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
}

.filter-reset {
    background: #f1f5f9;
    color: #64748b;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
}

.filter-reset:hover {
    background: #e2e8f0;
    color: #1e293b;
}

.filters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.filter-group {
    position: relative;
}

.filter-label {
    display: block;
    font-weight: 600;
    color: #374151;
    margin-bottom: 8px;
    font-size: 14px;
}

.filter-select,
.filter-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 14px;
    transition: all 0.3s ease;
    background: white;
}

.filter-select:focus,
.filter-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.price-range {
    display: flex;
    gap: 10px;
    align-items: center;
}

.price-range input {
    flex: 1;
}

.price-separator {
    color: #64748b;
    font-weight: 600;
}

/* Advanced Search */
.advanced-search {
    position: relative;
    margin-bottom: 20px;
}

.search-input {
    width: 100%;
    padding: 16px 50px 16px 20px;
    border: 2px solid #e2e8f0;
    border-radius: 15px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: #f8fafc;
}

.search-input:focus {
    outline: none;
    border-color: #3b82f6;
    background: white;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.search-button {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: #3b82f6;
    color: white;
    border: none;
    border-radius: 10px;
    padding: 10px 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    font-weight: 600;
}

.search-button:hover {
    background: #2563eb;
    transform: translateY(-50%) scale(1.05);
}

/* Shop Content */
.shop-content {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 40px;
}

/* Sidebar */
.shop-sidebar {
    background: white;
    border-radius: 20px;
    padding: 30px;
    height: fit-content;
    position: sticky;
    top: 100px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border: 1px solid #e2e8f0;
}

.sidebar-section {
    margin-bottom: 30px;
}

.sidebar-section:last-child {
    margin-bottom: 0;
}

.sidebar-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f1f5f9;
}

/* Categories */
.category-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.category-item {
    margin-bottom: 8px;
}

.category-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    color: #64748b;
    text-decoration: none;
    border-radius: 10px;
    transition: all 0.3s ease;
    font-size: 14px;
}

.category-link:hover,
.category-link.active {
    background: #f1f5f9;
    color: #3b82f6;
    transform: translateX(5px);
}

.category-count {
    background: #e2e8f0;
    color: #64748b;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
}

.category-link.active .category-count {
    background: #3b82f6;
    color: white;
}

/* Price Filter */
.price-filter {
    margin-bottom: 20px;
}

.price-slider {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: #e2e8f0;
    outline: none;
    -webkit-appearance: none;
}

.price-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #3b82f6;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(59, 130, 246, 0.3);
}

.price-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #3b82f6;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 6px rgba(59, 130, 246, 0.3);
}

.price-display {
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
    font-size: 14px;
    color: #64748b;
}

/* Product Grid */
.products-section {
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border: 1px solid #e2e8f0;
}

.products-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 20px;
}

.products-count {
    font-size: 1.125rem;
    color: #64748b;
    font-weight: 600;
}

.view-options {
    display: flex;
    gap: 10px;
    align-items: center;
}

.view-toggle {
    display: flex;
    background: #f1f5f9;
    border-radius: 10px;
    padding: 4px;
}

.view-btn {
    background: none;
    border: none;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #64748b;
}

.view-btn.active {
    background: white;
    color: #3b82f6;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.sort-select {
    padding: 8px 12px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    background: white;
    font-size: 14px;
    cursor: pointer;
}

/* Product Grid Layout */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.products-grid.list-view {
    grid-template-columns: 1fr;
    gap: 20px;
}

/* Product Card */
.product-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid #e2e8f0;
    position: relative;
    group: hover;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    border-color: #3b82f6;
}

.product-image {
    position: relative;
    overflow: hidden;
    aspect-ratio: 1;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.product-card:hover .product-image img {
    transform: scale(1.1);
}

.product-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: #ef4444;
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    z-index: 2;
}

.product-badge.sale {
    background: #ef4444;
}

.product-badge.new {
    background: #10b981;
}

.product-badge.featured {
    background: #f59e0b;
}

.product-actions {
    position: absolute;
    top: 12px;
    right: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    opacity: 0;
    transform: translateX(20px);
    transition: all 0.3s ease;
}

.product-card:hover .product-actions {
    opacity: 1;
    transform: translateX(0);
}

.action-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: white;
    color: #64748b;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.action-btn:hover {
    background: #3b82f6;
    color: white;
    transform: scale(1.1);
}

.product-info {
    padding: 20px;
}

.product-category {
    font-size: 12px;
    color: #8b5cf6;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.product-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 8px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}

.product-title a:hover {
    color: #3b82f6;
}

.product-rating {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.stars {
    display: flex;
    gap: 2px;
}

.star {
    color: #fbbf24;
    font-size: 14px;
}

.rating-count {
    font-size: 12px;
    color: #64748b;
}

.product-price {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 15px;
}

.current-price {
    font-size: 1.25rem;
    font-weight: 800;
    color: #1e293b;
}

.original-price {
    font-size: 1rem;
    color: #94a3b8;
    text-decoration: line-through;
}

.discount-percent {
    background: #fef2f2;
    color: #dc2626;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

.product-description {
    font-size: 14px;
    color: #64748b;
    line-height: 1.5;
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-footer {
    display: flex;
    gap: 10px;
    align-items: center;
}

.add-to-cart-btn {
    flex: 1;
    background: #3b82f6;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
}

.add-to-cart-btn:hover {
    background: #2563eb;
    transform: translateY(-2px);
}

.add-to-cart-btn:disabled {
    background: #94a3b8;
    cursor: not-allowed;
    transform: none;
}

.quick-view-btn {
    background: #f1f5f9;
    color: #64748b;
    border: none;
    padding: 12px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.quick-view-btn:hover {
    background: #e2e8f0;
    color: #1e293b;
}

/* List View Styles */
.product-card.list-view {
    display: flex;
    align-items: center;
    padding: 20px;
}

.product-card.list-view .product-image {
    width: 120px;
    height: 120px;
    flex-shrink: 0;
    margin-right: 20px;
    border-radius: 12px;
}

.product-card.list-view .product-info {
    flex: 1;
    padding: 0;
}

.product-card.list-view .product-footer {
    margin-top: 15px;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 40px;
}

.pagination-btn {
    padding: 10px 16px;
    border: 2px solid #e2e8f0;
    background: white;
    color: #64748b;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
}

.pagination-btn:hover,
.pagination-btn.active {
    background: #3b82f6;
    color: white;
    border-color: #3b82f6;
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Loading States */
.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 60px 0;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #e2e8f0;
    border-top: 4px solid #3b82f6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 1024px) {
    .shop-content {
        grid-template-columns: 250px 1fr;
        gap: 30px;
    }
    
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 25px;
    }
}

@media (max-width: 768px) {
    .shop-content {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .shop-sidebar {
        position: static;
        order: 2;
    }
    
    .products-section {
        order: 1;
    }
    
    .shop-title {
        font-size: 2.5rem;
    }
    
    .filters-grid {
        grid-template-columns: 1fr;
    }
    
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 20px;
    }
    
    .product-card.list-view {
        flex-direction: column;
        text-align: center;
    }
    
    .product-card.list-view .product-image {
        width: 100%;
        height: 200px;
        margin-right: 0;
        margin-bottom: 15px;
    }
}

@media (max-width: 480px) {
    .shop-container {
        padding: 0 15px;
    }
    
    .shop-title {
        font-size: 2rem;
    }
    
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 15px;
    }
    
    .product-info {
        padding: 15px;
    }
    
    .product-footer {
        flex-direction: column;
    }
    
    .add-to-cart-btn {
        width: 100%;
    }
}

/* Quick View Modal */
.quick-view-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.quick-view-modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
}

.modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    border-radius: 20px;
    max-width: 800px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: #f1f5f9;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 20px;
    color: #64748b;
    transition: all 0.3s ease;
    z-index: 10;
}

.modal-close:hover {
    background: #e2e8f0;
    color: #1e293b;
}

.modal-body {
    padding: 40px;
}

.quick-view-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: start;
}

.quick-view-image img {
    width: 100%;
    height: auto;
    border-radius: 12px;
}

.quick-view-info h2 {
    font-size: 2rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 20px;
}

.quick-view-price {
    font-size: 1.5rem;
    font-weight: 800;
    color: #3b82f6;
    margin-bottom: 20px;
}

.quick-view-description {
    font-size: 1rem;
    color: #64748b;
    line-height: 1.6;
    margin-bottom: 30px;
}

.quick-view-actions {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

/* Notifications */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: white;
    border-radius: 12px;
    padding: 16px 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    border-left: 4px solid #3b82f6;
    z-index: 10000;
    transform: translateX(400px);
    transition: all 0.3s ease;
    max-width: 350px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
}

.notification.show {
    transform: translateX(0);
}

.notification-success {
    border-left-color: #10b981;
}

.notification-error {
    border-left-color: #ef4444;
}

.notification-warning {
    border-left-color: #f59e0b;
}

.notification-close {
    background: none;
    border: none;
    font-size: 18px;
    color: #64748b;
    cursor: pointer;
    padding: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.notification-close:hover {
    color: #1e293b;
}

/* No Products */
.no-products {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: #64748b;
}

.no-products h3 {
    font-size: 1.5rem;
    color: #1e293b;
    margin-bottom: 10px;
}

/* Brand List */
.brand-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.brand-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.brand-item:hover {
    background: #f1f5f9;
}

.brand-item input[type="checkbox"] {
    margin: 0;
}

.brand-item span {
    font-size: 14px;
    color: #64748b;
}

/* Responsive Modal */
@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        max-height: 90vh;
    }
    
    .modal-body {
        padding: 20px;
    }
    
    .quick-view-content {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .quick-view-info h2 {
        font-size: 1.5rem;
    }
    
    .quick-view-price {
        font-size: 1.25rem;
    }
}

/* Loading States for Products */
.products-grid.loading {
    position: relative;
}

.products-grid.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.products-grid.loading::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border: 4px solid #e2e8f0;
    border-top: 4px solid #3b82f6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    z-index: 11;
}

/* Product Card Animations */
.product-card {
    animation: fadeInUp 0.6s ease forwards;
    opacity: 0;
    transform: translateY(30px);
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Success States */
.add-to-cart-btn.success {
    background: #10b981;
    color: white;
}

.add-to-cart-btn.loading {
    background: #94a3b8;
    cursor: not-allowed;
}

/* Enhanced Hover Effects */
.product-card:hover .product-image img {
    transform: scale(1.05);
}

.product-card:hover .product-actions {
    opacity: 1;
    transform: translateX(0);
}

/* Improved Accessibility */
.action-btn:focus,
.add-to-cart-btn:focus,
.quick-view-btn:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* Custom Scrollbar for Modal */
.modal-content::-webkit-scrollbar {
    width: 8px;
}

.modal-content::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 4px;
}

.modal-content::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

.modal-content::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Hide Default WordPress Sidebar */
#secondary,
.widget-area,
.sidebar-width {
    display: none !important;
}

/* Adjust main content when sidebar is hidden */
.content-area {
    width: 100% !important;
    margin-right: 0 !important;
}

/* Hide sidebar on all pages */
aside#secondary {
    display: none !important;
}

/* Ensure full width layout */
.site-main {
    width: 100% !important;
    max-width: none !important;
}

/* Hide specific widgets */
.widget_search,
.widget_block,
.wp-block-search,
.wp-block-group {
    display: none !important;
}
