/* =====================================
   SHOP PAGE STYLES
   ===================================== */

/* Shop Header */
.shop-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 2rem 0;
    color: white;
    text-align: center;
}

.shop-header .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.breadcrumb {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    opacity: 0.9;
}

.breadcrumb a {
    color: white;
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.breadcrumb a:hover {
    opacity: 0.7;
}

.shop-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0 0 0.5rem 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.shop-title i {
    color: #fbbf24;
}

.shop-subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
    margin: 0;
}

/* Shop Content */
.shop-content {
    padding: 2rem 0;
    min-height: 70vh;
    overflow-x: hidden;
}

.shop-layout {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 2rem;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1rem;
    overflow-x: hidden;
    width: 100%;
    box-sizing: border-box;
}

/* Filter Sidebar */
.filter-sidebar {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    height: fit-content;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
    position: sticky;
    top: 100px;
    transition: all 0.3s ease;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.filter-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #f3f4f6;
}

.filter-header h3 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 600;
    color: #1f2937;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.filter-header i {
    color: #667eea;
}

.filter-close {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #6b7280;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.filter-close:hover {
    background: #f3f4f6;
    color: #374151;
}

/* Filter Section */
.filter-section {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #e5e7eb;
}

.filter-section:last-of-type {
    border-bottom: none;
}

.filter-section h4 {
    margin: 0 0 1rem 0;
    font-size: 1rem;
    font-weight: 600;
    color: #374151;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.filter-section i {
    color: #667eea;
    font-size: 0.9rem;
}

