/* === Catalog Page Redesign === */

/* Standard Variables from main.css reference */
:root {
    --color-catalog-bg: #F5EFE6;
    /* Beige background like reference */
    --color-catalog-text: #333333;
    --color-catalog-accent: #1a1a1a;
    --color-catalog-price: #555555;
    --font-serif: 'Caudex', serif;
    --font-sans: 'Inter', sans-serif;
}

body.catalog-page {
    background-color: var(--color-catalog-bg);
}

/* === 1. Hero Section (Table Scene) === */
.catalog-hero {
    position: relative;
    width: 100%;
    height: 60vh;
    min-height: 400px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    margin-bottom: 4rem;
}

/* Overlay for text legibility if needed, largely transparent as per ref */
.catalog-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    /* Strong black overlay */
}

.catalog-hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: white;
    padding-bottom: 3rem;
    max-width: 900px;
}

.catalog-hero-title {
    font-family: var(--font-serif);
    font-size: 3.5rem;
    margin: 0;
    text-shadow: 0 4px 6px rgba(0, 0, 0, 0.5), 0 1px 3px rgba(0, 0, 0, 0.3);
    color: #ffffff !important;
    /* Force White */
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    line-height: 1.2;
}

.catalog-hero-desc {
    font-family: var(--font-serif);
    font-size: 1.1rem;
    font-style: italic;
    margin-top: 1rem;
    color: #ffffff !important;
    /* Force White */
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    font-weight: 400;
    letter-spacing: 0.5px;
}


/* === 2. Catalog Section Title & Filters === */
.catalog-header-wrapper {
    text-align: center;
    margin-bottom: 4rem;
}

.catalog-section-title {
    font-family: var(--font-serif);
    font-size: 2.5rem;
    color: var(--color-catalog-text);
    margin-bottom: 2rem;
    font-weight: 400;
}

.catalog-filters {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.filter-btn {
    font-family: var(--font-sans);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #888;
    cursor: pointer;
    position: relative;
    padding-bottom: 5px;
    transition: color 0.3s ease;
}

.filter-btn:hover,
.filter-btn.active {
    color: var(--color-catalog-accent);
}

.filter-btn::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1px;
    background-color: var(--color-catalog-accent);
    transition: width 0.3s ease;
}

.filter-btn:hover::after,
.filter-btn.active::after {
    width: 100%;
}

/* === 3. Product Grid & Animations === */
.catalog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 3rem 2rem;
    margin-bottom: 6rem;
    padding: 0 1rem;
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.catalog-item {
    display: flex;
    opacity: 0;
    animation: fadeUp 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
    transition: transform 0.4s ease;
}

.catalog-item:nth-child(1) {
    animation-delay: 0.1s;
}

.catalog-item:nth-child(2) {
    animation-delay: 0.2s;
}

.catalog-item:nth-child(3) {
    animation-delay: 0.3s;
}

.catalog-item:nth-child(4) {
    animation-delay: 0.4s;
}

.catalog-item:nth-child(5) {
    animation-delay: 0.5s;
}

.catalog-item:nth-child(6) {
    animation-delay: 0.6s;
}

.catalog-item:hover {
    transform: translateY(-10px);
}

/* PORTRAIT GOLD FRAME - DOUBLE BORDER EFFECT */
.catalog-item-image-wrapper {
    width: 100%;
    aspect-ratio: 3 / 4;
    position: relative;
    border-radius: 14px;
    overflow: hidden;

    /* Refined Gold Frame - Single Inset Line */
    border: none;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    /* Soft shadow for depth */

    transition: all 0.4s ease;
}

/* The inset gold line */
.catalog-item-image-wrapper::after {
    content: '';
    position: absolute;
    top: 12px;
    left: 12px;
    right: 12px;
    bottom: 12px;
    border: 1px solid #C5A059;
    border-radius: 10px;
    /* Slightly less radius than container */
    pointer-events: none;
    z-index: 2;
    transition: all 0.4s ease;
}

.catalog-item:hover .catalog-item-image-wrapper {
    box-shadow: 0 15px 40px rgba(197, 160, 89, 0.15);
}

.catalog-item:hover .catalog-item-image-wrapper::after {
    border-color: #e0b460;
    box-shadow: 0 0 15px rgba(197, 160, 89, 0.3);
    transform: scale(0.98);

}

.catalog-item-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s ease;
}

.catalog-item:hover .catalog-item-image {
    transform: scale(1.1);
}

/* Dark Gradient for Text Readability */
.catalog-item-gradient-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 50%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.5) 50%, transparent 100%);
    z-index: 1;
    pointer-events: none;
}

/* Title at Bottom - WHITE TEXT */
.catalog-item-title {
    position: absolute;
    bottom: 1.5rem;
    left: 0;
    width: 100%;
    text-align: center;
    z-index: 2;
    font-family: var(--font-serif);
    font-size: 1.6rem;
    color: #ffffff !important;
    /* Force white */
    font-weight: 500;
    text-shadow: 0 3px 8px rgba(0, 0, 0, 0.9);
    margin: 0;
    padding: 0 1rem;
}

/* Hover Details Overlay */
.catalog-item-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 3;
    padding: 2rem;
}

.catalog-item:hover .catalog-item-overlay {
    opacity: 1;
}

.catalog-hover-price {
    display: none;
}

.catalog-hover-desc {
    font-family: var(--font-sans);
    color: #1a1a1a;
    font-size: 1rem;
    text-align: center;
    line-height: 1.6;
    margin-top: 1rem;
}

