/* ===== Catalog Page Styles - Same Theme as Home ===== */

/* Hero Section - Same as Home */
.hero {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary), var(--secondary));
    padding: 80px 0 60px;
    color: white;
    text-align: center;
    position: relative;
    overflow: hidden;
    width: 100%;
    margin-bottom: 0;
}

.hero::before {
    content: '';
    position: absolute;
    top: -40%;
    right: -20%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(255,255,255,0.06) 0%, transparent 60%);
    border-radius: 50%;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(255,255,255,0.04) 0%, transparent 60%);
    border-radius: 50%;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 700px;
    margin: 0 auto;
    padding: 0 20px;
}

.hero h1 { color: white; font-size: 3rem; margin-bottom: 16px; line-height: 1.2; }
.hero p { color: rgba(255,255,255,0.9); font-size: 1.15rem; line-height: 1.6; }

/* Search & Filter Bar */
.search-filter-bar {
    background: white;
    padding: 24px 0;
    border-bottom: 1px solid var(--neutral-100);
    position: sticky;
    top: var(--header-height);
    z-index: 99;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.search-box {
    position: relative;
    margin-bottom: 16px;
}

.search-box i {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--neutral-400);
    font-size: 1rem;
    pointer-events: none;
    z-index: 1;
}

.search-box input {
    width: 100%;
    padding: 14px 48px 14px 44px;
    background: var(--neutral-50);
    border: 2px solid transparent;
    border-radius: var(--radius-full);
    font-size: 0.95rem;
    font-family: var(--font-primary);
    color: var(--neutral-800);
    transition: all 0.3s ease;
    outline: none;
}

.search-box input:focus {
    background: white;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(142, 11, 65, 0.06);
}

.search-box input::placeholder { color: var(--neutral-400); }

.clear-search {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--neutral-400);
    cursor: pointer;
    font-size: 1rem;
    display: none;
    padding: 4px;
    z-index: 1;
}

.clear-search.visible { display: block; }
.clear-search:hover { color: var(--neutral-600); }

/* Filter Row */
.filter-row {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}

/* Custom Dropdown Container */
.custom-select-wrapper {
    flex: 1;
    min-width: 150px;
    position: relative;
    user-select: none;
}

.custom-select-trigger {
    width: 100%;
    padding: 12px 40px 12px 18px;
    background: var(--neutral-50);
    border: 2px solid var(--neutral-100);
    border-radius: var(--radius-full);
    font-size: 0.88rem;
    font-family: var(--font-primary);
    font-weight: 500;
    color: var(--neutral-700);
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    letter-spacing: 0.2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: left;
}

.custom-select-trigger:hover {
    border-color: var(--neutral-300);
    background: white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.custom-select-trigger.open {
    border-color: var(--primary);
    background: white;
    box-shadow: 0 0 0 4px rgba(142, 11, 65, 0.08);
}

.custom-select-trigger .arrow {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.custom-select-trigger .arrow i {
    font-size: 0.7rem;
    color: var(--neutral-500);
    transition: color 0.3s ease;
}

.custom-select-trigger.open .arrow { transform: translateY(-50%) rotate(180deg); }
.custom-select-trigger.open .arrow i { color: var(--primary); }

/* Dropdown Options */
.custom-select-options {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    background: white;
    border: 2px solid var(--neutral-100);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    z-index: 200;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transform: translateY(-8px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}

.custom-select-options.open {
    max-height: 400px;
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
    overflow-y: auto;
}

.custom-select-options::-webkit-scrollbar { width: 5px; }
.custom-select-options::-webkit-scrollbar-track { background: transparent; border-radius: 10px; }
.custom-select-options::-webkit-scrollbar-thumb { background: var(--neutral-200); border-radius: 10px; }
.custom-select-options::-webkit-scrollbar-thumb:hover { background: var(--neutral-300); }

.custom-select-option {
    padding: 12px 18px;
    cursor: pointer;
    font-size: 0.88rem;
    color: var(--neutral-700);
    transition: all 0.2s ease;
    border-bottom: 1px solid var(--neutral-50);
    position: relative;
}

.custom-select-option:last-child { border-bottom: none; }
.custom-select-option:hover {
    background: var(--bg-primary);
    color: var(--primary);
    padding-left: 24px;
}

.custom-select-option.selected {
    background: var(--bg-primary);
    color: var(--primary);
    font-weight: 600;
}

.custom-select-option.selected::before {
    content: '\f00c';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.7rem;
    color: var(--primary);
}

/* Overlay */
.select-overlay {
    position: fixed;
    inset: 0;
    z-index: 150;
    display: none;
}

.select-overlay.active { display: block; }

/* Active Filters */
.active-filters {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 12px;
    min-height: 0;
}

.filter-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 16px;
    background: var(--bg-primary);
    color: var(--primary);
    border-radius: var(--radius-full);
    font-size: 0.82rem;
    font-weight: 500;
    border: 1px solid rgba(142, 11, 65, 0.1);
}

.filter-tag button {
    background: none;
    border: none;
    color: var(--primary);
    cursor: pointer;
    font-size: 0.75rem;
    padding: 0;
    display: flex;
    align-items: center;
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.filter-tag button:hover { opacity: 1; }

/* Results Bar */
.results-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--neutral-100);
}

.results-count { font-size: 0.9rem; color: var(--neutral-600); font-weight: 500; }

.view-toggle { display: flex; gap: 4px; }

.view-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--neutral-50);
    border: 1px solid var(--neutral-200);
    border-radius: var(--radius-sm);
    cursor: pointer;
    color: var(--neutral-500);
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.view-btn.active { background: var(--primary); color: white; border-color: var(--primary); }
.view-btn:hover:not(.active) { background: var(--bg-primary); border-color: var(--primary); color: var(--primary); }