/* Filter Options */
.filter-options {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.filter-option {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 8px;
    transition: background-color 0.2s ease;
}

.filter-option:hover {
    background: #f9fafb;
}

.filter-option input[type="checkbox"] {
    display: none;
}

.checkmark {
    width: 18px;
    height: 18px;
    border: 2px solid #d1d5db;
    border-radius: 4px;
    position: relative;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.filter-option input[type="checkbox"]:checked + .checkmark {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: #667eea;
}

.filter-option input[type="checkbox"]:checked + .checkmark::after {
    content: '';
    position: absolute;
    left: 5px;
    top: 1px;
    width: 6px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

/* Price Range */
.price-range {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    width: 100%;
    overflow: hidden;
}

.price-inputs {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
}

.price-inputs input {
    flex: 1;
    min-width: 0;
    width: 100%;
    max-width: calc(50% - 0.5rem);
    padding: 0.5rem;
    border: 2px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.9rem;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
}

.price-inputs input:focus {
    outline: none;
    border-color: #667eea;
}

.price-inputs span {
    color: #6b7280;
    font-weight: 500;
}

.price-suggestions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    width: 100%;
    overflow: hidden;
}

.price-tag {
    background: #f3f4f6;
    border: none;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
    width: 100%;
    box-sizing: border-box;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.price-tag:hover {
    background: #e5e7eb;
}

.price-tag.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

/* Rating Filters */
.rating-filters {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.rating-filter {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 8px;
    transition: background-color 0.2s ease;
}

.rating-filter:hover {
    background: #f9fafb;
}

.rating-filter input[type="radio"] {
    margin: 0;
}

.stars {
    display: flex;
    gap: 0.2rem;
    color: #fbbf24;
    font-size: 0.9rem;
}

/* Filter Actions */
.filter-actions {
    padding-top: 1rem;
}

.clear-filters-btn {
    width: 100%;
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    border: none;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.clear-filters-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3);
}

/* Shop Main */
.shop-main {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* Shop Toolbar */
.shop-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: white;
    padding: 1rem 1.5rem;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

.toolbar-left {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    min-width: 0;
}

.filter-toggle {
    display: none;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
}

.filter-toggle:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.result-count {
    color: #6b7280;
    font-weight: 500;
}

.toolbar-right {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    min-width: 0;
}

.sort-options {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.sort-options label {
    font-weight: 500;
    color: #374151;
    white-space: nowrap;
}

.sort-options select {
    padding: 0.5rem 1rem;
    border: 2px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.9rem;
    background: white;
    cursor: pointer;
    transition: border-color 0.3s ease;
}

.sort-options select:focus {
    outline: none;
    border-color: #667eea;
}

.view-options {
    display: flex;
    gap: 0.25rem;
    background: #f3f4f6;
    padding: 0.25rem;
    border-radius: 8px;
}

.view-btn {
    background: none;
    border: none;
    padding: 0.5rem;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #6b7280;
}

.view-btn.active {
    background: white;
    color: #667eea;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Products Grid */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    width: 100%;
    overflow: hidden;
}

.products-grid.list-view {
    grid-template-columns: 1fr;
    gap: 1rem;
}

/* Product Card */
.product-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    position: relative;
    width: 100%;
    box-sizing: border-box;
    cursor: pointer;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

.product-image {
    height: 200px;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    width: 100%;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.product-card:hover .product-image img {
    transform: scale(1.05);
}

.product-image i {
    font-size: 4rem;
    color: #667eea;
    transition: transform 0.3s ease;
}

.product-card:hover .product-image i {
    transform: scale(1.1);
}

.product-badge {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.product-info {
    padding: 1.5rem;
    width: 100%;
    box-sizing: border-box;
}

.product-rating {
    display: flex;
    gap: 0.2rem;
    color: #fbbf24;
    margin-bottom: 0.75rem;
    font-size: 0.9rem;
}

.product-info h4 {
    margin: 0 0 0.75rem 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: #1f2937;
    line-height: 1.4;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
}

.product-price {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.product-price span {
    font-size: 1.2rem;
    font-weight: 700;
    color: #667eea;
}

.product-old-price {
    font-size: 1rem !important;
    color: #9ca3af !important;
    text-decoration: line-through;
    font-weight: 400 !important;
    margin-left: 0.5rem;
}

.add-to-cart {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border: none;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
}

.add-to-cart:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

/* List View Styles */
.products-grid.list-view .product-card {
    display: flex;
    align-items: center;
    padding: 1rem;
}

.products-grid.list-view .product-image {
    width: 120px;
    height: 120px;
    border-radius: 8px;
    flex-shrink: 0;
    margin-right: 1.5rem;
}

.products-grid.list-view .product-info {
    flex: 1;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 2rem;
}

.products-grid.list-view .product-details {
    flex: 1;
}

.products-grid.list-view .product-price-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 1rem;
}

.products-grid.list-view .add-to-cart {
    width: auto;
    padding: 0.5rem 1.5rem;
}

/* Load More */
.load-more-section {
    text-align: center;
    margin-top: 2rem;
}

.load-more-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
}

.load-more-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

.load-more-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Pagination Controls */
.pagination-section {
    display: flex;
    justify-content: center;
    margin: 2rem 0;
    padding: 1rem;
}

.pagination-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: center;
}

.pagination-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 0.75rem 1.25rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
}

.pagination-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.3);
}

.pagination-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.page-numbers {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.page-number {
    background: white;
    color: #667eea;
    border: 2px solid #667eea;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 40px;
    text-align: center;
}

.page-number:hover {
    background: #f3f4f6;
    transform: translateY(-2px);
}

.page-number.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: transparent;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.page-ellipsis {
    color: #9ca3af;
    padding: 0.5rem 0.25rem;
    font-weight: 600;
}

/* Responsive pagination */
@media (max-width: 768px) {
    .pagination-controls {
        gap: 0.25rem;
    }
    
    .pagination-btn {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
    }
    
    .page-number {
        padding: 0.4rem 0.6rem;
        min-width: 35px;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .pagination-btn {
        padding: 0.4rem 0.75rem;
        font-size: 0.8rem;
    }
    
    .page-number {
        padding: 0.35rem 0.5rem;
        min-width: 32px;
        font-size: 0.85rem;
    }
    
    .pagination-btn i {
        display: none;
    }
}

/* No Results */
.no-results {
    text-align: center;
    padding: 3rem 1rem;
    color: #6b7280;
}

.no-results-icon {
    font-size: 4rem;
    color: #d1d5db;
    margin-bottom: 1rem;
}

.no-results h3 {
    margin: 0 0 0.5rem 0;
    color: #374151;
}

.no-results p {
    margin: 0 0 1.5rem 0;
}

/* Search Overlay */
.search-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    display: none;
    z-index: 9999;
    padding: 2rem;
}

.search-overlay.active {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 10vh;
}

.search-container {
    width: 100%;
    max-width: 600px;
}

.search-box {
    background: white;
    border-radius: 12px;
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
    margin-bottom: 1rem;
}

.search-box i {
    color: #667eea;
    font-size: 1.2rem;
}

.search-box input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 1.1rem;
    background: transparent;
}

.search-close {
    background: none;
    border: none;
    color: #9ca3af;
    cursor: pointer;
    font-size: 1.2rem;
    padding: 0.25rem;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.search-close:hover {
    background: #f3f4f6;
    color: #374151;
}

.search-suggestions {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
    display: none;
}

.search-suggestions.show {
    display: block;
}

.suggestion-item {
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border-bottom: 1px solid #f3f4f6;
    border-radius: 8px;
    margin: 0.25rem;
}

.suggestion-item:last-child {
    border-bottom: none;
}

.suggestion-item:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    transform: translateX(5px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.2);
}

.suggestion-item:hover i {
    color: #fbbf24;
}

.suggestion-item:hover .suggestion-text h4 {
    color: white;
}

.suggestion-item:hover .suggestion-text p {
    color: rgba(255, 255, 255, 0.9);
}

.suggestion-item i {
    color: #667eea;
    width: 20px;
    transition: color 0.3s ease;
}

.suggestion-text h4,
.suggestion-text p {
    transition: color 0.3s ease;
}

/* Active Navigation Link */
.nav-menu a.active {
    background: rgba(255, 255, 255, 0.1);
    color: #fbbf24 !important;
    border-radius: 6px;
}

/* Header Fixes for Shop Page */
.header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
    width: 100%;
    /* overflow: hidden; - Removed to allow mobile menu to show outside header */
}

.navbar {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    box-sizing: border-box;
    overflow: visible; /* Ensure menu can show outside navbar */
}

.nav-brand h1 a {
    color: white;
    text-decoration: none;
    font-size: 1.8rem;
    font-weight: 800;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-menu a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    padding: 0.5rem 1rem;
    border-radius: 6px;
}

.nav-menu a:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Admin Dropdown Styles for Shop */
.admin-dropdown {
    position: relative;
    display: inline-block;
}

.admin-dropdown .dropdown-toggle {
    text-decoration: none;
    color: white;
    font-weight: 500;
    transition: all 0.3s ease;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    text-align: center;
    vertical-align: middle;
}

.admin-dropdown .dropdown-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
}

