/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #000000;
    --secondary-color: #666666;
    --background: #ffffff;
    --border-color: #e5e5e5;
    --text-main: #1a1a1a;
    --text-muted: #757575;
    --font-heading: 'Times New Roman', Times, serif; /* Mimicking the classic serif look */
    --font-body: 'Helvetica Neue', Helvetica, Arial, sans-serif; /* Clean sans for UI */
}

body {
    font-family: var(--font-body);
    background-color: var(--background);
    color: var(--text-main);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

a {
    text-decoration: none;
    color: inherit;
    transition: opacity 0.2s ease;
}

a:hover {
    opacity: 0.7;
}

/* Header - Minimalist & Centered */
header {
    background: #ffffff;
    color: var(--primary-color);
    padding: 2rem 1.5rem;
    text-align: center;
    border-bottom: 1px solid transparent; /* Cleaner look */
    margin-bottom: 2rem;
}

header h1 {
    font-family: var(--font-heading);
    font-size: 2.25rem;
    font-weight: 400;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}

.subtitle {
    font-family: var(--font-body);
    font-size: 0.8rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--text-muted);
}

/* Main Layout */
main {
    max-width: 1600px; /* Wide layout */
    margin: 0 auto;
    padding: 0 2rem 4rem;
}

.view {
    display: none;
    animation: fadeIn 0.4s ease-in-out;
}

.view.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Gallery Grid - Clean, Editorial */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 40px 20px; /* Vertical gap larger for breathing room */
}

.gallery-item {
    background: transparent;
    border: none;
    box-shadow: none;
    cursor: pointer;
    text-align: center; /* Centered text like the reference */
}

.gallery-item:hover .gallery-item-image img {
    opacity: 0.9; /* Subtle hover effect */
}

.gallery-item-image {
    background-color: #f9f9f9; /* Light gray placeholder bg */
    margin-bottom: 1rem;
    overflow: hidden;
}

.gallery-item img {
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1; /* Square format often used in luxury e-comm */
    object-fit: contain; /* Keep entire jewel visible */
    display: block;
    transition: opacity 0.3s ease;
}

.gallery-item-info {
    padding: 0 0.5rem;
}

.gallery-item-title {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 400;
    color: var(--text-main);
    margin-bottom: 0.25rem;
    line-height: 1.3;
}

.gallery-item-code {
    font-family: var(--font-body);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #999;
    margin-bottom: 0.25rem;
}

.gallery-item-price {
    font-family: var(--font-body);
    font-size: 0.9rem;
    color: var(--text-main);
    font-weight: 400;
}

/* Detail View - Product Page Style */
.back-button {
    background: transparent;
    color: var(--text-main);
    border: 1px solid var(--border-color);
    padding: 0.75rem 1.5rem;
    font-family: var(--font-body);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    cursor: pointer;
    margin-bottom: 3rem;
    transition: all 0.2s ease;
}

.back-button:hover {
    border-color: var(--primary-color);
    background: var(--primary-color);
    color: #fff;
}

.detail-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
}

.detail-image-container {
    background-color: transparent;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.detail-image-container img {
    width: 100%;
    height: auto;
    display: block;
    background-color: #fafafa; /* Placeholder bg for each image */
}

.detail-info {
    padding-top: 1rem;
    position: sticky;
    top: 2rem;
    height: fit-content;
}

.detail-header {
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 2rem;
}

.detail-title {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 400;
    line-height: 1.1;
    margin-bottom: 0.5rem;
    color: var(--text-main);
}

.detail-price {
    font-family: var(--font-body);
    font-size: 1.25rem;
    color: var(--text-main);
    margin-bottom: 1.5rem;
}

/* Fact Sheet Style */
.detail-meta {
    font-family: var(--font-body);
    font-size: 0.85rem;
    color: var(--text-muted);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 2rem;
}

.detail-meta-item {
    display: grid;
    grid-template-columns: 120px 1fr;
}

.detail-meta-label {
    color: var(--text-main);
    font-weight: 500;
    text-transform: uppercase;
    font-size: 0.7rem;
    letter-spacing: 0.05em;
}

/* Narrative Text */
.detail-content {
    margin-top: 2rem;
}

.detail-narrative p {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    line-height: 1.7;
    color: var(--text-main);
    margin-bottom: 1.5rem;
}

.detail-narrative p:first-of-type::first-letter {
    font-size: 3rem;
    float: left;
    line-height: 0.8;
    margin-right: 0.5rem;
    font-family: var(--font-heading);
}

/* Footer */
footer {
    background-color: #f5f5f5;
    color: var(--text-main);
    padding: 4rem 2rem;
    text-align: center;
    border-top: 1px solid var(--border-color);
    margin-top: 4rem;
}

footer p {
    font-size: 0.8rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

/* Responsive */
@media (max-width: 900px) {
    .detail-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .detail-title {
        font-size: 2rem;
    }
}

@media (max-width: 600px) {
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 30px 15px;
    }
    
    header {
        padding: 1.5rem 1rem;
    }
    
    header h1 {
        font-size: 1.75rem;
    }
}
