.catalog-page {
    display: flex;
    gap: 0;
    max-width: 1400px;
    margin: 0 auto;
    padding: 32px 24px 60px;
    align-items: flex-start;
    min-height: 80vh;
}

/* === SIDEBAR === */
.catalog-sidebar {
    position: sticky;
    top: 88px;
    width: 280px;
    min-width: 280px;
    margin-right: 28px;
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xl);
    padding: 24px 20px;
    box-shadow: var(--shadow-soft);
    flex-shrink: 0;
}

.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.sidebar-header h3 {
    font-size: 20px;
    font-weight: 700;
    color: var(--color-text-primary);
    margin: 0;
}

.sidebar-reset {
    background: none;
    border: none;
    font-size: 12px;
    color: var(--color-primary-text);
    cursor: pointer;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 6px;
    transition: 0.2s;
}

.sidebar-reset:hover { background: var(--color-primary-light); }

.filter-group { margin-bottom: 18px; }

.filter-label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--color-text-muted);
    margin-bottom: 8px;
}

.filter-input-wrap {
    position: relative;
}

.filter-input-wrap svg {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    fill: var(--color-text-muted);
    pointer-events: none;
}

.filter-input-wrap input {
    width: 100%;
    padding: 10px 12px 10px 34px;
}

.filter-group input,
.filter-select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--color-border-strong);
    border-radius: var(--radius-medium);
    background: var(--color-bg-soft);
    color: var(--color-text-primary);
    font-size: 14px;
    font-family: inherit;
    outline: none;
    transition: 0.2s;
    box-sizing: border-box;
    appearance: none;
}

.filter-group input:focus,
.filter-select:focus {
    border-color: var(--color-primary-solid);
    box-shadow: 0 0 0 3px rgba(198,161,91,0.14);
    background: #fff;
}

.price-inputs {
    display: flex;
    align-items: center;
    gap: 8px;
}

.price-inputs input { width: 0; flex: 1; }
.price-inputs span { color: var(--color-text-muted); font-weight: 500; }

.filter-apply-btn {
    width: 100%;
    justify-content: center;
    margin-top: 8px;
    padding: 12px;
    border-radius: var(--radius-medium);
}

/* === MAIN AREA === */
.catalog-main { flex: 1; min-width: 0; }

.catalog-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 22px;
    flex-wrap: wrap;
    gap: 12px;
}

.catalog-title {
    font-size: 28px;
    font-weight: 800;
    color: var(--color-text-primary);
    margin: 0;
}

.catalog-count {
    font-size: 14px;
    color: var(--color-text-muted);
    margin-left: 4px;
}

.catalog-view-toggle {
    display: flex;
    gap: 6px;
    background: var(--color-bg-secondary);
    border-radius: 10px;
    padding: 4px;
}

.view-btn {
    width: 36px;
    height: 36px;
    border: none;
    background: none;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.2s;
}

.view-btn svg { width: 18px; height: 18px; fill: var(--color-text-muted); }
.view-btn.active { background: #fff; box-shadow: var(--shadow-soft); }
.view-btn.active svg { fill: var(--color-primary-solid); }

/* === PRODUCT GRID === */
.products-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

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

/* Product card — grid */
.product-card {
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xl);
    overflow: hidden;
    cursor: pointer;
    transition: all 0.28s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-shadow: var(--shadow-soft);
    position: relative;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-strong);
    border-color: rgba(198,161,91,0.3);
}

.product-card-image {
    width: 100%;
    aspect-ratio: 4/3;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-color: var(--color-bg-secondary);
    position: relative;
    overflow: hidden;
}

.product-card-image::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 60%, rgba(0,0,0,0.04) 100%);
}

.product-section-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(255,252,245,0.92);
    backdrop-filter: blur(8px);
    border: 1px solid var(--color-border-strong);
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    color: var(--color-primary-text);
    padding: 4px 10px;
    z-index: 2;
}

.product-rating-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(255,252,245,0.92);
    backdrop-filter: blur(8px);
    border: 1px solid var(--color-border);
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    color: #b08000;
    padding: 4px 10px;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 3px;
}