.admin-dropdown .dropdown-toggle i {
    font-size: 0.8rem;
    transition: transform 0.3s ease;
}

.admin-dropdown.active .dropdown-toggle i {
    transform: rotate(180deg);
}

.admin-dropdown .dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    min-width: 160px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    border-radius: 8px;
    padding: 0.5rem 0;
    margin-top: 0.5rem;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
    border: 1px solid rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
}

.admin-dropdown.active .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.admin-dropdown .dropdown-menu a {
    display: block !important;
    padding: 0.75rem 1rem !important;
    color: #555 !important;
    text-decoration: none !important;
    transition: all 0.3s ease !important;
    font-weight: 500 !important;
    background: transparent !important;
    width: 100% !important;
    white-space: nowrap !important;
    box-sizing: border-box !important;
}

.admin-dropdown .dropdown-menu a:hover {
    background: #f8f9fa !important;
    color: #667eea !important;
    padding-left: 1.5rem !important;
}

.nav-icons {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.nav-icons i {
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    transition: color 0.3s ease;
}

.nav-icons i:hover {
    color: #fbbf24;
}

.cart-icon-wrapper {
    position: relative;
    cursor: pointer;
}

.cart-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #ef4444;
    color: white;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 600;
}

/* Hide mobile menu toggle by default */
.mobile-menu-toggle {
    display: none;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0.5rem;
    color: white;
}

/* Hide mobile nav icons by default */
.mobile-nav-icons {
    display: none;
}

