/* Wolf Stack Mockup Styles v1.2.0 */

/* ==========================================
   APP CONTAINER
   ========================================== */
.wolfstack-app {
    max-width: 900px;
    margin: 40px auto;
    font-family: 'Helvetica Neue', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* ==========================================
   INPUT SECTION
   ========================================== */
.ws-input-section {
    background: #fff;
    padding: 30px;
    border-radius: 0;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
}

.ws-title {
    text-align: center;
    color: #000;
    margin: 0 0 25px 0;
    font-size: 32px;
    font-weight: 600;
    font-family: 'Playfair Display', 'Didot', 'Georgia', serif;
    letter-spacing: 0.5px;
}

.ws-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.ws-full-width {
    grid-column: span 2;
}

.ws-input-group label {
    font-weight: 600;
    color: #333;
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
}

/* ==========================================
   BUTTONS
   ========================================== */
.ws-btn-generate {
    width: 100%;
    padding: 16px;
    font-size: 18px;
    font-weight: 600;
    background: #000;
    color: #fff;
    border: none;
    border-radius: 0;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.ws-btn-generate:hover {
    background: #222;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
}

.ws-btn-generate:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.ws-btn-cart {
    width: 100%;
    max-width: 260px;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 600;
    background-color: transparent;
    color: #000;
    border: 1px solid #000;
    border-radius: 0;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 20px;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.ws-btn-cart:hover {
    background-color: #000;
    color: #fff;
}

.ws-btn-cart:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* ==========================================
   RESULT AREA
   ========================================== */
.ws-result-area {
    margin-top: 40px;
}

.ws-preview-title {
    text-align: center;
    font-size: 26px;
    color: #000;
    margin-bottom: 20px;
    font-family: 'Playfair Display', 'Didot', 'Georgia', serif;
}

/* ==========================================
   CONTROLS SECTION
   ========================================== */
.ws-controls {
    background: #fff;
    padding: 25px;
    margin-top: 20px;
    border-radius: 0;
    border: 1px solid #e5e5e5;
    text-align: center;
}

.ws-controls-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
    align-items: flex-end;
}

/* ==========================================
   PRICE DISPLAY
   ========================================== */
.ws-price-display {
    margin-top: 25px;
    padding: 15px 30px;
    background: #fff;
    border: 2px solid #000;
    border-radius: 0;
    display: inline-block;
}

.ws-price-label {
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #666;
    margin-right: 10px;
}

.ws-price-value {
    font-size: 28px;
    font-weight: 600;
    color: #000;
    font-family: 'Playfair Display', 'Didot', 'Georgia', serif;
}

/* ==========================================
   ROOM PREVIEW
   ========================================== */

/* 2. LA SALA */
.ws-room-preview {
    width: 100%;
    aspect-ratio: 16/9;
    background-size: cover;
    background-position: center;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding-top: 10%;
    overflow: hidden;
    border-radius: 0;
    background-color: #e0e0e0;
    /* Gris para ver si carga el div aunque no cargue la foto */
    transition: background-image 1s ease-in-out;
}

@media (max-width: 768px) and (orientation: portrait) {
    .ws-room-preview {
        padding-top: 18%;
        /* Push artwork down in portrait mode */
    }
}

.ws-frame-wrapper {
    position: absolute;
    /* Debe ser absolute, no relative */

    /* El centrado matemático perfecto */
    transform: translate(-50%, -50%);

    width: var(--ws-scale, 30%);
    aspect-ratio: var(--ws-ratio, 3/4);
    box-shadow: 2px 5px 15px rgba(0, 0, 0, 0.4);
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    background-color: transparent;
    overflow: hidden;
}

/* 3. CAPAS (ORDEN CRÍTICO) */

/* Capa 1: Sombra (Fondo) */
.ws-wall-shadow {
    position: absolute;
    top: 5px;
    left: 5px;
    width: 100%;
    height: 100%;
    z-index: 5;
}

/* Capa 2: Imagen del Usuario — fills frame completely (frame ratio always matches image ratio) */
.ws-user-art {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* No bars — frame shape is always the image's own shape */
    z-index: 10;
    opacity: 1;
    transition: opacity 0.3s;

    /* IMAGE THEFT PROTECTION */
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-user-drag: none;
    -khtml-user-drag: none;
    -moz-user-drag: none;
    -o-user-drag: none;
    pointer-events: none;
}

/* Capa 3: Marco (Overlay) */
.ws-frame-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 20;
    pointer-events: none;
    background-size: 100% 100%;
    background-repeat: no-repeat;
}

/* Capa 4: Reflejo */
.ws-glass-reflection {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.15) 0%, rgba(255, 255, 255, 0) 50%);
    z-index: 30;
    pointer-events: none;
}

