/**
 * EVSHOP Styles - Black & White, Sharp Corners
 * Clean, modern design with no border-radius, no shadows
 */

/* ============================================
   CONTAINER & LAYOUT
   ============================================ */

.evshop-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    background: #ffffff;
    color: #000000;
}

.evshop-content-wrapper {
    display: flex;
    gap: 30px;
    align-items: flex-start;
}

.evshop-main {
    flex: 1;
    min-width: 0;
    max-width: 100%;
}

/* ============================================
   TOP BAR - SEARCH & SORT
   ============================================ */

.evshop-top-bar {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
    width: 100%;
    align-items: stretch;
}

.evshop-search-wrapper {
    flex: 1;
    position: relative;
    min-width: 0;
}

.evshop-search-input {
    width: 100% !important;
    padding: 12px 15px;
    border: 2px solid #000000;
    background: #ffffff;
    color: #000000;
    font-size: 16px;
    outline: none;
    box-sizing: border-box;
    height: 100%;
}

.evshop-search-input:focus {
    border-color: #000000;
}

.evshop-search-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #ffffff;
    border: 2px solid #000000;
    border-top: none;
    max-height: 240px; /* Show max 5 items (48px each) then scroll */
    overflow-y: auto;
    z-index: 1000;
    display: none;
}

.evshop-search-suggestions.active {
    display: block;
}

.evshop-suggestion-item {
    display: block;
    padding: 12px 15px;
    border-bottom: 1px solid #000000;
    cursor: pointer;
    background: #ffffff;
    color: #000000;
    text-decoration: none;
    transition: all 0.2s ease;
}

.evshop-suggestion-item:hover {
    background: #000000;
    color: #ffffff;
    text-decoration: none;
}

.evshop-suggestion-item:last-child {
    border-bottom: none;
}

.evshop-suggestion-title {
    display: block;
    font-weight: 500;
    margin-bottom: 4px;
}

.evshop-suggestion-price {
    display: block;
    font-size: 14px;
    color: #666666;
    font-weight: 600;
}

.evshop-suggestion-item:hover .evshop-suggestion-price {
    color: #cccccc;
}

.evshop-sort-dropdown {
    padding: 12px 15px;
    border: 2px solid #000000;
    background: #ffffff;
    color: #000000;
    font-size: 16px;
    cursor: pointer;
    outline: none;
    min-width: 220px;
    flex-shrink: 0;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23000000' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
    padding-right: 40px;
}

.evshop-sort-dropdown:focus {
    border-color: #000000;
}

/* Desktop: Fixed sort dropdown width */
@media (min-width: 769px) {
    .evshop-sort-dropdown {
        width: 300px !important;
        max-width: 300px !important;
        min-width: 300px !important;
        flex-shrink: 0 !important;
    }
    
    .evshop-search-wrapper {
        flex: 1 1 auto !important;
        min-width: 300px;
    }
}

/* ============================================
   MOBILE FILTERS
   ============================================ */

.evshop-mobile-filters {
    display: none;
    margin-bottom: 20px;
    flex-direction: column;
    gap: 10px;
}

.evshop-mobile-category-dropdown,
.evshop-mobile-sort-dropdown {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #000000;
    background: #ffffff;
    color: #000000;
    font-size: 16px;
    cursor: pointer;
    outline: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23000000' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
    padding-right: 40px;
}

/* ============================================
   SIDEBAR FILTERS
   ============================================ */

.evshop-sidebar {
    width: 280px;
    flex-shrink: 0;
    background: #ffffff;
    border: 2px solid #000000;
    padding: 20px;
    max-height: none !important;
    overflow: visible !important;
    height: auto !important;
}

.evshop-filter-section {
    margin-bottom: 25px;
    padding-bottom: 25px;
    border-bottom: 1px solid #000000;
    max-height: none !important;
    overflow: visible !important;
}

.evshop-filter-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

/* Toggle Filters */
.evshop-toggle-filter {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;
    cursor: pointer;
}

.evshop-toggle-filter:last-child {
    margin-bottom: 0;
}

.evshop-toggle-label {
    font-size: 14px;
    font-weight: 500;
    color: #000000;
    flex: 1;
}

.evshop-toggle-input {
    display: none;
}

.evshop-toggle-switch {
    position: relative;
    width: 44px;
    height: 24px;
    background: #cccccc;
    border: 1px solid #000000;
    cursor: pointer;
    transition: background 0.3s;
}

.evshop-toggle-switch::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    background: #ffffff;
    border: 1px solid #000000;
    top: 1px;
    left: 1px;
    transition: left 0.3s;
}