.catalog-item-desc,
.catalog-item-footer,
.catalog-item-price,
.catalog-add-btn {
    display: none;
}

.catalog-header-wrapper {
    text-align: center;
    margin-bottom: 4rem;
}

.catalog-section-title {
    font-family: var(--font-serif);
    font-size: 2.5rem;
    color: var(--color-catalog-text);
    margin-bottom: 2rem;
    font-weight: 400;
}

.catalog-filters {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.filter-btn {
    font-family: var(--font-sans);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #888;
    cursor: pointer;
    position: relative;
    padding-bottom: 5px;
    transition: color 0.3s ease;
}

.filter-btn:hover,
.filter-btn.active {
    color: var(--color-catalog-accent);
}

.filter-btn::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1px;
    background-color: var(--color-catalog-accent);
    transition: width 0.3s ease;
}

.filter-btn:hover::after,
.filter-btn.active::after {
    width: 100%;
}

/* === 3. Product Grid & Animations === */
.catalog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 4rem 2rem;
    margin-bottom: 6rem;
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.catalog-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    cursor: pointer;
    opacity: 0;
    /* Hidden initially for animation */
    animation: fadeUp 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;

    /* Refined Gold Frame - Single Inset Line */
    /* border: 1px solid #e6e6e6; REMOVED */
    background-color: transparent;
    padding: 0;
    transition: all 0.3s ease;
}

.catalog-item:hover {
    /* border-color: #d0d0d0; REMOVED */
    /* box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05); REMOVED - handled by wrapper */
    transform: translateY(-5px);

}

/* Stagger delays handled in HTML via inline styles or nth-child here - sticking to simpler global delay/CSS for now or HTML specific */
.catalog-item:nth-child(1) {
    animation-delay: 0.1s;
}

.catalog-item:nth-child(2) {
    animation-delay: 0.2s;
}

.catalog-item:nth-child(3) {
    animation-delay: 0.3s;
}

.catalog-item:nth-child(4) {
    animation-delay: 0.4s;
}

.catalog-item:nth-child(5) {
    animation-delay: 0.5s;
}

.catalog-item:nth-child(6) {
    animation-delay: 0.6s;
}

.catalog-item-image-wrapper {
    width: 100%;
    aspect-ratio: 1 / 1.1;
    /* Slightly taller for elegance */
    overflow: hidden;
    margin-bottom: 1.5rem;
    position: relative;
}

/* Overlay Effect - Sliding Up */
.catalog-item-overlay {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.98);
    opacity: 1;
    transition: top 0.4s cubic-bezier(0.65, 0.05, 0.36, 1);
    /* Smoother bezier */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    z-index: 2;
}

/* Ensure Title is visible on hover inside the white overlay */
.catalog-item:hover .catalog-item-title {
    color: #1a1a1a !important;
    /* Switch to dark text on white background */
    z-index: 10;
    bottom: 50%;
    /* Move up to center */
    transform: translateY(-50px);
    text-shadow: none;
    /* Remove shadow for clean look */
    transition: all 0.4s ease;
}

.catalog-item-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* Back to cover for full bleed elegance */
    transition: transform 0.7s ease;
}

/* Hover State */
.catalog-item:hover .catalog-item-image {
    transform: scale(1.08);
    /* Slower, subtler zoom */
}

.catalog-item:hover .catalog-item-overlay {
    top: 0;
}

.catalog-item-title {
    font-family: var(--font-serif);
    font-size: 1.4rem;
    color: var(--color-catalog-text);
    margin-top: 0.8rem;
    font-weight: 400;
    /* Lighter weight for elegance */
}

/* Info inside Overlay */
.catalog-hover-price {
    font-family: var(--font-sans);
    /* Contrast with serif title */
    font-size: 1.2rem;
    color: var(--color-catalog-accent);
    margin-bottom: 1rem;
    font-weight: 600;
    letter-spacing: 1px;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.4s ease 0.1s;
}

.catalog-hover-desc {
    font-family: var(--font-serif);
    font-size: 1rem;
    color: #333;
    line-height: 1.6;
    font-style: italic;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.4s ease 0.2s;
}

.catalog-item:hover .catalog-hover-price,
.catalog-item:hover .catalog-hover-desc {
    opacity: 1;
    transform: translateY(0);
}

.catalog-item-desc,
.catalog-item-footer,
.catalog-item-price,
.catalog-add-btn {
    display: none;
    /* Ensure old elements are gone */
}


/* === 4. Highlights / Editorial Section === */
.highlights-section {
    padding: 6rem 0;
    margin-top: 4rem;
    background-color: #fafafa;
    /* Subtle contrast */
    border-top: 1px solid #eee;
}

.highlights-title {
    text-align: center;
    /* Centered for editorial look */
    font-family: var(--font-serif);
    font-size: 2rem;
    color: #222;
    margin-bottom: 3rem;
    position: relative;
    display: inline-block;
    left: 50%;
    transform: translateX(-50%);
}

.highlights-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 2px;
    background-color: var(--color-catalog-accent);
    margin: 1rem auto 0;
}

.highlight-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 3rem;
    max-width: 1000px;
    margin: 0 auto;
}

.highlight-card {
    background: transparent;
    padding: 0;
    border-radius: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1.5rem;
}

.highlight-image {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #fff;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.highlight-text {
    font-family: var(--font-serif);
    font-style: italic;
    font-size: 1.1rem;
    color: #444;
    line-height: 1.8;
}

.highlight-author {
    font-family: var(--font-sans);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #999;
    font-weight: 600;
    margin-top: 0.5rem;
}