/* ==========================================================================
   Arkhé Mağaza
   Sitenin kendi renkleri: #222 metin, gri tonlar, #f2f1f5 görsel zemini.
   Kart yapısı program kartlarını (camp__card) örnek alır.
   ========================================================================== */

.sp { color: #222; }
.sp *, .sp *::before, .sp *::after { box-sizing: border-box; }
.sp-container { max-width: 1160px; margin: 0 auto; padding: 32px 24px 80px; }

/* Kısa içerikte footer ekranın altına otursun (yalnızca mağaza sayfaları) */
body:has(.sp-page) { display: flex; flex-direction: column; min-height: 100vh; }
body:has(.sp-page) > .main { flex: 1 0 auto; }
body:has(.sp-page) > .footer { flex-shrink: 0; }

/* Görsel çerçevesi: her oranda görsel kırpılmadan sığar ------------------- */
.sp-frame { position: relative; display: block; overflow: hidden; isolation: isolate; background: #f2f1f5; }
.sp-frame__blur {
    position: absolute; inset: -30px; z-index: -1;
    background-position: center; background-size: cover;
    filter: blur(26px); opacity: .4;
}
.sp-frame__img { display: block; width: 100%; height: 100%; object-fit: contain; }
.sp-frame__empty { position: absolute; inset: 0; }

/* Liste ------------------------------------------------------------------- */
.sp-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; }
.sp-search { flex: 0 0 300px; margin-bottom: 2px; }
.sp-search input { min-width: 0; }
.sp-search .button { padding-top: 0; padding-bottom: 0; }
.sp-query { margin: 0 0 8px; }

.sp-grid {
    display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 36px 24px; margin-top: 20px;
}
.sp-grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px 20px; margin-top: 0; }

