/* Shared visual rhythm for the brand portfolio and its shop shortcuts. */
.portfolio-main > section + section { margin-top: clamp(3.5rem, 6vw, 5.5rem); }
.portfolio-main > .shop-section { margin-top: 0; padding-top: 2.75rem; }
.portfolio-main .section-header { padding: 0; margin-bottom: 1.75rem; }
.portfolio-main .section-header h2 { font-size: clamp(1.8rem, 3.1vw, 2.7rem) !important; line-height: 1.15 !important; }
.portfolio-main .section-header > p { font-size: .95rem !important; margin-top: .8rem !important; }
.section-header-compact { display: flex; justify-content: space-between; align-items: end; gap: 2rem; }
.portfolio-main .section-header-compact h2 { font-size: clamp(1.5rem, 2.5vw, 2rem) !important; }
.portfolio-main .section-header-compact > p { max-width: 24rem !important; margin: 0 !important; }
.shop-shortcuts { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: .75rem; }
.shop-shortcut { display: flex; flex-direction: column; align-items: center; gap: .6rem; padding: 1rem .6rem; border: 1px solid var(--line-strong); border-radius: .5rem; background: rgba(255,255,255,.75); color: var(--ink); text-align: center; transition: background .2s ease, border-color .2s ease; }
.shop-shortcut:hover { background: #fff; border-color: var(--gold); }
.shop-shortcut-logo { height: 3.25rem; width: 100%; display: flex; align-items: center; justify-content: center; }
.shop-shortcut-logo img { height: auto; width: auto; max-height: 2.75rem; max-width: 85%; object-fit: contain; mix-blend-mode: multiply; }
.shop-shortcut > strong { font-size: .78rem; line-height: 1.4; font-weight: 500; }
.shop-shortcut-link { display: flex; align-items: center; justify-content: center; gap: .4rem; margin-top: auto; font-size: .73rem; color: var(--ink-soft); }
.brand-gallery { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 1rem; }
.portfolio-brand { min-width: 0; display: flex; flex-direction: column; overflow: hidden; background: #fff; border: 1px solid var(--line); border-radius: .65rem; transition: border-color .2s ease, box-shadow .2s ease; }
.portfolio-brand:hover { border-color: var(--line-strong); box-shadow: 0 8px 22px rgba(20,20,20,.055); }
.brand-visual { display: block; aspect-ratio: 4 / 3; overflow: hidden; background: #eeece6; }
.brand-visual img { display: block; width: 100%; height: 100%; }
.brand-body { display: flex; flex-direction: column; flex: 1; padding: 0 1.1rem 1.1rem; }
.brand-logo { height: 5.25rem; display: flex; justify-content: center; align-items: center; }
.brand-logo img { width: auto; height: auto; max-width: 88%; max-height: 3rem; object-fit: contain; }
.brand-meta { display: flex; align-items: center; gap: .4rem; min-height: 2rem; }
.brand-countries { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem; }
.territory-label { display: inline-flex; align-items: center; min-height: 1.65rem; padding: .2rem .55rem; border-radius: .25rem; background: #f2f4f3; font-size: .61rem; font-weight: 600; letter-spacing: .06em; color: var(--teal-deep); white-space: nowrap; }
.territory-secondary { background: #f5ede1; color: #735a36; }
.brand-meta > .instagram-link { margin-left: auto; }
.brand-meta .instagram-link, .group-subbrand .instagram-link { width: 2rem; height: 2rem; min-width: 2rem; padding: .45rem; border: 0; background: transparent; box-shadow: none; color: var(--ink-soft); }
.brand-meta .instagram-link:hover, .group-subbrand .instagram-link:hover { background: var(--surface-3); transform: none; }
.brand-category { display: flex; align-items: flex-start; gap: .35rem; min-height: 2.8em; margin-top: .9rem; color: var(--ink-faint); font-size: .6rem; font-weight: 500; text-transform: uppercase; letter-spacing: .09em; line-height: 1.4; }
.brand-category > span { flex-shrink: 0; }
.brand-body h3 { min-height: 2.55em; margin: .4rem 0 .65rem; font-size: 1.3rem; font-weight: 600; line-height: 1.25; }
.brand-description { flex: 1; margin: 0 0 1.2rem; font-size: .84rem; line-height: 1.6; color: var(--ink-soft); }
.brand-open { display: flex; justify-content: space-between; align-items: center; gap: .75rem; padding-top: .9rem; min-height: 2.75rem; border-top: 1px solid var(--line-strong); color: var(--ink); font-size: .8rem; font-weight: 600; }
.brand-open > span { font-size: 1.1rem; }
.portfolio-groups { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem; }
.group-card.group-editorial { display: grid; grid-template-rows: auto 1fr auto; min-width: 0; border-radius: .75rem; box-shadow: none; border-color: var(--line-strong); }
.group-card.group-editorial:hover { transform: none; border-color: var(--gold); box-shadow: 0 8px 24px rgba(20,20,20,.05); }
.group-visual { position: relative; aspect-ratio: 2.7 / 1; overflow: hidden; background: var(--surface-3); }
.group-visual img { display: block; width: 100%; height: 100%; object-fit: cover; }
.group-visual > span { position: absolute; bottom: .85rem; left: 1.25rem; padding: .35rem .65rem; border-radius: .2rem; background: rgba(255,255,255,.93); color: var(--ink-soft); font-size: .64rem; letter-spacing: .08em; }
.group-content { display: flex; flex-direction: column; padding: 1.5rem; }
.group-origin { margin-left: auto; display: inline-flex; align-items: center; gap: .35rem; font-size: .63rem; color: var(--ink-faint); }
.group-content .brand-meta > .instagram-link { margin-left: .1rem; }
.group-logo { display: flex; align-items: center; height: 6.5rem; margin-top: .7rem; }
.group-logo img { width: auto; height: auto; max-width: 68%; max-height: 4.2rem; object-fit: contain; }
.group-logo img[src*="logo-pozzi"] { max-height: 5.3rem; }
.group-content > p { margin: .5rem 0 1.5rem; color: var(--ink-soft); font-size: .94rem; line-height: 1.7; }
.group-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: auto; }
.group-actions a { display: inline-flex; align-items: center; justify-content: center; gap: 1.2rem; min-height: 2.8rem; padding: .75rem 1rem; font-size: .81rem; font-weight: 500; border: 1px solid var(--line-strong); border-radius: .3rem; }
.group-overview { color: var(--ink); background: #fff; }
.group-shop { color: #fff; background: var(--teal-deep); }
.group-actions a:hover { border-color: var(--gold); }
.group-brand-logos { display: grid; grid-template-columns: repeat(var(--logo-count), minmax(0, 1fr)); gap: .75rem; align-items: stretch; padding: 1rem 1.25rem; border-top: 1px solid var(--line-strong); background: #faf9f6; }
.group-subbrand { min-width: 0; display: flex; align-items: center; justify-content: center; gap: .35rem; }
.group-subbrand > img { width: auto; height: auto; max-width: 100%; max-height: 4rem; object-fit: contain; }
.group-subbrand:has(.instagram-link) { flex-wrap: wrap; }
.group-subbrand:has(.instagram-link) > img { max-width: calc(100% - 2.4rem); }
.group-subbrand > img[src*="rivadossi"] { max-height: 5rem; }
.group-subbrand > img[src*="portmeirion"] { max-height: 4.4rem; }
:is(.shop-shortcut, .brand-open, .brand-visual, .group-actions a, .instagram-link):focus-visible { outline: 2px solid var(--teal); outline-offset: 4px; }
@media (max-width: 1100px) {
    .brand-gallery { display: flex; flex-wrap: wrap; justify-content: center; }
    .portfolio-brand { width: calc((100% - 2rem) / 3); }
    .shop-shortcuts { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .shop-shortcut:last-child { grid-column: span 2; }
    .group-origin { max-width: 9rem; }
}
@media (max-width: 800px) {
    .section-header-compact { display: block; }
    .portfolio-main .section-header-compact > p { margin-top: .7rem !important; max-width: 34rem !important; }
    .portfolio-groups { grid-template-columns: 1fr; }
    .group-origin { max-width: none; }
}
@media (max-width: 650px) {
    .portfolio-brand { width: calc((100% - 1rem) / 2); }
    .shop-shortcuts { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; }
    .shop-shortcut:last-child { grid-column: 1 / -1; }
    .shop-shortcut { display: grid; grid-template-columns: 3.5rem minmax(0, 1fr); gap: .2rem .6rem; text-align: left; padding: .75rem; }
    .shop-shortcut-logo { grid-row: span 2; }
    .shop-shortcut-logo img { max-width: 100%; }
    .shop-shortcut > strong { align-self: end; font-size: .75rem; }
    .shop-shortcut-link { justify-content: flex-start; align-self: start; font-size: .7rem; }
    .group-content { padding: 1.2rem; }
    .group-actions a { flex: 1 1 auto; }
    .group-brand-logos { padding: .8rem; gap: .6rem; }
    .group-subbrand { flex-direction: column; }
    .group-subbrand:has(.instagram-link) > img { max-width: 100%; }
    .group-visual { aspect-ratio: 2.1 / 1; }
}
@media (max-width: 480px) {
    .portfolio-brand { width: 100%; }
    .brand-body { padding: 0 1.2rem 1.2rem; }
    .brand-body h3, .brand-category { min-height: 0; }
    .brand-category { margin-top: .6rem; }
    .brand-description { margin-bottom: 1rem; }
    .brand-visual { aspect-ratio: 1.65 / 1; }
    .brand-logo { height: 4.5rem; }
    .group-origin { font-size: .6rem; }
    .group-brand-logos { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .group-brand-logos[style*="--logo-count:3"] .group-subbrand:last-child { grid-column: 1 / -1; }
    .group-subbrand { min-height: 4rem; flex-direction: row; }
    .group-subbrand > img { max-width: 78%; max-height: 3.25rem; }
    .group-subbrand:has(.instagram-link) > img { max-width: calc(100% - 2.4rem); }
}
@media (prefers-reduced-motion: reduce) {
    .portfolio-brand, .shop-shortcut { transition: none; }
}
