/* Product Grid - Clean Modern Style (matches variant slider) */
/* Save this as: product-grid.css in your theme folder */

.product-grid-wrapper {
    width: 100%;
    max-width: 1400px;
    margin: 64px auto;
    padding: 0 32px;
}

/* Header */
.grid-header {
    text-align: center;
    margin-bottom: 48px;
}

.grid-title {
    font-size: 32px;
    font-weight: 400;
    letter-spacing: 0.02em;
    color: #1a1a1a;
    margin: 0 0 16px 0;
}

.grid-divider {
    width: 60px;
    height: 1px;
    background: #1a1a1a;
    margin: 0 auto 12px auto;
}

.grid-count {
    font-size: 13px;
    letter-spacing: 0.02em;
    color: #999;
    margin: 0;
}

/* Filters with Category Buttons - MODERN STYLE */
.grid-filters {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px !important;
    padding-bottom: 20px !important;
    border-bottom: 1px solid #e8e8e8;
    gap: 24px;
    flex-wrap: wrap;
}

.filter-buttons-container {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
}

.filter-category-btn {
    padding: 10px 20px !important;
    border: 1px solid #e0e0e0;
    background-color: transparent;
    color: #1a1a1a;
    font-size: 12px;
    letter-spacing: 0.02em;
    cursor: pointer;
    transition: all 0.25s ease;
    font-weight: 400;
    border-radius: 4px;
}

.filter-category-btn:hover {
    background-color: #f5f5f5;
    border-color: #d0d0d0;
}

.filter-category-btn.active {
    background-color: #1a1a1a;
    color: #fff;
    border-color: #1a1a1a;
}

.filter-button-group {
    display: flex;
    gap: 0;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
}

.filter-button-group .filter-category-btn {
    border: none;
    border-right: 1px solid #e0e0e0;
    border-radius: 0;
}

.filter-button-group .filter-category-btn:last-child {
    border-right: none;
}

.filter-sort-group {
    display: flex;
    align-items: center;
    gap: 12px;
}

.filter-label {
    font-size: 12px;
    letter-spacing: 0.02em;
    color: #666;
    font-weight: 400;
}

.filter-select {
    padding: 10px 36px 10px 14px;
    border: 1px solid #e0e0e0;
    background-color: #fff;
    color: #1a1a1a;
    font-size: 12px;
    letter-spacing: 0.01em;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L6 6L11 1' stroke='%231a1a1a' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    transition: all 0.25s ease;
    border-radius: 4px;
}

.filter-select:hover,
.filter-select:focus {
    border-color: #1a1a1a;
    outline: none;
}

/* Grid */
.product-grid {
    display: grid;
    gap: 32px;
    margin-bottom: 64px;
}

.product-grid[data-columns="2"] {
    grid-template-columns: repeat(2, 1fr);
}

.product-grid[data-columns="3"] {
    grid-template-columns: repeat(3, 1fr);
}

.product-grid[data-columns="4"] {
    grid-template-columns: repeat(4, 1fr);
}

.product-grid[data-columns="5"] {
    grid-template-columns: repeat(5, 1fr);
}

.grid-item {
    opacity: 0;
    animation: fadeInUp 0.6s ease forwards;
}

.grid-item:nth-child(1) { animation-delay: 0.05s; }
.grid-item:nth-child(2) { animation-delay: 0.1s; }
.grid-item:nth-child(3) { animation-delay: 0.15s; }
.grid-item:nth-child(4) { animation-delay: 0.2s; }
.grid-item:nth-child(5) { animation-delay: 0.25s; }
.grid-item:nth-child(6) { animation-delay: 0.3s; }
.grid-item:nth-child(7) { animation-delay: 0.35s; }
.grid-item:nth-child(8) { animation-delay: 0.4s; }

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Product Card */
.product-card {
    display: block;
    text-decoration: none;
    color: inherit;
    transition: transform 0.25s ease;
    height: 100%;
}

.product-card:hover {
    transform: translateY(-3px);
}

/* Product Image - ROUNDED MODERN */
.product-image-wrapper {
    position: relative;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background-color: #f8f8f8;
    margin-bottom: 12px;
    border-radius: 12px;
}

.product-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}

.product-card:hover .product-image {
    transform: scale(1.04);
}

/* Sale Flag - MODERN */
.sale-flag {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: #000;
    color: #fff;
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.02em;
    padding: 4px 8px;
    z-index: 2;
    border-radius: 4px;
}

