/* A provider's own page. It has its own look, led by the color they choose. */
.store {
    --store-accent: #0f5c63;
    --store-on-accent: #fff;
    --store-page: color-mix(in srgb, var(--store-accent) 5%, #fff);
    --store-ink: color-mix(in srgb, var(--store-accent) 30%, #14161a);
    --store-soft: color-mix(in srgb, var(--store-ink) 68%, #fff);
    --store-line: color-mix(in srgb, var(--store-accent) 16%, #fff);
    --store-sign: "Lalezar", "IBM Plex Sans Arabic", sans-serif;

    /* The shared product cards read these, so they take the store's colors. */
    --surface: #fff;
    --ink: var(--store-ink);
    --ink-soft: var(--store-soft);
    --line: var(--store-line);
    --link: var(--store-accent);
    --enamel: var(--store-accent);
    --focus: var(--store-accent);
    --bs-secondary-bg: color-mix(in srgb, var(--store-accent) 8%, #fff);

    background: var(--store-page);
    color: var(--store-ink);
    font-family: var(--body-font, "IBM Plex Sans Arabic", sans-serif);
    min-height: 100vh;
}

.store[data-color="brick"] { --store-accent: #a93521; }
.store[data-color="navy"] { --store-accent: #223a7a; }
.store[data-color="green"] { --store-accent: #1c6b45; }
.store[data-color="plum"] { --store-accent: #6d2a60; }
.store[data-color="coal"] { --store-accent: #2a2a2e; }

.store a { color: inherit; }

.store-wrap {
    margin-inline: auto;
    max-width: 1120px;
    padding-inline: 20px;
}

/* The sign: the provider's name, at the size of a shop front. */
.store-hero {
    background: var(--store-accent);
    color: var(--store-on-accent);
    overflow: hidden;
    position: relative;
}

.store-hero-grid {
    align-items: stretch;
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
    min-height: 460px;
}

.store-hero-text {
    align-self: center;
    padding-block: 48px;
    padding-inline-end: 40px;
}

.store-hero-brand {
    align-items: center;
    display: flex;
    gap: 14px;
    margin-block-end: 20px;
}

.store-hero-brand img,
.store-hero-initial {
    background: #fff;
    border-radius: 14px;
    height: 72px;
    object-fit: cover;
    width: 72px;
}

.store-hero-initial {
    align-items: center;
    color: var(--store-accent);
    display: flex;
    font-family: var(--store-sign);
    font-size: 2.4rem;
    justify-content: center;
}

.store-hero-job {
    font-size: 1.05rem;
    opacity: 0.9;
}

.store-name {
    font-family: var(--store-sign);
    font-size: clamp(3rem, 8vw, 6.25rem);
    font-weight: 400;
    line-height: 1.05;
    margin: 0;
    overflow-wrap: anywhere;
}

.store-hero-facts {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 20px;
    margin-block: 16px 24px;
}

.store-hero-facts span {
    align-items: center;
    display: inline-flex;
    gap: 6px;
}

.store-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.store-button {
    align-items: center;
    border: 2px solid transparent;
    border-radius: 10px;
    display: inline-flex;
    font-weight: 700;
    gap: 8px;
    justify-content: center;
    min-height: 48px;
    padding: 8px 22px;
    text-decoration: none;
}

.store-button-main {
    background: #fff;
    color: var(--store-accent) !important;
}

.store-button-line {
    border-color: currentColor;
    color: inherit;
}

.store-button:focus-visible {
    outline: 3px solid currentColor;
    outline-offset: 2px;
}

.store-hero-cover {
    margin-inline-end: calc((100vw - min(100vw, 1120px)) / -2 - 20px);
    min-height: 100%;
    position: relative;
}

.store-hero-cover img {
    height: 100%;
    inset: 0;
    object-fit: cover;
    position: absolute;
    width: 100%;
}

.store-hero-solo {
    grid-template-columns: minmax(0, 1fr);
    min-height: 380px;
}

.store-hero-empty {
    align-content: center;
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    padding-block: 40px;
}

.store-hero-empty img {
    aspect-ratio: 1;
    border-radius: 14px;
    object-fit: cover;
    width: 100%;
}

.store-section {
    padding-block: 56px 0;
}

.store-section-title {
    font-family: var(--store-sign);
    font-size: clamp(1.9rem, 4vw, 2.6rem);
    font-weight: 400;
    margin: 0 0 20px;
}

.store-about {
    font-size: 1.2rem;
    line-height: 1.8;
    margin: 0;
    max-width: 62ch;
    white-space: pre-line;
}

.store-services {
    border-block-start: 2px solid var(--store-accent);
    list-style: none;
    margin: 0;
    padding: 0;
}

.store-services a {
    align-items: center;
    border-block-end: 1px solid var(--store-line);
    display: grid;
    gap: 4px 16px;
    grid-template-columns: minmax(0, 1fr) auto auto auto;
    padding-block: 18px;
    text-decoration: none;
}

.store-services a:hover strong {
    color: var(--store-accent);
}

.store-services strong {
    font-size: 1.2rem;
}

.store-services span {
    color: var(--store-soft);
}

.store-service-price {
    color: var(--store-ink) !important;
    font-weight: 700;
}

.store-works {
    display: grid;
    gap: 12px;
    grid-auto-rows: 200px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.store-works figure {
    border-radius: 12px;
    margin: 0;
    overflow: hidden;
    position: relative;
}

.store-works figure:nth-child(5n + 1) {
    grid-column: span 2;
    grid-row: span 2;
}

.store-works img {
    height: 100%;
    object-fit: cover;
    width: 100%;
}

.store-works figcaption {
    background: linear-gradient(transparent, rgb(0 0 0 / 70%));
    bottom: 0;
    color: #fff;
    font-weight: 600;
    inset-inline: 0;
    padding: 28px 12px 10px;
    position: absolute;
}

.store-reviews {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.store-reviews blockquote {
    background: #fff;
    border-radius: 12px;
    border-inline-start: 4px solid var(--store-accent);
    margin: 0;
    padding: 16px 18px;
}

.store-reviews footer {
    color: var(--store-soft);
    font-size: 0.9rem;
    margin-block-start: 8px;
}

.store-closing {
    background: var(--store-accent);
    color: var(--store-on-accent);
    margin-block-start: 64px;
    padding-block: 48px;
}

.store-closing-grid {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: space-between;
}

.store-closing h2 {
    font-family: var(--store-sign);
    font-size: clamp(2rem, 5vw, 3.2rem);
    font-weight: 400;
    margin: 0;
}

.store-social {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-block-start: 8px;
}

.store-hero-social {
    margin-block-start: 16px;
}

.store-social a {
    font-size: 1.5rem;
}

.store-social a:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 2px;
}

.store .product-showcase h2 {
    font-family: var(--store-sign);
    font-size: clamp(1.9rem, 4vw, 2.6rem);
    font-weight: 400;
}

.store-footer {
    color: var(--store-soft);
    font-size: 0.875rem;
    padding-block: 18px;
    text-align: center;
}

/* Comes in once the hero's own buttons have scrolled away. */
.store-bar {
    background: #fff;
    border: 1px solid var(--store-line);
    border-radius: 14px;
    bottom: 20px;
    box-shadow: 0 8px 24px rgb(0 0 0 / 16%);
    display: flex;
    gap: 8px;
    inset-inline-end: 20px;
    padding: 8px;
    position: fixed;
    transform: translateY(calc(100% + 28px));
    visibility: hidden;
    z-index: 10;
}

.store.is-past-hero .store-bar {
    transform: none;
    visibility: visible;
}

.store-bar .store-button {
    background: var(--store-accent);
    color: var(--store-on-accent);
}

.store-bar .store-button-line {
    background: #fff;
    border-color: var(--store-accent);
    color: var(--store-accent);
}

.store-work-open {
    background: none;
    border: 0;
    cursor: zoom-in;
    display: block;
    height: 100%;
    padding: 0;
    width: 100%;
}

.store-works figcaption {
    pointer-events: none;
}

.store-works-all {
    background: none;
    border: 1px solid var(--store-accent);
    border-radius: 10px;
    color: var(--store-accent);
    font-weight: 700;
    margin-block-start: 16px;
    padding: 10px 18px;
}

.store-lightbox {
    align-items: center;
    background: rgb(0 0 0 / 96%);
    color: #fff;
    display: flex;
    flex-direction: column;
    gap: 12px;
    inset: 0;
    justify-content: center;
    padding: 56px 16px 20px;
    position: fixed;
    touch-action: pan-y;
    z-index: 50;
}

.store-lightbox:focus {
    outline: none;
}

body:has(.store-lightbox) {
    overflow: hidden;
}

.store-lightbox img {
    border-radius: 8px;
    max-height: calc(100vh - 150px);
    max-width: min(100%, 1000px);
    object-fit: contain;
}

.store-lightbox-caption {
    margin: 0;
    text-align: center;
}

.store-lightbox-caption span {
    color: rgb(255 255 255 / 70%);
    display: block;
    font-size: 0.875rem;
}

.store-lightbox button {
    background: rgb(255 255 255 / 14%);
    border: 0;
    border-radius: 50%;
    color: #fff;
    font-size: 1.25rem;
    height: 48px;
    position: absolute;
    width: 48px;
}

.store-lightbox button:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

.store-lightbox-close {
    inset-block-start: 10px;
    inset-inline-end: 12px;
}

.store-lightbox-previous,
.store-lightbox-next {
    inset-block-start: calc(50% - 24px);
}

.store-lightbox-previous {
    inset-inline-start: 12px;
}

.store-lightbox-next {
    inset-inline-end: 12px;
}

@media (max-width: 768px) {
    .store {
        padding-block-end: 76px;
    }

    .store-hero-grid {
        grid-template-columns: minmax(0, 1fr);
        min-height: 0;
    }

    .store-hero-text {
        padding-block: 28px;
        padding-inline-end: 0;
    }

    .store-hero-cover {
        aspect-ratio: 16 / 10;
        margin-inline: -20px;
        min-height: 0;
        order: -1;
    }

    .store-hero-empty {
        display: none;
    }

    .store-section {
        padding-block-start: 40px;
    }

    .store-services a {
        grid-template-columns: minmax(0, 1fr) auto;
    }

    .store-service-area {
        grid-column: 1;
        grid-row: 2;
    }

    .store-service-price {
        grid-column: 2;
        grid-row: 1 / span 2;
    }

    .store-service-go {
        display: none;
    }

    .store-works {
        grid-auto-rows: 150px;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .store-works figure:nth-child(5n + 1) {
        grid-column: span 2;
    }

    .store-bar {
        border-inline: 0;
        border-block-end: 0;
        border-radius: 0;
        bottom: 0;
        box-shadow: none;
        display: grid;
        grid-template-columns: 1fr 1fr;
        inset-inline: 0;
        padding: 10px 14px;
    }

    .store-lightbox-previous,
    .store-lightbox-next {
        inset-block-start: auto;
        inset-block-end: 16px;
    }
}

@media (prefers-reduced-motion: no-preference) {
    .store-services a,
    .store-works img {
        transition: transform 0.2s ease;
    }

    .store-works figure:hover img {
        transform: scale(1.04);
    }

    .store-bar {
        transition: transform 0.25s ease, visibility 0.25s;
    }

    /* The one entrance on the page: the sign goes up as the shop opens. */
    .store-hero-text > * {
        animation: store-rise 0.5s ease-out both;
    }

    .store-hero-text > :nth-child(2) { animation-delay: 80ms; }
    .store-hero-text > :nth-child(3) { animation-delay: 160ms; }
    .store-hero-text > :nth-child(4) { animation-delay: 240ms; }
    .store-hero-text > :nth-child(5) { animation-delay: 320ms; }

    .store-hero-cover img {
        animation: store-settle 0.9s ease-out both;
    }

    .store-lightbox img {
        animation: store-fade 0.2s ease-out;
    }

    @keyframes store-rise {
        from { opacity: 0; transform: translateY(14px); }
    }

    @keyframes store-settle {
        from { transform: scale(1.05); }
    }

    @keyframes store-fade {
        from { opacity: 0; }
    }
}