/* Responsive Design */
@media (max-width: 1280px) and (max-height: 900px) {
    /* Special handling for Nest Hub Max and similar devices */
    .nav-menu {
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        background: rgba(17, 24, 39, 0.98);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        display: none;
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        padding: 5rem 2rem 2rem 2rem;
        gap: 1.5rem;
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 9999;
        overflow-y: auto;
        box-sizing: border-box;
    }

    .nav-menu.active {
        display: flex !important;
        transform: translateY(0) !important;
        opacity: 1 !important;
        visibility: visible !important;
    }

    .mobile-menu-toggle {
        display: flex !important;
        flex-direction: column;
        cursor: pointer;
        padding: 0.5rem;
        background: rgba(255, 255, 255, 0.1);
        border: none;
        border-radius: 6px;
        transition: all 0.3s ease;
        min-width: 44px;
        min-height: 44px;
        justify-content: center;
        align-items: center;
    }

    .mobile-nav-icons {
        display: flex;
        flex-direction: column;
        gap: 1rem;
        margin-top: 2rem;
        width: 100%;
        max-width: 300px;
    }

    .mobile-nav-icons a {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 0.5rem;
        font-size: 1rem;
        width: 100% !important;
        padding: 1rem !important;
        background: rgba(255, 255, 255, 0.1);
        border-radius: 8px;
        color: white !important;
        text-decoration: none;
        transition: all 0.3s ease;
    }

    .nav-icons {
        display: none !important;
    }

    /* Admin dropdown in mobile menu */
    .admin-dropdown .dropdown-menu {
        position: static;
        background: rgba(255, 255, 255, 0.1);
        box-shadow: none;
        border: none;
        margin-top: 0.5rem;
        border-radius: 8px;
        padding: 0.5rem;
        opacity: 0;
        visibility: hidden;
        max-height: 0;
        overflow: hidden;
        transition: all 0.3s ease;
    }

    .admin-dropdown.active .dropdown-menu {
        opacity: 1;
        visibility: visible;
        max-height: 400px; /* Increased from 200px to fit all items */
        overflow-y: auto; /* Allow scrolling if needed */
    }

    .admin-dropdown .dropdown-menu a {
        color: rgba(255, 255, 255, 0.9) !important;
        font-size: 1rem;
        padding: 0.75rem 1rem !important;
        width: auto !important;
        margin: 0.25rem 0;
        background: rgba(255, 255, 255, 0.05);
    }

    .admin-dropdown .dropdown-menu a:hover {
        background: rgba(102, 126, 234, 0.3) !important;
        color: #fbbf24 !important;
    }
}

