:root {
    --ink: #171615;
    --muted: #6f6259;
    --paper: #fffaf1;
    --paper-strong: #fff3de;
    --mist: #eaf7f7;
    --blue: #82c9df;
    --blue-deep: #5aaec7;
    --coral: #ee9a78;
    --sand: #dfc09f;
    --white: #ffffff;
    --shadow: 0 18px 50px rgba(23, 22, 21, 0.11);
    --radius: 26px;
}

/* Game invitations keep the existing shop and product modal as the entry point. */
.game-invitation{position:sticky;top:0;z-index:5;display:flex;align-items:center;justify-content:space-between;gap:16px;margin:12px auto;padding:14px 18px;width:min(1180px,calc(100% - 32px));border:1px solid var(--blue-deep);border-radius:18px;background:var(--paper-strong);box-shadow:var(--shadow)}
.game-invitation h2{font-size:18px;margin:0 0 5px}.game-invitation p{font-size:14px;margin:0;line-height:1.45}.game-invitation .extras-button{flex-shrink:0}
[data-game-continue]:disabled{opacity:.55;cursor:default}.modal-card>[data-game-continue]{position:sticky;top:0;z-index:4;flex:0 0 auto;align-self:stretch;margin:8px 70px 8px 12px;min-height:44px}
.game-share-list summary{font-weight:700;cursor:pointer;min-height:44px;display:flex;align-items:center}.game-share-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.game-share-grid>div{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px;border:1px solid var(--sand);border-radius:12px}.game-share-grid strong{min-width:0}.game-share-grid button{flex-shrink:0;min-height:44px}
@media(max-width:600px){.game-invitation{position:relative;flex-direction:column;align-items:stretch;margin:10px auto;padding:12px}.game-invitation .extras-button{width:100%;text-align:center}.game-share-grid{grid-template-columns:1fr}}

* { box-sizing: border-box; }

html {
    min-height: 100%;
    background: var(--paper);
}

body {
    margin: 0;
    min-height: 100%;
    font-family: Arial, Helvetica, sans-serif;
    color: var(--ink);
    background:
        radial-gradient(circle at top left, rgba(130, 201, 223, 0.35), transparent 31rem),
        radial-gradient(circle at 94% 18%, rgba(238, 154, 120, 0.25), transparent 26rem),
        linear-gradient(180deg, var(--paper), #ffffff 52%, var(--mist));
}

body.modal-open { overflow: hidden; }

img {
    max-width: 100%;
    display: block;
}

a { color: inherit; }

.site-header {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 18px 0 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    font-weight: 800;
    letter-spacing: -0.03em;
    font-size: clamp(1.05rem, 2vw, 1.35rem);
}

.brand-mark {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    color: var(--paper);
    background: var(--ink);
    box-shadow: 8px 8px 0 rgba(130, 201, 223, 0.55);
    font-family: Georgia, serif;
    font-style: italic;
}

.language-switcher {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 8px;
}

.language-link {
    width: 58px;
    min-width: 58px;
    height: 42px;
    padding: 0;
    border: 1px solid rgba(23, 22, 21, 0.14);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.78);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 7px 18px rgba(23, 22, 21, 0.06);
}

.flag-icon {
    display: block;
    width: 32px;
    height: 24px;
    object-fit: cover;
    border-radius: 4px;
    box-shadow: inset 0 0 0 1px rgba(23, 22, 21, 0.18);
}

.language-link.active {
    background: var(--ink);
    color: var(--paper);
    border-color: var(--ink);
}

main {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

.hero {
    position: relative;
    overflow: hidden;
    margin: 14px 0 34px;
    min-height: 300px;
    padding: clamp(34px, 7vw, 72px);
    display: grid;
    grid-template-columns: minmax(0, 1fr) clamp(220px, 31vw, 380px);
    align-items: center;
    gap: clamp(18px, 4vw, 42px);
    border-radius: calc(var(--radius) + 10px);
    background:
        radial-gradient(circle at 78% 45%, rgba(130, 201, 223, 0.28) 0 9rem, transparent 9.2rem),
        radial-gradient(circle at 87% 20%, rgba(238, 154, 120, 0.18) 0 5.5rem, transparent 5.7rem),
        linear-gradient(135deg, rgba(255, 255, 255, 0.91), rgba(255, 243, 222, 0.92));
    box-shadow: var(--shadow);
    border: 1px solid rgba(23, 22, 21, 0.08);
}

.hero-copy {
    position: relative;
    z-index: 2;
    max-width: 670px;
}

.eyebrow {
    margin: 0 0 12px;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--blue-deep);
    font-size: 0.77rem;
    font-weight: 900;
}

.hero h1 {
    margin: 0;
    max-width: 760px;
    font-size: clamp(2.4rem, 7vw, 6.2rem);
    line-height: 0.92;
    letter-spacing: -0.075em;
}

.hero-subtitle {
    margin: 22px 0 0;
    max-width: 530px;
    color: var(--muted);
    font-size: clamp(1rem, 2.2vw, 1.24rem);
    line-height: 1.55;
}

.made-to-order {
    margin-top: 24px;
    max-width: 620px;
    padding: 18px 20px;
    border: 1px solid rgba(111, 159, 42, 0.28);
    border-left: 5px solid #8EBF42;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.72);
    box-shadow: 0 10px 26px rgba(23, 22, 21, 0.06);
}

.made-to-order h2 {
    margin: 0;
    color: var(--ink);
    font-size: clamp(1.05rem, 2vw, 1.32rem);
    line-height: 1.2;
}

.made-to-order p {
    margin: 8px 0 0;
    color: var(--muted);
    font-size: 0.96rem;
    line-height: 1.55;
}

.hero-art {
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-art img {
    width: min(100%, 360px);
    height: auto;
    display: block;
    filter: drop-shadow(0 18px 32px rgba(23, 22, 21, 0.14));
}

.whatsapp-contact {
    position: relative;
    overflow: hidden;
    margin: -8px 0 34px;
    padding: clamp(20px, 4vw, 30px);
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 18px;
    border: 1px solid rgba(37, 211, 102, 0.28);
    border-radius: var(--radius);
    background:
        radial-gradient(circle at 88% 10%, rgba(37, 211, 102, 0.18), transparent 14rem),
        rgba(255, 255, 255, 0.88);
    box-shadow: 0 16px 44px rgba(23, 22, 21, 0.08);
}

.whatsapp-contact-icon {
    width: clamp(58px, 8vw, 76px);
    height: clamp(58px, 8vw, 76px);
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: #25d366;
    box-shadow: 8px 8px 0 rgba(130, 201, 223, 0.32);
}

.whatsapp-contact-icon svg {
    width: 58%;
    height: 58%;
    fill: #ffffff;
}

.whatsapp-contact-copy {
    min-width: 0;
}

.whatsapp-contact-eyebrow {
    margin: 0 0 5px;
    color: #147a3d;
    font-size: 0.75rem;
    font-weight: 900;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.whatsapp-contact h2 {
    font-size: clamp(1.35rem, 3vw, 2.15rem);
}

.whatsapp-contact-copy > p:last-child {
    max-width: 720px;
    margin: 8px 0 0;
    color: var(--muted);
    line-height: 1.55;
}

.whatsapp-contact-button {
    min-height: 52px;
    padding: 0 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border-radius: 999px;
    background: #147a3d;
    color: #ffffff;
    text-decoration: none;
    font-weight: 900;
    white-space: nowrap;
    box-shadow: 7px 7px 0 rgba(37, 211, 102, 0.22);
    transition: transform 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.whatsapp-contact-button:hover,
.whatsapp-contact-button:focus-visible {
    background: #106633;
    transform: translateY(-2px);
    box-shadow: 9px 9px 0 rgba(37, 211, 102, 0.22);
}

.whatsapp-contact-button span {
    font-size: 1.2rem;
    line-height: 1;
}

.contact-section-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.contact-email-button {
    background: var(--ink);
    box-shadow: 7px 7px 0 rgba(130, 201, 223, 0.28);
}

.contact-email-button:hover,
.contact-email-button:focus-visible {
    background: #2f2d2a;
    box-shadow: 9px 9px 0 rgba(130, 201, 223, 0.28);
}

.section-title-row {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    margin-bottom: 16px;
}

h2 {
    margin: 0;
    font-size: clamp(1.6rem, 4vw, 2.65rem);
    letter-spacing: -0.055em;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 16px;
    padding-bottom: 34px;
}

.product-card {
    min-width: 0;
    display: flex;
    flex-direction: column;
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid rgba(23, 22, 21, 0.09);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 16px 42px rgba(23, 22, 21, 0.08);
    transition: transform 160ms ease, box-shadow 160ms ease;
}

.product-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 22px 54px rgba(23, 22, 21, 0.12);
}

.product-tile {
    width: 100%;
    min-height: 0;
    flex: 1 1 auto;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    text-align: left;
    cursor: pointer;
    display: grid;
}

.product-contact-actions,
.modal-contact-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 42px 42px;
    align-items: center;
    gap: 8px;
}

.product-contact-actions {
    padding: 0 10px 12px;
}

.product-contact-label {
    min-width: 0;
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 900;
}

.product-contact-button {
    width: 42px;
    min-width: 42px;
    min-height: 42px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    border-radius: 13px;
    color: #ffffff;
    text-align: center;
    text-decoration: none;
    font-size: 0.78rem;
    font-weight: 900;
    line-height: 1.15;
    transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.product-contact-button:hover,
.product-contact-button:focus-visible {
    transform: translateY(-2px);
}

.product-contact-button svg {
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
    fill: currentColor;
}

.product-contact-whatsapp {
    background: #147a3d;
    box-shadow: 4px 4px 0 rgba(37, 211, 102, 0.22);
}

.product-contact-whatsapp:hover,
.product-contact-whatsapp:focus-visible {
    background: #106633;
}

.product-contact-email {
    background: var(--ink);
    box-shadow: 4px 4px 0 rgba(130, 201, 223, 0.28);
}

.product-contact-email:hover,
.product-contact-email:focus-visible {
    background: #2f2d2a;
}

.product-image {
    position: relative;
    display: grid;
    place-items: center;
    aspect-ratio: 1;
    background:
        radial-gradient(circle at 74% 15%, rgba(238, 154, 120, 0.20), transparent 35%),
        var(--paper-strong);
    text-decoration: none;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}


/* Public catalogue photo frame. This uses the image's natural dimensions rather
   than object-fit, so portrait photos cannot be enlarged and clipped. */
.catalog-photo-frame {
    background:
        radial-gradient(circle at 74% 15%, rgba(238, 154, 120, 0.20), transparent 35%),
        var(--paper-strong);
    text-decoration: none;
}

.catalog-photo {
    display: block;
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 100%;
}

.product-photo-badge {
    position: absolute;
    right: 9px;
    bottom: 9px;
    min-width: 32px;
    height: 32px;
    padding: 0 9px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: rgba(23, 22, 21, 0.86);
    color: #fff;
    font-size: 0.82rem;
    font-weight: 900;
    box-shadow: 0 6px 18px rgba(23, 22, 21, 0.2);
}

.product-info {
    padding: 14px 15px 16px;
    display: grid;
    gap: 10px;
}

.product-info strong {
    display: block;
    font-size: 1.02rem;
    letter-spacing: -0.025em;
    line-height: 1.18;
}

.price {
    display: inline-flex;
    width: fit-content;
    gap: 7px;
    align-items: baseline;
    margin: 0;
    padding: 8px 12px;
    border-radius: 999px;
    background: var(--mist);
    color: var(--ink);
    font-weight: 900;
    line-height: 1.1;
}

.price span {
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 700;
}

.contact-price {
    background: rgba(238, 154, 120, 0.18);
}

.empty-state {
    padding: 30px;
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.7);
    border: 1px dashed rgba(23, 22, 21, 0.18);
}

.extras-strip {
    margin: 18px 0;
    padding: clamp(18px, 4vw, 30px);
    border-radius: var(--radius);
    border: 1px solid rgba(23, 22, 21, 0.09);
    box-shadow: 0 12px 36px rgba(23, 22, 21, 0.07);
    background: rgba(255, 255, 255, 0.78);
}


.extras-strip p:not(.eyebrow) {
    color: var(--muted);
    line-height: 1.55;
    margin: 12px 0 0;
}


.extras-strip {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 20px;
    align-items: center;
    background:
        radial-gradient(circle at left, rgba(130, 201, 223, 0.32), transparent 45%),
        rgba(255, 255, 255, 0.84);
}

.extras-button {
    display: inline-flex;
    min-height: 48px;
    align-items: center;
    justify-content: center;
    padding: 0 22px;
    border-radius: 999px;
    background: var(--ink);
    color: var(--paper);
    text-decoration: none;
    font-weight: 900;
    box-shadow: 8px 8px 0 rgba(238, 154, 120, 0.34);
    white-space: nowrap;
}

.site-footer {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 24px 0 42px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: var(--muted);
    font-size: 0.92rem;
}

.site-footer a {
    text-decoration: none;
    font-weight: 800;
}

.product-modal[hidden] { display: none; }

.product-modal {
    position: fixed;
    inset: 0;
    z-index: 50;
    display: grid;
    place-items: center;
    padding: 16px;
}

.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(23, 22, 21, 0.62);
    backdrop-filter: blur(6px);
}

