/* ===== GALLERIA D'ARTE - CENTERED FRAME (v3.1) ===== */

/* 1. CONTAINER */
.paintings-grid-container {
    width: 100%;
    /* Height is now controlled by parent flexbox, but we lay it out */
    height: 100%;
    max-height: 100vh;

    overflow-x: auto !important;
    overflow-y: hidden;

    display: flex;
    align-items: center;
    /* Vertical Center items inside */
    justify-content: flex-start;

    padding: 0 10vw;
    /* Horizontal padding for visual comfort */
    background: transparent;

    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    z-index: 10;
}

.paintings-grid {
    display: flex;
    align-items: center;
    gap: 120px;
    height: 100%;
    width: max-content;
    padding-right: 10vw;
}

/* 2. THE CARD */


.painting-card {
    display: flex;
    flex-direction: column;

    width: var(--card-width);
    height: calc(100vh - var(--header-height) - var(--footer-height) - 40px);
    /* Dominant vertical space */

    /* THE FRAME */
    background: #fff;
    border: 12px solid var(--color-frame-wood);
    /* border-radius: 20px; - Removed for sharp corners */
    overflow: hidden;
    outline: 2px solid var(--color-gold-muted);
    outline-offset: -8px; 
    box-shadow:
        0 30px 60px rgba(0, 0, 0, 0.6),
        0 10px 20px rgba(0, 0, 0, 0.4),
        inset 0 0 40px rgba(0,0,0,0.4);

    position: relative;
    flex-shrink: 0;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.painting-card:hover {
    transform: translateY(-15px) scale(1.02);
    box-shadow: 0 50px 100px rgba(0, 0, 0, 0.7);
    z-index: 50;
    outline-color: var(--color-gold-bright);
    outline-offset: -12px;
}

/* 3. IMAGE AREA */
.painting-images {
    width: 100%;
    height: 65%;
    /* Larger image area for cinematic impact */
    position: relative;
    background: #000;
    overflow: hidden;
    border-bottom: 6px solid #2c2925;
}

.painting-image-blur {
    position: absolute;
    top: -10%;
    left: -10%;
    width: 120%;
    height: 120%;
    object-fit: cover;
    filter: blur(15px) brightness(0.4);
    opacity: 0.8;
    z-index: 1;
    transition: opacity 0.5s ease-in-out;
}

.painting-image {
    width: 100%;
    height: 100%;
    object-fit: contain !important;
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
    z-index: 2;
    transition: opacity 0.5s;
}

.painting-image.active {
    opacity: 1;
}

/* 4. NAVIGATION ARROWS */
.image-nav {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 20;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 10px;
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
}

.painting-card:hover .image-nav {
    opacity: 1;
}

.nav-btn {
    pointer-events: auto;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(253, 251, 247, 0.9);
    color: var(--color-bg-deep);
    border: 2px solid var(--color-gold-muted);
    backdrop-filter: none;

    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
    transition: all 0.2s;
    user-select: none;
}

.nav-btn:hover {
    transform: scale(1.1);
    background: var(--color-gold-bright);
    color: white;
}



/* 5. INFO AREA */
.painting-info {
    padding: 30px 25px;
    background: #fffcf5;
    background-image: 
        radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.8) 0%, transparent 100%),
        url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='paper'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.04' numOctaves='5' stitchTiles='stitch'/%3E%3CfeColorMatrix type='matrix' values='1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 0.05 0'/%3E%3C/filter%3E%3Crect width='100' height='100' filter='url(%23paper)'/%3E%3C/svg%3E");
    text-align: center;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    cursor: pointer;
    position: relative;
    border: 1px solid rgba(212, 175, 55, 0.3);
    margin: 15px;
    /* border-radius: 4px; - Removed for sharp look */
    box-shadow: 
        inset 0 0 30px rgba(212, 175, 55, 0.1),
        0 5px 15px rgba(0,0,0,0.1);
}

/* Corner Ornaments */
.painting-info::before,
.painting-info::after {
    content: '';
    position: absolute;
    width: 25px;
    height: 25px;
    border: 2px solid var(--color-gold-muted);
    opacity: 0.4;
    transition: all 0.4s ease;
}

.painting-info::before {
    top: 10px;
    left: 10px;
    border-right: none;
    border-bottom: none;
}

.painting-info::after {
    bottom: 10px;
    right: 10px;
    border-left: none;
    border-top: none;
}

.painting-card:hover .painting-info::before,
.painting-card:hover .painting-info::after {
    width: 35px;
    height: 35px;
    opacity: 1;
    border-color: var(--color-gold-bright);
}

.painting-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.4rem;
    font-weight: 700;
    color: #1a1714;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 12px;
    position: relative;
}

.painting-description {
    font-family: 'Georgia', serif;
    font-size: 0.95rem;
    color: #444;
    font-style: italic;
    margin-bottom: 15px;
    line-height: 1.5;
    min-height: 2.8rem;
    /* Space for 2 lines even if empty */

    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.price-container {
    min-height: 4.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-top: auto;
}

.painting-price {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    font-weight: 800;
    color: #800020;
    margin: 0;
    line-height: 1;
}

.card-separator {
    width: 80px;
    height: 3px;
    background: #800020;
    border-radius: 2px;
    transition: width 0.4s ease;
}

.painting-card:hover .card-separator {
    width: 120px;
}

.more-info {
    font-family: var(--font-heading);
    font-size: 0.8rem;
    color: var(--color-gold-muted);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-top: 15px;
    opacity: 0.5;
    transition: all 0.3s ease;
}

.painting-card:hover .more-info {
    opacity: 1;
    color: var(--color-gold-bright);
    letter-spacing: 3px;
}

/* CARD TYPE BADGES */
.painting-type-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-family: 'Inter', sans-serif;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    margin: 0 auto 8px auto;
}

.original-badge {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fde68a;
}

.replica-badge {
    background: #f3e8ff;
    color: #6b21a8;
    border: 1px solid #e9d5ff;
}