@media (max-width: 1024px) {
    .shop-layout {
        grid-template-columns: 1fr;
        gap: 1rem;
        padding: 0 0.5rem;
    }
    
    .filter-sidebar {
        position: fixed;
        top: 0;
        left: -100%;
        width: 85vw;
        max-width: 380px;
        height: 100vh;
        z-index: 10000;
        overflow-y: auto;
        overflow-x: hidden;
        transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        background: white;
        border-radius: 0;
        max-height: 100vh;
        padding: 0;
        box-shadow: 2px 0 20px rgba(0, 0, 0, 0.2);
        -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
    }
    
    .filter-sidebar.active {
        left: 0;
    }

    /* Backdrop overlay */
    body.filter-open::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.6);
        backdrop-filter: blur(4px);
        z-index: 9999;
        animation: fadeIn 0.3s ease;
    }

    @keyframes fadeIn {
        from { opacity: 0; }
        to { opacity: 1; }
    }

    /* Filter header - sticky on mobile */
    .filter-header {
        position: sticky;
        top: 0;
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        padding: 1.25rem 1.5rem;
        margin-bottom: 0;
        border-bottom: none;
        border-radius: 0;
        z-index: 10;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    }

    .filter-header h3 {
        color: white;
        font-size: 1.3rem;
        margin: 0;
    }

    .filter-header i {
        color: #fbbf24;
    }
    
    .filter-close {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        background: rgba(255, 255, 255, 0.2);
        border-radius: 50%;
        font-size: 1.3rem;
        color: white;
        transition: all 0.3s ease;
    }

    .filter-close:hover {
        background: rgba(255, 255, 255, 0.3);
        transform: rotate(90deg);
    }

    .filter-close i {
        color: white;
    }

    /* Filter content area with padding */
    .filter-sidebar .filter-section {
        padding: 1.25rem 1.5rem;
        margin-bottom: 0;
        border-bottom: 1px solid #e5e7eb;
    }

    .filter-sidebar .filter-section:last-of-type {
        border-bottom: 1px solid #e5e7eb;
    }

    /* Section headers */
    .filter-section h4 {
        font-size: 1.05rem;
        margin-bottom: 1rem;
        color: #1f2937;
        font-weight: 700;
    }

    /* Enhanced checkboxes for touch */
    .filter-option {
        padding: 0.75rem 0.5rem;
        margin-bottom: 0.5rem;
        border-radius: 10px;
        min-height: 44px; /* Touch-friendly */
        display: flex;
        align-items: center;
    }

    .filter-option:active {
        background: #f3f4f6;
        transform: scale(0.98);
    }

    .checkmark {
        width: 22px;
        height: 22px;
        border-width: 2.5px;
        margin-right: 0.5rem;
    }

    .filter-option input[type="checkbox"]:checked + .checkmark::after {
        left: 6px;
        top: 2px;
        width: 7px;
        height: 12px;
    }

    /* Price range improvements */
    .price-inputs {
        gap: 0.75rem;
        margin-bottom: 1rem;
    }

    .price-inputs input {
        padding: 0.75rem;
        font-size: 1rem;
        border-radius: 10px;
        min-height: 44px;
    }

    .price-inputs span {
        font-size: 1.2rem;
        font-weight: 700;
        color: #6b7280;
    }

    .price-suggestions {
        gap: 0.75rem;
    }

    .price-tag {
        padding: 0.75rem 1rem;
        border-radius: 10px;
        font-size: 0.95rem;
        font-weight: 600;
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
        background: linear-gradient(135deg, #f9fafb 0%, #f3f4f6 100%);
        border: 2px solid #e5e7eb;
        transition: all 0.3s ease;
    }

    .price-tag:active {
        transform: scale(0.95);
    }

    .price-tag.active {
        border-color: #667eea;
        box-shadow: 0 4px 12px rgba(102, 126, 234, 0.25);
    }

    /* Rating filters touch-friendly */
    .rating-filter {
        padding: 0.75rem 0.5rem;
        border-radius: 10px;
        min-height: 48px;
        margin-bottom: 0.5rem;
    }

    .rating-filter:active {
        background: #f3f4f6;
        transform: scale(0.98);
    }

    .rating-filter input[type="radio"] {
        width: 20px;
        height: 20px;
        min-width: 20px;
    }

    .stars {
        font-size: 1rem;
        gap: 0.25rem;
    }

    .rating-filter span {
        font-size: 0.95rem;
    }

    /* Filter actions - sticky at bottom */
    .filter-actions {
        position: sticky;
        bottom: 0;
        background: white;
        padding: 1.25rem 1.5rem;
        margin: 0;
        border-top: 2px solid #e5e7eb;
        box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
    }

    .clear-filters-btn {
        padding: 1rem;
        border-radius: 12px;
        font-size: 1rem;
        min-height: 50px;
        font-weight: 700;
        box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3);
    }

    .clear-filters-btn:active {
        transform: translateY(0) scale(0.98);
    }

    /* Scrollbar styling for filter sidebar */
    .filter-sidebar::-webkit-scrollbar {
        width: 6px;
    }

    .filter-sidebar::-webkit-scrollbar-track {
        background: #f3f4f6;
    }

    .filter-sidebar::-webkit-scrollbar-thumb {
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        border-radius: 3px;
    }

    .filter-sidebar::-webkit-scrollbar-thumb:hover {
        background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
    }
    
    .filter-toggle {
        display: flex;
        box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
        font-size: 1rem;
        padding: 0.85rem 1.25rem;
        border-radius: 12px;
        min-height: 48px;
    }

    .filter-toggle:active {
        transform: scale(0.95);
    }
    
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 1rem;
    }

    .shop-content {
        padding: 1rem 0;
    }

    /* Mobile Menu Styles for Shop Page */
    .mobile-menu-toggle {
        display: flex !important;
        flex-direction: column;
        cursor: pointer;
        padding: 0.5rem;
        background: rgba(255, 255, 255, 0.1);
        border: none;
        border-radius: 6px;
        transition: all 0.3s ease;
        min-width: 44px;
        min-height: 44px;
        justify-content: center;
        align-items: center;
    }

    .mobile-menu-toggle:hover {
        background: rgba(255, 255, 255, 0.2);
        transform: scale(1.05);
    }

    .mobile-menu-toggle i {
        font-size: 1.5rem;
        color: white;
        transition: all 0.3s ease;
    }

    .nav-menu {
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        background: rgba(17, 24, 39, 0.98);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        display: none;
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        padding: 5rem 2rem 2rem 2rem;
        gap: 1.5rem;
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 9999;
        overflow-y: auto;
        box-sizing: border-box;
    }

    .nav-menu.active {
        display: flex !important;
        transform: translateY(0) !important;
        opacity: 1 !important;
        visibility: visible !important;
    }

    .nav-menu a {
        color: white !important;
        text-decoration: none;
        font-size: 1.2rem;
        font-weight: 500;
        padding: 1rem 2rem;
        border-radius: 8px;
        transition: all 0.3s ease;
        width: 200px;
        text-align: center;
        box-sizing: border-box;
        display: block;
    }

    .nav-menu a:hover,
    .nav-menu a.active {
        background: rgba(102, 126, 234, 0.2);
        color: #fbbf24 !important;
    }

    .mobile-nav-icons {
        display: flex;
        flex-direction: column;
        gap: 1rem;
        margin-top: 2rem;
        width: 100%;
        max-width: 300px;
    }

    .mobile-nav-icons a {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 0.5rem;
        font-size: 1rem;
        width: 100% !important;
        padding: 1rem !important;
        background: rgba(255, 255, 255, 0.1);
        border-radius: 8px;
    }

    .nav-menu a {
        color: white !important;
        text-decoration: none;
        font-size: 1.2rem;
        font-weight: 500;
        padding: 1rem 2rem;
        border-radius: 8px;
        transition: all 0.3s ease;
        width: 200px;
        text-align: center;
        box-sizing: border-box;
    }

    .nav-menu a:hover,
    .nav-menu a.active {
        background: rgba(102, 126, 234, 0.2);
        color: #fbbf24 !important;
    }

    .mobile-nav-icons {
        display: flex;
        flex-direction: column;
        gap: 1rem;
        margin-top: 2rem;
    }

    .mobile-nav-icons a {
        display: flex;
        align-items: center;
        gap: 0.5rem;
        font-size: 1rem;
        width: 200px;
        justify-content: center;
    }
}