.product-card-body {
    padding: 16px 18px 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.product-card-name {
    font-size: 16px;
    font-weight: 700;
    color: var(--color-text-primary);
    margin: 0 0 8px;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-card-desc {
    font-size: 13px;
    color: var(--color-text-muted);
    margin: 0 0 14px;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}

.product-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: auto;
}

.product-card-price {
    font-size: 20px;
    font-weight: 800;
    background: linear-gradient(135deg, #b08a4a, #7a5520);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
}

.product-card-add {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    border: none;
    background: linear-gradient(135deg, #c6a15b, #8e6b2e);
    color: #fff;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: 0.22s;
    box-shadow: 0 4px 14px rgba(139,100,40,0.25);
}

.product-card-add:hover { transform: scale(1.08); box-shadow: 0 6px 20px rgba(139,100,40,0.35); }
.product-card-add.added { background: linear-gradient(135deg, #4caf50, #2e7d32); }

/* List view card */
.products-grid.list-view .product-card {
    flex-direction: row;
    align-items: stretch;
}

.products-grid.list-view .product-card-image {
    width: 200px;
    min-width: 200px;
    aspect-ratio: unset;
    flex-shrink: 0;
}

.products-grid.list-view .product-card-body {
    flex-direction: row;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    padding: 20px 22px;
}

.products-grid.list-view .product-card-name {
    flex: 1;
    min-width: 200px;
    margin: 0;
    font-size: 18px;
    -webkit-line-clamp: 1;
}

.products-grid.list-view .product-card-desc {
    display: none;
}

.products-grid.list-view .product-card-footer {
    margin: 0;
    gap: 12px;
}

/* Empty state */
.catalog-empty {
    text-align: center;
    padding: 80px 20px;
    color: var(--color-text-muted);
    grid-column: 1 / -1;
}

.catalog-empty-icon { font-size: 56px; margin-bottom: 16px; }
.catalog-empty h3 { font-size: 20px; font-weight: 700; color: var(--color-text-secondary); margin: 0 0 8px; }
.catalog-empty p { font-size: 14px; margin: 0; }

/* Skeleton loader */
.product-skeleton {
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xl);
    overflow: hidden;
    animation: skeleton-pulse 1.5s ease-in-out infinite;
}

.skeleton-img {
    width: 100%;
    aspect-ratio: 4/3;
    background: linear-gradient(90deg, #f0e8d8 25%, #faf4ec 50%, #f0e8d8 75%);
    background-size: 200% 100%;
    animation: skeleton-shine 1.5s infinite;
}

.skeleton-body { padding: 16px 18px 20px; }
.skeleton-line {
    height: 14px;
    border-radius: 7px;
    background: linear-gradient(90deg, #f0e8d8 25%, #faf4ec 50%, #f0e8d8 75%);
    background-size: 200% 100%;
    animation: skeleton-shine 1.5s infinite;
    margin-bottom: 10px;
}

.skeleton-line.w-80 { width: 80%; }
.skeleton-line.w-60 { width: 60%; }
.skeleton-line.w-40 { width: 40%; }

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

/* === PAGINATION === */
.pagination-wrap {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 32px;
    padding: 4px 0;
}

.pagination-wrap button {
    width: 40px;
    height: 40px;
    min-width: 40px;
    border: 1px solid var(--color-border-strong);
    background: #fff;
    color: var(--color-text-secondary);
    border-radius: 10px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: 0.22s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-soft);
}

.pagination-wrap button:hover {
    border-color: var(--color-primary-solid);
    color: var(--color-primary-solid);
    transform: translateY(-2px);
}

.pagination-wrap button.active {
    background: linear-gradient(135deg, #c6a15b, #8e6b2e);
    border-color: transparent;
    color: #fff;
    box-shadow: var(--shadow-medium);
}

/* === PRODUCT MODAL === */
.product-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(20, 12, 0, 0.55);
    backdrop-filter: blur(4px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

.product-modal-overlay.open {
    opacity: 1;
    pointer-events: all;
}

.product-modal {
    background: #fff;
    border-radius: var(--radius-xl);
    max-width: 900px;
    width: 100%;
    max-height: 88vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 40px 100px rgba(0,0,0,0.25);
    transform: scale(0.94) translateY(20px);
    transition: transform 0.3s cubic-bezier(0.34, 1.3, 0.64, 1);
}

.product-modal-overlay.open .product-modal {
    transform: scale(1) translateY(0);
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    border: 1px solid var(--color-border);
    background: var(--color-bg-soft);
    border-radius: 50%;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: 0.2s;
    color: var(--color-text-secondary);
}

.modal-close:hover { background: var(--color-border); }

.modal-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    max-height: 85vh;
    overflow: hidden;
}

.modal-image {
    aspect-ratio: 1;
    background-size: cover;
    background-position: center;
    background-color: var(--color-bg-secondary);
    border-radius: var(--radius-xl) 0 0 var(--radius-xl);
    max-height: 85vh;
    overflow: hidden;
    align-self: stretch;
    aspect-ratio: unset; 
}

.modal-info {
    padding: 36px 32px;
    display: flex;
    flex-direction: column;
    gap: 0;
    overflow-y: auto;
    max-height: 85vh;
}

.modal-section-tag {
    display: inline-block;
    background: var(--color-primary-light);
    border: 1px solid rgba(198,161,91,0.28);
    color: var(--color-primary-text);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    padding: 5px 12px;
    border-radius: 20px;
    margin-bottom: 12px;
    align-self: flex-start;
}

.modal-name {
    font-family: 'Playfair Display', serif;
    font-size: 26px;
    font-weight: 800;
    color: var(--color-text-primary);
    margin: 0 0 10px;
    line-height: 1.15;
}

.modal-rating {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 16px;
}

.modal-stars { color: #e0a020; font-size: 16px; }
.modal-rating-num { font-size: 14px; font-weight: 600; color: var(--color-text-secondary); }

.modal-price {
    font-size: 32px;
    font-weight: 800;
    background: linear-gradient(135deg, #b08a4a, #7a5520);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 20px;
    line-height: 1;
}

.modal-desc {
    font-size: 14px;
    line-height: 1.75;
    color: var(--color-text-secondary);
    margin-bottom: 20px;
}

.modal-specs {
    background: var(--color-bg-soft);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-medium);
    padding: 16px;
    margin-bottom: 20px;
}

.modal-specs h4 {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--color-text-muted);
    margin: 0 0 12px;
}

.spec-row {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 7px 0;
    border-bottom: 1px solid var(--color-border);
    font-size: 14px;
}

.spec-row:last-child { border: none; padding-bottom: 0; }
.spec-key { color: var(--color-text-muted); }
.spec-val { font-weight: 600; color: var(--color-text-primary); text-align: right; }

.modal-colors { margin-bottom: 20px; }
.modal-colors h4 {
    font-size: 12px; font-weight: 700; letter-spacing: 0.1em;
    text-transform: uppercase; color: var(--color-text-muted); margin: 0 0 10px;
}

.color-swatches { display: flex; gap: 8px; flex-wrap: wrap; }

.color-swatch {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid transparent;
    transition: 0.2s;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

.color-swatch.active {
    border-color: var(--color-primary-solid);
    transform: scale(1.15);
}

.modal-actions {
    display: flex;
    gap: 10px;
    margin-top: auto;
    padding-top: 8px;
}

.modal-add-cart {
    flex: 1;
    justify-content: center;
    padding: 14px 20px;
    font-size: 15px;
    border-radius: var(--radius-medium);
}

.modal-add-cart.added {
    background: linear-gradient(135deg, #4caf50, #2e7d32) !important;
}

.modal-wishlist {
    width: 48px;
    height: 48px;
    border: 1px solid var(--color-border-strong);
    background: var(--color-bg-soft);
    border-radius: var(--radius-medium);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    transition: 0.2s;
    flex-shrink: 0;
}

.modal-wishlist:hover { background: #ffe0e0; border-color: #ff6b6b; }

/* === CART DRAWER === */
.cart-overlay {
    position: fixed;
    inset: 0;
    background: rgba(20,12,0,0.4);
    backdrop-filter: blur(3px);
    z-index: 800;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

.cart-overlay.open { opacity: 1; pointer-events: all; }

.cart-drawer {
    position: fixed;
    top: 0;
    right: 0;
    width: 400px;
    max-width: 100vw;
    height: 100%;
    background: #fff;
    box-shadow: -20px 0 60px rgba(0,0,0,0.12);
    z-index: 900;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.cart-drawer.open { transform: translateX(0); }

.cart-drawer-header {
    padding: 22px 24px;
    border-bottom: 1px solid var(--color-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}

.cart-drawer-header h3 {
    font-family: 'Playfair Display', serif;
    font-size: 22px;
    font-weight: 700;
    margin: 0;
    color: var(--color-text-primary);
}

.cart-drawer-close {
    width: 34px;
    height: 34px;
    border: 1px solid var(--color-border);
    background: var(--color-bg-soft);
    border-radius: 50%;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.2s;
    color: var(--color-text-secondary);
}

.cart-drawer-close:hover { background: var(--color-border); }

.cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
}

.cart-item {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    padding: 14px 0;
    border-bottom: 1px solid var(--color-border);
}

.cart-item-img {
    width: 68px;
    height: 68px;
    border-radius: 10px;
    background-size: cover;
    background-position: center;
    background-color: var(--color-bg-secondary);
    flex-shrink: 0;
}

.cart-item-info { flex: 1; min-width: 0; }

.cart-item-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--color-text-primary);
    margin: 0 0 6px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.cart-item-price {
    font-size: 15px;
    font-weight: 700;
    color: var(--color-primary-solid);
}

.cart-item-qty {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
}

.qty-btn {
    width: 26px;
    height: 26px;
    border: 1px solid var(--color-border-strong);
    background: var(--color-bg-soft);
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.2s;
    font-weight: 700;
    color: var(--color-text-secondary);
}

.qty-btn:hover { background: var(--color-primary-light); border-color: var(--color-primary-solid); }
.qty-num { font-size: 14px; font-weight: 700; color: var(--color-text-primary); min-width: 20px; text-align: center; }

.cart-item-remove {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--color-text-muted);
    font-size: 18px;
    padding: 4px;
    transition: 0.2s;
    flex-shrink: 0;
    line-height: 1;
}

.cart-item-remove:hover { color: #e05050; }

.cart-empty {
    text-align: center;
    padding: 60px 20px;
    color: var(--color-text-muted);
}

.cart-empty-icon { font-size: 48px; margin-bottom: 12px; }
.cart-empty p { font-size: 14px; margin: 0; }

.cart-drawer-footer {
    padding: 20px 24px;
    border-top: 1px solid var(--color-border);
    flex-shrink: 0;
}

.cart-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
    font-size: 16px;
    color: var(--color-text-secondary);
}

.cart-total strong {
    font-family: 'Playfair Display', serif;
    font-size: 24px;
    font-weight: 700;
    background: linear-gradient(135deg, #c6a15b, #8e6b2e);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.cart-checkout-btn {
    width: 100%;
    justify-content: center;
    padding: 14px;
    font-size: 15px;
    border-radius: var(--radius-medium);
    margin-bottom: 10px;
}

.cart-clear-btn {
    width: 100%;
    background: none;
    border: 1px solid var(--color-border-strong);
    border-radius: var(--radius-medium);
    padding: 10px;
    font-size: 13px;
    color: var(--color-text-muted);
    cursor: pointer;
    transition: 0.2s;
    font-family: inherit;
}

.cart-clear-btn:hover { background: #fff0f0; border-color: #ff8080; color: #e05050; }

/* === RESPONSIVE === */
@media (max-width: 1200px) {
    .products-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 960px) {
    .catalog-page { flex-direction: column; padding: 20px 16px 48px; }
    .catalog-sidebar {
        position: static;
        width: 100%;
        min-width: 0;
        margin-right: 0;
        margin-bottom: 20px;
    }
    .products-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 680px) {
    .products-grid { grid-template-columns: 1fr; }
    .modal-body { grid-template-columns: 1fr; }
    .modal-image { border-radius: var(--radius-xl) var(--radius-xl) 0 0; aspect-ratio: 3/2; }
    .modal-info { padding: 24px 20px; }
    .modal-name { font-size: 22px; }
    .modal-price { font-size: 26px; }
    .cart-drawer { width: 100%; }
}

@media (max-width: 480px) {
    .products-grid.list-view .product-card { flex-direction: column; }
    .products-grid.list-view .product-card-image { width: 100%; aspect-ratio: 4/3; }
    .products-grid.list-view .product-card-body { flex-direction: column; align-items: flex-start; }
    .products-grid.list-view .product-card-name { -webkit-line-clamp: 2; }
}
