/* =============================================================
   SEBA Gifts
   Design tokens: Plus Jakarta Sans, beige/grey palette z motywu
   ============================================================= */

/* ---- Sekcja karuzeli w koszyku -------------------------------- */

.seba-gifts-wrap {
    position: relative;
    box-sizing: border-box;
    max-width: 100%;
    background: #f9f7f1;            /* $beige50 */
    border: 1px solid #d8cfaf;      /* $beige200 */
    border-radius: 12px;
    padding: 24px;
    margin: 0 0 32px;
    font-family: "Plus Jakarta Sans", sans-serif;
    overflow: hidden;
}

/* Loading overlay */
.seba-gifts-wrap.is-loading::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(249, 247, 241, .7);   /* beige50 semi-transparent */
    border-radius: 12px;
    z-index: 20;
    cursor: wait;
}

/* ---- Nagłówek ------------------------------------------------- */

.seba-gifts-header {
    display: flex;
    align-items: center;
    gap: 10px;
    border-radius: 8px;
    padding: 8px 0;
    margin-bottom: 12px;
}

.seba-gifts-header__icon {
    width: 40px;
    height: 40px;
    min-width: 40px;
    object-fit: contain;
    display: block;
}

/* Stan: brak kwalifikacji — zachęta */
.seba-gifts-header--promo {
    padding-left: 0;
    padding-right: 0;
}

.seba-gifts-header--promo .seba-gifts-headline {
    font-size: 0.9375rem;           /* 15px */
    font-weight: 600;
    color: #cc7d74;
    line-height: 1.5;
    margin: 0;
}

/* Stan: kwalifikuje, wolne sloty — akcja */
.seba-gifts-header--qualify {
    padding-left: 0;
    padding-right: 0;
}

.seba-gifts-header--qualify .seba-gifts-headline {
    font-size: 0.9375rem;
    font-weight: 600;
    color: #cc7d74;
    line-height: 1.5;
    margin: 0;
}

/* Stan: wszystkie sloty zajęte — potwierdzenie */
.seba-gifts-header--selected {
    padding-left: 0;
    padding-right: 0;
}

.seba-gifts-header--selected .seba-gifts-headline {
    font-size: 0.9375rem;
    font-weight: 600;
    color: #cc7d74;
    line-height: 1.5;
    margin: 0;
}

/* ---- Splide — nadpisania dla karuzeli prezentów --------------- */

/* Padding boczny tworzy strefę dla strzałek — nie najeżdżają na slajdy */
.seba-gifts-splide {
    padding: 0 48px;
}

.seba-gifts-wrap .splide__arrow {
    background: #f2efe4;            /* $beige100 */
    border: 1px solid #d8cfaf;      /* $beige200 */
    width: 36px;
    height: 36px;
    opacity: 1;
    transition: background 0.3s ease-in-out, border-color 0.3s ease-in-out;
}

.seba-gifts-wrap .splide__arrow--prev { left:  6px; }
.seba-gifts-wrap .splide__arrow--next { right: 6px; }

.seba-gifts-wrap .splide__arrow:hover:not(:disabled) {
    background: #d8cfaf;
}

.seba-gifts-wrap .splide__arrow:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.seba-gifts-wrap .splide__arrow svg {
    width: 14px;
    height: 14px;
    fill: #292524;                  /* $grey800 */
}

/* ---- Karta prezentu ------------------------------------------ */

.seba-gifts-slide {
    padding: 4px;                   /* margines między krawędzią a kartą */
}

.seba-gifts-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: #fff;
    border: 1.5px solid #e7e5e4;   /* $grey200 */
    border-radius: 8px;
    overflow: hidden;
    transition: border-color 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
}

.seba-gifts-card:hover {
    border-color: #d7d3d0;          /* $grey300 */
    box-shadow: 0px 4px 8px -2px rgba(0, 0, 0, .1);
}

/* Karta zaznaczona */
.seba-gifts-slide.is-selected .seba-gifts-card {
    border-color: #326212;          /* $greenPrimary */
    box-shadow: 0px 4px 8px -2px rgba(50, 98, 18, .2);
}

