/**
 * VR Hair - Catalog & Product Styles
 * Design refinado e sofisticado
 */

:root {
    --vr-primary: #637952;
    --vr-primary-light: #8ba378;
    --vr-primary-dark: #4a5c3d;
    --vr-text: #333333;
    --vr-text-muted: #666666;
    --vr-text-light: #999999;
    --vr-bg: #ffffff;
    --vr-bg-alt: #f8f9fa;
    --vr-border: #e5e5e5;
    --vr-border-light: #f0f0f0;
    --vr-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    --vr-shadow-hover: 0 8px 24px rgba(0, 0, 0, 0.12);
    --vr-radius: 8px;
    --vr-radius-lg: 12px;
    --vr-transition: 0.3s ease;
    --vr-spacing: 8px;
}

/* ========================================
   CATALOG LAYOUT
======================================== */
.catalog-layout {
    display: flex;
    gap: 32px;
    width: 100%;
    max-width: 1400px;
    margin: 32px auto;
    padding: 0 24px;
    box-sizing: border-box;
}

.catalog-sidebar-area {
    flex: 0 0 240px;
    position: sticky;
    top: 100px;
    height: fit-content;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
}

.catalog-main-area {
    flex: 1;
    min-width: 0;
}

/* ========================================
   CATALOG HEADER
======================================== */
.catalog-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--vr-border-light);
}

.catalog-title {
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--vr-text);
    margin: 0;
    letter-spacing: -0.02em;
}

.catalog-results {
    font-size: 0.875rem;
    color: var(--vr-text-muted);
    margin-top: 4px;
}

/* Order Select */
.catalog-order {
    position: relative;
}

.catalog-order select,
.catalog-order .form-control {
    appearance: none;
    background: var(--vr-bg);
    border: 1px solid var(--vr-border);
    border-radius: var(--vr-radius);
    padding: 10px 40px 10px 16px;
    font-size: 0.875rem;
    color: var(--vr-text);
    cursor: pointer;
    transition: all var(--vr-transition);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    min-width: 180px;
}

.catalog-order select:hover,
.catalog-order .form-control:hover {
    border-color: var(--vr-primary);
}

.catalog-order select:focus,
.catalog-order .form-control:focus {
    outline: none;
    border-color: var(--vr-primary);
    box-shadow: 0 0 0 3px rgba(99, 121, 82, 0.1);
}

/* ========================================
   PRODUCT GRID
======================================== */
.product-card-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 24px;
}