.ws-frame-wrapper.finish-matte .ws-glass-reflection {
    opacity: 0.05;
}

/* FIX INPUTS */
.ws-input-group select,
.ws-input-group textarea,
.ws-input-group input {
    min-height: 45px !important;
    padding: 10px 15px !important;
    font-size: 16px !important;
    width: 100%;
    border: 1px solid #ccc;
    border-radius: 0;
    box-sizing: border-box;
    background: #fff;
}

/* ==========================================
   SLIDER STYLES
   ========================================== */

.ws-slider-container {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
}

.ws-slider-viewport {
    flex: 1;
    overflow: hidden;
    border-radius: 0;
}

.ws-slider-track {
    display: flex;
    transition: transform 0.5s ease-in-out;
}

.ws-slider-slide {
    min-width: 100%;
    opacity: 0.3;
    transform: scale(0.95);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.ws-slider-slide.active {
    opacity: 1;
    transform: scale(1);
}

.ws-slide-label {
    text-align: center;
    margin-top: 10px;
    font-size: 14px;
    color: #666;
    font-weight: 500;
}

/* Slider Arrows — always visible against light room backgrounds */
.ws-slider-arrow {
    width: 44px;
    height: 44px;
    border-radius: 0;
    background: black !important;
    color: white !important;
    border: 1px solid #000;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
    flex-shrink: 0;
}

.ws-slider-arrow:hover {
    background: white !important;
    color: black !important;
    border-color: #000;
}

.ws-slider-arrow:active {
    transform: scale(0.95);
}

/* Slider Dots */
.ws-slider-dots {
    position: absolute;
    bottom: -30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
}

.ws-dot {
    width: 12px;
    height: 4px;
    border-radius: 0;
    background: #ccc;
    cursor: pointer;
    transition: all 0.3s ease;
}

.ws-dot.active {
    background: #000;
    transform: scaleX(1.5);
}

.ws-dot:hover {
    background: #888;
}

/* Control Select Styling */
.ws-control-select {
    min-width: 160px;
    padding: 12px 16px !important;
    font-size: 15px !important;
    border: 1px solid #ccc !important;
    border-radius: 0 !important;
    background: #fff !important;
    cursor: pointer;
    transition: border-color 0.3s ease;
}

.ws-control-select:hover {
    border-color: #222 !important;
}

.ws-control-select:focus {
    outline: none;
    border-color: #222 !important;
    box-shadow: 0 0 0 3px rgba(34, 34, 34, 0.1);
}


/* ==========================================
   ESTIMATED PRICE BADGE (State A)
   ========================================== */
.ws-estimated-price {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 18px 0;
    padding: 14px 24px;
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 0;
    transition: all 0.4s ease;
}

.ws-estimated-price.ws-est-active {
    animation: ws-est-pulse 2s ease-in-out infinite;
}

@keyframes ws-est-pulse {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(0, 0, 0, 0.05);
    }

    50% {
        box-shadow: 0 0 0 4px rgba(0, 0, 0, 0);
    }
}