.evshop-toggle-input:checked + .evshop-toggle-switch {
    background: #000000;
}

.evshop-toggle-input:checked + .evshop-toggle-switch::after {
    left: 21px;
}

/* Price Filter */
.evshop-price-filter {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.evshop-price-info {
    font-size: 12px;
    color: #666666;
    margin-bottom: 10px;
}

.evshop-price-slider-wrapper {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
}

.evshop-price-slider {
    width: 100% !important;
    height: 6px;
    background: #cccccc;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    cursor: pointer;
    box-sizing: border-box;
}

.evshop-price-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    background: #000000;
    border: 2px solid #000000;
    cursor: pointer;
}

.evshop-price-slider::-moz-range-thumb {
    width: 18px;
    height: 18px;
    background: #000000;
    border: 2px solid #000000;
    cursor: pointer;
    -moz-appearance: none;
    appearance: none;
}

.evshop-price-slider-value {
    font-size: 14px;
    font-weight: 600;
    color: #000000;
    text-align: center;
}

/* Categories */
.evshop-categories {
    max-height: none !important;
    overflow: visible !important;
    height: auto !important;
}

.evshop-categories ul,
.evshop-categories li,
.evshop-category-list,
.evshop-category-list ul,
.evshop-category-list li {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

.evshop-category-list {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

.evshop-category-item {
    margin-bottom: 8px;
    list-style: none !important;
    list-style-type: none !important;
}

.evshop-category-item:last-child {
    margin-bottom: 0;
}

.evshop-category-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 14px;
    color: #000000;
    padding: 6px 0;
    transition: background 0.2s ease;
}

.evshop-category-label:hover {
    background: #f5f5f5;
}

.evshop-category-item[data-level="0"] .evshop-category-label {
    padding-left: 0;
}

.evshop-category-item[data-level="1"] .evshop-category-label {
    padding-left: 20px;
}

.evshop-category-item[data-level="2"] .evshop-category-label {
    padding-left: 40px;
}

.evshop-category-item[data-level="3"] .evshop-category-label {
    padding-left: 60px;
}

.evshop-category-checkbox {
    width: 18px;
    height: 18px;
    margin-right: 12px;
    cursor: pointer;
    border: 2px solid #000000;
    background: #ffffff;
    border-radius: 4px;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    position: relative;
    flex-shrink: 0;
    margin-top: 0;
}

.evshop-category-checkbox:checked {
    background: #000000;
}

.evshop-category-checkbox:checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #ffffff;
    font-size: 11px;
    font-weight: bold;
    line-height: 1;
}

.evshop-category-name {
    flex: 1;
    font-weight: 400;
}

.evshop-category-count {
    color: #666666;
    font-size: 12px;
    margin-left: 8px;
    font-weight: 400;
}

.evshop-category-children,
.evshop-category-children ul,
.evshop-category-children li {
    margin-left: 28px;
    margin-top: 4px;
    list-style: none !important;
    list-style-type: none !important;
    padding: 0 !important;
}

.evshop-category-children ul,
.evshop-category-children ul ul {
    list-style: none !important;
    list-style-type: none !important;
    padding-left: 0 !important;
    margin-left: 0 !important;
}

.evshop-category-children .evshop-category-item {
    margin-bottom: 6px;
}

.evshop-category-children .evshop-category-label {
    font-size: 13px;
    padding: 4px 0;
}

.evshop-category-children .evshop-category-checkbox {
    width: 16px;
    height: 16px;
    margin-right: 10px;
    border-radius: 4px;
}

.evshop-category-children .evshop-category-checkbox:checked::after {
    font-size: 10px;
}

/* ============================================
   PRODUCTS COUNT
   ============================================ */

.evshop-products-count {
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e0e0e0;
}

.evshop-count-text {
    font-size: 13px;
    color: #666666;
    margin: 0;
    font-weight: 400;
}

/* ============================================
   PRODUCTS GRID
   ============================================ */

.evshop-products-grid {
    display: grid;
    gap: 20px;
    margin-bottom: 40px;
}

/* Mobile first: 1 column by default */
.evshop-products-grid[data-columns="2"],
.evshop-products-grid[data-columns="3"],
.evshop-products-grid[data-columns="4"] {
    grid-template-columns: repeat(1, 1fr);
}

/* Desktop: Force 4 columns for all grid variations */
@media (min-width: 769px) {
    .evshop-products-grid[data-columns="2"],
    .evshop-products-grid[data-columns="3"],
    .evshop-products-grid[data-columns="4"] {
        grid-template-columns: repeat(4, 1fr) !important;
    }
}