@media (max-width: 768px) {
    /* Ensure header doesn't clip dropdown */
    .header {
        overflow: visible;
    }
    
    .navbar {
        overflow: visible;
    }
    
    .nav-menu {
        overflow: visible; /* Allow dropdown to extend beyond */
    }
    
    .nav-menu.active {
        overflow-y: auto; /* But allow scrolling for the menu itself */
    }
    
    /* Admin dropdown high z-index */
    .admin-dropdown {
        z-index: 10000;
    }
    
    .shop-header {
        padding: 1.5rem 0;
    }
    
    .shop-title {
        font-size: 2rem;
        flex-direction: column;
        gap: 0.25rem;
    }
    
    .shop-toolbar {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
        padding: 1rem;
    }
    
    .toolbar-left,
    .toolbar-right {
        justify-content: space-between;
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
        gap: 1rem;
        padding: 0 0.5rem;
    }
    
    .products-grid.list-view .product-card {
        flex-direction: column;
    }
    
    .products-grid.list-view .product-image {
        width: 100%;
        height: 150px;
        margin-right: 0;
        margin-bottom: 1rem;
    }
    
    .products-grid.list-view .product-info {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }
    
    .products-grid.list-view .product-price-actions {
        align-items: stretch;
    }
    
    .products-grid.list-view .add-to-cart {
        width: 100%;
    }

    .shop-layout {
        padding: 0 0.25rem;
        gap: 0.5rem;
    }

    .shop-content {
        padding: 1rem 0;
    }

    /* Mobile Header Adjustments */
    .header {
        padding: 0.75rem 0;
    }

    .navbar {
        padding: 0 0.5rem;
    }

    .nav-brand h1 a {
        font-size: 1.5rem;
    }

    .nav-icons {
        gap: 1rem;
    }

    .nav-icons i {
        font-size: 1.1rem;
    }

    /* Hide desktop nav menu */
    .nav-menu {
        display: none !important;
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        background: rgba(17, 24, 39, 0.98);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        padding: 5rem 2rem 2rem 2rem;
        gap: 1.5rem;
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 999999 !important;
        overflow-y: auto;
        box-sizing: border-box;
    }

    .nav-menu.active {
        display: flex !important;
        transform: translateY(0) !important;
        opacity: 1 !important;
        visibility: visible !important;
    }

    .nav-menu a {
        color: white !important;
        text-decoration: none;
        font-size: 1.2rem;
        font-weight: 500;
        padding: 1rem 2rem;
        border-radius: 8px;
        transition: all 0.3s ease;
        width: 200px;
        text-align: center;
        box-sizing: border-box;
        display: block;
    }

    .nav-menu a:hover,
    .nav-menu a.active {
        background: rgba(102, 126, 234, 0.2);
        color: #fbbf24 !important;
    }

    .mobile-nav-icons {
        display: flex;
        flex-direction: column;
        gap: 1rem;
        margin-top: 2rem;
        width: 100%;
        max-width: 300px;
    }

    .mobile-nav-icons a {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 0.5rem;
        font-size: 1rem;
        width: 100% !important;
        padding: 1rem !important;
        background: rgba(255, 255, 255, 0.1);
        border-radius: 8px;
    }

    /* Show mobile menu toggle */
    .mobile-menu-toggle {
        display: flex !important;
        cursor: pointer;
        background: rgba(255, 255, 255, 0.1);
        border: none;
        padding: 0.5rem;
        border-radius: 6px;
        transition: all 0.3s ease;
        min-width: 44px;
        min-height: 44px;
        justify-content: center;
        align-items: center;
        position: relative;
        z-index: 1000000 !important;
    }

    .mobile-menu-toggle:hover {
        background: rgba(255, 255, 255, 0.2);
    }

    .mobile-menu-toggle i {
        font-size: 1.3rem;
        color: white;
        transition: all 0.3s ease;
    }

    /* Price inputs mobile fix */
    .price-inputs {
        flex-direction: column;
        gap: 0.5rem;
    }

    .price-inputs input {
        max-width: 100%;
        width: 100%;
    }

    .price-inputs span {
        align-self: center;
    }
    
    /* Admin dropdown mobile styles - match other nav links */
    .nav-menu .admin-dropdown {
        width: 200px !important;
        display: block !important;
    }

    .nav-menu .admin-dropdown .dropdown-toggle {
        color: white !important;
        text-decoration: none !important;
        font-size: 1.2rem !important;
        font-weight: 500 !important;
        padding: 1rem 2rem !important;
        border-radius: 8px !important;
        transition: all 0.3s ease !important;
        width: 200px !important;
        text-align: center !important;
        box-sizing: border-box !important;
        display: block !important;
        background: none !important;
        justify-content: center !important;
        align-items: center !important;
        gap: 0.4rem !important;
    }

    .nav-menu .admin-dropdown .dropdown-toggle:hover {
        background: rgba(102, 126, 234, 0.2) !important;
        color: #fbbf24 !important;
    }
}

@media (max-width: 480px) {
    .products-grid {
        grid-template-columns: 1fr;
        padding: 0;
    }
    
    .search-overlay {
        padding: 1rem;
    }
    
    .filter-sidebar {
        max-width: 100vw;
        width: 100vw;
        padding: 1rem;
    }

    .shop-layout {
        padding: 0;
        gap: 0.5rem;
    }

    .shop-content {
        padding: 0.5rem 0;
    }

    .shop-toolbar {
        padding: 0.75rem;
        margin: 0 0.25rem;
    }

    .product-card {
        margin: 0 0.25rem;
    }

    .navbar {
        padding: 0 0.25rem;
    }

    /* Very small screen adjustments */
    .filter-section {
        margin-bottom: 1.5rem;
    }

    .filter-option {
        padding: 0.4rem;
    }

    .price-tag {
        padding: 0.4rem 0.6rem;
        font-size: 0.8rem;
    }
}

/* Hide mobile menu toggle on large desktop screens */
@media (min-width: 1401px) {
    .mobile-menu-toggle {
        display: none !important;
    }
}
