/**
 * Opticom patch cord calculator v1.4.2
 * Self-contained layout for Joomla 6 / JoomShopping 5 pages.
 */
.opticom-patchcalc,
.opticom-patchcalc * {
    box-sizing: border-box;
}

.opticom-patchcalc {
    max-width: 1120px;
    margin: 0 auto;
    padding: 28px;
    border: 1px solid #e5e7eb;
    border-radius: 22px;
    background: #ffffff;
    color: #111827;
    box-shadow: 0 18px 50px rgba(15, 23, 42, 0.08);
    font-family: inherit;
}

.opticom-patchcalc__header {
    text-align: center;
    margin-bottom: 26px;
}

.opticom-patchcalc__title {
    margin: 0 0 8px;
    font-size: clamp(22px, 2.4vw, 30px);
    line-height: 1.2;
    font-weight: 800;
    color: #0f172a;
}

.opticom-patchcalc__subtitle {
    max-width: 720px;
    margin: 0 auto;
    color: #64748b;
    font-size: 15px;
    line-height: 1.55;
}

.opticom-patchcalc__grid {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(330px, 0.85fr);
    gap: 24px;
    align-items: start;
}

.opticom-patchcalc__section {
    margin-bottom: 24px;
}

.opticom-patchcalc__section:last-child {
    margin-bottom: 0;
}

.opticom-patchcalc__section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    font-size: 16px;
    font-weight: 800;
    color: #0f172a;
}

.opticom-patchcalc__step {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 999px;
    color: #ffffff;
    background: #2563eb;
    font-size: 14px;
    line-height: 1;
}

.opticom-patchcalc__hint {
    margin: 0 0 14px;
    color: #64748b;
    font-size: 14px;
    line-height: 1.5;
}

.opticom-patchcalc__choice-group {
    margin-bottom: 16px;
}

.opticom-patchcalc__choice-group:last-child {
    margin-bottom: 0;
}

.opticom-patchcalc__group-label {
    display: inline-flex;
    align-items: center;
    margin-bottom: 10px;
    padding: 5px 10px;
    border: 1px solid #e2e8f0;
    border-radius: 999px;
    background: #f8fafc;
    color: #334155;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.opticom-patchcalc__cards {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.opticom-patchcalc__radio {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
}

.opticom-patchcalc__option {
    position: relative;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    min-height: 76px;
    padding: 14px 14px;
    border: 1.5px solid #e2e8f0;
    border-radius: 16px;
    background: #ffffff;
    cursor: pointer;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease, background-color 0.18s ease;
}

.opticom-patchcalc__option:hover {
    border-color: #94a3b8;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
    transform: translateY(-1px);
}

.opticom-patchcalc__radio:focus-visible + .opticom-patchcalc__option {
    outline: 3px solid rgba(37, 99, 235, 0.25);
    outline-offset: 2px;
}

.opticom-patchcalc__radio:checked + .opticom-patchcalc__option {
    border-color: #2563eb;
    background: #eff6ff;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.opticom-patchcalc__option-main {
    display: grid;
    gap: 4px;
}

.opticom-patchcalc__option-title {
    color: #0f172a;
    font-size: 14px;
    font-weight: 800;
    line-height: 1.3;
}

.opticom-patchcalc__option-note {
    color: #64748b;
    font-size: 12px;
    line-height: 1.35;
}

.opticom-patchcalc__badge {
    align-self: flex-start;
    flex: 0 0 auto;
    padding: 3px 7px;
    border-radius: 999px;
    background: #dbeafe;
    color: #1d4ed8;
    font-size: 11px;
    font-weight: 800;
}

.opticom-patchcalc__check {
    display: none;
    position: absolute;
    right: 12px;
    bottom: 10px;
    width: 22px;
    height: 22px;
    border-radius: 999px;
    background: #2563eb;
    color: #ffffff;
    text-align: center;
    font-size: 14px;
    font-weight: 900;
    line-height: 22px;
}

.opticom-patchcalc__radio:checked + .opticom-patchcalc__option .opticom-patchcalc__check {
    display: block;
}

