/* Ürün sayfası - tarih + seçenek kartları (Product.RelatedProductIDs) */
.po {
    --po-blue: var(--bs-primary-dark, #1565C0);
    --po-blue-soft: #eaf1fb;
    --po-border: #dfe3ea;
    --po-muted: #6b7280;
    --po-ink: #1a2b49;
    --po-green: #1e7b45;
    --po-green-soft: #e3f4ea;
    --po-red: #b42318;
    --po-gold: #c99a1e;
    --po-gold-soft: #fdf6e3;
    border: 1px solid var(--po-border);
    border-radius: 14px;
    overflow: hidden;
    background: #fff;
    color: var(--po-ink);
}

.po-header {
    background: var(--po-blue);
    color: #fff;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    font-size: .85rem;
    padding: .85rem 1.25rem;
}

.po-body { padding: 1.25rem; }

.po-label-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: .5rem 1rem;
    flex-wrap: wrap;
    margin-bottom: .75rem;
}

.po-label {
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #4b5563;
}

.po-label.mt-4 { margin-bottom: .75rem; }

.po-hint { font-size: .8rem; color: var(--po-blue); }

/* ---------- Dates ---------- */
.po-dates {
    position: relative;
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: .6rem;
}

/* 5 gün + "Other date": 6 kutu eşit genişlikte; diğer tarihler "Other date" takviminden seçilir */
.po-days { display: contents; }

.po-days .po-date { min-width: 0; }

.po-date {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .1rem;
    min-height: 92px;
    padding: .5rem .25rem;
    background: #fff;
    border: 1px solid var(--po-border);
    border-radius: 12px;
    color: var(--po-ink);
    cursor: pointer;
    transition: border-color .15s, background-color .15s, box-shadow .15s;
}

.po-date:hover { border-color: var(--po-blue); }
.po-date:focus-visible { outline: 2px solid var(--po-blue); outline-offset: 2px; }

.po-date.is-active {
    background: var(--po-blue-soft);
    border: 2px solid var(--po-blue);
}

