.combo-jeans-selector-container,
.scj-shipping-selector-container,
.scj-payment-selector-container {
    background-color: #f9f9f9;
    padding: 20px;
    border-radius: 5px;
    margin-bottom: 20px;
    border: 1px solid #e0e0e0;
}
.combo-jeans-selector-container h3 {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 1.2em;
    color: #333;
}
.combo-jean-item {
    padding: 15px;
    margin-bottom: 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: #fff;
}
.combo-jean-item:last-child {
    margin-bottom: 0;
}
.combo-jean-item h4 {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 1.1em;
    color: #555;
}
.combo-jean-item p,
.scj-shipping-selector-container p,
.scj-payment-selector-container p {
    margin: 10px 0;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}
.combo-label-text {
    display: inline-block;
    min-width: 70px;
    font-weight: bold;
    margin-right: 10px;
    margin-bottom: 5px;
    color: #444;
}
.combo-jean-item select,
.scj-city-selector-class,
#scj_payment_method_selector {
    padding: 8px 10px;
    border-radius: 4px;
    border: 1px solid #ccc;
    background-color: #fff;
    min-width: 150px;
    max-width: 100%;
    box-sizing: border-box;
}
#scj_custom_whatsapp_button_js_v2:hover {
    background-color: #128C7E !important;
}

