/* ============================================
   GEMARIX MODAL/LIGHTBOX SYSTEM
   ============================================ */

.gx-modal-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.92);
    z-index: 9999;
    cursor: pointer;
    animation: gx-fade-in 0.25s ease-out;
}

.gx-modal-overlay.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

@keyframes gx-fade-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.gx-modal-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    cursor: default;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.gx-modal-content img {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    box-shadow: 0 25px 50px rgba(0,0,0,0.5);
    border-radius: 4px;
}

.gx-modal-caption {
    color: #fff;
    margin-top: 20px;
    font-family: 'Cormorant', Georgia, serif;
    font-size: 1.5rem;
    font-style: italic;
    text-align: center;
}

.gx-modal-subcaption {
    color: rgba(255,255,255,0.6);
    margin-top: 6px;
    font-family: 'Outfit', sans-serif;
    font-size: 0.85rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    text-align: center;
}

.gx-modal-close {
    position: absolute;
    top: 20px; right: 20px;
    width: 44px; height: 44px;
    border: none;
    background: rgba(255,255,255,0.15);
    color: white;
    font-size: 28px;
    font-weight: 300;
    cursor: pointer;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    z-index: 10000;
}

.gx-modal-close:hover {
    background: rgba(255,255,255,0.3);
}

/* Clickable card hover effect */
.gx-clickable-card {
    cursor: pointer;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    position: relative;
    overflow: hidden;
}

.gx-clickable-card::after {
    content: 'Click to view';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.7));
    color: white;
    padding: 16px 8px 8px;
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-family: 'Outfit', sans-serif;
    text-align: center;
    opacity: 0;
    transition: opacity 0.25s ease;
    pointer-events: none;
}

.gx-clickable-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 24px rgba(62,122,133,0.18);
}

.gx-clickable-card:hover::after {
    opacity: 1;
}

/* Sizes grid */
.gx-sizes-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin: 28px 0;
}

@media (max-width: 640px) {
    .gx-sizes-grid { grid-template-columns: 1fr; }
}

.gx-size-card {
    background: white;
    border: 1px solid #e8e0d0;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.gx-size-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(62,122,133,0.15);
}

.gx-size-card-image {
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: #f5f0e6;
}

.gx-size-card-image img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.gx-size-card:hover .gx-size-card-image img {
    transform: scale(1.04);
}

.gx-size-card-body {
    padding: 18px 20px;
    text-align: center;
}

.gx-size-card-title {
    font-family: 'Cormorant', Georgia, serif;
    font-size: 1.3rem;
    color: #2D5E68;
    margin: 0 0 5px;
}

.gx-size-card-dim {
    font-family: 'Outfit', sans-serif;
    font-size: 0.8rem;
    color: #777;
    letter-spacing: 0.04em;
}

/* Quarry photo gallery */
.gx-quarry-gallery {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 10px;
    margin: 24px 0 8px;
}

@media (max-width: 640px) {
    .gx-quarry-gallery { grid-template-columns: 1fr; }
}

.gx-quarry-item {
    aspect-ratio: 4 / 3;
    overflow: hidden;
    border-radius: 4px;
    cursor: pointer;
    transition: transform 0.25s ease;
}

.gx-quarry-item:hover {
    transform: scale(1.02);
}

.gx-quarry-item img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.gx-quarry-item:hover img {
    transform: scale(1.06);
}

.gx-indicative-note {
    text-align: center;
    color: #999;
    font-size: 0.72rem;
    font-style: italic;
    margin-top: 10px;
    font-family: 'Outfit', sans-serif;
}