/* Products Section */
.products-section { padding: 30px 0 60px 0; background: var(--bg-primary); }

/* ===== PROFESSIONAL PRODUCT CARD ===== */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
    gap: 24px;
}

.products-grid.list-view {
    grid-template-columns: 1fr;
    gap: 20px;
}

.product-card {
    background: white;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--neutral-100);
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.product-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-6px);
    border-color: rgba(142, 11, 65, 0.3);
}

/* Product Image */
.product-card-image {
    position: relative;
    padding-top: 100%;
    background: var(--neutral-50);
    cursor: pointer;
    overflow: hidden;
}

.product-card-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* Badges */
.product-badge {
    position: absolute;
    top: 14px;
    right: 14px;
    background: linear-gradient(135deg, var(--secondary), var(--primary));
    color: white;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    z-index: 2;
    box-shadow: 0 4px 12px rgba(214, 26, 94, 0.35);
    letter-spacing: 0.3px;
}

.product-badge.sold-out {
    background: var(--neutral-800);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

/* Quick Actions */
.product-quick-actions {
    position: absolute;
    top: 14px;
    left: 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    opacity: 0;
    transform: translateX(-10px);
    transition: all 0.3s ease;
    z-index: 2;
}

.product-card:hover .product-quick-actions { opacity: 1; transform: translateX(0); }

.quick-action-btn {
    width: 36px;
    height: 36px;
    background: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(0,0,0,0.15);
    font-size: 0.85rem;
    color: var(--neutral-600);
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.quick-action-btn:hover { background: var(--primary); color: white; transform: scale(1.15); }

/* Product Body */
.product-card-body {
    padding: 16px 18px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.product-card-category {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--secondary);
    font-weight: 600;
    margin-bottom: 6px;
}

.product-card-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--neutral-900);
    margin-bottom: 8px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}

.product-card-title a { color: inherit; text-decoration: none; transition: color 0.2s ease; }
.product-card-title a:hover { color: var(--primary); }

/* Rating */
.product-card-rating {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 10px;
}

.product-card-rating .stars { color: #F59E0B; font-size: 0.82rem; display: flex; gap: 1px; }
.rating-count { color: var(--neutral-400); font-size: 0.78rem; }

/* Pricing */
.product-card-pricing {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.current-price { font-size: 1.15rem; font-weight: 700; color: var(--primary); }
.original-price { font-size: 0.82rem; text-decoration: line-through; color: var(--neutral-400); }

/* Card Footer */
.product-card-actions {
    display: flex;
    gap: 10px;
    margin-top: auto;
}

.product-card-actions .btn {
    flex: 1;
    font-size: 0.8rem;
    padding: 9px 12px;
    border-radius: var(--radius-full);
    white-space: nowrap;
}

/* List View */
.products-grid.list-view .product-card {
    display: grid;
    grid-template-columns: 260px 1fr auto;
    gap: 24px;
    flex-direction: row;
}

.products-grid.list-view .product-card-image {
    padding-top: 0;
    height: 100%;
    min-height: 220px;
}

.products-grid.list-view .product-card-body { justify-content: center; padding: 20px; }
.products-grid.list-view .product-card-actions {
    flex-direction: column;
    justify-content: center;
    padding-right: 20px;
    gap: 8px;
    min-width: 140px;
}

.products-grid.list-view .product-card-actions .btn { flex: unset; width: 100%; }

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    padding: 40px 0 20px;
}

.page-btn {
    min-width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border: 2px solid var(--neutral-100);
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--neutral-700);
    transition: all 0.2s ease;
    padding: 0 12px;
}

.page-btn:hover:not(:disabled):not(.active) { background: var(--bg-primary); border-color: var(--primary); color: var(--primary); }
.page-btn.active { background: var(--primary); color: white; border-color: var(--primary); font-weight: 700; }
.page-btn:disabled { opacity: 0.3; cursor: not-allowed; }

