/* Sunny's Kitchen Delights – Photo Gallery */
.skd-photo-gallery-section {
    --skd-gallery-bg: #fbf7ef;
    --skd-gallery-text: #3a2821;
    --skd-gallery-heading: #182b34;
    --skd-gallery-accent: #c98b22;
    background: var(--skd-gallery-bg);
    padding: clamp(64px, 7vw, 104px) 24px clamp(72px, 8vw, 112px);
    box-sizing: border-box;
}

.skd-photo-gallery-inner {
    width: min(1200px, 100%);
    margin: 0 auto;
}

.skd-photo-gallery-header,
.skd-photo-gallery-editor-header {
    width: min(760px, 100%);
    text-align: center;
    margin: 0 auto clamp(38px, 4vw, 52px);
}

.skd-photo-gallery-eyebrow {
    color: var(--skd-gallery-accent, #c98b22);
    font-family: "Segoe Script", "Brush Script MT", cursive;
    font-size: clamp(18px, 1.7vw, 23px);
    line-height: 1.25;
    margin: 0 0 10px;
}

.skd-photo-gallery-heading {
    color: var(--skd-gallery-heading, #182b34);
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(42px, 4vw, 62px);
    line-height: 1.06;
    font-weight: 400;
    letter-spacing: -0.025em;
    margin: 0;
}

.skd-photo-gallery-description {
    color: #6b4b3a;
    font-size: clamp(15.5px, 1.3vw, 17px);
    line-height: 1.65;
    margin: 18px auto 0;
    max-width: 680px;
}

.skd-photo-gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-auto-flow: row;
    grid-auto-rows: 220px;
    gap: 16px;
}

.skd-photo-gallery-item {
    min-width: 0;
    min-height: 0;
    margin: 0 !important;
    padding: 0 !important;
    border: 0;
    border-radius: 16px;
    overflow: hidden;
    background: #eadbc7;
    box-sizing: border-box;
}

.skd-photo-gallery-item--tall {
    grid-row: span 2;
}

.skd-photo-gallery-item .skd-photo-gallery-image {
    display: block;
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    object-fit: cover;
    object-position: center;
    border-radius: 0 !important;
    margin: 0 !important;
}

.skd-photo-gallery-empty {
    border: 1px dashed rgba(58, 40, 33, .28);
    border-radius: 14px;
    padding: 28px;
    text-align: center;
    color: #6b4b3a;
}

/* Gutenberg editor */
.skd-photo-gallery-editor-wrap {
    --skd-gallery-bg: #fbf7ef;
    --skd-gallery-text: #3a2821;
    --skd-gallery-heading: #182b34;
    --skd-gallery-accent: #c98b22;
    background: var(--skd-gallery-bg);
    padding: 34px;
    border-radius: 14px;
    box-sizing: border-box;
}

.skd-photo-gallery-editor-header [contenteditable="true"]:focus {
    outline: 1px dashed rgba(201, 139, 34, .6);
    outline-offset: 5px;
}

.skd-photo-gallery-editor-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-auto-rows: 180px;
    gap: 14px;
}

.skd-photo-gallery-editor-item {
    position: relative;
    min-width: 0;
    min-height: 0;
    margin: 0;
    border-radius: 14px;
    overflow: hidden;
    background: #eadbc7;
}

.skd-photo-gallery-editor-item--tall {
    grid-row: span 2;
}

.skd-photo-gallery-editor-item .skd-photo-gallery-image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.skd-photo-gallery-editor-number {
    position: absolute;
    top: 10px;
    left: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .92);
    color: #3a2821;
    font-size: 12px;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .08);
}

.skd-photo-gallery-editor-actions {
    position: absolute;
    left: 10px;
    right: 10px;
    bottom: 10px;
    display: flex;
    justify-content: flex-end;
    gap: 6px;
    flex-wrap: wrap;
}

.skd-photo-gallery-editor-actions .components-button {
    min-width: 34px;
    height: 34px;
    justify-content: center;
    background: rgba(255, 255, 255, .94);
    backdrop-filter: blur(4px);
}

.skd-photo-gallery-editor-empty {
    border: 1px dashed rgba(58, 40, 33, .28);
    border-radius: 16px;
    padding: 42px 24px;
    text-align: center;
    color: var(--skd-gallery-text);
}

.skd-photo-gallery-editor-empty strong {
    display: block;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 22px;
    font-weight: 400;
    margin-bottom: 8px;
}

.skd-photo-gallery-editor-empty p {
    max-width: 560px;
    margin: 0 auto 18px;
    color: #6b4b3a;
}

.skd-photo-gallery-editor-empty-icon {
    font-size: 38px;
    width: 38px;
    height: 38px;
    margin-bottom: 12px;
    color: var(--skd-gallery-accent);
}

.skd-photo-gallery-editor-footer {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.skd-photo-gallery-editor-footer .components-notice {
    flex: 1 1 420px;
    margin: 0;
}

.skd-photo-gallery-inspector-count {
    margin-top: 10px;
    color: #6b4b3a;
    font-size: 12px;
}

@media (min-width: 1200px) {
    .skd-photo-gallery-grid {
        grid-auto-rows: 220px;
    }
}

@media (max-width: 980px) {
    .skd-photo-gallery-grid,
    .skd-photo-gallery-editor-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .skd-photo-gallery-grid {
        grid-auto-rows: 210px;
    }

    .skd-photo-gallery-editor-grid {
        grid-auto-rows: 170px;
    }
}

@media (max-width: 640px) {
    .skd-photo-gallery-section {
        padding-left: 18px;
        padding-right: 18px;
    }

    .skd-photo-gallery-grid,
    .skd-photo-gallery-editor-grid {
        grid-template-columns: 1fr;
    }

    .skd-photo-gallery-grid {
        grid-auto-rows: 270px;
    }

    .skd-photo-gallery-item--tall,
    .skd-photo-gallery-editor-item--tall {
        grid-row: auto;
    }

    .skd-photo-gallery-item--tall {
        min-height: 340px;
    }

    .skd-photo-gallery-editor-grid {
        grid-auto-rows: 220px;
    }

    .skd-photo-gallery-editor-item--tall {
        min-height: 280px;
    }

    .skd-photo-gallery-editor-wrap {
        padding: 24px 16px;
    }
}