.po-date-dow { font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.po-date-day { font-size: 1.5rem; font-weight: 700; line-height: 1.1; }
.po-date-price { font-size: .72rem; color: #4b5563; text-align: center; line-height: 1.2; }
.po-date.is-soldout .po-date-price { color: var(--po-red); }
.po-date.is-soldout .po-date-day { color: #9ca3af; }

.po-date--other {
    min-width: 0;
    gap: .2rem;
    padding: .5rem .4rem;
    border: 1.5px dashed #b8c0cc;
    color: var(--po-blue);
    font-weight: 600;
    font-size: .9rem;
    line-height: 1.2;
    text-align: center;
}

.po-date--other .ti { font-size: 1.3rem; flex-shrink: 0; }

.po-date--loading { cursor: default; }
.po-date--loading span {
    display: block;
    width: 60%;
    height: 48px;
    border-radius: 6px;
    background: linear-gradient(90deg, #f1f3f6 25%, #e6e9ee 50%, #f1f3f6 75%);
    background-size: 200% 100%;
    animation: po-shimmer 1.2s infinite;
}

@keyframes po-shimmer { to { background-position: -200% 0; } }

.po-date--other.is-open { border-style: solid; border-color: var(--po-blue); background: var(--po-blue-soft); }

.po-calendar {
    position: absolute;
    top: calc(100% + .5rem);
    right: 0;
    z-index: 30;
    background: #fff;
    border: 1px solid var(--po-border);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(26, 43, 73, .15);
    padding: .5rem;
}

.po-calendar { width: 330px; max-width: calc(100vw - 2rem); }

/* temanın flatpickr css'i takvimi %100 genişlik + gün başına max 40px yapıyor; panel içinde düzelt */
.po-calendar .flatpickr-calendar,
.po-calendar .flatpickr-calendar.inline {
    position: relative;
    top: 0;
    width: 100%;
    margin: 0;
    padding: 0;
    box-shadow: none;
    opacity: 1;
    visibility: visible;
}

.po-calendar .flatpickr-days,
.po-calendar .dayContainer {
    width: 100%;
    min-width: 0;
    max-width: none;
}

.po-calendar .dayContainer { justify-content: flex-start; box-shadow: none; }

.po-calendar .flatpickr-day {
    flex-basis: 14.2857143%;
    width: 14.2857143%;
    max-width: none;
    height: 38px;
    line-height: 38px;
}

.po-calendar .flatpickr-day.flatpickr-disabled { color: #c4c9d2; text-decoration: none; }
.po-calendar .flatpickr-day.today:not(.selected) {
    background: transparent;
    color: var(--po-ink);
    border-color: var(--po-blue);
}

/* flatpickr'ın bağlandığı input görünmesin */
.po-calendar > input,
.po-calendar .flatpickr-input { display: none !important; }

.po-calendar .flatpickr-day.selected,
.po-calendar .flatpickr-day.selected:hover {
    background: var(--po-blue);
    border-color: var(--po-blue);
}

.po--fallback .po-label-row,
.po--fallback .po-dates,
.po--fallback [data-po-options-label] { display: none; }

/* ---------- Cards ---------- */
.po-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    border: 1px solid var(--po-border);
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
}

.po-card--recommended { border: 1.5px solid var(--po-gold); }

.po-card-media { position: relative; aspect-ratio: 520 / 300; background: #f1f3f6; }
.po-card-media img { width: 100%; height: 100%; object-fit: cover; display: block; transition: filter .2s; }

.po-ribbon {
    position: absolute;
    top: .6rem;
    right: .6rem;
    background: var(--po-gold);
    color: #fff;
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    padding: .25rem .6rem;
    border-radius: 6px;
}

.po-soldout-bar {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    background: var(--po-red);
    color: #fff;
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: .05em;
    text-transform: uppercase;
    padding: .4rem .75rem;
}

.po-card-body { padding: 1rem; flex: 1 1 auto; }

.po-badges { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: .6rem; min-height: 1.4rem; }

.po-type, .po-status, .po-next {
    font-size: .7rem;
    font-weight: 700;
    padding: .2rem .5rem;
    border-radius: 5px;
    line-height: 1.3;
}

.po-type { background: var(--po-blue); color: #fff; text-transform: uppercase; letter-spacing: .05em; }
.po-status { background: var(--po-green-soft); color: var(--po-green); }
.po-next { background: #eef0f3; color: #374151; font-weight: 600; }

.po-card-title { font-size: 1.15rem; font-weight: 700; margin: 0 0 .4rem; color: var(--po-ink); }
.po-card-desc { font-size: .88rem; color: #4b5563; margin: 0 0 .75rem; }

.po-chips { display: flex; flex-wrap: wrap; gap: .4rem; }
.po-chip {
    font-size: .75rem;
    border: 1px solid var(--po-border);
    border-radius: 999px;
    padding: .2rem .6rem;
    color: #374151;
    white-space: nowrap;
}
.po-chip .ti { color: var(--po-green); }

.po-card-foot { background: #f6f7f9; padding: 1rem; border-top: 1px solid #eef0f3; }
.po-card--recommended .po-card-foot { background: var(--po-gold-soft); }

.po-price { margin-bottom: .75rem; font-size: .85rem; color: #4b5563; }
.po-price strong { font-size: 1.6rem; color: var(--po-ink); margin: 0 .15rem; }

.po-btn { font-weight: 600; }

.po-more { font-weight: 600; padding-left: 1.5rem; padding-right: 1.5rem; }

/* sold out state */
.po-card.is-soldout .po-card-media img { filter: grayscale(1); }
.po-card.is-soldout .po-card-title { color: #6b7280; }
.po-card.is-soldout .po-type { background: #9ca3af; }

/* ---------- Alt banner + trust ---------- */
.po-alt {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: .75rem 1rem;
    flex-wrap: wrap;
    margin-top: 1.25rem;
    padding: 1rem 1.25rem;
    background: var(--po-blue-soft);
    border-radius: 10px;
    font-weight: 600;
    font-size: .92rem;
}

.po-alt-btn {
    background: none;
    border: 0;
    padding: 0;
    color: var(--po-blue);
    font-weight: 700;
    cursor: pointer;
}

.po-trust {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: .5rem 1.75rem;
    padding: .8rem 1rem;
    border-top: 1px solid #eef0f3;
    background: #fafbfc;
    font-size: .82rem;
    color: #374151;
}
.po-trust .ti { color: var(--po-green); }

/* ---------- Mobile ---------- */
@media (max-width: 767.98px) {
    .po-body { padding: 1rem; }
    .po-dates, .po-days { gap: .4rem; }
    .po-date { min-height: 80px; }
    .po-date-day { font-size: 1.25rem; }
    .po-date-price { font-size: .68rem; white-space: normal; text-align: center; line-height: 1.2; }
    .po-date--other { padding: .4rem .2rem; font-size: .75rem; }
    .po-calendar { left: 50%; right: auto; transform: translateX(-50%); }
}