.ws-est-label {
    font-size: 12px;
    font-weight: 500;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.ws-est-value {
    font-size: 20px;
    font-weight: 600;
    color: #000;
    font-family: 'Playfair Display', 'Didot', 'Georgia', serif;
}

/* ==========================================
   CO-CREATION CTA (State A)
   ========================================== */
.ws-cocreation-cta {
    margin: 20px 0;
    text-align: center;
}

.ws-btn-cocreation {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    font-size: 14px;
    font-weight: 600;
    color: #000;
    background: #fff;
    border: 2px solid #000;
    border-radius: 0;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.ws-btn-cocreation:hover {
    background: #000;
    color: #fff;
}

.ws-btn-cocreation:active {
    transform: translateY(2px);
}

/* ==========================================
   GENERATE ANOTHER BUTTON (State B)
   ========================================== */
.ws-btn-generate-another {
    display: block;
    width: 100%;
    max-width: 260px;
    margin: 15px auto 0;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 600;
    color: #000;
    background-color: transparent;
    border: 1px solid #000;
    border-radius: 0;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.ws-btn-generate-another:hover {
    background-color: #000;
    color: #fff;
}

/* Responsive */
@media (max-width: 768px) {
    .wolfstack-app {
        margin: 20px 15px;
    }

    .ws-input-section {
        padding: 20px;
    }

    .ws-title {
        font-size: 22px;
    }

    .ws-form-grid {
        grid-template-columns: 1fr;
    }

    .ws-full-width {
        grid-column: span 1;
    }

    .ws-controls-grid {
        display: -webkit-box;
        display: -ms-flexbox;
        display: flex;
        flex-direction: row;
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scroll-snap-type: x mandatory;
        padding-bottom: 10px;
        align-items: stretch;
        gap: 10px;
    }

    /* Hide scrollbar for a cleaner app-like look */
    .ws-controls-grid::-webkit-scrollbar {
        display: none;
    }

    .ws-controls-grid {
        -ms-overflow-style: none;
        scrollbar-width: none;
    }

    .ws-controls-grid>* {
        flex: 0 0 85%;
        scroll-snap-align: center;
    }

    .ws-controls-grid .ws-input-group {
        width: 100%;
    }

    .ws-price-value {
        font-size: 28px;
    }

    .ws-btn-cart {
        max-width: 100%;
    }

    .ws-btn-cocreation {
        font-size: 13px;
        padding: 12px 20px;
    }

    .ws-estimated-price {
        flex-direction: column;
        gap: 4px;
        padding: 12px 16px;
    }

    .ws-btn-generate-another {
        max-width: 100%;
    }
}

@media (max-width: 600px) {
    .ws-slider-arrow {
        width: 36px;
        height: 36px;
        font-size: 14px;
    }

    .ws-slider-container {
        gap: 5px;
    }

    .ws-slide-label {
        font-size: 12px;
    }

    .ws-control-select {
        min-width: 100%;
    }

    .ws-room-preview {
        aspect-ratio: 4/3;
    }
}

/* ==========================================
   UPLOADER STYLES
   ========================================== */

/* Upload Section */
.ws-upload-section {
    text-align: center;
    padding: 30px;
    background: #fff;
    border-radius: 0;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
}

.ws-upload-section.ws-has-image {
    padding: 20px;
    margin-bottom: 20px;
}

.ws-subtitle {
    color: #666;
    font-size: 16px;
    margin-bottom: 25px;
}

/* Drop Zone */
.ws-drop-zone {
    border: 2px dashed #ccc;
    border-radius: 0;
    padding: 60px 40px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #fafafa;
}

.ws-drop-zone:hover {
    border-color: #000;
    background: #f0f0f0;
}

.ws-drop-zone.ws-drag-over {
    border-color: #000;
    background: #e8e8e8;
    transform: scale(1.02);
}

.ws-drop-icon {
    font-size: 64px;
    margin-bottom: 20px;
    opacity: 0.8;
}

.ws-drop-text {
    font-size: 18px;
    color: #333;
    margin-bottom: 10px;
}

.ws-drop-hint {
    font-size: 14px;
    color: #999;
}

.ws-has-image .ws-drop-zone {
    padding: 20px;
    border-style: solid;
    border-width: 2px;
}

.ws-has-image .ws-drop-icon {
    font-size: 32px;
    margin-bottom: 10px;
}

.ws-has-image .ws-drop-text {
    font-size: 14px;
}

/* Upload Progress */
.ws-upload-progress {
    margin-top: 20px;
}

.ws-progress-bar {
    height: 8px;
    background: #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
}

.ws-progress-fill {
    height: 100%;
    background: #000;
    width: 0%;
    transition: width 0.3s ease;
}

.ws-progress-text {
    font-size: 14px;
    color: #666;
    margin-top: 10px;
}

/* Quality Guard™ Badge */
.ws-quality-guard {
    margin-top: 25px;
    padding: 20px 25px;
    background: #fff;
    border-radius: 0;
    border: 1px solid #e5e5e5;
    text-align: left;
}

.ws-quality-guard-header {
    font-size: 18px;
    font-weight: 600;
    color: #000;
    margin-bottom: 10px;
    font-family: 'Playfair Display', 'Didot', 'Georgia', serif;
}

.ws-quality-guard-body {
    font-size: 14px;
    color: #555;
    line-height: 1.6;
    margin: 0;
}

/* ==========================================
   TRAFFIC LIGHT DPI SYSTEM
   ========================================== */
.ws-traffic-light {
    margin-bottom: 20px;
}

.ws-tl {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 18px 22px;
    border-radius: 0;
    border: 2px solid;
    transition: all 0.3s ease;
}

.ws-tl-icon {
    font-size: 32px;
    flex-shrink: 0;
}

.ws-tl-text {
    text-align: left;
}

.ws-tl-text strong {
    display: block;
    font-size: 16px;
    margin-bottom: 4px;
}

.ws-tl-text span {
    font-size: 13px;
    opacity: 0.8;
}

/* GREEN — Excellent */
.ws-tl-green {
    background: #f0fdf4;
    border-color: #000;
    color: #000;
}

/* YELLOW — Good */
.ws-tl-yellow {
    background: #fffbeb;
    border-color: #000;
    color: #000;
}

/* RED — Low Resolution */
.ws-tl-red {
    background: #fef2f2;
    border-color: #000;
    color: #000;
}

/* Cart DPI Warning (near Add to Cart button) */
.ws-cart-dpi-warning {
    padding: 12px 18px;
    margin-top: 15px;
    margin-bottom: 5px;
    border-radius: 0;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    background: #fffbeb;
    color: #000;
    border: 1px solid #000;
}

/* Responsive Uploader */
@media (max-width: 600px) {
    .ws-drop-zone {
        padding: 40px 20px;
    }

    .ws-drop-icon {
        font-size: 48px;
    }

    .ws-tl {
        flex-direction: column;
        text-align: center;
    }

    .ws-tl-text {
        text-align: center;
    }


    .ws-quality-guard {
        text-align: center;
    }
}

/* ==========================================
   RESPONSIVE: MOCKUP & SLIDER — Tablet
   ========================================== */
@media (max-width: 768px) {
    .wolfstack-app {
        margin: 20px auto;
        padding: 0 10px;
    }

    .ws-input-section {
        padding: 18px;
    }

    .ws-title {
        font-size: 22px;
        margin-bottom: 16px;
    }

    .ws-form-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .ws-full-width {
        grid-column: span 1;
    }

    .ws-preview-title {
        font-size: 20px;
        margin-bottom: 14px;
    }

    /* Room preview — ensure it doesn't collapse on Safari iOS */
    .ws-room-preview {
        aspect-ratio: 4/3;
        min-height: 220px;
        /* Safari iOS: -webkit-fill-available prevents 100vh collapse */
        min-height: -webkit-fill-available;
        padding-top: 8%;
    }

    /* Frame wrapper — scale is controlled by JS --ws-scale variable */
    /* Do NOT set min-width here — it overrides the proportional calculation */

    /* Arrows: overlay inside the slide for mobile touch */
    .ws-slider-container {
        position: relative;
        /* anchors absolute arrows */
        gap: 0;
    }

    .ws-slider-arrow {
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        z-index: 50;
        width: 36px;
        height: 36px;
        font-size: 16px;
        background: rgba(0, 0, 0, 0.6) !important;
        border: none;
        border-radius: 4px;
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
    }

    .ws-slider-arrow:first-of-type {
        left: 6px;
    }

    .ws-slider-arrow:last-of-type {
        right: 6px;
    }

    /* Viewport relative so arrows work inside */
    .ws-slider-viewport {
        position: relative;
    }

    /* Dots */
    .ws-slider-dots {
        bottom: -24px;
    }

    .ws-dot {
        width: 10px;
        height: 3px;
    }

    /* Controls: stack vertically */
    .ws-controls {
        padding: 16px;
    }

    .ws-controls-grid {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .ws-control-select {
        min-width: unset;
        width: 100%;
    }

    /* Price badge */
    .ws-estimated-price {
        flex-direction: column;
        gap: 4px;
        padding: 10px 16px;
    }

    .ws-price-display {
        padding: 10px 20px;
    }

    .ws-price-value {
        font-size: 22px;
    }

    /* Cart button — iOS Safari strips backgrounds without -webkit-appearance: none */
    .ws-btn-cart {
        max-width: 100%;
        -webkit-appearance: none;
        -moz-appearance: none;
        appearance: none;
        background-color: transparent !important;
        color: #000 !important;
        border: 1px solid #000 !important;
    }

    .ws-btn-generate {
        font-size: 16px;
        padding: 14px;
        -webkit-appearance: none;
        -moz-appearance: none;
        appearance: none;
        background: #000 !important;
        color: #fff !important;
    }

    /* Slider arrows — force background on iOS */
    .ws-slider-arrow {
        -webkit-appearance: none;
        appearance: none;
    }

    /* Slide label */
    .ws-slide-label {
        font-size: 12px;
    }
}

/* ==========================================
   RESPONSIVE: MOCKUP & SLIDER — Phone
   ========================================== */
@media (max-width: 480px) {
    .wolfstack-app {
        margin: 10px auto;
    }

    .ws-input-section {
        padding: 14px;
    }

    .ws-title {
        font-size: 18px;
    }

    /* Room: taller on portrait phones so the frame is visible */
    .ws-room-preview {
        aspect-ratio: 3/2;
        min-height: 200px;
        padding-top: 6%;
    }

    /* Frame: scale controlled by JS --ws-scale, no min-width override */

    /* Smaller arrows for phones */
    .ws-slider-arrow {
        width: 32px;
        height: 32px;
        font-size: 14px;
    }

    /* Controls: tight layout */
    .ws-controls {
        padding: 12px;
        margin-top: 12px;
    }

    .ws-controls-grid {
        gap: 8px;
    }

    .ws-control-select {
        padding: 10px 12px !important;
        font-size: 13px !important;
    }

    .ws-price-value {
        font-size: 18px;
    }

    .ws-price-label {
        font-size: 11px;
    }
}

/* ==========================================
   SAFARI iOS VIEWPORT FIX
   Prevents containers from collapsing when
   Safari hides/shows the URL bar
   ========================================== */
@supports (-webkit-touch-callout: none) {
    .ws-room-preview {
        min-height: 220px;
    }

    .ws-slider-slide {
        min-height: 200px;
    }
}

/* ==========================================
   Arrow positioning fix (prevents overlap)
   ========================================== */
.ws-slider-container {
    position: relative;
}

/* Force arrows to be anchored left/right over the viewport */
#ws-slider-prev,
#ws-slider-next {
    position: absolute !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    z-index: 50 !important;
}

/* left/right */
#ws-slider-prev {
    left: 12px !important;
}

#ws-slider-next {
    right: 12px !important;
}

/* Make sure viewport takes full width */
.ws-slider-viewport {
    width: 100% !important;
}

/* Mobile: hide arrows and rely on swipe/dots */
@media (max-width: 768px) {

    #ws-slider-prev,
    #ws-slider-next {
        display: none !important;
    }
}