:root {
    --gallery-gold: #c9a455;
    --gallery-green: #0d3328;
    --gallery-cream: #fdfaf3;
}

body {
    padding-top: 0;
    background: #f7f5f0;
    color: #1f2a24;
    line-height: 1.5;
}

.container {
    width: min(92%, 1200px);
    margin: 0 auto;
}

.gallery-section {
    padding: 20px 0 52px;
}

.gallery-heading {
    margin: 0 0 12px;
    color: var(--gallery-gold);
    font: 700 clamp(25px, 4vw, 34px)/1.2 'Playfair Display', Georgia, serif;
    text-align: center;
}

.crockery-image-section {
    margin: 0 0 36px;
}

.crockery-image-section > h2,
.crockery-products-heading {
    margin: 28px 0 16px;
    color: var(--gallery-green);
    font: 700 clamp(20px, 3vw, 26px)/1.25 'Playfair Display', Georgia, serif;
    text-align: center;
}

.crockery-image-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr));
    gap: 18px;
}

.crockery-image-card {
    min-width: 0;
    padding: 10px;
    background: #fff;
    border: 1px solid rgba(201, 164, 85, .2);
    border-radius: 12px;
    box-shadow: 0 7px 20px rgba(13, 51, 40, .08);
}

.crockery-image-main {
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: var(--gallery-cream);
    border-radius: 8px;
}

.crockery-image-main img,
.crockery-image-thumbnails img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.crockery-image-card h3 {
    margin: 10px 0;
    color: var(--gallery-green);
    font: 700 15px/1.3 'Playfair Display', Georgia, serif;
    text-align: center;
}

.crockery-image-thumbnails {
    display: flex;
    justify-content: center;
    gap: 8px;
    overflow-x: auto;
    padding: 2px 2px 6px;
}

.crockery-image-thumbnails button {
    flex: 0 0 52px;
    width: 52px;
    height: 52px;
    padding: 2px;
    overflow: hidden;
    background: #fff;
    border: 1px solid rgba(201, 164, 85, .35);
    border-radius: 6px;
    cursor: pointer;
}

.crockery-image-thumbnails button.active {
    border: 2px solid var(--gallery-gold);
}

.crockery-image-thumbnails button:focus-visible {
    outline: 2px solid var(--gallery-green);
    outline-offset: 2px;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
    gap: 20px;
}

.gallery-card {
    display: flex;
    min-width: 0;
    flex-direction: column;
    overflow: hidden;
    background: #fff;
    border: 1px solid rgba(201, 164, 85, .2);
    border-radius: 12px;
    box-shadow: 0 7px 20px rgba(13, 51, 40, .08);
    transition: transform .2s ease, box-shadow .2s ease;
}

.gallery-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 26px rgba(13, 51, 40, .13);
}

.gallery-product {
    display: flex;
    flex: 1;
    flex-direction: column;
    color: inherit;
    text-decoration: none;
}

.gallery-product:focus-visible,
.gallery-actions a:focus-visible,
.gallery-actions button:focus-visible {
    outline: 2px solid var(--gallery-gold);
    outline-offset: 3px;
}

.gallery-image {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: var(--gallery-cream);
}

.gallery-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .35s ease;
}

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

.gallery-info {
    display: flex;
    flex: 1;
    flex-direction: column;
    align-items: center;
    padding: 12px 12px 8px;
    text-align: center;
}

.gallery-info .gallery-category {
    color: var(--gallery-gold);
    font-size: 11px;
    font-weight: 600;
}

.gallery-info h2 {
    margin: 4px 0 6px;
    color: var(--gallery-green);
    font: 700 16px/1.25 'Playfair Display', Georgia, serif;
}

.gallery-info p {
    margin-top: auto;
    color: var(--gallery-gold);
    font-size: 15px;
    font-weight: 700;
}

.gallery-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    padding: 8px 12px 12px;
}

.gallery-actions a,
.gallery-actions button {
    display: flex;
    min-height: 38px;
    align-items: center;
    justify-content: center;
    padding: 7px 8px;
    border: 1px solid var(--gallery-green);
    border-radius: 5px;
    font: 600 12px/1.2 Poppins, Arial, sans-serif;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
}

.gallery-actions a {
    color: var(--gallery-cream);
    background: var(--gallery-green);
}

.gallery-actions button {
    color: var(--gallery-green);
    background: #fff;
}

.gallery-actions a:hover,
.gallery-actions button:hover:not(:disabled) {
    color: var(--gallery-green);
    background: var(--gallery-gold);
    border-color: var(--gallery-gold);
}

.gallery-actions button:disabled {
    cursor: not-allowed;
    opacity: .55;
}

.gallery-message {
    grid-column: 1 / -1;
    margin: 22px 0;
    color: #666;
    text-align: center;
}

.gallery-status {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    clip-path: inset(50%);
}

@media (max-width: 600px) {
    .gallery-section {
        padding: 16px 0 36px;
    }

    .gallery-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }

    .gallery-info {
        padding: 10px 8px 6px;
    }

    .gallery-info h2 {
        font-size: 14px;
    }

    .gallery-actions {
        gap: 6px;
        padding: 6px 8px 9px;
    }

    .gallery-actions a,
    .gallery-actions button {
        min-height: 36px;
        padding: 6px 4px;
        font-size: 11px;
    }
}

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