.modal-card {
    position: relative;
    z-index: 2;
    width: min(92vw, 620px);
    max-height: 90vh;
    overflow: auto;
    border-radius: calc(var(--radius) + 8px);
    background: var(--paper);
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 28px 90px rgba(0, 0, 0, 0.34);
}

.modal-gallery {
    position: relative;
    overflow: hidden;
    background: var(--paper-strong);
    touch-action: pan-y;
}

.modal-card img {
    width: 100%;
    max-height: min(68vh, 620px);
    object-fit: contain;
    background: var(--paper-strong);
}

.modal-gallery-nav {
    position: absolute;
    z-index: 3;
    top: 50%;
    width: 48px;
    height: 48px;
    margin-top: -24px;
    border: 0;
    border-radius: 50%;
    background: rgba(23, 22, 21, 0.78);
    color: #fff;
    font: inherit;
    font-size: 2.3rem;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(23, 22, 21, 0.2);
}

.modal-gallery-nav[hidden],
.modal-gallery-counter[hidden] {
    display: none;
}

.modal-gallery-prev { left: 10px; }
.modal-gallery-next { right: 10px; }

.modal-gallery-counter {
    position: absolute;
    z-index: 3;
    left: 50%;
    bottom: 10px;
    transform: translateX(-50%);
    min-width: 54px;
    padding: 7px 11px;
    border-radius: 999px;
    background: rgba(23, 22, 21, 0.82);
    color: #fff;
    text-align: center;
    font-size: 0.82rem;
    font-weight: 900;
}

.modal-copy {
    padding: 18px;
    display: grid;
    gap: 12px;
}

.modal-copy h2 {
    font-size: clamp(1.4rem, 5vw, 2.3rem);
}

.modal-description {
    margin: 0;
    color: var(--muted);
    line-height: 1.55;
    white-space: pre-line;
}

.modal-price {
    font-size: 1.03rem;
}

.modal-close {
    position: absolute;
    z-index: 3;
    top: 10px;
    right: 10px;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 50%;
    background: var(--ink);
    color: var(--paper);
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(23, 22, 21, 0.25);
}

.admin-body {
    background: linear-gradient(180deg, var(--paper), #fff);
}

.admin-main {
    padding-bottom: 60px;
}

.admin-view-site {
    width: auto;
}

.admin-card {
    margin: 18px 0;
    padding: clamp(18px, 4vw, 28px);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(23, 22, 21, 0.10);
    box-shadow: 0 14px 42px rgba(23, 22, 21, 0.08);
}

.bulk-upload-card {
    border-color: rgba(90, 174, 199, 0.28);
    background: linear-gradient(135deg, rgba(234, 247, 247, 0.88), rgba(255, 255, 255, 0.92));
}

.bulk-upload-card p {
    margin: 8px 0 18px;
    color: var(--muted);
    line-height: 1.5;
}

.login-card {
    max-width: 430px;
    margin: 52px auto;
}

.admin-top-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 16px;
    margin-top: 22px;
}

.admin-top-row h1,
.admin-card h1,
.admin-card h2 {
    margin: 0;
    letter-spacing: -0.055em;
}

.admin-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.admin-form {
    display: grid;
    gap: 16px;
}

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

label {
    display: grid;
    gap: 7px;
    color: var(--muted);
    font-size: 0.86rem;
    font-weight: 800;
}

.field-help {
    display: block;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--blue-deep);
    margin-top: 2px;
}

input[type="text"],
input[type="number"],
input[type="password"],
input[type="file"],
textarea {
    width: 100%;
    border: 1px solid rgba(23, 22, 21, 0.16);
    border-radius: 14px;
    padding: 12px 13px;
    background: #fff;
    color: var(--ink);
    font: inherit;
}

input[type="file"] {
    padding: 10px;
}

textarea {
    min-height: 104px;
    resize: vertical;
    line-height: 1.45;
}

.description-field {
    align-self: stretch;
}

.checkbox-label {
    display: flex;
    flex-direction: row;
    gap: 9px;
    align-items: center;
    align-self: end;
    min-height: 45px;
}

.primary-button,
.secondary-button,
.danger-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 18px;
    border: 0;
    border-radius: 999px;
    font: inherit;
    font-weight: 900;
    text-decoration: none;
    cursor: pointer;
}

.primary-button {
    width: fit-content;
    background: var(--ink);
    color: var(--paper);
}

.secondary-button {
    background: var(--mist);
    color: var(--ink);
}

.danger-button {
    background: #ffe4dd;
    color: #7d1f0f;
}

.small {
    min-height: 36px;
    padding: 0 13px;
    font-size: 0.86rem;
}

.message {
    margin: 14px 0;
    padding: 13px 15px;
    border-radius: 14px;
    font-weight: 800;
}

.message.success {
    background: #e8f7ef;
    color: #17572f;
}

.message.error {
    background: #ffe9e4;
    color: #7d1f0f;
}

.current-images-block {
    display: grid;
    gap: 9px;
}

.current-images-title {
    color: var(--muted);
    font-weight: 900;
}

.current-images-grid {
    display: flex;
    gap: 9px;
    overflow-x: auto;
    padding: 2px 2px 7px;
    scroll-snap-type: x proximity;
}

.current-image-item {
    position: relative;
    flex: 0 0 82px;
    scroll-snap-align: start;
}

.current-image-item img {
    width: 82px;
    height: 82px;
    border-radius: 18px;
    object-fit: cover;
    background: var(--paper-strong);
}

.current-image-item .main-photo-badge {
    position: absolute;
    left: 6px;
    bottom: 6px;
    padding: 4px 7px;
    border-radius: 999px;
    background: rgba(23, 22, 21, 0.82);
    color: #fff;
    font-size: 0.68rem;
    font-weight: 900;
}

.delete-photo-button {
    position: absolute;
    top: -7px;
    right: -7px;
    width: 30px;
    height: 30px;
    padding: 0;
    border: 2px solid #fff;
    border-radius: 50%;
    background: #b42318;
    color: #fff;
    font: 900 1.25rem/1 Arial, Helvetica, sans-serif;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 5px 14px rgba(23, 22, 21, 0.25);
}

.delete-photo-button:active {
    transform: scale(0.94);
}

.edit-button-row {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.delete-edit-form {
    margin-top: 12px;
    padding-top: 14px;
    border-top: 1px solid rgba(23, 22, 21, 0.09);
}

.delete-product-button {
    min-height: 40px;
}

.merge-heading-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
}

.merge-help {
    max-width: 760px;
    margin: 10px 0 0;
    color: var(--muted);
    line-height: 1.55;
}

.merge-target-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 10px;
    margin-top: 18px;
}

.merge-target-form {
    margin: 0;
}