/* ========================================
   PRODUCT CARD - Refined
======================================== */
.product-card {
    background: var(--vr-bg);
    border-radius: var(--vr-radius-lg);
    overflow: hidden;
    box-shadow: var(--vr-shadow);
    transition: all var(--vr-transition);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.product-card:hover {
    box-shadow: var(--vr-shadow-hover);
    transform: translateY(-4px);
}

.product-card a {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    flex: 1;
}

/* Card Image */
.card-img-wrapper {
    position: relative;
    aspect-ratio: 1;
    overflow: hidden;
    background: var(--vr-bg-alt);
}

.card-img-wrapper img,
.product-main-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.product-card:hover .card-img-wrapper img,
.product-card:hover .product-main-img {
    transform: scale(1.05);
}

/* Seals/Badges */
.seals-list {
    position: absolute;
    top: 12px;
    left: 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    z-index: 2;
    list-style: none;
    margin: 0;
    padding: 0;
}

.seal {
    display: inline-block;
    padding: 4px 10px;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-radius: 4px;
    color: #fff;
}

.seal.featured {
    background: linear-gradient(135deg, #f59e0b, #d97706);
}

.seal.promocao {
    background: linear-gradient(135deg, #ef4444, #dc2626);
}

.seal.profissional {
    background: linear-gradient(135deg, var(--vr-primary), var(--vr-primary-dark));
}

/* Card Content */
.card-product-name {
    padding: 16px 16px 8px;
    margin: 0;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--vr-text);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.8em;
}

/* Prices */
.product-prices {
    padding: 0 16px 16px;
    margin-top: auto;
}

.product-card-main-price {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.product-card-price-old {
    font-size: 0.8rem;
    color: var(--vr-text-light);
    text-decoration: line-through;
}

.product-card-price-new {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--vr-primary);
}

/* Buy Button */
.buy-action {
    padding: 0 16px 16px;
}

.card-buy-btn {
    width: 100%;
    padding: 12px 24px;
    background: var(--vr-primary);
    color: #fff;
    border: none;
    border-radius: var(--vr-radius);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    cursor: pointer;
    transition: all var(--vr-transition);
}

.card-buy-btn:hover {
    background: var(--vr-primary-dark);
    transform: translateY(-1px);
}

.buy-buttons {
    display: block;
    text-decoration: none;
}

/* ========================================
   PAGINATION
======================================== */
.pagination-container {
    margin-top: 48px;
    padding-top: 32px;
    border-top: 1px solid var(--vr-border-light);
}

.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}

.pagination .page-item .page-link {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border: 1px solid var(--vr-border);
    border-radius: var(--vr-radius);
    background: var(--vr-bg);
    color: var(--vr-text);
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    transition: all var(--vr-transition);
}

.pagination .page-item .page-link:hover {
    border-color: var(--vr-primary);
    color: var(--vr-primary);
    background: rgba(99, 121, 82, 0.05);
}

.pagination .page-item.active .page-link {
    background: var(--vr-primary);
    border-color: var(--vr-primary);
    color: #fff;
}

.pagination .page-item.disabled .page-link {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

/* ========================================
   SIDEBAR FILTERS
======================================== */
.catalog-sidebar {
    background: var(--vr-bg);
    border-radius: var(--vr-radius-lg);
    padding: 20px;
    box-shadow: var(--vr-shadow);
}

.filter-section {
    margin-bottom: 24px;
}

.filter-section:last-child {
    margin-bottom: 0;
}

.filter-title {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--vr-text);
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--vr-border-light);
}

.filter-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.filter-list li {
    margin-bottom: 8px;
}

.filter-list a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    border-radius: 6px;
    color: var(--vr-text-muted);
    text-decoration: none;
    font-size: 0.875rem;
    transition: all var(--vr-transition);
}

.filter-list a:hover,
.filter-list a.active {
    background: rgba(99, 121, 82, 0.08);
    color: var(--vr-primary);
}

.filter-count {
    font-size: 0.75rem;
    color: var(--vr-text-light);
    background: var(--vr-bg-alt);
    padding: 2px 8px;
    border-radius: 10px;
}

/* ========================================
   NO RESULTS
======================================== */
.no-results {
    text-align: center;
    padding: 60px 20px;
    background: var(--vr-bg);
    border-radius: var(--vr-radius-lg);
    box-shadow: var(--vr-shadow);
}

.no-results i {
    font-size: 3rem;
    color: var(--vr-text-light);
    margin-bottom: 16px;
}

.no-results h4 {
    font-size: 1.25rem;
    color: var(--vr-text);
    margin-bottom: 8px;
}

.no-results p {
    color: var(--vr-text-muted);
    margin: 0;
}

/* ========================================
   RESPONSIVE
======================================== */
@media (max-width: 1024px) {
    .catalog-layout {
        gap: 24px;
    }

    .catalog-sidebar-area {
        flex: 0 0 200px;
    }
}

@media (max-width: 768px) {
    .catalog-layout {
        flex-direction: column;
        padding: 0 16px;
        margin: 24px auto;
    }

    .catalog-sidebar-area {
        position: static;
        max-height: none;
        order: -1;
    }

    .catalog-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .catalog-order {
        width: 100%;
    }

    .catalog-order select,
    .catalog-order .form-control {
        width: 100%;
    }

    .product-card-list {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
}

@media (max-width: 480px) {
    .product-card-list {
        grid-template-columns: 1fr;
    }

    .catalog-title {
        font-size: 1.5rem;
    }
}