.scj-gender-selector-container {
    margin-bottom: 15px;
}
.scj-gender-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    border-radius: 4px;
}
.scj-gender-btn {
    padding: 10px 24px;
    border: 2px solid #ccc;
    border-radius: 4px;
    background-color: #fff;
    color: #444;
    font-weight: bold;
    cursor: pointer;
    transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.scj-gender-btn:hover {
    border-color: #999;
}
.scj-gender-btn.active {
    background-color: #25D366;
    border-color: #25D366;
    color: #fff;
}
.combo-jean-item select:disabled {
    background-color: #f0f0f0;
    color: #999;
    cursor: not-allowed;
}

/* Resaltado del ítem del combo al asignarle un color desde el perchero */
.combo-jean-item { transition: all 0.3s ease; }
.combo-jean-item.scj-highlight-sync {
    border-color: #10b981 !important;
    background-color: #ecfdf5 !important;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.16);
}

/* ==========================================================================
   ZONA ROJA: PERCHERO INTERACTIVO FOTOGRÁFICO 360° (DEBAJO DE GALERÍA)
   ========================================================================== */
.scj-perchero-studio-box {
    position: relative;
    width: 100%;
    margin-top: 22px;
    margin-bottom: 24px;
    background: radial-gradient(ellipse at 50% 18%, #ffffff 0%, #f4f5f7 52%, #e4e7ec 100%);
    border-radius: 14px;
    border: 1px solid #cfd6df;
    box-shadow: 0 16px 36px rgba(15, 23, 42, 0.08), inset 0 1px 0 #ffffff;
    overflow: hidden;
    user-select: none;
    display: flex;
    flex-direction: column;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    clear: both;
}

.scj-perchero-top-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    background: rgba(255, 255, 255, 0.92);
    border-bottom: 1px solid #e2e8f0;
    z-index: 40;
    flex-wrap: wrap;
    gap: 6px;
}

.scj-perchero-title-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.scj-live-dot {
    width: 8px;
    height: 8px;
    background: #10b981;
    border-radius: 50%;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
}

.scj-perchero-box-title {
    font-size: 12.5px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #0f172a;
}

.scj-top-hint-pill {
    font-size: 11px;
    font-weight: 600;
    color: #475569;
    background: #f1f5f9;
    padding: 3px 9px;
    border-radius: 20px;
    border: 1px solid #e2e8f0;
}

/* ESCENA: foto de estudio (local con barral dorado) sin prendas; las perchas del plugin cuelgan del barral de la foto.
   El alto de la imagen = alto de la escena para que el barral (arriba) y el zócalo (abajo) coincidan con las perchas. */
.scj-rack-scene {
    position: relative;
    overflow: hidden;
    background: #c8b399 url("escena-estudio.webp") left top / auto 100% no-repeat;
    isolation: isolate;
}
.scj-rack-scene::after {             /* leve luz sobre la prenda central para separarla del fondo */
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background: radial-gradient(ellipse 46% 56% at 50% 48%, rgba(255, 250, 238, 0.22) 0%, rgba(255, 250, 238, 0) 100%);
}

/* BARRAL: ahora es parte de la foto de fondo; se conserva solo el espacio que ocupaba */
.scj-rail-wall-shadow, .scj-rail-bracket, .scj-rail-chrome-pipe { display: none !important; }

/* (estilos anteriores del barral dibujado, sin uso) */
.scj-rack-rail-container {
    position: relative;
    width: 100%;
    height: 42px;
    margin-top: 6px;
    z-index: 25;
}

.scj-rail-wall-shadow {
    position: absolute;
    top: 28px;
    left: 15px;
    right: 15px;
    height: 16px;
    background: linear-gradient(180deg, rgba(110, 78, 30, 0.20) 0%, rgba(110, 78, 30, 0) 100%);
    filter: blur(4px);
    z-index: 10;
}

.scj-rail-bracket {
    position: absolute;
    top: 2px;
    width: 22px;
    height: 32px;
    background: linear-gradient(90deg, #6f4f1c 0%, #c9a24d 35%, #f6e2a4 55%, #a77b2c 85%, #5e4210 100%);
    box-shadow:  0 5px 10px rgba(110, 78, 30, 0.28);
    z-index: 32;
}
.scj-rail-bracket.left {
    left: 0;
    border-radius: 0 6px 6px 0;
    border-right: 2px solid #c9a24d;
}
.scj-rail-bracket.right {
    right: 0;
    border-radius: 6px 0 0 6px;
    border-left: 2px solid #c9a24d;
}

.scj-rail-chrome-pipe {
    position: absolute;
    top: 10px;
    left: 14px;
    right: 14px;
    height: 16px;
    background: linear-gradient(180deg, #8a6420 0%, #d8b45e 14%, #fbeab5 28%, #d0a94f 46%, #a77b2c 68%, #6f4f1c 90%, #8a6420 100%);
    box-shadow: 0 4px 8px rgba(110, 78, 30, 0.30), inset 0 1px 1px rgba(255, 248, 220, 0.9);
    z-index: 25;
}

/* ESCENARIO DE PERCHAS */
.scj-rack-stage {
    position: relative;
    width: 100%;
    /* box-sizing fijo: muchos temas usan border-box y el padding-top restaba alto útil (cortaba la botamanga).
       Alto = percha + prenda (hasta ~535px) + margen para el balanceo y la sombra. */
    box-sizing: border-box;
    height: 580px;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    overflow: hidden;
    cursor: grab;
    perspective: 1400px;
    margin-top: -32px;
    padding-top: 32px;
    z-index: 2; /* por encima del velo de luz de la escena */
}
.scj-rack-stage:active {
    cursor: grabbing;
}

.scj-studio-floor-gradient {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 50px;
    background: linear-gradient(180deg, rgba(150, 112, 62, 0) 0%, rgba(150, 112, 62, 0.16) 100%);
    pointer-events: none;
    z-index: 2;
}

.scj-stage-arrow {
    position: absolute !important;
    top: 48% !important;
    transform: translateY(-50%) !important;
    width: 40px !important;
    height: 40px !important;
    min-height: 40px !important;
    padding: 0 !important;
    border-radius: 50% !important;
    background: rgba(255, 255, 255, 0.94) !important;
    border: 1px solid #cbd5e1 !important;
    box-shadow: 0 6px 16px rgba(0,0,0,0.14) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 16px !important;
    color: #0f172a !important;
    cursor: pointer !important;
    z-index: 45 !important;
    transition: all 0.2s !important;
    line-height: 1 !important;
}
.scj-stage-arrow:hover {
    background: #0f172a !important;
    color: #fff !important;
}
.scj-stage-arrow.prev { left: 12px !important; }
.scj-stage-arrow.next { right: 12px !important; }

/* UNIDAD DE PERCHA + PRENDA */
.scj-hanger-unit {
    position: absolute;
    top: 6px;
    width: 300px;
    display: flex;
    flex-direction: column;
    align-items: center;
    transform-origin: 50% 12px;
    transition: transform 0.55s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.45s ease, filter 0.45s ease;
    will-change: transform, opacity, filter;
}

.scj-hanger-unit.pos-center {
    transform: translateX(0) scale(1) translateZ(0);
    opacity: 1;
    z-index: 30;
    filter: brightness(1);
}
.scj-hanger-unit.pos-left {
    transform: translateX(-168px) scale(0.76) translateZ(-90px);
    opacity: 1; /* sólida: con la foto de fondo, la transparencia dejaba ver la pared a través de la prenda */
    z-index: 15;
    filter: brightness(0.9) saturate(0.95) blur(0.6px);
    cursor: pointer;
}
.scj-hanger-unit.pos-right {
    transform: translateX(168px) scale(0.76) translateZ(-90px);
    opacity: 1; /* sólida: con la foto de fondo, la transparencia dejaba ver la pared a través de la prenda */
    z-index: 15;
    filter: brightness(0.9) saturate(0.95) blur(0.6px);
    cursor: pointer;
}
.scj-hanger-unit.pos-hidden {
    transform: translateX(0) scale(0.5) translateZ(-180px);
    opacity: 0;
    pointer-events: none;
    z-index: 5;
}

.scj-hanger-physics-rig {
    position: relative;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    transform-origin: 50% 12px;
    transition: transform 0.38s cubic-bezier(0.25, 1, 0.5, 1);
    transform-style: preserve-3d;
}

.scj-hanger-hook-wrap {
    position: relative;
    width: 54px;
    height: 54px;
    margin-bottom: -14px;
    z-index: 28;
    filter: drop-shadow(2px 4px 5px rgba(0,0,0,0.35));
}

.scj-hanger-wood-assembly {
    position: relative;
    width: 270px;
    height: 64px;
    z-index: 24;
    transition: transform 0.35s ease;
    filter: drop-shadow(0 8px 10px rgba(0,0,0,0.26));
}

.scj-hanger-unit.has-photo { top: -10px; }                    /* el gancho de la foto abraza el barral */
.scj-hanger-unit.has-photo .scj-hanger-hook-wrap { display: none; }   /* el gancho ya viene en la foto */
.scj-hanger-unit.has-photo .scj-hanger-wood-assembly {
    width: 173px;                 /* escala que deja las pinzas en los bordes de la cintura del jean (~100px) */
    height: auto;
    filter: drop-shadow(0 4px 5px rgba(60, 40, 15, 0.28));
}
.scj-hanger-photo {
    display: block;
    width: 100%;
    height: auto;
}
.scj-hanger-unit.has-photo .scj-garment-photo-stage { margin-top: -26px; }
/* las pinzas van DELANTE de la cintura: copias de la foto recortadas a cada pinza (sin el alambre, que va detrás) */
.scj-hanger-clip-front {
    position: absolute;
    top: -60px;
    left: 50%;
    width: 173px;
    max-width: none;
    margin-left: -86.5px;
    height: auto;
    z-index: 35;
    pointer-events: none;
    transition: transform 0.35s ease;
}
.scj-hanger-clip-front.left  { clip-path: inset(58% 73% 0 15%); }
.scj-hanger-clip-front.right { clip-path: inset(58% 15% 0 73%); }
.scj-hanger-unit.angle-costado .scj-hanger-clip-front { transform: scaleX(0.62); }

/* ---- PERCHERO DE COSTADO: las prendas no elegidas cuelgan de perfil, juntas, con la percha de canto ---- */
.scj-hanger-unit.has-layout.rack-side {
    transform: translateX(var(--ux)) translateZ(0);
    opacity: 1;
    z-index: var(--uz);
    filter: brightness(var(--ub));
    width: var(--sw, 120px);          /* zona clickeable angosta, para poder elegir cada prenda de perfil */
    cursor: pointer;
}
.scj-hanger-unit.has-layout.pos-center { pointer-events: none; }   /* la elegida no tapa los clics sobre las de costado */

/* percha vista de canto: varita de madera, gancho como línea fina y pinza de perfil */
.scj-hanger-edge { display: none; position: absolute; left: 0; right: 0; top: 0; height: 100%; pointer-events: none; }
.scj-hanger-edge i { position: absolute; left: 50%; display: block; }
.scj-hanger-edge .e-wire { width: 2px; margin-left: -1px; top: 0; height: calc(var(--hw) * 0.212); background: linear-gradient(90deg, #5b6270, #cfd5dd 50%, #5b6270); }
.scj-hanger-edge .e-bar  { width: 9px; margin-left: -4.5px; top: calc(var(--hw) * 0.212); height: calc(var(--hw) * 0.0856); background: linear-gradient(90deg, #c9a068, #efd8ae 45%, #c9a068); border-radius: 2px; box-shadow: 0 2px 3px rgba(60, 40, 15, 0.35); }
.scj-hanger-edge .e-clip { width: 8px; margin-left: -4px; top: calc(var(--hw) * 0.30); height: calc(var(--hw) * 0.19); background: linear-gradient(90deg, #4b5563, #d7dde5 45%, #4b5563); border-bottom: 5px solid #111827; border-radius: 2px 2px 3px 3px; }
.scj-hanger-unit.has-layout .scj-hanger-photo,
.scj-hanger-unit.has-layout .scj-hanger-clip-front { transition: opacity 0.2s ease; }
.scj-hanger-unit.has-layout.angle-costado .scj-hanger-photo,
.scj-hanger-unit.has-layout.angle-costado .scj-hanger-clip-front { opacity: 0; }
.scj-hanger-unit.has-layout.angle-costado .scj-hanger-edge { display: block; }
.scj-hanger-unit.has-layout.angle-costado .scj-hanger-wood-assembly,
.scj-hanger-unit.has-layout.angle-costado .scj-hanger-clip-front { transform: none; }

/* etiqueta verde "En tu combo": bajo la botamanga (zona del piso), compacta en las prendas de costado */
.scj-hanger-unit.has-layout .scj-combo-assigned-pill { top: calc(var(--hw) * 0.37 + var(--glen) + 18px); }
.scj-hanger-unit.has-layout.rack-side .scj-combo-assigned-pill .lbl { display: none; }
.scj-hanger-unit.has-layout.rack-side .scj-combo-assigned-pill { padding: 3px 8px; }
.scj-hanger-unit.has-layout.rack-side .scj-combo-assigned-pill .its::before { content: '✓ '; }

/* ---- Proporciones calculadas por JS (cada foto se mide): variables --hw, --utop, --gw, --gh, --gt, --gl, --glen, --hemw ---- */
.scj-hanger-unit.has-layout { top: var(--utop); }
.scj-hanger-unit.has-layout .scj-hanger-wood-assembly { width: var(--hw); }
.scj-hanger-unit.has-layout .scj-garment-photo-stage { width: var(--hw); height: var(--glen); margin-top: calc(var(--hw) * -0.1277); }
.scj-hanger-unit.has-layout .scj-garment-real-img {
    width: var(--gw) !important;
    height: var(--gh) !important;
    max-width: none !important;
    flex: none;
    object-fit: fill !important;
    margin-top: calc(var(--gt) * -1) !important;
    left: var(--gl) !important;
}
.scj-hanger-unit.has-layout .scj-garment-cast-shadow {
    width: var(--gw) !important;
    height: var(--gh) !important;
    max-width: none !important;
    object-fit: fill !important;
    top: calc(10px - var(--gt)) !important;
    left: calc(50% - var(--gw) / 2 + var(--gl)) !important;
}
.scj-hanger-unit.has-layout .scj-garment-photo-stage::after { left: 50%; right: auto; width: calc(var(--hemw) * 0.9); margin-left: calc(var(--hemw) * -0.45); }
.scj-hanger-unit.has-layout .scj-hanger-clip-front { width: var(--hw); margin-left: calc(var(--hw) * -0.5); top: calc(var(--hw) * -0.370); }

.scj-hanger-unit.angle-costado .scj-hanger-wood-assembly {
    transform: scaleX(0.62);
}

.scj-garment-photo-stage {
    position: relative;
    width: 260px;
    height: 415px;
    margin-top: -22px;
    z-index: 26;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    transform-origin: 50% 0%;
}

/* sombra suave sobre el piso, bajo la botamanga */
.scj-garment-photo-stage::after {
    content: "";
    position: absolute;
    left: 6%;
    right: 6%;
    bottom: -14px;
    height: 22px;
    background: radial-gradient(ellipse at 50% 50%, rgba(86, 58, 28, 0.34) 0%, rgba(86, 58, 28, 0.16) 45%, rgba(86, 58, 28, 0) 72%);
    filter: blur(3px);
    z-index: 0;
    pointer-events: none;
}

.scj-garment-cast-shadow {
    position: absolute !important;
    top: 10px !important;
    width: 235px !important;
    height: 395px !important;
    z-index: 1 !important;
    opacity: 0.2 !important;
    filter: blur(14px) brightness(0) sepia(1) !important;
    transform: translate(12px, 10px) scale(0.95);
    transition: all 0.35s ease;
    pointer-events: none !important;
    object-fit: contain !important;
}

.scj-garment-real-img {
    position: relative !important;
    width: 250px !important;
    height: 410px !important;
    object-fit: contain !important;
    object-position: top center !important;
    z-index: 10 !important;
    filter: drop-shadow(0 8px 14px rgba(15, 23, 42, 0.2));
    transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
    pointer-events: none !important;
}

.scj-front-clips-overlay {
    position: absolute;
    top: -12px;
    left: 0;
    width: 100%;
    height: 42px;
    z-index: 35;
    pointer-events: none;
    transition: transform 0.35s ease;
}

.scj-hanger-unit.angle-costado .scj-front-clips-overlay {
    transform: scaleX(0.62);
}

.scj-combo-assigned-pill {
    position: absolute;
    top: 42px;
    left: 50%;
    transform: translateX(-50%);
    background: #059669;
    color: #fff;
    font-size: 11px;
    font-weight: 800;
    padding: 3px 11px;
    border-radius: 20px;
    box-shadow: 0 4px 12px rgba(5, 150, 105, 0.4);
    z-index: 42;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.25s;
    pointer-events: none;
}
.scj-combo-assigned-pill.show {
    opacity: 1;
}

/* LUPA ÓPTICA HD */
.scj-hd-magnifier-lens {
    position: absolute;
    width: 165px;
    height: 165px;
    border-radius: 50%;
    border: 3.5px solid #ffffff;
    box-shadow: 0 14px 32px rgba(0,0,0,0.45), inset 0 0 18px rgba(0,0,0,0.28);
    pointer-events: none;
    z-index: 60;
    display: none;
    overflow: hidden;
    background-color: #f8fafc;
    background-repeat: no-repeat;
}
.scj-hd-magnifier-lens.active {
    display: block;
}
.scj-lens-caption {
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(15, 23, 42, 0.82);
    color: #fff;
    font-size: 9px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 10px;
    white-space: nowrap;
}

/* PANEL INFERIOR DE CONTROLES */
.scj-perchero-controls-panel {
    background: #ffffff;
    border-top: 1px solid #e2e8f0;
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 40;
}

.scj-controls-row-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
}

.scj-color-pills-nav {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
}

.scj-color-pill-btn {
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    padding: 5px 11px !important;
    border-radius: 20px !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    border: 1.5px solid #e2e8f0 !important;
    background: #f8fafc !important;
    color: #334155 !important;
    cursor: pointer !important;
    line-height: 1.2 !important;
    min-height: 0 !important;
}
.scj-color-pill-btn.active {
    border-color: #0f172a !important;
    background: #0f172a !important;
    color: #ffffff !important;
}

.scj-angle-controls {
    display: flex;
    align-items: center;
    gap: 3px;
    background: #f1f5f9;
    padding: 3px;
    border-radius: 8px;
}

.scj-angle-btn {
    border: none !important;
    background: transparent !important;
    padding: 5px 9px !important;
    border-radius: 6px !important;
    font-size: 11.5px !important;
    font-weight: 700 !important;
    color: #475569 !important;
    cursor: pointer !important;
    min-height: 0 !important;
    line-height: 1.2 !important;
}
.scj-angle-btn.active {
    background: #ffffff !important;
    color: #0f172a !important;
    box-shadow: 0 1px 4px rgba(0,0,0,0.12) !important;
}

.scj-btn-lupa-toggle {
    border: 1.5px solid #cbd5e1 !important;
    background: #ffffff !important;
    padding: 5px 10px !important;
    border-radius: 8px !important;
    font-size: 11.5px !important;
    font-weight: 700 !important;
    color: #1e293b !important;
    cursor: pointer !important;
    min-height: 0 !important;
    line-height: 1.2 !important;
}
.scj-btn-lupa-toggle.active {
    background: #0284c7 !important;
    border-color: #0284c7 !important;
    color: #ffffff !important;
}

.scj-rotation-slider-row {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #f8fafc;
    padding: 7px 12px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}
.scj-rotation-label {
    font-size: 11.5px;
    font-weight: 700;
    color: #334155;
    white-space: nowrap;
}
.scj-rotation-range {
    flex: 1;
    accent-color: #0f172a;
    cursor: pointer;
}
.scj-rotation-deg-badge {
    font-size: 11.5px;
    font-weight: 800;
    color: #0f172a;
    min-width: 85px;
    text-align: right;
}

.scj-combo-quick-assign-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 8px;
}

.scj-btn-assign-combo {
    padding: 8px 10px !important;
    border-radius: 7px !important;
    border: 1.5px solid #0284c7 !important;
    background: #f0f9ff !important;
    color: #0369a1 !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    text-align: center !important;
    min-height: 0 !important;
    line-height: 1.3 !important;
}
.scj-btn-assign-combo:hover {
    background: #0284c7 !important;
    color: #ffffff !important;
}
.scj-btn-assign-combo.assigned {
    background: #059669 !important;
    border-color: #059669 !important;
    color: #ffffff !important;
}