/* Skeleton */
.skeleton-product { background: white; border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--neutral-100); }
.skeleton-image {
    padding-top: 100%;
    background: linear-gradient(90deg, #f0f0f0 25%, #e8e8e8 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}
.skeleton-body { padding: 18px 20px; }
.skeleton-line {
    height: 12px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e8e8e8 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 4px;
    margin-bottom: 10px;
}
.skeleton-line.short { width: 45%; }
.skeleton-line.medium { width: 70%; }
.skeleton-line.long { width: 88%; }
.skeleton-line.price { height: 20px; width: 55%; margin-top: 4px; }
.skeleton-line.button { height: 40px; border-radius: 25px; margin-top: 12px; }

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

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 1200px) {
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
        gap: 20px;
    }
}

@media (max-width: 1024px) {
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
        gap: 18px;
    }
    .hero { padding: 60px 0 50px; }
    .hero h1 { font-size: 2.4rem; }
}

@media (max-width: 768px) {
    .hero { padding: 50px 0 40px; }
    .hero h1 { font-size: 2rem; }
    .hero p { font-size: 1rem; }
    
    .search-filter-bar { padding: 16px 0; }
    
    .filter-row { flex-direction: column; gap: 10px; }
    .custom-select-wrapper { width: 100%; min-width: unset; }
    .custom-select-trigger { padding: 12px 40px 12px 16px; }
    
    .results-bar { flex-direction: column; gap: 10px; align-items: flex-start; }
    
    .products-section { padding: 20px 0 40px 0; }
    
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 14px;
    }
    
    .products-grid.list-view { grid-template-columns: 1fr; gap: 14px; }
    .products-grid.list-view .product-card { grid-template-columns: 1fr; gap: 0; }
    .products-grid.list-view .product-card-image { padding-top: 55%; min-height: unset; }
    .products-grid.list-view .product-card-actions { flex-direction: row; padding: 0 16px 16px; min-width: unset; }
    
    .product-card-body { padding: 14px; }
    .product-card-title { font-size: 0.88rem; }
    .current-price { font-size: 1.05rem; }
    .product-card-actions { gap: 8px; }
    .product-card-actions .btn { font-size: 0.75rem; padding: 8px 10px; }
    
    .pagination { padding: 30px 0 20px; gap: 6px; }
    .page-btn { min-width: 36px; height: 36px; font-size: 0.85rem; }
}

@media (max-width: 480px) {
    .hero { padding: 36px 0 30px; }
    .hero h1 { font-size: 1.6rem; }
    .hero p { font-size: 0.9rem; }
    
    .search-filter-bar { padding: 14px 0; }
    .search-box { margin-bottom: 12px; }
    .search-box input { padding: 12px 38px 12px 36px; font-size: 0.85rem; }
    
    .custom-select-trigger { padding: 11px 36px 11px 14px; font-size: 0.82rem; }
    .custom-select-option { padding: 10px 16px; font-size: 0.82rem; }
    
    .results-bar { margin-top: 12px; padding-top: 12px; }
    .results-count { font-size: 0.82rem; }
    
    .products-section { padding: 16px 0 40px 0; }
    
    .products-grid {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }
    
    .product-card-body { padding: 10px 12px; }
    .product-card-title { font-size: 0.8rem; }
    .product-card-category { font-size: 0.65rem; letter-spacing: 1px; }
    .product-card-pricing { margin-bottom: 10px; gap: 6px; }
    .current-price { font-size: 0.9rem; }
    .original-price { font-size: 0.72rem; }
    .product-card-rating { font-size: 0.72rem; margin-bottom: 6px; }
    
    .product-card-actions { flex-direction: column; gap: 5px; }
    .product-card-actions .btn { padding: 7px 8px; font-size: 0.72rem; }
    
    .product-badge { top: 8px; right: 8px; padding: 4px 10px; font-size: 0.65rem; }
    .quick-action-btn { width: 28px; height: 28px; font-size: 0.7rem; }
    .product-quick-actions { top: 8px; left: 8px; gap: 5px; }
    
    .page-btn { min-width: 34px; height: 34px; font-size: 0.8rem; padding: 0 8px; }
    .pagination { gap: 4px; padding: 24px 0 16px; }
    .filter-tag { padding: 5px 12px; font-size: 0.75rem; }
}

@media (max-width: 360px) {
    .products-grid { gap: 8px; }
    
    .product-card-body { padding: 8px 10px; }
    .product-card-title { font-size: 0.75rem; }
    .product-card-category { font-size: 0.6rem; }
    .current-price { font-size: 0.82rem; }
    .product-card-actions .btn { padding: 6px 6px; font-size: 0.68rem; }
    
    .product-badge { top: 6px; right: 6px; padding: 3px 6px; font-size: 0.6rem; }
    .quick-action-btn { width: 24px; height: 24px; font-size: 0.65rem; }
}