.merge-target-button {
    width: 100%;
    min-height: 76px;
    padding: 8px;
    display: grid;
    grid-template-columns: 60px minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    border: 1px solid rgba(23, 22, 21, 0.12);
    border-radius: 16px;
    background: #fff;
    color: var(--ink);
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.merge-target-button:hover,
.merge-target-button:focus-visible {
    border-color: var(--blue-deep);
    box-shadow: 0 8px 24px rgba(23, 22, 21, 0.09);
}

.merge-target-button img {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    object-fit: cover;
    background: var(--paper-strong);
}

.merge-target-copy {
    min-width: 0;
    display: grid;
    gap: 4px;
}

.merge-target-copy strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.merge-target-copy span {
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 800;
}

.admin-product-name-text {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
}

.admin-product-id {
    display: block;
    margin-top: 1px;
    color: var(--muted);
    font-size: 0.68rem;
    font-weight: 800;
}

.admin-product-row-actions {
    display: flex;
    gap: 7px;
    align-items: center;
    margin-top: 2px;
    font-size: 0.64rem;
    font-weight: 900;
}

.photo-count {
    color: var(--muted);
}

.merge-inline-button {
    color: var(--blue-deep);
    text-decoration: none;
}

.merge-inline-button:hover,
.merge-inline-button:focus-visible {
    text-decoration: underline;
}

.product-list-card {
    padding: clamp(12px, 3vw, 22px);
}

.admin-table-wrap {
    overflow-x: visible;
    max-width: 100%;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 0;
}

.admin-products-table {
    table-layout: fixed;
    margin-bottom: 0;
    font-size: 0.82rem;
    --bs-table-bg: transparent;
    --bs-table-hover-bg: rgba(234, 247, 247, 0.72);
    --bs-table-border-color: rgba(23, 22, 21, 0.09);
}

.admin-products-table .col-product-image { width: 42px; }
.admin-products-table .col-product-name { width: auto; }
.admin-products-table .col-product-price { width: 78px; }
.admin-products-table .col-product-order { width: 42px; }
.admin-products-table .col-product-status { width: 30px; }

.admin-table th,
.admin-table td {
    padding: 6px 4px;
    text-align: left;
    border-bottom: 1px solid rgba(23, 22, 21, 0.09);
    vertical-align: middle;
    white-space: nowrap;
}

.admin-table th {
    color: var(--muted);
    font-size: 0.62rem;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    font-weight: 900;
}

.admin-table .image-heading {
    letter-spacing: 0;
}

.clickable-product-row {
    cursor: pointer;
}

.clickable-product-row:focus {
    outline: 2px solid var(--blue-deep);
    outline-offset: -2px;
}

.admin-product-name {
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 800;
    max-width: 1px;
}

.admin-price-cell,
.admin-order-cell,
.admin-status-cell {
    font-size: 0.75rem;
    font-weight: 900;
}

.admin-price-cell {
    text-align: right;
}

.admin-order-cell,
.admin-status-cell {
    color: var(--muted);
}

.table-thumb {
    width: 32px;
    height: 32px;
    object-fit: cover;
    background: var(--paper-strong);
    border-radius: 8px;
}

.status-tick {
    display: inline-grid;
    place-items: center;
    width: 20px;
    height: 20px;
    border-radius: 999px;
    background: #e8f7ef;
    color: #17572f;
    font-size: 0.82rem;
    font-weight: 900;
}

.status-empty {
    color: #b28a78;
    font-size: 0.9rem;
    font-weight: 900;
}

.admin-table-help {
    margin: 10px 0 0;
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 800;
}

.visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

@media (max-width: 760px) {
    .site-header,
    .admin-top-row,
    .site-footer,
    .extras-strip,
    .whatsapp-contact {
        align-items: stretch;
        grid-template-columns: 1fr;
        flex-direction: column;
    }

    .site-header {
        width: min(100% - 22px, 1180px);
        gap: 12px;
    }

    main,
    .site-footer {
        width: min(100% - 22px, 1180px);
    }

    .language-switcher {
        justify-content: flex-start;
        gap: 6px;
    }

    .language-link {
        flex: 0 0 52px;
        width: 52px;
        min-width: 52px;
        height: 40px;
    }

    .flag-icon {
        width: 30px;
        height: 23px;
    }

    .hero {
        min-height: 250px;
        padding: 30px 22px;
        margin-top: 8px;
    }

    .hero-art img {
        width: min(100%, 300px);
    }

    .whatsapp-contact {
        margin-top: -12px;
        gap: 14px;
    }

    .whatsapp-contact-icon {
        width: 58px;
        height: 58px;
    }

    .whatsapp-contact-button {
        width: 100%;
    }

    .product-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
        padding-bottom: 18px;
    }

    .product-card {
        border-radius: 18px;
    }

    .product-info {
        padding: 10px;
        gap: 8px;
    }

    .product-info strong {
        font-size: 0.9rem;
    }

    .price {
        max-width: 100%;
        padding: 7px 9px;
        font-size: 0.82rem;
        flex-wrap: wrap;
        border-radius: 14px;
    }


    .extras-button,
    .secondary-button,
    .primary-button {
        width: 100%;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .admin-actions {
        width: 100%;
    }


    .merge-heading-row {
        align-items: stretch;
        flex-direction: column;
    }

    .merge-target-grid {
        grid-template-columns: 1fr;
    }

    .modal-card {
        width: 96vw;
        max-height: 92vh;
    }

    .modal-gallery-nav {
        width: 46px;
        height: 46px;
        margin-top: -23px;
    }
}

@media (max-width: 640px) {
    .admin-card {
        border-radius: 18px;
    }

    .product-list-card {
        padding: 10px 7px;
    }

    .admin-products-table {
        font-size: 0.74rem;
    }

    .admin-products-table .col-product-image { width: 34px; }
    .admin-products-table .col-product-price { width: 64px; }
    .admin-products-table .col-product-order { width: 34px; }
    .admin-products-table .col-product-status { width: 24px; }

    .admin-table th,
    .admin-table td {
        padding: 4px 3px;
    }

    .admin-table th {
        font-size: 0.55rem;
    }

    .table-thumb {
        width: 28px;
        height: 28px;
        border-radius: 7px;
    }

    .admin-price-cell,
    .admin-order-cell,
    .admin-status-cell {
        font-size: 0.66rem;
    }

    .status-tick {
        width: 18px;
        height: 18px;
        font-size: 0.75rem;
    }
}

@media (max-width: 390px) {
    .language-link {
        width: 48px;
        min-width: 48px;
    }

    .hero h1 {
        font-size: 2.15rem;
    }

    .product-grid {
        gap: 8px;
    }

    .product-info strong {
        font-size: 0.84rem;
    }

    .product-list-card {
        padding-left: 5px;
        padding-right: 5px;
    }

    .admin-products-table .col-product-image { width: 31px; }
    .admin-products-table .col-product-price { width: 60px; }
    .admin-products-table .col-product-order { width: 30px; }
    .admin-products-table .col-product-status { width: 22px; }

    .admin-table th,
    .admin-table td {
        padding-left: 2px;
        padding-right: 2px;
    }

}

/* Compact admin editing controls and photo selection. */
.admin-body .admin-price-cell {
    text-align: right;
}

.admin-body .admin-product-meta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.admin-body .photo-preview-trigger {
    display: block;
    width: 100%;
    padding: 0;
    border: 0;
    border-radius: 18px;
    background: transparent;
    cursor: zoom-in;
}

.admin-body .photo-preview-trigger img {
    width: 100%;
    height: auto;
    aspect-ratio: 1;
    object-fit: contain;
}

.admin-body .main-photo-toggle {
    position: absolute;
    z-index: 2;
    top: 7px;
    left: 7px;
    width: 30px;
    height: 30px;
    padding: 0;
    display: grid;
    place-items: center;
    border: 2px solid rgba(255, 255, 255, 0.95);
    border-radius: 50%;
    background: #9c9c9c;
    color: #fff;
    font: 900 1rem/1 Arial, sans-serif;
    cursor: pointer;
    box-shadow: 0 3px 12px rgba(23, 22, 21, 0.25);
}

.admin-body .main-photo-toggle.is-main {
    background: #25a85a;
    opacity: 1;
    cursor: default;
}

.admin-body .delete-photo-button {
    z-index: 2;
}

.admin-body .main-photo-badge,
.admin-body .make-main-photo-button {
    display: none;
}

.admin-body .autosave-status {
    align-self: center;
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 800;
}

.admin-body .delete-edit-form {
    display: flex;
    justify-content: center;
}

.admin-body .admin-photo-modal {
    position: fixed;
    z-index: 1000;
    inset: 0;
    padding: 20px;
    display: grid;
    place-items: center;
    background: rgba(16, 15, 14, 0.9);
}

.admin-body .admin-photo-modal[hidden] {
    display: none;
}

.admin-body .admin-photo-modal img {
    max-width: min(1100px, calc(100vw - 40px));
    max-height: calc(100dvh - 40px);
    object-fit: contain;
}

.admin-body .admin-photo-modal-close {
    position: fixed;
    z-index: 2;
    top: 14px;
    right: 14px;
    width: 48px;
    height: 48px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #fff;
    color: var(--ink);
    font: 400 2rem/1 Arial, sans-serif;
    cursor: pointer;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.3);
}

@media (max-width: 680px) {
    .admin-body .admin-products-table tr {
        grid-template-columns: 64px minmax(0, 1fr);
    }

    .admin-body .admin-price-cell {
        grid-column: 2;
        justify-content: flex-start;
        margin-top: 5px;
    }

    .admin-body .current-image-item {
        flex-basis: 104px;
    }

    .admin-body .current-image-item img {
        width: 104px;
        height: 104px;
    }

    .admin-body .edit-button-row {
        align-items: center;
    }
}

/* Keep photo actions small after all legacy admin-mode rules. */
.admin-body .current-image-item,
html[data-admin-mode="phone"] .current-image-item {
    flex: 0 0 124px;
}

.admin-body .photo-preview-trigger img,
.admin-body .current-image-item img,
html[data-admin-mode="phone"] .current-image-item img,
html[data-admin-mode="desktop"] .current-image-item img {
    width: 124px;
    height: 124px;
    aspect-ratio: 1;
    border-radius: 14px;
    object-fit: contain;
}

.admin-body .main-photo-toggle {
    top: 5px;
    left: 5px;
    width: 22px;
    height: 22px;
    border-width: 1px;
    font-size: 0.72rem;
}

.admin-body .delete-photo-button,
html[data-admin-mode="desktop"] .delete-photo-button {
    top: 5px;
    right: 5px;
    width: 22px;
    height: 22px;
    font-size: 1rem;
}

/* Final compact admin header, edit row, and unobtrusive photo controls. */
.admin-body .admin-header {
    flex-direction: row;
    align-items: center;
}

.admin-body .admin-header-logout {
    width: auto;
    min-height: 38px;
    padding: 0 15px;
}

.admin-body .admin-top-row-simple {
    margin-top: 10px;
    justify-content: flex-end;
}

.admin-body .admin-top-row-simple .admin-actions {
    width: auto;
}

.admin-body .price-visibility-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 12px;
}

.admin-body .price-visibility-row > label:first-child {
    min-width: 0;
}

.admin-body .price-visibility-row .checkbox-label {
    min-height: 48px;
    padding: 0 4px 0 0;
    align-items: center;
    white-space: nowrap;
}

