/* ============================================
   VEXPO CMS - Front Swiper Module
   Skeleton CSS Variables - Carousel Responsivo
   ============================================ */

/* Variables */
:root {
    --vex-swiper-bg: var(--white);
    --vex-swiper-card-bg: var(--white);
    --vex-swiper-accent: var(--primary);
    --vex-swiper-accent-hover: var(--primary-dark);
    --vex-swiper-text: var(--text-primary);
    --vex-swiper-text-secondary: var(--text-muted);
    --vex-swiper-border: var(--gray-200);
    --vex-swiper-input-bg: var(--gray-50);
}

/* Section */
.vex-swiper-section {
    padding: 40px 0;
    background: var(--bg-body);
}

/* Container */
.vex-swiper-container {
    max-width: 100%;
    margin: 0 auto 0px;
    position: relative;
}

.vex-swiper-container:last-child {
    margin-bottom: 0;
}

.vex-swiper-inactive {
    opacity: 0.5;
    border: 2px dashed var(--vex-swiper-accent);
    border-radius: 8px;
    padding: 20px;
    background: var(--gray-50);
}

/* Header */
.vex-swiper-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 0 20px;
}

.vex-swiper-title {
    color: var(--vex-swiper-text);
    font-size: 1.5rem;
    font-weight: 600;
    padding-top: 50px;
    margin-left: 3%;
    display: none;
}

/* Admin Button */
.vex-swiper-admin-btn {
    background: var(--vex-swiper-card-bg);
    border: 1px solid var(--vex-swiper-border);
    border-radius: 6px;
    padding: 8px;
    cursor: pointer;
    color: var(--vex-swiper-text-secondary);
    transition: all 0.2s ease;
}

.vex-swiper-admin-btn:hover {
    background: var(--vex-swiper-accent);
    color: var(--white);
    border-color: var(--vex-swiper-accent);
}

/* Wrapper */
.vex-swiper-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 20px;
}

/* Navigation */
.vex-swiper-nav {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    background: var(--vex-swiper-card-bg);
    border: 1px solid var(--vex-swiper-border);
    border-radius: 50%;
    cursor: pointer;
    color: var(--vex-swiper-text);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    box-shadow: var(--shadow-sm);
}

.vex-swiper-nav:hover:not(:disabled) {
    background: var(--vex-swiper-accent);
    color: var(--white);
    border-color: var(--vex-swiper-accent);
    box-shadow: var(--shadow-md);
}

.vex-swiper-nav:disabled {
    cursor: not-allowed;
    opacity: 0.5;
}

/* Track */
.vex-swiper-track {
    flex: 1;
    overflow: hidden;
}

.vex-swiper-slides {
    display: flex;
    gap: 16px;
    transition: transform 0.3s ease;
    cursor: grab;
}

.vex-swiper-slides:active {
    cursor: grabbing;
}

/* Slide */
.vex-swiper-slide {
    flex: 0 0 calc((100% - 64px) / 5);
    min-width: 200px;
    background: var(--white);
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-200);
}

.vex-swiper-slide:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.vex-swiper-slide a {
    text-decoration: none;
    color: inherit;
    display: block;
    height: 100%;
}

/* Image */
.vex-swiper-img-wrap {
    width: 100%;
    height: 270px;
    overflow: hidden;
    background: var(--gray-100);
}

.vex-swiper-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.vex-swiper-slide:hover .vex-swiper-img-wrap img {
    transform: scale(1.05);
}

.vex-swiper-img-brand {
    background: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    border-bottom: 1px solid var(--gray-200);
}

.vex-swiper-img-brand img {
    object-fit: contain;
    max-height: 80px;
}

/* Info */
.vex-swiper-info {
    padding: 12px;
}

.vex-swiper-item-title {
    color: var(--vex-swiper-text);
    font-size: 0.95rem;
    font-weight: 500;
    margin: 0 0 6px;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.vex-swiper-brand,
.vex-swiper-category {
    display: block;
    color: var(--vex-swiper-accent);
    font-size: 0.75rem;
    text-transform: uppercase;
    margin-bottom: 4px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.vex-swiper-code {
    display: block;
    color: var(--vex-swiper-text-secondary);
    font-size: 0.75rem;
    margin-bottom: 6px;
    font-family: 'Monaco', 'Menlo', monospace;
}

.vex-swiper-price {
    display: block;
    color: var(--vex-swiper-accent);
    font-size: 1.1rem;
    font-weight: 600;
}

.vex-swiper-date {
    display: block;
    color: var(--vex-swiper-text-secondary);
    font-size: 0.8rem;
}

/* Ribbon */
.vex-swiper-ribbon {
    position: absolute;
    top: 19px;
    right: -36px;
    background: var(--vex-swiper-accent);
    color: var(--white);
    font-size: 0.7rem;
    text-transform: uppercase;
    padding: 5px 50px;
    transform: rotate(45deg);
    z-index: 10;
    text-align: center;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.vex-swiper-ribbon-featured {
    background: var(--danger);
    color: var(--white);
}

/* Empty */
.vex-swiper-empty {
    width: 100%;
    padding: 40px;
    text-align: center;
    color: var(--vex-swiper-text-secondary);
}

/* ============== MODAL ============== */
.vex-swiper-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    backdrop-filter: blur(3px);
}

.vex-swiper-modal-overlay.vex-swiper-modal-open {
    display: flex;
}

.vex-swiper-modal {
    background: var(--vex-swiper-card-bg);
    border-radius: 12px;
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-2xl);
}

.vex-swiper-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid var(--vex-swiper-border);
    background: var(--gray-50);
}