.opticom-patchcalc__select-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.opticom-patchcalc__field {
    display: grid;
    gap: 7px;
    margin: 0;
    color: #475569;
    font-size: 13px;
    font-weight: 700;
}

.opticom-patchcalc__field select,
.opticom-patchcalc__field input[type="number"] {
    width: 100%;
    min-height: 42px;
    padding: 8px 10px;
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    background: #ffffff;
    color: #0f172a;
    font: inherit;
    font-weight: 600;
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.opticom-patchcalc__field select:focus,
.opticom-patchcalc__field input[type="number"]:focus {
    border-color: #2563eb;
    outline: 0;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.opticom-patchcalc__length-row {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) 110px 130px;
    gap: 12px;
    align-items: end;
}

.opticom-patchcalc__field-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.opticom-patchcalc__field-head strong {
    padding: 3px 9px;
    border-radius: 999px;
    background: #dbeafe;
    color: #1d4ed8;
    font-size: 12px;
    white-space: nowrap;
}

.opticom-patchcalc__field input[type="range"] {
    width: 100%;
    min-height: 42px;
    accent-color: #2563eb;
}

.opticom-patchcalc__right {
    min-width: 0;
}

.opticom-patchcalc__sticky {
    position: sticky;
    top: 18px;
    display: grid;
    gap: 14px;
}

.opticom-patchcalc__preview,
.opticom-patchcalc__price-box,
.opticom-patchcalc__actions,
.opticom-patchcalc__lead-time {
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

.opticom-patchcalc__preview {
    padding: 16px;
    background: #f8fafc;
}

.opticom-patchcalc__preview-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 14px;
    color: #0f172a;
    font-size: 13px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.opticom-patchcalc__preview-head small {
    padding: 3px 8px;
    border-radius: 999px;
    background: #dcfce7;
    color: #166534;
    font-size: 11px;
    font-weight: 900;
    text-transform: none;
}

.opticom-patchcalc__photo-visual {
    position: relative;
    overflow: hidden;
    min-height: 160px;
    margin-bottom: 12px;
    padding: 12px 12px 10px;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    background:
        radial-gradient(circle at 20% 0%, rgba(37, 99, 235, 0.10), transparent 34%),
        linear-gradient(180deg, #ffffff 0%, #f1f5f9 100%);
}

.opticom-patchcalc__visual-labels {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    color: #334155;
    font-size: 12px;
    font-weight: 900;
}

.opticom-patchcalc__visual-labels span,
.opticom-patchcalc__visual-labels strong {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 24px;
    padding: 3px 8px;
    border: 1px solid #e2e8f0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.05);
    white-space: nowrap;
}

.opticom-patchcalc__visual-labels strong {
    background: #eff6ff;
    color: #1d4ed8;
}

.opticom-patchcalc__product-line {
    position: relative;
    display: grid;
    grid-template-columns: 116px minmax(104px, 1fr) 116px;
    align-items: center;
    min-height: 98px;
}

.opticom-patchcalc__connector-stack {
    position: relative;
    display: grid;
    align-items: center;
    min-height: 84px;
}

.opticom-patchcalc__connector-img {
    position: relative;
    z-index: 2;
    display: block;
    width: 122px;
    max-width: none;
    height: auto;
    pointer-events: none;
    filter: drop-shadow(0 10px 12px rgba(15, 23, 42, 0.16));
}

.opticom-patchcalc__connector-img--left {
    justify-self: start;
    margin-left: -10px;
}

.opticom-patchcalc__connector-img--right {
    justify-self: end;
    margin-right: -10px;
    transform: scaleX(-1);
}

.opticom-patchcalc__connector-img--top,
.opticom-patchcalc__connector-img--bottom {
    grid-area: 1 / 1;
    transition: transform 0.2s ease, opacity 0.2s ease, visibility 0.2s ease;
}

.opticom-patchcalc__cables {
    --opticom-cable-color: #f2c94c;
    --opticom-cable-image: none;
    position: relative;
    z-index: 1;
    display: grid;
    align-items: center;
    min-height: 62px;
    margin: 0 -10px;
}

.opticom-patchcalc__cable-line {
    display: block;
    width: 100%;
    height: 20px;
    border: 1px solid rgba(15, 23, 42, 0.28);
    border-radius: 999px;
    background-color: var(--opticom-cable-color);
    background-image: var(--opticom-cable-image);
    background-size: 100% 100%;
    background-repeat: repeat-x;
    box-shadow:
        inset 0 2px 4px rgba(255, 255, 255, 0.35),
        inset 0 -3px 5px rgba(15, 23, 42, 0.18),
        0 6px 12px rgba(15, 23, 42, 0.12);
}

.opticom-patchcalc__cable-line--top,
.opticom-patchcalc__cable-line--bottom {
    grid-area: 1 / 1;
}

.opticom-patchcalc__photo-visual--simplex .opticom-patchcalc__cable-line--top {
    transform: translateY(0);
}

.opticom-patchcalc__photo-visual--simplex .opticom-patchcalc__cable-line--bottom {
    display: none;
}

.opticom-patchcalc__photo-visual--simplex .opticom-patchcalc__connector-img--top {
    transform: translateY(0);
}

.opticom-patchcalc__photo-visual--simplex .opticom-patchcalc__connector-img--right.opticom-patchcalc__connector-img--top {
    transform: scaleX(-1) translateY(0);
}

.opticom-patchcalc__photo-visual--simplex .opticom-patchcalc__connector-img--bottom {
    opacity: 0;
    visibility: hidden;
}

.opticom-patchcalc__photo-visual--duplex .opticom-patchcalc__cable-line--top {
    transform: translateY(-12px);
}

.opticom-patchcalc__photo-visual--duplex .opticom-patchcalc__cable-line--bottom {
    transform: translateY(12px);
}

.opticom-patchcalc__photo-visual--duplex .opticom-patchcalc__connector-img--top {
    transform: translateY(-14px);
}

.opticom-patchcalc__photo-visual--duplex .opticom-patchcalc__connector-img--bottom {
    opacity: 1;
    visibility: visible;
    transform: translateY(14px);
}

.opticom-patchcalc__photo-visual--duplex .opticom-patchcalc__connector-img--right.opticom-patchcalc__connector-img--top {
    transform: scaleX(-1) translateY(-14px);
}

.opticom-patchcalc__photo-visual--duplex .opticom-patchcalc__connector-img--right.opticom-patchcalc__connector-img--bottom {
    transform: scaleX(-1) translateY(14px);
}

.opticom-patchcalc__visual-caption {
    display: flex;
    justify-content: center;
    gap: 7px;
    margin: 10px 0 6px;
    color: #64748b;
    font-size: 13px;
}

.opticom-patchcalc__visual-caption strong {
    color: #0f172a;
}

.opticom-patchcalc__visual-note {
    margin: 0;
    color: #64748b;
    font-size: 11px;
    line-height: 1.35;
    text-align: center;
}

.opticom-patchcalc__selection {
    min-height: 78px;
    padding: 10px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #ffffff;
    color: #334155;
    font-size: 13px;
    font-weight: 650;
    line-height: 1.55;
    white-space: pre-line;
}

.opticom-patchcalc__price-box {
    padding: 18px;
}

.opticom-patchcalc__price-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 6px;
}

.opticom-patchcalc__price-head span {
    color: #0f172a;
    font-size: 14px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.opticom-patchcalc__price-head strong {
    color: #2563eb;
    font-size: clamp(25px, 3vw, 34px);
    font-weight: 900;
    line-height: 1;
    white-space: nowrap;
}

.opticom-patchcalc__price-sub {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
    color: #64748b;
    font-size: 13px;
}

.opticom-patchcalc__price-sub strong {
    color: #0f172a;
}

.opticom-patchcalc__breakdown {
    display: grid;
    gap: 9px;
    padding-top: 12px;
    border-top: 1px solid #e2e8f0;
}

.opticom-patchcalc__breakdown > div {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    color: #64748b;
    font-size: 13px;
}

.opticom-patchcalc__breakdown strong {
    flex: 0 0 auto;
    color: #0f172a;
    white-space: nowrap;
}

.opticom-patchcalc__breakdown-total {
    padding-top: 9px;
    border-top: 1px solid #e2e8f0;
    color: #0f172a !important;
    font-weight: 900;
}

.opticom-patchcalc__actions {
    padding: 16px;
}

.opticom-patchcalc__actions p {
    margin: 0 0 10px;
    color: #64748b;
    font-size: 13px;
    text-align: center;
}

.opticom-patchcalc__btn {
    width: 100%;
    min-height: 46px;
    border: 0;
    border-radius: 14px;
    cursor: pointer;
    font: inherit;
    font-size: 15px;
    font-weight: 900;
    transition: transform 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

.opticom-patchcalc__btn:hover {
    transform: translateY(-1px);
}

.opticom-patchcalc__btn--whatsapp {
    background: #16a34a;
    color: #ffffff;
    box-shadow: 0 10px 20px rgba(22, 163, 74, 0.22);
}

.opticom-patchcalc__btn--whatsapp:hover {
    background: #15803d;
}

.opticom-patchcalc__btn--reset {
    min-height: 34px;
    margin-top: 8px;
    background: transparent;
    color: #64748b;
    box-shadow: none;
    font-size: 13px;
}

.opticom-patchcalc__btn--reset:hover {
    background: #f1f5f9;
    color: #0f172a;
}

.opticom-patchcalc__lead-time {
    padding: 12px 14px;
    color: #64748b;
    font-size: 13px;
    text-align: center;
}

.opticom-patchcalc__lead-time strong {
    color: #0f172a;
}

@media (max-width: 980px) {
    .opticom-patchcalc {
        padding: 20px;
    }

    .opticom-patchcalc__grid {
        grid-template-columns: 1fr;
    }

    .opticom-patchcalc__sticky {
        position: static;
    }
}

@media (max-width: 720px) {
    .opticom-patchcalc {
        padding: 16px;
        border-radius: 18px;
    }

    .opticom-patchcalc__cards,
    .opticom-patchcalc__select-grid,
    .opticom-patchcalc__length-row {
        grid-template-columns: 1fr;
    }

    .opticom-patchcalc__option {
        min-height: 70px;
    }

    .opticom-patchcalc__product-line {
        grid-template-columns: 84px minmax(82px, 1fr) 84px;
    }

    .opticom-patchcalc__connector-img {
        width: 104px;
    }

    .opticom-patchcalc__visual-labels {
        font-size: 11px;
        gap: 5px;
    }

    .opticom-patchcalc__visual-labels span,
    .opticom-patchcalc__visual-labels strong {
        padding-left: 6px;
        padding-right: 6px;
    }

    .opticom-patchcalc__price-head,
    .opticom-patchcalc__price-sub,
    .opticom-patchcalc__breakdown > div {
        align-items: flex-start;
        flex-direction: column;
        gap: 4px;
    }
}


@media (max-width: 640px) {
    .opticom-patchcalc__product-line {
        grid-template-columns: 86px minmax(70px, 1fr) 86px;
        min-height: 84px;
    }

    .opticom-patchcalc__connector-img {
        width: 96px;
    }

    .opticom-patchcalc__photo-visual--duplex .opticom-patchcalc__connector-img--top {
        transform: translateY(-10px);
    }

    .opticom-patchcalc__photo-visual--duplex .opticom-patchcalc__connector-img--bottom {
        transform: translateY(10px);
    }

    .opticom-patchcalc__photo-visual--duplex .opticom-patchcalc__connector-img--right.opticom-patchcalc__connector-img--top {
        transform: scaleX(-1) translateY(-10px);
    }

    .opticom-patchcalc__photo-visual--duplex .opticom-patchcalc__connector-img--right.opticom-patchcalc__connector-img--bottom {
        transform: scaleX(-1) translateY(10px);
    }
}