.sp-card {
    display: flex; flex-direction: column; min-width: 0; height: 100%;
    background: #fff; color: #222; text-decoration: none; cursor: pointer;
    border: 1px solid rgba(0, 0, 0, .08); border-radius: 5px; overflow: hidden;
    box-shadow: 0 4px 8px 0 rgba(50, 25, 25, .06);
    transition: box-shadow .2s, border-color .2s;
}
.sp-card:hover { border-color: rgba(0, 0, 0, .14); box-shadow: 0 6px 14px 0 rgba(50, 25, 25, .12); }
.sp-card:focus-visible { outline: 2px solid #222; outline-offset: 3px; }
.sp-card__media { aspect-ratio: 1 / 1; }

.sp-card__body { display: block; flex: 1; padding: 14px 16px 12px; min-width: 0; }
.sp-card__title {
    margin: 0; color: #111827; font-size: 1.125rem; font-weight: 500; line-height: 1.35;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.sp-card__excerpt {
    margin: 4px 0 0; color: #6b7280; font-size: .95rem; line-height: 1.5;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

.sp-card__footer {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 12px 16px; border-top: 1px solid #eaeaea;
}
.sp-card__price { display: inline-flex; align-items: center; gap: 6px; font-weight: 500; font-variant-numeric: tabular-nums; white-space: nowrap; }
.sp-card__cta { display: inline-flex; align-items: center; gap: 5px; color: #222; white-space: nowrap; }
.sp-card__cta i { margin-top: 2px; transition: transform .15s; }
.sp-card:hover .sp-card__cta i { transform: translateX(3px); }

/* Detay ------------------------------------------------------------------- */
.sp-breadcrumb { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 24px; color: #6b7280; font-size: .9rem; }
.sp-breadcrumb a { color: #6b7280; text-decoration: none; }
.sp-breadcrumb a:hover { color: #222; }
.sp-breadcrumb [aria-current] { color: #222; max-width: 60vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sp-notice { margin-bottom: 20px; padding: 10px 14px; background: #fafafa; border: 1px solid #eaeaea; border-radius: 3px; font-size: .95rem; }

.sp-detail { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 56px; align-items: start; }

.sp-gallery__main { aspect-ratio: 1 / 1; border-radius: .375rem; cursor: zoom-in; }
.sp-gallery__main:focus-visible { outline: 2px solid #222; outline-offset: 3px; }
.sp-gallery__zoom {
    position: absolute; right: 14px; top: 14px; z-index: 2;
    width: 40px; height: 40px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    background: rgba(255, 255, 255, .92); color: #222;
    opacity: 0; transition: opacity .2s;
}
.sp-gallery__main:hover .sp-gallery__zoom { opacity: 1; }
.sp-gallery__nav {
    position: absolute; top: 50%; z-index: 3; transform: translateY(-50%);
    width: 44px; height: 44px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    border: 1px solid rgba(0, 0, 0, .1); background: #fff; color: #222; cursor: pointer;
    box-shadow: 0 4px 8px 0 rgba(50, 25, 25, .1);
    opacity: 0; transition: opacity .2s;
}
.sp-gallery__main:hover .sp-gallery__nav, .sp-gallery__nav:focus-visible { opacity: 1; }
.sp-gallery__nav:focus-visible { outline: 2px solid #222; outline-offset: 2px; }
.sp-gallery__nav--prev { left: 14px; }
.sp-gallery__nav--next { right: 14px; }

.sp-thumbs { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; margin-top: 10px; }
.sp-thumb { position: relative; padding: 0; border: 0; background: none; cursor: pointer; border-radius: .375rem; opacity: .6; transition: opacity .2s; }
.sp-thumb .sp-frame { aspect-ratio: 1 / 1; border-radius: .375rem; }
.sp-thumb::after { content: ''; position: absolute; inset: 0; border-radius: .375rem; box-shadow: inset 0 0 0 2px transparent; transition: box-shadow .2s; }
.sp-thumb:hover, .sp-thumb[aria-current="true"] { opacity: 1; }
.sp-thumb[aria-current="true"]::after { box-shadow: inset 0 0 0 2px #222; }
.sp-thumb:focus-visible { outline: 2px solid #222; outline-offset: 2px; opacity: 1; }

.sp-info { position: sticky; top: 100px; }
.sp-info__title { margin: 0; color: #111827; font-size: clamp(1.75rem, 3vw, 2.4rem); font-weight: 500; line-height: 1.2; word-break: break-word; }
.sp-info__price { margin: 14px 0 0; font-size: 1.5rem; font-weight: 500; font-variant-numeric: tabular-nums; }

.sp-info__desc { margin-top: 28px; padding-top: 24px; border-top: 1px solid #eaeaea; }
.sp-info__subtitle { margin: 0 0 10px; font-size: 1rem; font-weight: 500; color: #222; }
.sp-prose { color: #374151; line-height: 1.7; overflow-wrap: anywhere; }
.sp-prose > *:first-child { margin-top: 0; }
.sp-prose > *:last-child { margin-bottom: 0; }
.sp-prose p { margin: 0 0 1em; }
.sp-prose ul, .sp-prose ol { margin: 0 0 1em; padding-left: 1.2em; }
.sp-prose li { margin-bottom: .3em; }
.sp-prose a { color: #222; }
.sp-prose img { max-width: 100%; height: auto; border-radius: .375rem; }
.sp-prose h1, .sp-prose h2, .sp-prose h3, .sp-prose h4 { color: #222; font-weight: 500; line-height: 1.3; margin: 1.3em 0 .5em; }

.sp-info__actions { margin-top: 28px; padding-top: 24px; border-top: 1px solid #eaeaea; }
.sp-btn {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    width: 100%; min-height: 50px; padding: 0 20px;
    border-radius: 5px; background: #222; color: #fff;
    box-shadow: 0 4px 8px 0 rgba(50, 25, 25, .1);
    font: inherit; font-size: 1rem; font-weight: 500; letter-spacing: .02em; text-decoration: none;
    transition: background-color .2s;
}
.sp-btn:hover { background: #000; color: #fff; }
.sp-btn:focus-visible { outline: 2px solid #222; outline-offset: 3px; }
.sp-btn i { margin-top: 2px; }
.sp-info__hint { margin: 10px 0 0; color: #6b7280; font-size: .9rem; text-align: center; }

.sp-related { margin-top: 72px; padding-top: 32px; border-top: 1px solid #eaeaea; }
.sp-related__head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.sp-related__head h2 { margin: 0; font-size: 1.4rem; font-weight: 500; }
.sp-link { display: inline-flex; align-items: center; gap: 5px; color: #222; text-decoration: none; }
.sp-link i { margin-top: 2px; }
.sp-link:hover { text-decoration: underline; }

/* Lightbox ---------------------------------------------------------------- */
.sp-lightbox {
    position: fixed; inset: 0; z-index: 1000;
    display: none; align-items: center; justify-content: center;
    padding: 64px 16px; background: rgba(20, 20, 20, .94);
}
.sp-lightbox--open { display: flex; }
.sp-lightbox img { max-width: 100%; max-height: 100%; object-fit: contain; user-select: none; }
.sp-lightbox__btn {
    position: absolute; width: 48px; height: 48px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    border: 0; background: rgba(255, 255, 255, .12); color: #fff; cursor: pointer;
    transition: background-color .2s;
}
.sp-lightbox__btn:hover { background: rgba(255, 255, 255, .24); }
.sp-lightbox__btn:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.sp-lightbox__close { top: 16px; right: 16px; }
.sp-lightbox__prev { left: 16px; top: 50%; transform: translateY(-50%); }
.sp-lightbox__next { right: 16px; top: 50%; transform: translateY(-50%); }
.sp-lightbox__counter { position: absolute; top: 30px; left: 50%; transform: translateX(-50%); color: rgba(255, 255, 255, .8); font-size: .9rem; font-variant-numeric: tabular-nums; }
body.sp-lock { overflow: hidden; }

/* Responsive -------------------------------------------------------------- */
@media (max-width: 1024px) {
    .sp-grid--4 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .sp-grid--4 > :nth-child(4) { display: none; }
    .sp-detail { gap: 36px; }
}
@media (max-width: 860px) {
    .sp-head { flex-direction: column; align-items: stretch; gap: 12px; }
    .sp-search { flex-basis: auto; width: 100%; }
    .sp-grid, .sp-grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 14px; }
    .sp-grid--4 > :nth-child(4) { display: flex; }
    .sp-detail { grid-template-columns: 1fr; gap: 28px; }
    .sp-info { position: static; }
    .sp-gallery__nav { opacity: 1; }
    .sp-thumbs { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
    .sp-container { padding: 24px 16px 56px; }
    .sp-card__body { padding: 10px 12px 8px; }
    .sp-card__title { font-size: 1rem; }
    .sp-card__excerpt { font-size: .875rem; }
    .sp-card__footer { padding: 10px 12px; gap: 6px; }
    .sp-card__price svg { display: none; }
    .sp-card__cta { font-size: .9rem; }
    .sp-gallery__nav { width: 40px; height: 40px; }
    .sp-gallery__nav--prev { left: 10px; }
    .sp-gallery__nav--next { right: 10px; }
    .sp-thumbs { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
    .sp-related { margin-top: 56px; }
    .sp-lightbox__prev, .sp-lightbox__next { top: auto; bottom: 16px; transform: none; }
    .sp-lightbox__prev { left: calc(50% - 60px); }
    .sp-lightbox__next { right: calc(50% - 60px); }
}
@media (hover: none) {
    .sp-gallery__zoom { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
    .sp *, .sp-lightbox * { transition: none !important; }
}