/* ============================================
   PRODUCT CARD
   ============================================ */

.evshop-product-card {
    background: #ffffff;
    border: 1px solid #000000;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: all 0.2s ease;
    height: 100%;
}

.evshop-product-card:hover {
    border-color: #000000;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.evshop-product-link {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    flex: 1;
    cursor: pointer;
}

.evshop-product-link img,
.evshop-product-card img,
.evshop-product-image,
.elementor img.evshop-product-image {
    width: 100% !important;
    height: 300px !important;
    max-height: 300px !important;
    min-height: 300px !important;
    object-fit: contain !important;
    object-position: center !important;
    background: #f8f8f8;
    border-bottom: 1px solid #000000;
    display: block !important;
    cursor: pointer;
    pointer-events: auto;
    padding: 15px;
    box-sizing: border-box;
}

.evshop-no-image {
    background: #f8f8f8;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999999;
    font-size: 14px;
}

.evshop-product-info {
    padding: 15px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.evshop-product-title {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 10px 0;
    color: #000000;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.evshop-product-price {
    font-size: 18px;
    font-weight: 700;
    color: #000000;
    margin-bottom: 15px;
}

.evshop-product-price del {
    color: #666666;
    font-size: 14px;
    font-weight: 400;
    margin-right: 8px;
}

.evshop-product-price ins {
    text-decoration: none;
    color: #000000;
}

.evshop-product-actions {
    padding: 0 15px 15px 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.evshop-add-to-cart {
    display: block !important;
    width: 100%;
    padding: 12px 20px;
    background: #000000;
    color: #ffffff;
    border: 2px solid #000000;
    text-align: center;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-sizing: border-box;
    visibility: visible !important;
    opacity: 1 !important;
}

.evshop-add-to-cart:hover {
    background: #ffffff;
    color: #000000;
    text-decoration: none;
}

/* ============================================
   PAGINATION
   ============================================ */

.evshop-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 40px;
}

.evshop-pagination-button {
    padding: 10px 15px;
    border: 2px solid #000000;
    background: #ffffff;
    color: #000000;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 40px;
}

.evshop-pagination-button:hover:not(:disabled) {
    background: #000000;
    color: #ffffff;
}

.evshop-pagination-button.active {
    background: #000000;
    color: #ffffff;
}

.evshop-pagination-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ============================================
   EMPTY STATE
   ============================================ */

.evshop-empty {
    text-align: center;
    padding: 60px 20px;
    color: #000000;
}

.evshop-empty p {
    font-size: 16px;
    margin: 0;
}

/* ============================================
   LOADING STATE
   ============================================ */

.evshop-loading {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 60px 20px;
}

.evshop-loading p {
    margin: 15px 0 0 0;
    font-size: 14px;
    color: #000000;
}

.evshop-loading-more {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    color: #000000;
}

.evshop-loading-more p {
    margin: 10px 0 0 0;
    font-size: 14px;
}

.evshop-loading-more .evshop-spinner {
    width: 30px;
    height: 30px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #000000;
}

.evshop-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #000000;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 1024px) {
    .evshop-content-wrapper {
        flex-direction: column;
    }
    
    .evshop-sidebar {
        flex: 1;
        position: static;
        max-height: none;
        width: 100%;
    }
}

@media (max-width: 768px) {
    .evshop-container {
        padding: 15px;
    }
    
    .evshop-top-bar {
        margin-bottom: 20px;
        flex-direction: column;
        gap: 10px;
    }
    
    .evshop-sort-dropdown {
        width: 100%;
        min-width: auto;
        max-width: 100%;
        display: none; /* Hide desktop sort on mobile */
    }
    
    /* Show mobile filters, hide desktop sidebar */
    .evshop-mobile-filters {
        display: flex !important;
    }
    
    .evshop-sidebar {
        display: none !important;
    }
    
    .evshop-desktop-categories {
        display: none !important;
    }
    
    /* Mobile: Only 1 product per row */
    .evshop-products-grid[data-columns="2"],
    .evshop-products-grid[data-columns="3"],
    .evshop-products-grid[data-columns="4"] {
        grid-template-columns: repeat(1, 1fr) !important;
        gap: 15px;
    }
    
    .evshop-main {
        max-width: 100% !important;
        width: 100% !important;
    }
    
    .evshop-product-link img,
    .evshop-product-card img,
    .evshop-product-image,
    .elementor img.evshop-product-image {
        height: 300px !important;
        max-height: 300px !important;
        min-height: 300px !important;
        width: 100% !important;
        object-fit: contain !important;
    }
    
}