.admin-body .current-images-grid {
    gap: 14px;
}

.admin-body .current-image-item,
html[data-admin-mode="phone"] .current-image-item {
    flex: 0 0 124px;
}

.admin-body .photo-preview-trigger img,
.admin-body .current-image-item img,
html[data-admin-mode="phone"] .current-image-item img {
    width: 124px;
    height: 124px;
    border-radius: 14px;
}

.admin-body .main-photo-toggle {
    top: 5px;
    left: 5px;
    width: 22px;
    height: 22px;
    border-width: 1px;
    font-size: 0.72rem;
    box-shadow: 0 2px 7px rgba(23, 22, 21, 0.22);
}

.admin-body .delete-photo-button,
html[data-admin-mode="desktop"] .delete-photo-button {
    top: 5px;
    right: 5px;
    width: 22px;
    height: 22px;
    border: 1px solid rgba(255, 255, 255, 0.9);
    background: rgba(112, 35, 27, 0.84);
    font-size: 1rem;
    box-shadow: 0 2px 7px rgba(23, 22, 21, 0.22);
}

@media (max-width: 680px) {
    .admin-body .site-header {
        padding-block: 10px;
        gap: 10px;
    }

    .admin-body .admin-header-logout {
        margin-left: auto;
    }

    .admin-body .admin-top-row-simple,
    .admin-body .admin-top-row-simple .admin-actions,
    .admin-body .admin-top-row-simple .secondary-button {
        width: 100%;
    }

    .admin-body .price-visibility-row {
        grid-template-columns: minmax(0, 1fr) auto;
    }

    .admin-body .price-visibility-row .checkbox-label {
        font-size: 0.9rem;
    }
}

.brand-mark-image {
    overflow: hidden;
    padding: 0;
    background: transparent;
    box-shadow: none;
}

.brand-mark-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

/* Admin display mode switch. Phone mode preserves the existing compact layout. */
.admin-mode-switch {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px;
    border: 1px solid rgba(23, 22, 21, 0.12);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.78);
}

.admin-mode-button {
    min-height: 38px;
    padding: 8px 13px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--muted);
    font: inherit;
    font-size: 0.78rem;
    font-weight: 900;
    cursor: pointer;
}

.admin-mode-button[aria-pressed="true"] {
    background: var(--ink);
    color: var(--white);
    box-shadow: 0 5px 14px rgba(23, 22, 21, 0.16);
}

html[data-admin-mode="desktop"] .admin-header,
html[data-admin-mode="desktop"] .admin-main {
    width: min(1500px, calc(100% - 48px));
}

html[data-admin-mode="desktop"] .admin-card {
    padding: clamp(24px, 3vw, 38px);
}

html[data-admin-mode="desktop"] .form-grid {
    grid-template-columns: repeat(3, minmax(220px, 1fr));
    gap: 18px 22px;
}

html[data-admin-mode="desktop"] .current-images-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 18px;
    overflow: visible;
}

html[data-admin-mode="desktop"] .current-image-item {
    flex: none;
    min-width: 0;
}

html[data-admin-mode="desktop"] .current-image-item img {
    width: 100%;
    height: auto;
    aspect-ratio: 1;
    border-radius: 22px;
    object-fit: contain;
}

html[data-admin-mode="desktop"] .current-image-item .main-photo-badge {
    left: 10px;
    bottom: 10px;
    padding: 6px 10px;
    font-size: 0.78rem;
}

html[data-admin-mode="desktop"] .delete-photo-button {
    top: -10px;
    right: -10px;
    width: 38px;
    height: 38px;
    font-size: 1.5rem;
}

html[data-admin-mode="desktop"] .merge-target-grid {
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 16px;
}

html[data-admin-mode="desktop"] .merge-target-button {
    min-height: 126px;
    grid-template-columns: 108px minmax(0, 1fr);
    gap: 16px;
    padding: 10px;
}

html[data-admin-mode="desktop"] .merge-target-button img {
    width: 108px;
    height: 108px;
    border-radius: 18px;
    object-fit: contain;
}

html[data-admin-mode="desktop"] .admin-products-table {
    font-size: 0.95rem;
}

html[data-admin-mode="desktop"] .admin-products-table .col-product-image { width: 112px; }
html[data-admin-mode="desktop"] .admin-products-table .col-product-price { width: 110px; }
html[data-admin-mode="desktop"] .admin-products-table .col-product-order { width: 80px; }
html[data-admin-mode="desktop"] .admin-products-table .col-product-status { width: 70px; }

html[data-admin-mode="desktop"] .admin-table th,
html[data-admin-mode="desktop"] .admin-table td {
    padding: 10px 8px;
}

html[data-admin-mode="desktop"] .table-thumb {
    width: 96px;
    height: 96px;
    border-radius: 16px;
    object-fit: contain;
}

html[data-admin-mode="desktop"] .admin-product-name-text {
    font-size: 1rem;
}

html[data-admin-mode="desktop"] .admin-product-id,
html[data-admin-mode="desktop"] .admin-product-row-actions {
    font-size: 0.78rem;
}

/* Explicit phone mode keeps the current compact phone layout even on a wide screen. */
html[data-admin-mode="phone"] .admin-header,
html[data-admin-mode="phone"] .admin-main {
    width: min(760px, calc(100% - 22px));
}

html[data-admin-mode="phone"] .form-grid,
html[data-admin-mode="phone"] .merge-target-grid {
    grid-template-columns: 1fr;
}

html[data-admin-mode="phone"] .current-images-grid {
    display: flex;
    gap: 9px;
    overflow-x: auto;
}

html[data-admin-mode="phone"] .current-image-item {
    flex: 0 0 82px;
}

html[data-admin-mode="phone"] .current-image-item img {
    width: 82px;
    height: 82px;
    object-fit: cover;
}

html[data-admin-mode="phone"] .admin-mode-switch {
    width: 100%;
}

html[data-admin-mode="phone"] .admin-mode-button {
    flex: 1 1 50%;
}

@media (max-width: 760px) {
    .admin-mode-switch {
        width: 100%;
    }

    .admin-mode-button {
        flex: 1 1 50%;
    }

    html[data-admin-mode="desktop"] .admin-header,
    html[data-admin-mode="desktop"] .admin-main {
        width: min(100% - 22px, 1500px);
    }

    html[data-admin-mode="desktop"] .form-grid {
        grid-template-columns: 1fr;
    }

    html[data-admin-mode="desktop"] .current-images-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }

    html[data-admin-mode="desktop"] .admin-products-table .col-product-image { width: 70px; }
    html[data-admin-mode="desktop"] .table-thumb {
        width: 58px;
        height: 58px;
    }
}


/* Customer catalogue layout. Keep this separate from all admin display-mode rules. */
.shop-body .product-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
}

.shop-body .product-card {
    min-width: 0;
}

.shop-body .product-tile {
    overflow: hidden;
}

.shop-body .product-image {
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
}

.shop-body .product-image > img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Guard against an older cached/legacy inline product gallery being displayed in the grid. */
.shop-body .product-card .product-image > img ~ img,
.shop-body .product-card .product-gallery-nav,
.shop-body .product-card .product-gallery-counter,
.shop-body .product-card .gallery-nav,
.shop-body .product-card .gallery-counter,
.shop-body .product-card .image-nav,
.shop-body .product-card .image-counter {
    display: none !important;
}

@media (max-width: 900px) {
    .shop-body .product-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 14px;
    }
}

@media (max-width: 640px) {
    .shop-body .product-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .shop-body .product-image {
        aspect-ratio: 1 / 1;
    }

    .shop-body .product-info {
        padding: 10px;
    }
}

.admin-inline-form {
    display: flex;
    margin: 0;
}

@media (max-width: 760px) {
    .admin-inline-form {
        width: 100%;
    }
}

/* Product viewer: use the same natural stacked layout on desktop and phone. */
.shop-body .product-modal {
    padding: 18px;
}