/* Product Overlay - SUBTLE */
.product-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.02);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.product-card:hover .product-overlay {
    opacity: 0;
}

.view-product {
    display: none;
}

/* Product Info */
.product-info {
    padding: 0 4px;
}

.product-tags {
    display: flex;
    gap: 4px;
    margin-bottom: 6px;
    flex-wrap: wrap;
}

.product-tag {
    font-size: 9px;
    font-weight: 400;
    letter-spacing: 0;
    color: #666;
    background-color: #f0f0f0;
    border: none;
    padding: 3px 6px;
    display: inline-block;
    border-radius: 3px;
}

.product-name {
    font-size: 14px;
    font-weight: 400;
    letter-spacing: 0;
    color: #1a1a1a;
    margin: 0 0 6px 0;
    line-height: 1.3;
    min-height: 36px;
}

.product-price {
    font-size: 13px;
    font-weight: 500;
    color: #1a1a1a;
    letter-spacing: 0;
}

.product-price del {
    color: #999;
    margin-right: 6px;
    font-weight: 400;
    font-size: 12px;
}

.product-price ins {
    text-decoration: none;
    color: #1a1a1a;
}

/* Pagination - MODERN */
.grid-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 56px;
    flex-wrap: wrap;
}

.pagination-btn {
    padding: 10px 18px;
    border: 1px solid #e0e0e0;
    background-color: transparent;
    color: #1a1a1a;
    font-size: 12px;
    letter-spacing: 0.01em;
    cursor: pointer;
    transition: all 0.25s ease;
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 400;
    border-radius: 4px;
}

.pagination-btn:hover:not(:disabled) {
    background-color: #1a1a1a;
    color: #fff;
    border-color: #1a1a1a;
}

.pagination-btn.active {
    background-color: #1a1a1a;
    color: #fff;
    border-color: #1a1a1a;
}

.pagination-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.pagination-prev svg,
.pagination-next svg {
    flex-shrink: 0;
}

.pagination-dots {
    color: #999;
    padding: 0 8px;
}

/* Empty State */
.grid-empty {
    text-align: center;
    font-size: 14px;
    color: #999;
    padding: 64px 0;
    letter-spacing: 0.05em;
}

/* Loading Animation */
.loading-bar {
    background: linear-gradient(90deg, #f5f3ed 25%, #ebe8dd 50%, #f5f3ed 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Tablet */
@media (max-width: 1024px) {
    .product-grid[data-columns="4"],
    .product-grid[data-columns="5"] {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .grid-title {
        font-size: 36px;
    }
    
    .product-grid-wrapper {
        padding: 0 24px;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .product-grid-wrapper {
        margin: 48px auto;
        padding: 0 16px;
    }
    
    .grid-header {
        margin-bottom: 40px;
    }
    
    .grid-title {
        font-size: 28px;
        letter-spacing: 0.1em;
    }
    
    .product-grid[data-columns="2"],
    .product-grid[data-columns="3"],
    .product-grid[data-columns="4"],
    .product-grid[data-columns="5"] {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .product-name {
        font-size: 14px;
        min-height: 40px;
    }
    
    .product-price {
        font-size: 13px;
    }
    
    .product-tag {
        font-size: 9px;
        padding: 3px 8px;
    }
    
    .sale-flag {
        font-size: 10px;
        padding: 5px 10px;
        top: 12px;
        right: 12px;
    }
    
    .view-product {
        font-size: 11px;
    }
    
    .grid-filters {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
    
    .filter-buttons-container {
        width: 100%;
        flex-direction: column;
        gap: 12px;
    }
    
    .filter-category-btn {
        flex: 1;
        width: 100%;
        text-align: center;
    }
    
    .filter-button-group {
        width: 100%;
    }
    
    .filter-sort-group {
        width: 100%;
        justify-content: space-between;
    }
    
    .filter-label {
        font-size: 11px;
    }
    
    .filter-select {
        flex: 1;
    }
    
    .pagination-btn {
        padding: 10px 16px;
        font-size: 12px;
    }
    
    .pagination-prev span,
    .pagination-next span {
        display: none;
    }
}

/* Small Mobile */
@media (max-width: 480px) {
    .product-grid[data-columns="2"],
    .product-grid[data-columns="3"],
    .product-grid[data-columns="4"],
    .product-grid[data-columns="5"] {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    
    .grid-title {
        font-size: 24px;
    }
    
    .product-image-wrapper {
        margin-bottom: 16px;
    }
    
    .pagination-btn {
        padding: 8px 12px;
    }
}