/* Zdjęcie */
.seba-gifts-card__img-link {
    display: block;
    overflow: hidden;
    background: #f5f5f4;            /* $grey100 */
}

.seba-gifts-card__img {
    display: block;
    width: 100%;
    height: 165px;
    object-fit: cover;
    transition: transform 0.3s ease-in-out;
}

.seba-gifts-card__img-link:hover .seba-gifts-card__img {
    transform: scale(1.06);
}

/* Tytuły produktu */
.seba-gifts-card__titles {
    padding: 10px 12px 4px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

/* Krótka nazwa — główny tytuł */
.seba-gifts-card__short-name {
    font-size: 0.9375rem;           /* 15px */
    font-weight: 600;
    line-height: 1.3;
    color: #292524;                 /* $grey800 */
}

/* Pełna nazwa — drobny podtytuł */
.seba-gifts-card__name {
    font-size: 0.75rem;             /* 12px */
    font-weight: 400;
    line-height: 1.35;
    color: #79716b;                 /* $grey500 */
}

/* Stopka karty */
.seba-gifts-card__footer {
    padding: 4px 12px 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

/* ---- Przyciski karty ----------------------------------------- */

.seba-gifts-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 36px;
    padding: 0 14px;
    border-radius: 8px;
    font-family: "Plus Jakarta Sans", sans-serif;
    font-size: 0.8125rem;           /* 13px */
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s ease-in-out, color 0.15s ease-in-out;
    white-space: nowrap;
    border: none;
    line-height: 1;
    text-align: center;
}

/* Dodaj — zielony $greenPrimary (zgodnie z btn--green motywu) */
.seba-gifts-btn--add {
    background: #326212;            /* $greenPrimary */
    color: #f5f5f4;
}

.seba-gifts-btn--add:hover {
    background: #3a7416;
    color: #f5f5f4;
}

/* Dodano ✓ — wyszarzony, disabled */
.seba-gifts-btn--added {
    background: #e7e5e4;            /* $grey200 */
    color: #a9a29d;                 /* $grey400 */
    cursor: not-allowed;
    opacity: 0.75;
}

.seba-gifts-btn--added:hover {
    background: #e7e5e4;
    color: #a9a29d;
}

/* Wiersz: główny przycisk + ikonka usuń */
.seba-gifts-card__actions {
    display: flex;
    gap: 6px;
    align-items: center;
}

.seba-gifts-card__actions .seba-gifts-btn {
    flex: 1;
}

/* Usuń — ikonka kosz, subtelna */
.seba-gifts-btn--remove {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 32px;
    height: 36px;
    padding: 0;
    background: transparent;
    border: 1px solid #e7e5e4;     /* $grey200 */
    border-radius: 8px;
    color: #c4bdb8;
    cursor: pointer;
    transition: color 0.15s ease-in-out, border-color 0.15s ease-in-out, background 0.15s ease-in-out;
}

.seba-gifts-btn--remove:hover {
    background: #fff1f0;
    color: #b24646;
    border-color: #f5c6c6;
}

/* Zamień — styl btn--primary (beżowy, drugorzędne) */
.seba-gifts-btn--change {
    background: #f2efe4;            /* $beige100 */
    color: #292524;                 /* $grey800 */
}

.seba-gifts-btn--change:hover {
    background: #f9f7f1;            /* $beige50 */
    color: #292524;
}

/* ---- Cena przekreślona (stan locked) ------------------------- */

.seba-gifts-card__price {
    display: flex;
    align-items: baseline;
    gap: 7px;
    padding: 4px 0 2px;
    flex-wrap: wrap;
}

.seba-gifts-card__price-regular {
    font-size: 0.875rem;            /* 14px */
    font-weight: 400;
    color: #a9a29d;                 /* $grey400 */
    text-decoration: line-through;
    font-style: normal;
}

.seba-gifts-card__price-regular .woocommerce-Price-amount {
    color: inherit;
}

.seba-gifts-card__price-gift {
    font-size: 1rem;                /* 16px */
    font-weight: 700;
    color: #b24646;                 /* $promoPrice */
    text-decoration: none;
}

.seba-gifts-card__price-gift .woocommerce-Price-amount {
    color: inherit;
}

/* ---- Podtytuł nagłówka promo --------------------------------- */

.seba-gifts-header__content {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.seba-gifts-subheadline {
    margin: 0;
    font-size: 0.8125rem;           /* 13px */
    font-weight: 400;
    color: #57534e;                 /* $grey600 */
    line-height: 1.45;
}

.seba-gifts-header--promo .seba-gifts-subheadline {
    color: #57534e;
}

/* ---- Wskaźniki stanu kart ------------------------------------ */

/* Wybrano ✓ */
.seba-gifts-card__selected-badge {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.8125rem;
    font-weight: 700;
    color: #326212;                 /* $greenPrimary */
    line-height: 1;
}

/* Zablokowany — brak kwalifikacji */
.seba-gifts-card__locked {
    display: block;
    font-size: 0.75rem;             /* 12px */
    font-weight: 500;
    color: #a9a29d;                 /* $grey400 */
    font-style: italic;
    text-align: center;
    padding: 4px 0;
}

/* ---- Badge "Prezent" w wierszu koszyka ----------------------- */

.seba-gift-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px 4px 7px;
    background: transparent;
    color: #cc7d74;
    border: 1px solid #cc7d74;
    font-family: "Plus Jakarta Sans", sans-serif;
    font-size: 0.75rem;             /* 12px */
    font-weight: 700;
    border-radius: 20px;            /* pill */
    vertical-align: middle;
    margin-left: 6px;
    letter-spacing: 0.03em;
    line-height: 1;
    white-space: nowrap;
    text-decoration: none;
    width: fit-content;
}

.seba-gift-badge__icon {
    display: block;
    width: 14px;
    height: 14px;
    object-fit: contain;
    flex-shrink: 0;
}

/* ---- Promo na karcie produktu -------------------------------- */

.seba-gifts-product-promo {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #fdf5f4;            /* very light tint of #cc7d74 */
    border-left: 3px solid #cc7d74;
    padding: 11px 15px;
    border-radius: 10px;
    box-shadow: 0px 2px 6px -1px rgba(0, 0, 0, .05);
    margin: 12px 0 16px;
    transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
}

.seba-gifts-product-promo:hover {
    transform: translateY(-2px);
    box-shadow: 0px 8px 14px -4px rgba(0, 0, 0, .07);
}

.seba-gifts-product-promo__icon {
    width: 28px;
    height: 28px;
    min-width: 28px;
    object-fit: contain;
    display: block;
}

.seba-gifts-product-promo__text {
    font-family: "Plus Jakarta Sans", sans-serif;
    font-size: 0.875rem;            /* 14px */
    font-weight: 500;
    color: #57534e;                 /* $grey600 */
    line-height: 1.45;
}

.seba-gifts-product-promo__text strong {
    font-weight: 700;
    color: #cc7d74;
}

/* ---- Responsywność ------------------------------------------- */

@media (max-width: 575px) {
    .seba-gifts-wrap {
        padding: 12px;
        border-radius: 8px;
    }
    .seba-gifts-header {
        padding: 12px 14px;
        gap: 10px;
    }
    .seba-gifts-header__icon {
        width: 32px;
        height: 32px;
        min-width: 32px;
    }
    .seba-gifts-header--qualify .seba-gifts-headline,
    .seba-gifts-header--promo .seba-gifts-headline,
    .seba-gifts-header--selected .seba-gifts-headline {
        font-size: 0.875rem;
    }
    .seba-gifts-product-promo {
        padding: 9px 12px;
        gap: 10px;
    }
    .seba-gifts-product-promo__icon {
        width: 24px;
        height: 24px;
        min-width: 24px;
    }
    .seba-gifts-product-promo__text {
        font-size: 0.8125rem;       /* 13px */
    }

    /* Na mobile — ukryj strzałki (swipe wystarczy), reset paddingu splide */
    .seba-gifts-splide {
        padding: 0;
    }
    .seba-gifts-wrap .splide__arrow {
        display: none;
    }

    /* Nieco mniejsze zdjęcie na bardzo wąskich ekranach */
    .seba-gifts-card__img {
        height: 145px;
    }
}