.vex-swiper-modal-title {
    color: var(--vex-swiper-text);
    font-size: 1.2rem;
    font-weight: 600;
    margin: 0;
}

.vex-swiper-modal-close {
    background: none;
    border: none;
    color: var(--vex-swiper-text-secondary);
    cursor: pointer;
    padding: 4px;
    font-size: 24px;
    transition: color 0.2s ease;
}

.vex-swiper-modal-close:hover {
    color: var(--vex-swiper-text);
}

.vex-swiper-modal-body {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
}

.vex-swiper-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 16px 20px;
    border-top: 1px solid var(--vex-swiper-border);
    background: var(--gray-50);
}

/* Form */
.vex-swiper-form-group {
    margin-bottom: 16px;
}

.vex-swiper-form-group label {
    display: block;
    color: var(--vex-swiper-text);
    font-size: 0.9rem;
    margin-bottom: 6px;
    font-weight: 500;
}

.vex-swiper-form-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.vex-swiper-form-row label {
    margin-bottom: 0;
}

.vex-swiper-input,
.vex-swiper-select {
    width: 100%;
    background: var(--vex-swiper-input-bg);
    border: 1px solid var(--vex-swiper-border);
    border-radius: 6px;
    padding: 10px 12px;
    color: var(--vex-swiper-text);
    font-size: 0.95rem;
    transition: border-color 0.2s ease;
    font-family: inherit;
}

.vex-swiper-input::placeholder,
.vex-swiper-select::placeholder {
    color: var(--gray-400);
}

.vex-swiper-input:focus,
.vex-swiper-select:focus {
    outline: none;
    border-color: var(--vex-swiper-accent);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}

.vex-swiper-color {
    width: 60px;
    height: 40px;
    padding: 2px;
    cursor: pointer;
    border: 1px solid var(--vex-swiper-border);
    border-radius: 6px;
}

.vex-swiper-help {
    display: block;
    color: var(--vex-swiper-text-secondary);
    font-size: 0.75rem;
    margin-top: 4px;
}

/* Switch */
.vex-swiper-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 26px;
}

.vex-swiper-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.vex-swiper-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--gray-300);
    border-radius: 26px;
    transition: 0.3s;
}

.vex-swiper-slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background: var(--white);
    border-radius: 50%;
    transition: 0.3s;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.vex-swiper-switch input:checked + .vex-swiper-slider {
    background: var(--vex-swiper-accent);
}

.vex-swiper-switch input:checked + .vex-swiper-slider:before {
    transform: translateX(24px);
}

/* Buttons */
.vex-swiper-btn {
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    font-family: inherit;
}

.vex-swiper-btn-primary {
    background: var(--vex-swiper-accent);
    color: var(--white);
}

.vex-swiper-btn-primary:hover {
    background: var(--vex-swiper-accent-hover);
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

.vex-swiper-btn-secondary {
    background: var(--vex-swiper-border);
    color: var(--vex-swiper-text);
}

.vex-swiper-btn-secondary:hover {
    background: var(--gray-300);
    box-shadow: var(--shadow-md);
}

/* ============== RESPONSIVE ============== */
@media (max-width: 1200px) {
    .vex-swiper-slide {
        flex: 0 0 calc((100% - 48px) / 4);
    }
}

@media (max-width: 992px) {
    .vex-swiper-slide {
        flex: 0 0 calc((100% - 32px) / 3);
    }
}

@media (max-width: 768px) {
    .vex-swiper-section {
        padding: 30px 0;
    }

    .vex-swiper-wrapper {
        padding: 0 10px;
        gap: 8px;
    }

    .vex-swiper-slide {
        flex: 0 0 calc((100% - 16px) / 2);
        min-width: 150px;
    }
    
    .vex-swiper-nav {
        width: 36px;
        height: 36px;
        font-size: 16px;
    }
    
    .vex-swiper-title {
        font-size: 1.2rem;
    }

    .vex-swiper-img-wrap {
        height: 200px;
    }

    .vex-swiper-modal {
        max-width: 90vw;
    }
}

@media (max-width: 576px) {
    .vex-swiper-slide {
        flex: 0 0 100%;
        min-width: 100%;
    }
    
    .vex-swiper-nav {
        display: none;
    }
    
    .vex-swiper-wrapper {
        gap: 0;
    }

    .vex-swiper-header {
        padding: 0 10px;
    }

    .vex-swiper-img-wrap {
        height: 240px;
    }

    .vex-swiper-form-row {
        flex-direction: column;
        align-items: stretch;
    }

    .vex-swiper-modal-footer {
        flex-direction: column;
    }

    .vex-swiper-btn {
        width: 100%;
    }
}