:root {
    --ff-radius: var(--sh-radius, 14px);
    --ff-radius-pill: var(--sh-radius-pill, 999px);
    --ff-color-primary: var(--sh-color-primary, #2e6a4f);
    --ff-color-primary-dark: var(--sh-color-primary-dark, #245540);
    --ff-shadow: var(--sh-shadow-soft, 0 10px 24px rgba(15, 23, 42, 0.06));
}

.ff-billed-slider {
    position: relative;
    width: 100%;
    max-width: 100%;
    border-radius: var(--ff-radius);
    overflow: hidden;
    box-shadow: var(--ff-shadow);
}

.ff-billed-slider .swiper-wrapper {
    height: var(--ff-height-desktop, 420px);
}

@media (max-width: 768px) {
    .ff-billed-slider .swiper-wrapper {
        height: var(--ff-height-mobile, 320px);
    }
}

.ff-slide {
    height: 100%;
}

.ff-slide-media,
.ff-slide-media img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.ff-overlay {
    position: absolute;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    padding: 1rem 1.25rem;
    color: #fff;
    max-width: min(640px, 90%);
}

.ff-overlay-bg {
    background: rgba(15, 23, 42, 0.5);
    border-radius: var(--ff-radius);
}

.ff-overlay-title {
    font-size: 1.6rem;
    line-height: 1.2;
    font-weight: 700;
}

.ff-overlay-body {
    font-size: 1rem;
    line-height: 1.5;
}

.ff-overlay-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.65rem 1.5rem;
    border-radius: var(--ff-radius-pill);
    background: var(--ff-color-primary);
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    min-height: 48px;
    transition: all 0.2s ease;
}

.ff-overlay-button:hover,
.ff-overlay-button:focus {
    background: var(--ff-color-primary-dark);
    transform: translateY(-1px);
}

.ff-pos-tl { top: 1rem; left: 1rem; }
.ff-pos-tr { top: 1rem; right: 1rem; }
.ff-pos-bl { bottom: 1rem; left: 1rem; }
.ff-pos-br { bottom: 1rem; right: 1rem; }
.ff-pos-center {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    align-items: center;
}

.ff-billed-slider .swiper-button-next,
.ff-billed-slider .swiper-button-prev {
    background: rgba(255, 255, 255, 0.9);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.ff-billed-slider .swiper-pagination-bullet {
    width: 10px;
    height: 10px;
    background: rgba(255, 255, 255, 0.6);
    opacity: 1;
}

.ff-billed-slider .swiper-pagination-bullet-active {
    background: var(--ff-color-primary);
}

/* Admin preview helpers */
.ff-slider-list {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 10px;
}

.ff-slider-item {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 10px;
    margin-bottom: 10px;
    background: #fff;
}

.ff-slider-item-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: move;
    gap: 8px;
    padding-bottom: 8px;
    margin-bottom: 8px;
    border-bottom: 1px solid #e5e7eb;
}

.ff-slider-item-head .ff-drag-handle {
    color: #9ca3af;
    cursor: grab;
}

.ff-slider-item-body {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 16px;
}

@media (max-width: 782px) {
    .ff-slider-item-body {
        grid-template-columns: 1fr;
    }
}

.ff-slider-item .ff-image-preview {
    position: relative;
    background: #f3f4f6;
    border-radius: 8px;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ff-slider-item .ff-image-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.ff-slider-item .ff-image-preview em {
    color: #6b7280;
    font-size: 13px;
}

.ff-slider-item .ff-preview-label {
    position: absolute;
    bottom: 6px;
    right: 6px;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 4px;
}

.ff-slide-fields {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.ff-slide-fields p {
    margin: 0;
}

.ff-slider-placeholder {
    border: 2px dashed #2271b1;
    background: #f0f6fc;
    border-radius: 8px;
    min-height: 60px;
    margin-bottom: 10px;
}

/* Cropper modal (admin) */
.ff-cropper-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}
.ff-cropper-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
}
.ff-cropper-dialog {
    position: relative;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    z-index: 1;
}
.ff-cropper-header,
.ff-cropper-footer {
    padding: 10px 12px;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.ff-crop-dims {
    font-size: 12px;
    color: #6b7280;
    margin-left: auto;
    margin-right: 8px;
}
.ff-cropper-footer {
    border-top: 1px solid #e5e7eb;
    border-bottom: 0;
    gap: 8px;
    justify-content: flex-end;
}
.ff-cropper-body {
    padding: 12px;
    min-width: 320px;
}
.ff-cropper-body img {
    max-width: 80vw;
    max-height: 70vh;
    display: block;
}
.ff-crop-close {
    background: transparent;
    border: none;
    font-size: 18px;
    cursor: pointer;
    line-height: 1;
}