.shop-body .modal-card {
    width: min(820px, calc(100vw - 36px));
    height: auto;
    max-height: calc(100dvh - 36px);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.shop-body .modal-gallery {
    flex: 0 0 auto;
    width: 100%;
    min-width: 0;
    min-height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.shop-body .modal-card img {
    display: block;
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 62dvh;
    object-fit: contain;
}

.shop-body .modal-copy {
    flex: 0 0 auto;
    min-width: 0;
    min-height: 0;
    overflow: visible;
    align-content: start;
    padding: clamp(24px, 3vw, 42px);
    gap: 18px;
}

.shop-body .modal-copy h2 {
    font-size: clamp(1.65rem, 2.7vw, 2.75rem);
    line-height: 1.08;
}

.shop-body .modal-description {
    font-size: clamp(1rem, 1.35vw, 1.18rem);
    line-height: 1.55;
}

.shop-body .modal-price {
    margin-top: 4px;
    width: fit-content;
}

.shop-body .modal-contact-actions {
    margin-top: 4px;
    grid-template-columns: minmax(0, 1fr) 48px 48px;
}

.shop-body .modal-contact-actions .product-contact-button {
    width: 48px;
    min-width: 48px;
    min-height: 48px;
}

@media (max-width: 760px) {
    .shop-body .product-modal {
        padding: 6px;
        align-items: center;
    }

    .shop-body .modal-card {
        width: calc(100vw - 12px);
        height: calc(100dvh - 12px);
        border-radius: 26px;
        grid-template-columns: minmax(0, 1fr);
        grid-template-rows: minmax(0, 58%) minmax(0, 42%);
    }

    .shop-body .modal-copy {
        padding: 20px 22px 24px;
        gap: 12px;
    }

    .shop-body .modal-copy h2 {
        font-size: clamp(1.35rem, 6.2vw, 1.9rem);
        line-height: 1.12;
    }

    .shop-body .modal-description {
        font-size: clamp(0.98rem, 4.4vw, 1.12rem);
        line-height: 1.45;
    }

    .shop-body .modal-gallery-nav {
        width: 50px;
        height: 50px;
        margin-top: -25px;
    }

    .shop-body .modal-close {
        top: 12px;
        right: 12px;
        width: 48px;
        height: 48px;
    }

    .shop-body .whatsapp-contact .contact-section-actions {
        grid-column: 1 / -1;
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        width: 100%;
    }

    .shop-body .whatsapp-contact .whatsapp-contact-button {
        width: 100%;
    }
}

@media (max-width: 420px), (max-height: 700px) {
    .shop-body .modal-card {
        grid-template-rows: minmax(0, 54%) minmax(0, 46%);
    }

    .shop-body .modal-copy {
        padding: 16px 18px 20px;
        gap: 9px;
    }

    .shop-body .modal-copy h2 {
        font-size: clamp(1.22rem, 5.8vw, 1.65rem);
    }

    .shop-body .modal-description {
        font-size: clamp(0.92rem, 4.1vw, 1.02rem);
        line-height: 1.4;
    }

}

/* Product photo actions: choose any existing photo as the product's main image. */
.make-main-photo-button {
    position: absolute;
    left: 5px;
    bottom: 5px;
    max-width: calc(100% - 10px);
    min-height: 28px;
    padding: 5px 8px;
    border: 1px solid rgba(255, 255, 255, 0.92);
    border-radius: 999px;
    background: rgba(111, 159, 42, 0.94);
    color: #fff;
    font: 900 0.66rem/1.05 "Segoe UI", Arial, sans-serif;
    white-space: nowrap;
    cursor: pointer;
    box-shadow: 0 5px 14px rgba(23, 22, 21, 0.22);
}

.make-main-photo-button:active {
    transform: scale(0.96);
}

html[data-admin-mode="desktop"] .make-main-photo-button {
    left: 10px;
    bottom: 10px;
    min-height: 34px;
    padding: 7px 11px;
    font-size: 0.78rem;
}
/* 2026 phone-first catalogue and simplified admin */
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.catalog-count { margin: .2rem 0 0; color: var(--muted, #667085); font-size: .9rem; }
.catalog-search { display: flex; align-items: center; gap: .45rem; width: min(280px, 100%); padding: .3rem .75rem; border: 1px solid rgba(20, 90, 80, .2); border-radius: 999px; background: #fff; }
.catalog-search input { min-width: 0; width: 100%; border: 0; outline: 0; padding: .45rem 0; background: transparent; font: inherit; }
.product-card[hidden] { display: none !important; }
.admin-disclosure { margin-top: 1rem; border: 1px solid rgba(20, 90, 80, .18); border-radius: 16px; background: rgba(255,255,255,.55); }
.admin-disclosure > summary, .admin-tools-card > summary { cursor: pointer; padding: 1rem; font-weight: 800; list-style-position: inside; }
.disclosure-grid, .admin-tools-content { padding: 0 1rem 1rem; }
.admin-tools-card { padding: 0 !important; overflow: hidden; }
.admin-tools-content h2 { margin-top: .5rem; }
.admin-tools-content hr { margin: 1.5rem 0; border: 0; border-top: 1px solid rgba(20, 90, 80, .15); }
@media (max-width: 680px) {
    .shop-body .site-header { position: sticky; top: 0; z-index: 30; backdrop-filter: blur(14px); background: rgba(255,255,255,.9); }
    .shop-body .hero { padding-block: 1.25rem; }
    .shop-body .hero-art { justify-content: center; }
    .section-title-row { align-items: stretch; flex-direction: column; gap: .75rem; }
    .catalog-search { width: 100%; box-sizing: border-box; border-radius: 14px; }
    .catalog-search input { min-height: 36px; font-size: 16px; }
    .shop-body .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; }
    .shop-body .product-info { padding: .7rem; }
    .shop-body .product-info strong { font-size: .95rem; }
    .shop-body .modal-card { max-height: 92dvh; border-radius: 24px 24px 0 0; }
    .shop-body .product-modal { align-items: end; }
    .admin-actions { display: grid; grid-template-columns: 1fr 1fr; width: 100%; }
    .admin-actions .secondary-button:first-child { grid-column: 1 / -1; }
    .admin-actions .secondary-button { justify-content: center; min-height: 46px; }
    .admin-main { padding-inline: .65rem; }
    .admin-card { border-radius: 18px; }
    .product-form .primary-button { position: sticky; bottom: .65rem; z-index: 15; width: 100%; min-height: 52px; box-shadow: 0 8px 28px rgba(15, 118, 110, .3); }
    .edit-button-row { align-items: stretch; flex-direction: column; }
    .admin-products-table thead, .admin-products-table .admin-order-cell, .admin-products-table .admin-status-cell, .admin-products-table .col-product-order, .admin-products-table .col-product-status { display: none; }
    .admin-products-table, .admin-products-table tbody, .admin-products-table tr { display: block; width: 100%; }
    .admin-products-table tr { margin-bottom: .65rem; border: 1px solid rgba(20,90,80,.14); border-radius: 14px; background: #fff; overflow: hidden; }
    .admin-products-table td { border: 0; }
    .admin-products-table .table-thumb { width: 64px; height: 64px; border-radius: 10px; }
}

/* Compact public shop landing area on phones. Admin layout is intentionally excluded. */
@media (max-width: 680px) {
    .shop-body .site-header {
        width: min(100% - 22px, 1180px);
        min-height: 58px;
        padding: 7px 0;
        flex-direction: row;
        align-items: center;
        gap: 8px;
    }

    .shop-body .brand {
        min-width: 0;
        gap: 8px;
        font-size: 0.98rem;
        white-space: nowrap;
    }

    .shop-body .brand-mark {
        width: 36px;
        height: 36px;
        flex: 0 0 36px;
    }

    .shop-body .language-switcher {
        flex-wrap: nowrap;
        justify-content: flex-end;
        gap: 4px;
    }

    .shop-body .language-link {
        width: 38px;
        min-width: 38px;
        height: 34px;
    }

    .shop-body .flag-icon {
        width: 24px;
        height: 18px;
    }

    .shop-body .hero {
        min-height: 0;
        margin: 7px 0 14px;
        padding: 18px 18px 19px;
        border-radius: 24px;
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .shop-body .hero .eyebrow {
        margin-bottom: 7px;
        font-size: 0.68rem;
    }

    .shop-body .hero h1 {
        font-size: clamp(2rem, 10vw, 2.75rem);
        line-height: 0.96;
    }

    .shop-body .hero-subtitle {
        margin-top: 10px;
        font-size: 0.92rem;
        line-height: 1.38;
    }

    .shop-body .made-to-order {
        margin-top: 14px;
        padding: 14px 15px;
        border-radius: 14px;
    }

    .shop-body .made-to-order h2 {
        font-size: 1.05rem;
    }

    .shop-body .made-to-order p {
        margin-top: 6px;
        font-size: 0.88rem;
        line-height: 1.45;
    }

    .shop-body .hero-art {
        order: -1;
    }

    .shop-body .hero-art img {
        width: min(100%, 250px);
        margin: 0 auto;
    }

    .shop-body .whatsapp-contact {
        margin: 0 0 16px;
        padding: 10px;
        grid-template-columns: 40px minmax(0, 1fr) auto;
        align-items: center;
        gap: 9px;
        border-radius: 18px;
    }

    .shop-body .whatsapp-contact-icon {
        width: 40px;
        height: 40px;
        box-shadow: 4px 4px 0 rgba(130, 201, 223, 0.32);
    }

    .shop-body .whatsapp-contact-eyebrow,
    .shop-body .whatsapp-contact-copy > p:last-child {
        display: none;
    }

    .shop-body .whatsapp-contact h2 {
        font-size: 1rem;
        line-height: 1.12;
        letter-spacing: -0.035em;
    }

    .shop-body .whatsapp-contact-button {
        width: auto;
        min-height: 38px;
        padding: 0 11px;
        gap: 5px;
        font-size: 0.76rem;
        box-shadow: 4px 4px 0 rgba(37, 211, 102, 0.22);
    }

    .shop-body .section-title-row {
        margin-bottom: 10px;
        gap: 8px;
    }

    .shop-body .section-title-row h2 {
        font-size: 1.45rem;
    }

    .shop-body .catalog-count {
        font-size: 0.8rem;
    }

    .shop-body .catalog-search {
        padding-block: 0.12rem;
    }

    .shop-body .catalog-search input {
        min-height: 32px;
    }
}

@media (max-width: 380px) {
    .shop-body .brand > span:last-child {
        display: none;
    }
}

/* Admin product list: stable table on desktop and clean product cards on phones. */
.admin-body .product-list-card > h2 {
    margin-bottom: 14px;
}

.admin-body .admin-table-wrap {
    overflow: hidden;
    border: 1px solid rgba(23, 22, 21, 0.09);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.72);
}

.admin-body .admin-products-table {
    margin: 0;
}

.admin-body .admin-products-table tbody tr:last-child td {
    border-bottom: 0;
}

.admin-body .clickable-product-row:hover {
    background: rgba(234, 247, 247, 0.72);
}

.admin-body .admin-product-name {
    max-width: none;
}

html[data-admin-mode="desktop"] .admin-products-table .col-product-image { width: 80px; }
html[data-admin-mode="desktop"] .admin-products-table .col-product-price { width: 105px; }
html[data-admin-mode="desktop"] .admin-products-table .col-product-order { width: 70px; }
html[data-admin-mode="desktop"] .admin-products-table .col-product-status { width: 64px; }

html[data-admin-mode="desktop"] .admin-products-table .table-thumb {
    width: 64px;
    height: 64px;
    border-radius: 12px;
}

html[data-admin-mode="desktop"] .admin-products-table th,
html[data-admin-mode="desktop"] .admin-products-table td {
    padding: 8px;
}

html[data-admin-mode="desktop"] .admin-product-row-actions {
    margin-top: 5px;
}

html[data-admin-mode="phone"] .product-list-card {
    padding: 12px;
}

html[data-admin-mode="phone"] .admin-table-wrap {
    overflow: visible;
    border: 0;
    border-radius: 0;
    background: transparent;
}

html[data-admin-mode="phone"] .admin-products-table,
html[data-admin-mode="phone"] .admin-products-table tbody {
    display: block;
    width: 100%;
}

html[data-admin-mode="phone"] .admin-products-table thead,
html[data-admin-mode="phone"] .admin-products-table colgroup,
html[data-admin-mode="phone"] .admin-order-cell,
html[data-admin-mode="phone"] .admin-status-cell {
    display: none;
}

html[data-admin-mode="phone"] .admin-products-table tr {
    width: 100%;
    margin-bottom: 9px;
    padding: 8px;
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    border: 1px solid rgba(23, 22, 21, 0.1);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 7px 20px rgba(23, 22, 21, 0.05);
}

html[data-admin-mode="phone"] .admin-products-table td {
    display: block;
    min-width: 0;
    padding: 0;
    border: 0;
}

html[data-admin-mode="phone"] .admin-products-table .table-thumb {
    width: 64px;
    height: 64px;
    border-radius: 10px;
}

html[data-admin-mode="phone"] .admin-price-cell {
    text-align: right;
    white-space: nowrap;
}

html[data-admin-mode="phone"] .admin-product-name-text {
    white-space: normal;
    line-height: 1.2;
}

html[data-admin-mode="phone"] .admin-product-row-actions {
    flex-wrap: wrap;
}

@media (max-width: 680px) {
    .admin-body .product-list-card {
        padding: 12px;
    }

    .admin-body .admin-table-wrap {
        overflow: visible;
        border: 0;
        border-radius: 0;
        background: transparent;
    }

    .admin-body .admin-products-table,
    .admin-body .admin-products-table tbody {
        display: block;
        width: 100%;
    }

    .admin-body .admin-products-table thead,
    .admin-body .admin-products-table colgroup,
    .admin-body .admin-order-cell,
    .admin-body .admin-status-cell {
        display: none;
    }

    .admin-body .admin-products-table tr {
        width: 100%;
        margin-bottom: 9px;
        padding: 8px;
        display: grid;
        grid-template-columns: 64px minmax(0, 1fr) auto;
        align-items: center;
        gap: 10px;
        border: 1px solid rgba(23, 22, 21, 0.1);
        border-radius: 14px;
        background: rgba(255, 255, 255, 0.9);
        box-shadow: 0 7px 20px rgba(23, 22, 21, 0.05);
    }

    .admin-body .admin-products-table td {
        display: block;
        min-width: 0;
        padding: 0;
        border: 0;
    }

    .admin-body .admin-products-table .table-thumb {
        width: 64px;
        height: 64px;
        border-radius: 10px;
    }

    .admin-body .admin-price-cell {
        text-align: right;
        white-space: nowrap;
    }

    .admin-body .admin-product-name-text {
        white-space: normal;
        line-height: 1.2;
    }

    .admin-body .admin-product-row-actions {
        flex-wrap: wrap;
    }
}

@media (max-width: 390px) {
    .admin-body .admin-products-table tr,
    html[data-admin-mode="phone"] .admin-products-table tr {
        grid-template-columns: 56px minmax(0, 1fr);
    }

    .admin-body .admin-products-table .table-thumb,
    html[data-admin-mode="phone"] .admin-products-table .table-thumb {
        width: 56px;
        height: 56px;
    }

    .admin-body .admin-price-cell,
    html[data-admin-mode="phone"] .admin-price-cell {
        grid-column: 2;
        text-align: left;
    }
}

/* Definitive photo sizing; intentionally last in the cascade. */
.admin-body .current-image-item,
html[data-admin-mode="phone"] .current-image-item {
    flex: 0 0 124px;
}

.admin-body .photo-preview-trigger img,
.admin-body .current-image-item img,
html[data-admin-mode="phone"] .current-image-item img,
html[data-admin-mode="desktop"] .current-image-item img {
    width: 124px;
    height: 124px;
    aspect-ratio: 1;
    border-radius: 14px;
    object-fit: contain;
}

.admin-body .main-photo-toggle {
    top: 5px;
    left: 5px;
    width: 22px;
    height: 22px;
    border-width: 1px;
    font-size: 0.72rem;
}

.admin-body .delete-photo-button,
html[data-admin-mode="desktop"] .delete-photo-button {
    top: 5px;
    right: 5px;
    width: 22px;
    height: 22px;
    font-size: 1rem;
}

/* Public mobile header and product viewer corrections. */
@media (max-width: 680px) {
    .shop-body .brand {
        flex: 1 1 auto;
        overflow: hidden;
    }

    .shop-body .brand > span:last-child {
        overflow: hidden;
        text-overflow: ellipsis;
        font-size: 0.88rem;
    }

    .shop-body .language-switcher {
        flex: 0 0 auto;
        gap: 3px;
    }

    .shop-body .language-link {
        width: 32px;
        min-width: 32px;
        height: 30px;
    }

    .shop-body .flag-icon {
        width: 21px;
        height: 16px;
    }

    .shop-body .modal-card {
        width: calc(100vw - 12px);
        height: auto;
        max-height: calc(100dvh - 12px);
        display: flex;
        flex-direction: column;
        overflow-y: auto;
    }

    .shop-body .modal-gallery {
        flex: 0 0 min(56dvh, 520px);
        width: 100%;
        min-height: 0;
    }

    .shop-body .modal-card .modal-gallery > img {
        width: 100%;
        height: 100%;
        object-fit: contain;
        background: #111;
    }

    .shop-body .modal-copy {
        flex: 0 0 auto;
        min-height: 0;
        overflow: visible;
    }
}

/* Admin large-photo toolbar: main, crop, close, delete. */
.admin-body .admin-photo-modal {
    padding-top: 74px;
}

.admin-body .admin-photo-modal-toolbar {
    position: fixed;
    z-index: 3;
    top: 12px;
    left: 50%;
    width: min(280px, calc(100vw - 28px));
    transform: translateX(-50%);
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    align-items: center;
    justify-items: center;
}

.admin-body .admin-photo-modal-toolbar button {
    position: static;
    width: 44px;
    height: 44px;
    padding: 0;
    display: grid;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    color: #fff;
    font: 900 1.45rem/1 Arial, sans-serif;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.admin-body .admin-photo-modal-main {
    background: #858585;
}

.admin-body .admin-photo-modal-main.is-main {
    background: #25a85a;
    opacity: 1;
}

.admin-body .admin-photo-modal-close {
    background: #fff;
    color: var(--ink) !important;
    font-weight: 400 !important;
}

.admin-body .admin-photo-modal-delete {
    background: #a52b20;
}

.admin-body .admin-photo-modal > img {
    max-height: calc(100dvh - 94px);
}

/* Phone header: brand and language flags each get a clear line. */
@media (max-width: 680px) {
    .shop-body .site-header {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        gap: 7px;
        padding: 8px 0 9px;
    }

    .shop-body .brand {
        width: 100%;
        overflow: visible;
    }

    .shop-body .brand > span:last-child {
        overflow: visible;
        text-overflow: clip;
        font-size: 1rem;
    }

    .shop-body .language-switcher {
        width: 100%;
        display: grid;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 6px;
    }

    .shop-body .language-link {
        width: 100%;
        min-width: 0;
        height: 34px;
    }

    .shop-body .flag-icon {
        width: 25px;
        height: 19px;
    }
}

/* Final phone header: one compact line. */
@media (max-width: 680px) {
    .shop-body .site-header {
        display: flex;
        flex-direction: row;
        align-items: center;
        gap: 7px;
        min-height: 50px;
        padding: 6px 0;
    }

    .shop-body .brand {
        width: auto;
        min-width: 0;
        flex: 1 1 auto;
        gap: 6px;
        overflow: hidden;
    }

    .shop-body .brand-mark {
        width: 32px;
        height: 32px;
        flex-basis: 32px;
    }

    .shop-body .brand > span:last-child {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        font-size: 0.88rem;
    }

    .shop-body .language-switcher {
        width: auto;
        flex: 0 0 auto;
        display: flex;
        gap: 3px;
    }

    .shop-body .language-link {
        flex: 0 0 26px;
        width: 26px;
        min-width: 26px;
        height: 26px;
        border-radius: 8px;
        box-shadow: none;
    }

    .shop-body .flag-icon {
        width: 18px;
        height: 13px;
        border-radius: 2px;
    }
}

/* Public phone modal: preserve every photo's natural aspect ratio. */
@media (max-width: 680px) {
    .shop-body .modal-gallery {
        flex: 0 0 auto;
        width: 100%;
        min-height: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        background: var(--paper-strong);
    }

    .shop-body .modal-card .modal-gallery > img {
        width: auto;
        height: auto;
        max-width: 100%;
        max-height: 56dvh;
        object-fit: contain;
        background: var(--paper-strong);
    }
}

/* Requested final control sizing. */
@media (max-width: 680px) {
    .shop-body .language-link {
        flex: 0 0 39px;
        width: 39px;
        min-width: 39px;
        height: 36px;
    }

    .shop-body .flag-icon {
        width: 27px;
        height: 20px;
    }

    .shop-body .brand > span:last-child {
        font-size: 0.82rem;
    }
}

.admin-body .admin-photo-modal-toolbar .admin-photo-modal-close {
    width: auto;
    min-width: 76px;
    padding: 0 14px;
    border-radius: 999px;
    font-size: 0.9rem;
    font-weight: 900 !important;
}

/* Product photo variations, saved-product upload flow and upload wait state. */
.admin-body .product-create-help {
    margin: 8px 0 18px;
    color: var(--muted);
    line-height: 1.5;
}

.admin-body .photo-upload-panel {
    margin-top: 22px;
    padding-top: 20px;
    border-top: 1px solid rgba(23, 22, 21, 0.12);
}

.admin-body .photo-upload-heading {
    margin-bottom: 14px;
}

.admin-body .photo-upload-heading h3 {
    margin: 0 0 5px;
    font-size: 1.15rem;
    letter-spacing: -0.025em;
}

.admin-body .photo-upload-heading p {
    margin: 0;
    color: var(--muted);
    line-height: 1.45;
}

.admin-body .photo-upload-form {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
}

.admin-body .photo-upload-form .primary-button {
    white-space: nowrap;
}

.admin-body .current-images-grid {
    align-items: start;
}

.admin-body .current-image-item,
html[data-admin-mode="phone"] .current-image-item {
    flex: 0 0 190px;
    padding: 10px;
    border: 1px solid rgba(23, 22, 21, 0.10);
    border-radius: 16px;
    background: #fff;
    box-sizing: border-box;
}

.admin-body .current-image-photo {
    position: relative;
    width: 124px;
    margin: 0 auto;
}

.admin-body .photo-variation-fields {
    display: grid;
    gap: 9px;
    margin-top: 10px;
}

.admin-body .photo-variation-fields label {
    gap: 4px;
    font-size: 0.76rem;
}

.admin-body .photo-variation-fields input {
    min-width: 0;
    padding: 9px 10px;
    border-radius: 10px;
    font-size: 0.88rem;
}

.admin-body .photo-variation-fields .field-help {
    font-size: 0.68rem;
    line-height: 1.3;
}

.shop-body .modal-variation {
    width: fit-content;
    margin: 0;
    padding: 7px 11px;
    border-radius: 999px;
    background: rgba(90, 174, 199, 0.18);
    color: var(--ink);
    font-weight: 900;
}

.upload-wait-overlay {
    position: fixed;
    z-index: 3000;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 20px;
    background: rgba(16, 15, 14, 0.72);
    backdrop-filter: blur(3px);
}

.upload-wait-overlay[hidden] {
    display: none !important;
}

.upload-wait-card {
    width: min(360px, calc(100vw - 36px));
    padding: 24px 22px;
    display: grid;
    justify-items: center;
    gap: 14px;
    border-radius: 20px;
    background: #fff;
    color: var(--ink);
    text-align: center;
    box-shadow: 0 20px 70px rgba(0, 0, 0, 0.28);
}

.upload-spinner {
    width: 42px;
    height: 42px;
    border: 4px solid rgba(23, 22, 21, 0.14);
    border-top-color: #25a85a;
    border-radius: 50%;
    animation: kaya-upload-spin 0.8s linear infinite;
}

body.upload-in-progress {
    overflow: hidden;
}

@keyframes kaya-upload-spin {
    to { transform: rotate(360deg); }
}

html[data-admin-mode="desktop"] .current-images-grid {
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
}

@media (max-width: 680px) {
    .admin-body .photo-upload-form {
        grid-template-columns: 1fr;
    }

    .admin-body .photo-upload-form .primary-button {
        width: 100%;
    }

    .admin-body .current-image-item,
    html[data-admin-mode="phone"] .current-image-item {
        flex-basis: 190px;
    }
}


.admin-body .table-thumb-empty {
    display: inline-grid;
    place-items: center;
    padding: 4px;
    background: var(--paper-strong);
    color: var(--muted);
    font-size: 0.64rem;
    font-weight: 900;
    line-height: 1.05;
    text-align: center;
}

.admin-body .no-photo-count {
    color: #9a3412;
}

/* Admin photo crop and rotate page. */
.admin-body .admin-photo-modal-toolbar {
    width: min(370px, calc(100vw - 28px));
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.crop-photo-button {
    position: absolute;
    z-index: 3;
    left: 50%;
    bottom: 5px;
    transform: translateX(-50%);
    min-width: 44px;
    padding: 5px 8px;
    border: 1px solid rgba(255, 255, 255, 0.95);
    border-radius: 999px;
    background: rgba(31, 78, 121, 0.94);
    color: #fff;
    font: 800 0.68rem/1 "Segoe UI", Arial, sans-serif;
    text-align: center;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.25);
}

.crop-photo-button:hover,
.crop-photo-button:focus-visible {
    color: #fff;
    background: #163d61;
}

.admin-photo-modal-crop {
    min-height: 42px;
    padding: 10px 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: #1f4e79;
    color: #fff;
    font-weight: 800;
    text-decoration: none;
}

.admin-photo-modal-crop:hover,
.admin-photo-modal-crop:focus-visible {
    color: #fff;
    background: #163d61;
}

.crop-main {
    width: min(1180px, calc(100% - 24px));
}

.crop-card {
    padding: clamp(16px, 3vw, 28px);
}

.crop-heading-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 16px;
}

.crop-heading-row h1 {
    margin: 0 0 6px;
    font-size: clamp(1.45rem, 4vw, 2rem);
}

.crop-heading-row p {
    margin: 0;
    color: var(--muted, #64748b);
}

.crop-heading-row .crop-queue-status {
    margin-top: 8px;
    color: #1f4e79;
    font-weight: 800;
}

.crop-editor-shell {
    display: grid;
    gap: 14px;
}

.crop-image-stage {
    width: 100%;
    height: min(68dvh, 760px);
    min-height: 360px;
    overflow: hidden;
    border: 1px solid #d0d7de;
    border-radius: 18px;
    background: #111827;
}

.crop-image-stage img {
    display: block;
    max-width: 100%;
}

.crop-toolbar,
.crop-action-row,
.crop-skip-form {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.crop-tool-button {
    min-width: 140px;
}

.crop-action-row .primary-button,
.crop-skip-form .secondary-button {
    min-width: 180px;
}

.crop-save-status {
    min-height: 24px;
    margin: 0;
    color: #1f4e79;
    font-weight: 800;
    text-align: center;
}

.cropper-view-box,
.cropper-face {
    border-radius: 4px;
}

@media (max-width: 680px) {
    .crop-main {
        width: min(100% - 12px, 1180px);
        padding-top: 10px;
    }

    .crop-card {
        padding: 12px;
        border-radius: 16px;
    }

    .crop-image-stage {
        height: 58dvh;
        min-height: 300px;
        border-radius: 12px;
    }

    .crop-toolbar {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .crop-toolbar .crop-tool-button {
        width: 100%;
        min-width: 0;
    }

    .crop-toolbar .crop-tool-button:last-child {
        grid-column: 1 / -1;
    }

    .crop-action-row .primary-button,
    .crop-skip-form .secondary-button {
        width: 100%;
    }
}

/* Public newest-products row and catalogue sorting controls. */
.shop-body .newest-products {
    margin-bottom: 34px;
}

.shop-body .newest-product-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    padding-bottom: 0;
}

.catalog-controls {
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
    gap: 10px;
}

.catalog-sort {
    display: grid;
    gap: 4px;
    color: var(--muted, #667085);
    font-size: 0.78rem;
    font-weight: 700;
}

.catalog-sort select {
    min-height: 44px;
    padding: 0 34px 0 12px;
    border: 1px solid rgba(20, 90, 80, .2);
    border-radius: 14px;
    background: #fff;
    color: var(--ink);
    font: inherit;
    font-size: 0.9rem;
}

@media (max-width: 900px) {
    .shop-body .newest-product-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 680px) {
    .shop-body .newest-products {
        margin-bottom: 24px;
    }

    .catalog-controls {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        width: 100%;
    }

    .catalog-sort select {
        width: 100%;
        font-size: 16px;
    }

}

@media (max-width: 480px) {
    .shop-body .whatsapp-contact .contact-section-actions {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* Public product cards must show the complete photo, matching the enlarged viewer. */
.shop-body .product-image > img {
    width: 100%;
    height: 100%;
    object-fit: contain !important;
    object-position: center;
    background: var(--paper-strong);
}

/* Public shop contact cards and native/fallback sharing actions. */
.shop-contact-panels {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr);
    gap: 14px;
    align-items: stretch;
    margin: -8px 0 34px;
}

.shop-contact-panel {
    position: relative;
    display: grid;
    min-width: 0;
    min-height: 96px;
    margin: 0;
    padding: 14px 18px;
    grid-template: auto auto / auto minmax(0, 1fr);
    align-items: center;
    gap: 4px 14px;
    overflow: hidden;
    border: 1px solid rgba(23, 22, 21, 0.14);
    border-radius: 24px;
    cursor: pointer;
}

.shop-contact-panel > .whatsapp-contact-button {
    position: relative;
    grid-column: 2;
    grid-row: 1;
    width: 100%;
    margin: 0;
    border: 0;
    font: inherit;
    cursor: pointer;
}

.shop-contact-panel > .whatsapp-contact-button .contact-button-arrow {
    position: absolute;
    right: 18px;
}

.contact-panel-channel {
    display: flex;
    align-items: center;
    min-height: 0;
    text-align: center;
}

.shop-contact-panel .whatsapp-contact-icon {
    width: 58px;
    height: 58px;
    flex: 0 0 auto;
}

.contact-panel-channel-name {
    display: none;
}

.contact-panel-status {
    display: none;
}

.shop-body .shop-contact-panel.whatsapp-contact {
    grid-column: 1 / -1;
    grid-template: auto auto auto / minmax(0, 1fr);
    justify-items: center;
    gap: 16px;
    min-height: 0;
    padding: 30px clamp(20px, 6vw, 70px) 34px;
    border: 1px solid rgba(98, 158, 79, 0.35);
    border-radius: 30px;
    background:
        radial-gradient(circle at 4% 15%, rgba(147, 207, 118, 0.2), transparent 22%),
        radial-gradient(circle at 94% 90%, rgba(147, 207, 118, 0.22), transparent 23%),
        radial-gradient(circle at 50% 105%, rgba(173, 228, 130, 0.22), transparent 35%),
        #fffef5;
    box-shadow: 0 16px 44px rgba(44, 93, 42, 0.12);
}

.shop-contact-panel.whatsapp-contact::before,
.shop-contact-panel.whatsapp-contact::after {
    position: absolute;
    pointer-events: none;
    color: rgba(64, 132, 64, 0.62);
    font-family: "Segoe Print", "Comic Sans MS", cursive;
    line-height: 1;
}

.shop-contact-panel.whatsapp-contact::before {
    content: "♡";
    top: 28%;
    left: 5%;
    font-size: clamp(3rem, 6vw, 5.5rem);
    transform: rotate(-18deg);
}

.shop-contact-panel.whatsapp-contact::after {
    content: "✦  ♡  ✦";
    right: 4%;
    bottom: 23%;
    font-size: clamp(1.3rem, 2.5vw, 2rem);
    transform: rotate(12deg);
}

.whatsapp-ribbon {
    position: relative;
    z-index: 1;
    margin: 0;
    padding: 9px 28px;
    border-radius: 48% 52% 46% 54% / 35% 42% 58% 65%;
    background: #6d9f5b;
    color: #ffffff;
    font-size: clamp(0.9rem, 1.7vw, 1.15rem);
    font-weight: 900;
    letter-spacing: 0.05em;
    text-align: center;
    text-transform: uppercase;
    transform: rotate(-3deg);
}

.shop-body .shop-contact-panel.whatsapp-contact .whatsapp-contact-copy {
    position: relative;
    z-index: 1;
    display: block;
    text-align: center;
}

.shop-body .shop-contact-panel.whatsapp-contact h2 {
    margin: 0;
    color: #173b28;
    font-family: "Segoe Print", "Comic Sans MS", "Trebuchet MS", cursive;
    font-size: clamp(2rem, 5vw, 3.65rem);
    line-height: 1.18;
    letter-spacing: -0.045em;
}

.shop-body .shop-contact-panel.whatsapp-contact .contact-panel-text {
    display: block;
    margin: 12px 0 0;
    color: #5f7f52;
    font-size: clamp(1rem, 2.2vw, 1.4rem);
    font-weight: 700;
    line-height: 1.5;
}

.shop-body .shop-contact-panel.whatsapp-contact > .whatsapp-contact-button {
    z-index: 1;
    grid-column: 1;
    grid-row: 3;
    display: flex;
    gap: 12px;
    width: min(100%, 780px);
    min-height: 88px;
    padding: 6px 56px 6px 7px;
    border: 4px solid #ffffff;
    background: linear-gradient(135deg, #26ae51, #087a3b);
    box-shadow: 0 0 0 3px #a9dda4, 0 12px 28px rgba(29, 142, 65, 0.28);
    font-size: clamp(0.95rem, 2.2vw, 1.5rem);
    font-weight: 900;
    line-height: 1.15;
    text-align: center;
    text-transform: uppercase;
    white-space: normal;
}

.shop-body .shop-contact-panel.whatsapp-contact > .whatsapp-contact-button:hover,
.shop-body .shop-contact-panel.whatsapp-contact > .whatsapp-contact-button:focus-visible {
    background: linear-gradient(135deg, #218f45, #076733);
    box-shadow: 0 0 0 3px #a9dda4, 0 16px 32px rgba(29, 142, 65, 0.32);
}

.shop-body .shop-contact-panel.whatsapp-contact .whatsapp-contact-icon {
    width: 68px;
    height: 68px;
    border: 3px solid #ffffff;
    background: linear-gradient(135deg, #32d65d, #087a3b);
    box-shadow: none;
}

.whatsapp-contact-button .whatsapp-button-label {
    flex: 1 1 auto;
    min-width: 0;
    font-size: inherit;
    line-height: inherit;
}

.shop-body .shop-contact-panel.whatsapp-contact .contact-button-arrow {
    right: 19px;
    font-size: 1.8rem;
}

.email-contact {
    border-color: rgba(23, 22, 21, 0.14);
    background:
        radial-gradient(circle at 88% 10%, rgba(130, 201, 223, 0.2), transparent 14rem),
        rgba(255, 255, 255, 0.88);
}

.email-contact .whatsapp-contact-icon {
    background: var(--ink);
}

.email-contact > .whatsapp-contact-button {
    min-height: 64px;
    padding: 0 8px;
    background: transparent;
    color: var(--ink);
    box-shadow: none;
    font-weight: 900;
    text-transform: uppercase;
    white-space: normal;
}

.email-contact > .whatsapp-contact-button:hover,
.email-contact > .whatsapp-contact-button:focus-visible {
    background: rgba(23, 22, 21, 0.07);
    box-shadow: none;
}

.share-site-contact {
    border-color: rgba(114, 75, 156, 0.22);
    background:
        radial-gradient(circle at 88% 10%, rgba(114, 75, 156, 0.18), transparent 14rem),
        rgba(255, 255, 255, 0.88);
}

.share-site-contact .whatsapp-contact-icon,
.share-site-button {
    background: #724b9c;
}

.share-site-contact > .whatsapp-contact-button {
    min-height: 64px;
    padding: 6px 36px 6px 12px;
    background: linear-gradient(135deg, #8d61b2, #724b9c);
    box-shadow: 6px 6px 0 rgba(114, 75, 156, 0.16);
    font-size: clamp(0.9rem, 2vw, 1.3rem);
    font-weight: 700;
    white-space: normal;
}

.share-site-contact > .share-site-button:hover,
.share-site-contact > .share-site-button:focus-visible {
    background: #5e3b83;
}

.share-site-contact .whatsapp-contact-copy {
    grid-column: 1 / -1;
    grid-row: 2;
    text-align: center;
}

.share-status {
    min-height: 0;
    margin: 0;
    color: #147a3d !important;
    font-size: 0.82rem;
    font-weight: 800;
}

.product-info {
    flex: 1 1 auto;
}

.product-title-button {
    width: 100%;
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.product-title-button:focus-visible {
    outline: 3px solid rgba(114, 75, 156, 0.42);
    outline-offset: 4px;
    border-radius: 4px;
}

.product-price-row,
.modal-price-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 9px;
}

.product-share-button {
    min-height: 38px;
    padding: 7px 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    flex: 0 0 auto;
    border: 1px solid rgba(114, 75, 156, 0.22);
    border-radius: 999px;
    background: rgba(114, 75, 156, 0.1);
    color: #5e3b83;
    font: inherit;
    font-size: 0.78rem;
    font-weight: 900;
    cursor: pointer;
    transition: transform 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.product-share-button:hover,
.product-share-button:focus-visible {
    transform: translateY(-2px);
    background: rgba(114, 75, 156, 0.17);
    box-shadow: 4px 4px 0 rgba(114, 75, 156, 0.14);
}

.product-share-button svg {
    width: 17px;
    height: 17px;
    flex: 0 0 17px;
    fill: currentColor;
}

.modal-price-row {
    margin-top: 4px;
}

.shop-body .modal-price-row .modal-price {
    margin-top: 0;
}

@media (max-width: 680px) {
    .shop-contact-panels {
        gap: 8px;
        margin: 0 0 16px;
    }

    .shop-body .shop-contact-panel {
        min-height: 78px;
        margin: 0;
        padding: 8px;
        grid-template: auto auto / auto minmax(0, 1fr);
        gap: 4px 7px;
        align-items: center;
        border-radius: 18px;
    }

    .shop-body .shop-contact-panel > .whatsapp-contact-button {
        grid-column: 2;
        grid-row: 1;
        width: 100%;
        min-height: 52px;
        padding: 5px 22px 5px 4px;
        line-height: 1.15;
    }

    .shop-body .shop-contact-panel > .whatsapp-contact-button .contact-button-arrow {
        right: 6px;
        font-size: 1.2rem;
    }

    .shop-body .shop-contact-panel .contact-panel-channel {
        grid-column: 1;
        grid-row: 1;
        min-height: 0;
    }

    .shop-body .shop-contact-panel .whatsapp-contact-icon {
        width: 42px;
        height: 42px;
    }

    .shop-body .shop-contact-panel.whatsapp-contact {
        grid-template: auto auto auto / minmax(0, 1fr);
        gap: 12px;
        padding: 22px 14px 26px;
        border-radius: 24px;
    }

    .shop-contact-panel.whatsapp-contact::before {
        top: 34%;
        left: 2%;
        font-size: 2.5rem;
    }

    .shop-contact-panel.whatsapp-contact::after {
        right: 3%;
        bottom: 25%;
        font-size: 1rem;
    }

    .whatsapp-ribbon {
        padding: 7px 22px;
    }

    .shop-body .shop-contact-panel.whatsapp-contact h2 {
        font-size: clamp(1.7rem, 7vw, 2.8rem);
    }

    .shop-body .shop-contact-panel.whatsapp-contact .contact-panel-text {
        margin-top: 8px;
        font-size: clamp(0.95rem, 3.6vw, 1.18rem);
    }

    .shop-body .shop-contact-panel.whatsapp-contact > .whatsapp-contact-button {
        grid-column: 1;
        grid-row: 3;
        min-height: 72px;
        padding: 4px 28px 4px 4px;
        gap: 5px;
        font-size: clamp(1rem, 4vw, 1.1rem);
    }

    .shop-body .shop-contact-panel.whatsapp-contact .whatsapp-contact-icon {
        width: 54px;
        height: 54px;
    }

    .shop-body .shop-contact-panel.whatsapp-contact .contact-button-arrow {
        right: 7px;
        font-size: 1.2rem;
    }

    .email-contact > .whatsapp-contact-button {
        font-size: 0.78rem;
    }

    .share-site-contact > .whatsapp-contact-button {
        font-size: 0.78rem;
    }

    .shop-body .product-info {
        gap: 8px;
    }

    .product-price-row {
        gap: 5px;
    }

    .product-share-button {
        min-height: 34px;
        padding: 6px 8px;
        font-size: 0.72rem;
    }

    .product-share-button svg {
        width: 15px;
        height: 15px;
        flex-basis: 15px;
    }
}

@media (max-width: 480px) {
    .product-price-row .price {
        padding-inline: 8px;
        font-size: 0.86rem;
    }

    .product-share-button span {
        font-size: 0.68rem;
    }
}

@media (max-width: 360px) {
    .shop-contact-panels {
        grid-template-columns: minmax(0, 1fr);
    }

    .shop-contact-panel.whatsapp-contact::before,
    .shop-contact-panel.whatsapp-contact::after {
        display: none;
    }
}

/* Game names retain space beside the compact copy action. */
.game-links-modal{width:min(720px,calc(100% - 24px));max-height:calc(100dvh - 24px);overflow-y:auto;border:1px solid var(--sand);border-radius:var(--radius);padding:20px;background:var(--paper);color:var(--ink);box-shadow:var(--shadow)}
.game-links-modal::backdrop{background:#17161599}.game-links-heading{display:flex;align-items:center;justify-content:space-between;gap:12px}.game-links-heading h2{margin:0}.game-links-modal .game-share-grid{grid-template-columns:1fr}.game-share-grid strong{flex:1;overflow-wrap:anywhere}.game-links-modal .game-copy-icon{flex:0 0 44px;width:44px;min-width:44px;height:44px;min-height:44px;padding:10px;display:grid;place-items:center}.game-copy-icon svg{display:block}

/* Compact, phone-friendly administrator login history. */
.admin-game-actions{display:flex;flex-wrap:wrap;gap:8px;margin:0 0 12px}
.game-login-history-modal{width:min(600px,calc(100% - 24px))}
.game-login-history-picker{display:grid;gap:6px;margin:18px 0 12px;min-height:0;font-weight:700;color:var(--ink)}
.game-login-history-picker select{width:100%;min-width:0;min-height:44px;border:1px solid var(--sand);border-radius:10px;padding:8px 12px;background:var(--paper);color:var(--ink);font:inherit}
.game-login-history-summary{min-height:24px;margin:0 0 10px;color:var(--muted)}
.game-login-history-table{width:100%;border-collapse:collapse;table-layout:fixed}
.game-login-history-table th,.game-login-history-table td{padding:10px 8px;text-align:left;border-bottom:1px solid var(--sand);overflow-wrap:anywhere}
.game-login-history-table th{font-size:.83rem}
.game-login-history-table tr:nth-child(even) td{background:var(--mist)}
.game-login-history-empty{text-align:center!important;color:var(--muted)}
.game-login-history-pagination{display:flex;flex-wrap:wrap;justify-content:space-between;align-items:center;gap:12px;margin-top:16px}
.game-login-history-pagination>div{display:flex;gap:8px}
.game-login-history-pagination button:disabled{opacity:.45;cursor:default}
@media(max-width:480px){.admin-game-actions .secondary-button{flex:1 1 auto}.game-login-history-modal{padding:14px}.game-login-history-table th,.game-login-history-table td{padding:9px 4px;font-size:.86rem}}
