/* PRODUCT DETAIL - stile catalogo tecnico ITNETCOM */
.product-page {
    background: #ffffff;
    color: var(--text);
}

.product-main-section {
    padding: 24px 0 28px;
    background: #ffffff;
}

.product-breadcrumb {
    margin-bottom: 22px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.45;
}

.product-breadcrumb a {
    color: #111111;
    text-decoration: none;
    font-weight: 700;
}

.product-breadcrumb a:hover {
    color: var(--brand-red);
}

/* AREA PRINCIPALE: immagine + riepilogo + box acquisto */
.product-detail-card {
    display: grid;
    grid-template-columns: minmax(420px, 0.95fr) minmax(460px, 1.15fr) 310px;
    gap: 30px;
    align-items: start;
}

.product-gallery,
.product-summary,
.product-buy-box,
.product-description-card,
.product-empty-state {
    background: #ffffff;
}

.product-gallery {
    min-width: 0;
}

.product-badge-row,
.product-related-badge-row {
    min-height: 24px;
    display: flex;
    align-items: center;
    margin-bottom: 12px;
}

.product-tag,
.product-related-tag {
    display: inline-flex;
    align-items: center;
    min-height: 22px;
    max-width: 100%;
    padding: 0 8px;
    border: 1px solid #ededed;
    background: #ffffff;
    color: var(--brand-red);
    font-size: 10px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.product-media {
    position: relative;
    width: 100%;
    min-height: 520px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    overflow: hidden;
}

.product-media img {
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: 560px;
    object-fit: contain;
    object-position: center;
    display: block;
}

.product-fallback {
    width: 100%;
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9d9d9d;
    background: #f5f5f5;
}

.product-fallback .material-symbols-outlined {
    font-size: 54px;
}

.product-summary {
    min-width: 0;
    padding-top: 40px;
}

.product-status-row {
    min-height: 26px;
    display: flex;
    align-items: center;
    margin-bottom: 12px;
}

.product-status-pill {
    min-height: 24px;
    display: inline-flex;
    align-items: center;
    padding: 0 11px;
    border-radius: 999px;
    background: #f2f2f2;
    color: #555555;
    font-size: 11px;
    line-height: 1;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.product-status-pill.is-available {
    background: rgba(31, 122, 49, 0.10);
    color: #1f7a31;
}

.product-status-pill.is-unavailable {
    background: rgba(179, 38, 30, 0.10);
    color: #b3261e;
}

.product-summary h1,
.product-empty-state h1 {
    margin: 0;
    max-width: 760px;
    color: var(--brand-black);
    font-size: 22px;
    line-height: 1.18;
    font-weight: 700;
    letter-spacing: -0.015em;
}

.product-code-inline {
    margin: 10px 0 0;
    color: #111111;
    font-size: 13px;
    line-height: 1.4;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.product-code-inline strong {
    font-weight: 700;
}

.product-category-line {
    margin-top: 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.product-category-line a,
.product-category-line span {
    min-height: 24px;
    display: inline-flex;
    align-items: center;
    padding: 0 9px;
    border: 1px solid #ebebeb;
    background: #ffffff;
    color: #555555;
    text-decoration: none;
    font-size: 10px;
    line-height: 1.2;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.product-category-line a:hover {
    color: var(--brand-red);
    border-color: var(--brand-red);
}

.product-summary-divider {
    width: 100%;
    height: 1px;
    margin: 18px 0;
    background: #e7e7e7;
}

.product-short-description {
    margin: 0;
    max-width: 760px;
    color: #333333;
    font-size: 14px;
    line-height: 1.48;
}

.product-summary-info {
    margin-top: 16px;
    max-width: 760px;
    padding: 14px 0 0;
    border-top: 1px solid #ededed;
}

.product-summary-info-heading {
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.product-summary-info-icon {
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--brand-red);
    color: #ffffff;
    font-size: 13px;
    font-weight: 700;
    line-height: 1;
    flex: 0 0 28px;
}

.product-summary-info-heading .product-kicker {
    margin: 0 0 3px;
}

.product-summary-info-heading h2 {
    margin: 0;
    color: #111111;
    font-size: 14px;
    line-height: 1.2;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.product-summary-info-list {
    margin: 0;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
}

.product-summary-info-list > div {
    min-width: 0;
    padding: 9px 10px;
    border: 1px solid #ededed;
    background: #ffffff;
}

.product-summary-info-list dt {
    margin: 0 0 5px;
    color: var(--muted);
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.product-summary-info-list dd {
    margin: 0;
    color: #111111;
    font-size: 12px;
    line-height: 1.3;
    font-weight: 700;
    overflow-wrap: anywhere;
}

.product-summary-actions {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #ededed;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.product-outline-action {
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 12px;
    border: 1px solid var(--brand-red);
    background: #ffffff;
    color: var(--brand-red);
    text-decoration: none;
    text-align: center;
    font-size: 11px;
    line-height: 1.2;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.product-outline-action:hover {
    background: var(--brand-red);
    color: #ffffff;
}

/* BOX LATERALE PREZZO */
.product-buy-box {
    position: sticky;
    top: 104px;
    min-width: 0;
    padding: 22px;
    border: 1px solid #e4e4e4;
    background: #f7f8fa;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.04);
}

.product-buy-status {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #1f7a31;
    font-size: 13px;
    line-height: 1.35;
}

.product-stock-dot {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: currentColor;
    display: inline-block;
    flex: 0 0 auto;
}

.product-buy-price {
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid #e2e2e2;
}

.product-buy-price span {
    display: block;
    margin-bottom: 5px;
    color: #777777;
    font-size: 10px;
    line-height: 1.2;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.product-buy-price strong {
    color: #111111;
    font-size: 25px;
    line-height: 1.05;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.product-buy-availability {
    margin: 12px 0 0;
    color: #555555;
    font-size: 12px;
    line-height: 1.45;
}

.product-actions-row {
    margin-top: 18px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.product-qty {
    width: 92px;
    min-width: 92px;
    height: 40px;
    display: grid;
    grid-template-columns: 30px 1fr 30px;
    align-items: center;
    border: 1px solid #d9d9d9;
    background: #ffffff;
}

.product-qty button {
    border: 0;
    background: transparent;
    width: 100%;
    height: 100%;
    color: #111111;
    font-size: 18px;
    cursor: pointer;
}

.product-qty span {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #111111;
    font-size: 15px;
}

.product-primary-action,
.product-secondary-action,
.product-help-card a,
.product-empty-state .product-primary-action {
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 14px;
    text-decoration: none;
    text-align: center;
    font-size: 11px;
    line-height: 1.2;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease, opacity 0.2s ease;
}

.product-primary-action,
.product-empty-state .product-primary-action {
    flex: 1 1 auto;
    min-width: 0;
    background: var(--brand-red);
    border: 1px solid var(--brand-red);
    color: #ffffff;
}

.product-primary-action:hover,
.product-empty-state .product-primary-action:hover {
    background: #cc0000;
    border-color: #cc0000;
}

.product-secondary-action {
    width: 100%;
    margin-top: 10px;
    background: #ffffff;
    border: 1px solid #d9d9d9;
    color: #111111;
}

.product-secondary-action:hover {
    color: var(--brand-red);
    border-color: var(--brand-red);
}

.product-back-link {
    display: block;
    margin-top: 11px;
    color: #555555;
    text-align: center;
    text-decoration: none;
    font-size: 10px;
    line-height: 1.3;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.product-back-link:hover {
    color: var(--brand-red);
}

.product-buy-benefits {
    margin: 20px -22px -22px;
    padding: 18px 22px;
    list-style: none;
    border-top: 1px solid #e2e2e2;
    background: #ffffff;
}

.product-buy-benefits li {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 10px;
    color: #333333;
    font-size: 12px;
    line-height: 1.35;
}

.product-buy-benefits li:last-child {
    margin-bottom: 0;
}

.product-buy-benefits .material-symbols-outlined {
    color: var(--brand-red);
    font-size: 18px;
    line-height: 1;
}

/* DESCRIZIONE */
.product-description-section {
    padding: 0 0 34px;
}

.product-description-layout {
    display: block;
}

.product-description-card {
    min-width: 0;
    padding: 24px 26px 26px;
    border-top: 2px solid var(--brand-red);
    background: #ffffff;
}

.product-kicker {
    margin: 0 0 6px;
    color: var(--brand-red);
    font-size: 10px;
    line-height: 1.2;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.product-description-card h2,
.product-section-heading h2 {
    margin: 0;
    color: var(--brand-black);
    font-size: 22px;
    line-height: 1.18;
    font-weight: 700;
    letter-spacing: -0.015em;
}

.product-description-content {
    margin-top: 13px;
    color: #333333;
    font-size: 14px;
    line-height: 1.45;
}

.product-description-content p {
    margin: 0 0 9px;
}

.product-description-content p:first-child,
.product-description-content h2:first-child,
.product-description-content h3:first-child {
    margin-top: 0;
}

.product-description-content h2,
.product-description-content h3,
.product-description-content h4,
.product-ai-description h3,
.product-identity-heading h3,
.product-help-card h3 {
    margin: 16px 0 7px;
    color: #111111;
    line-height: 1.2;
    font-weight: 700;
}

.product-description-content h2 {
    font-size: 17px;
}

.product-description-content h3,
.product-ai-description h3,
.product-identity-heading h3,
.product-help-card h3 {
    font-size: 15px;
}

.product-description-content ul,
.product-description-content ol {
    margin: 7px 0 10px;
    padding-left: 18px;
}

.product-description-content li {
    margin-bottom: 4px;
}

.product-description-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 14px 0;
    font-size: 13px;
}

.product-description-content th,
.product-description-content td {
    border: 1px solid #ededed;
    padding: 8px;
    text-align: left;
}

.product-identity-panel {
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid #f0f0f0;
}

.product-identity-heading {
    margin-bottom: 12px;
}

.product-identity-heading .product-kicker {
    margin-bottom: 5px;
}

.product-identity-heading h3 {
    margin: 0;
}

.product-identity-list {
    margin: 0;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.product-identity-list > div {
    min-width: 0;
    padding: 11px 12px;
    border: 1px solid #ededed;
    background: #ffffff;
}

.product-identity-list dt {
    margin: 0 0 6px;
    color: var(--muted);
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.product-identity-list dd {
    margin: 0;
    color: #111111;
    font-size: 13px;
    line-height: 1.35;
    font-weight: 700;
    overflow-wrap: anywhere;
}

.product-ai-description {
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid #f0f0f0;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.45;
}

.product-ai-description p {
    margin-bottom: 0;
}


/* CORRELATI - CAROUSEL IN STILE NEGOZIO */
.product-related-section {
    padding: 0 0 42px;
}

.product-section-heading {
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #ededed;
}

.product-related-carousel {
    position: relative;
}

.product-related-viewport {
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

.product-related-viewport::-webkit-scrollbar {
    display: none;
}

.product-related-track {
    --product-related-gap: 18px;
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: calc((100% - (var(--product-related-gap) * 5)) / 6);
    gap: var(--product-related-gap);
    align-items: stretch;
}

.product-related-card {
    min-width: 0;
    min-height: 430px;
    display: flex;
    flex-direction: column;
    color: #111111;
    text-decoration: none;
    background: #ffffff;
}

.product-related-link {
    display: block;
    color: inherit;
    text-decoration: none;
}

.product-related-media {
    position: relative;
    width: 100%;
    height: 210px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    overflow: hidden;
    margin-bottom: 14px;
}

.product-related-media img {
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
    object-fit: contain;
    object-position: center;
    display: block;
    transition: transform 0.25s ease;
}

.product-related-card:hover .product-related-media img {
    transform: scale(1.03);
}

.product-related-name {
    margin: 0;
    min-height: 58px;
    font-size: 15px;
    line-height: 1.28;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: #111111;
}

.product-related-link:hover .product-related-name {
    color: var(--brand-red);
}

.product-related-meta {
    margin-top: 10px;
}

.product-related-brand {
    font-size: 11px;
    line-height: 1.25;
    text-transform: uppercase;
    color: #555555;
    font-weight: 600;
    letter-spacing: 0.04em;
}

.product-related-code {
    margin-top: 4px;
    min-height: 14px;
    font-size: 11px;
    line-height: 1.2;
    text-transform: uppercase;
    color: #7a7a7a;
    letter-spacing: 0.05em;
}

.product-related-bottom {
    margin-top: auto;
    padding-top: 14px;
}

.product-related-price {
    color: #111111;
    font-size: 21px;
    line-height: 1.05;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.product-related-stock {
    margin-top: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #1f7a31;
    font-size: 12px;
    line-height: 1.3;
    font-weight: 600;
}

.product-related-stock.is-low {
    color: #c77700;
}

.product-related-stock.is-zero {
    color: #b3261e;
}

.product-related-actions {
    margin-top: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.product-related-qty {
    width: 92px;
    min-width: 92px;
    height: 40px;
    display: grid;
    grid-template-columns: 30px 1fr 30px;
    align-items: center;
    border: 1px solid #d9d9d9;
    background: #fff;
}

.product-related-qty button {
    border: 0;
    background: transparent;
    width: 100%;
    height: 100%;
    font-size: 18px;
    color: #111;
    cursor: pointer;
}

.product-related-qty span {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    color: #111;
}

.product-related-cart {
    flex: 1 1 auto;
    min-width: 0;
    height: 40px;
    border: 1px solid var(--brand-red);
    background: var(--brand-red);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, opacity 0.2s ease;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 0 12px;
}

.product-related-cart:hover:not(:disabled) {
    background: #cc0000;
    border-color: #cc0000;
}

.product-related-cart:disabled {
    opacity: 0.45;
    cursor: default;
}

.product-related-cart svg {
    width: 18px;
    height: 18px;
    display: block;
    flex-shrink: 0;
}

.product-related-arrow {
    position: absolute;
    top: 128px;
    transform: translateY(-50%);
    width: 38px;
    height: 38px;
    border: 1px solid #dfdfdf;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.98);
    color: #111111;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    z-index: 4;
}

.product-related-arrow:hover:not(:disabled) {
    color: var(--brand-red);
    border-color: var(--brand-red);
}

.product-related-arrow:disabled {
    opacity: 0;
    pointer-events: none;
}

.product-related-arrow-prev {
    left: -18px;
}

.product-related-arrow-next {
    right: -18px;
}

/* STATO VUOTO */
.product-empty-state {
    min-height: 320px;
    padding: 42px 28px;
    border: 1px solid var(--line);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.product-empty-state .material-symbols-outlined {
    margin-bottom: 12px;
    color: var(--brand-red);
    font-size: 58px;
}

.product-empty-state p {
    margin: 12px 0 0;
    max-width: 520px;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.6;
}

.product-empty-state .product-primary-action {
    margin-top: 18px;
    flex: 0 0 auto;
}

@media (max-width: 1680px) {
    .product-detail-card {
        grid-template-columns: minmax(360px, 0.95fr) minmax(420px, 1.12fr) 300px;
        gap: 26px;
    }

    .product-related-track {
        grid-auto-columns: calc((100% - (var(--product-related-gap) * 4)) / 5);
    }
}

@media (max-width: 1420px) {
    .product-detail-card {
        grid-template-columns: minmax(320px, 0.9fr) minmax(0, 1.1fr) 290px;
        gap: 22px;
    }

    .product-media {
        min-height: 430px;
    }

    .product-summary {
        padding-top: 26px;
    }

    .product-summary-actions {
        grid-template-columns: 1fr;
    }

    .product-summary-info-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .product-related-track {
        grid-auto-columns: calc((100% - (var(--product-related-gap) * 3)) / 4);
    }

    .product-identity-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 1180px) {
    .product-detail-card {
        grid-template-columns: 1fr;
    }

    .product-gallery,
    .product-summary {
        padding-top: 0;
    }

    .product-media {
        min-height: 360px;
    }

    .product-buy-box {
        position: static;
    }

    .product-related-track {
        grid-auto-columns: calc((100% - (var(--product-related-gap) * 3)) / 4);
    }
}

@media (max-width: 980px) {
    .product-related-track {
        grid-auto-columns: calc((100% - (var(--product-related-gap) * 2)) / 3);
    }
}

@media (max-width: 820px) {
    .product-main-section {
        padding: 18px 0 20px;
    }

    .product-breadcrumb {
        margin-bottom: 12px;
        font-size: 11px;
    }

    .product-detail-card {
        gap: 18px;
    }

    .product-badge-row,
    .product-related-badge-row {
        min-height: 24px;
        margin-bottom: 6px;
    }

    .product-tag,
    .product-related-tag {
        min-height: 20px;
        padding: 0 7px;
        font-size: 9px;
    }

    .product-media {
        min-height: 260px;
    }

    .product-media img {
        max-height: 280px;
    }

    .product-summary h1,
    .product-empty-state h1 {
        font-size: 21px;
        line-height: 1.22;
    }

    .product-short-description,
    .product-description-content {
        font-size: 14px;
        line-height: 1.45;
    }

    .product-summary-actions {
        margin-top: 14px;
        padding-top: 14px;
    }

    .product-summary-info {
        margin-top: 14px;
        padding-top: 13px;
    }

    .product-summary-info-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 7px;
    }

    .product-summary-info-list > div {
        padding: 8px;
    }

    .product-buy-box {
        padding: 16px;
    }

    .product-buy-benefits {
        margin: 18px -16px -16px;
        padding: 16px;
    }

    .product-actions-row {
        gap: 8px;
    }

    .product-primary-action,
    .product-secondary-action {
        min-height: 38px;
        font-size: 10px;
        padding: 0 10px;
    }

    .product-description-section {
        padding-bottom: 28px;
    }

    .product-description-card {
        padding: 22px 0;
        border-top-width: 2px;
    }

    .product-description-card h2,
    .product-section-heading h2 {
        font-size: 21px;
    }

    .product-identity-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .product-related-track {
        --product-related-gap: 16px;
        grid-auto-columns: calc((100% - var(--product-related-gap)) / 2);
    }

    .product-related-card {
        min-height: 372px;
    }

    .product-related-media {
        height: 170px;
        margin-bottom: 10px;
    }

    .product-related-name {
        min-height: 44px;
        font-size: 14px;
        line-height: 1.24;
    }

    .product-related-meta {
        margin-top: 8px;
    }

    .product-related-bottom {
        padding-top: 10px;
    }

    .product-related-price {
        font-size: 19px;
    }

    .product-related-stock {
        margin-top: 8px;
        font-size: 11px;
    }

    .product-related-actions {
        margin-top: 10px;
        gap: 8px;
    }

    .product-related-qty {
        width: 84px;
        min-width: 84px;
        height: 38px;
        grid-template-columns: 28px 1fr 28px;
    }

    .product-related-cart {
        height: 38px;
        font-size: 10px;
        padding: 0 10px;
    }

    .product-related-arrow {
        display: none;
    }
}

@media (max-width: 540px) {
    .product-detail-card {
        gap: 16px;
    }

    .product-buy-price strong {
        font-size: 22px;
    }

    .product-actions-row {
        align-items: stretch;
    }

    .product-qty {
        width: 70px;
        min-width: 70px;
        height: 36px;
        grid-template-columns: 23px 1fr 23px;
    }

    .product-qty button {
        font-size: 15px;
    }

    .product-qty span {
        font-size: 13px;
    }

    .product-primary-action,
    .product-secondary-action {
        min-height: 36px;
        font-size: 9px;
    }

    .product-identity-list {
        grid-template-columns: 1fr;
    }

    .product-related-track {
        --product-related-gap: 14px;
        grid-auto-columns: calc((100% - var(--product-related-gap)) / 2);
    }

    .product-related-card {
        min-height: 360px;
    }

    .product-related-media {
        height: 150px;
    }

    .product-related-name {
        min-height: 48px;
        font-size: 13px;
        line-height: 1.25;
    }

    .product-related-brand,
    .product-related-code {
        font-size: 10px;
    }

    .product-related-price {
        font-size: 18px;
    }

    .product-related-stock {
        gap: 6px;
        font-size: 10px;
    }

    .product-related-actions {
        gap: 7px;
    }

    .product-related-qty {
        width: 70px;
        min-width: 70px;
        height: 36px;
        grid-template-columns: 23px 1fr 23px;
    }

    .product-related-qty button {
        font-size: 15px;
    }

    .product-related-cart {
        height: 36px;
        font-size: 9px;
        padding: 0 8px;
    }

    .product-related-cart svg {
        width: 15px;
        height: 15px;
    }
}

@media (max-width: 390px) {
    .product-summary h1,
    .product-empty-state h1 {
        font-size: 20px;
    }

    .product-media {
        min-height: 230px;
    }

    .product-media img {
        max-height: 250px;
    }

    .product-related-track {
        --product-related-gap: 12px;
    }

    .product-related-card {
        min-height: 340px;
    }

    .product-related-media {
        height: 132px;
    }

    .product-related-name {
        min-height: 46px;
        font-size: 12.5px;
    }
}

/* PRODUCT HELP MODAL */
.product-help-trigger {
    cursor: pointer;
    font-family: inherit;
}

.product-help-modal {
    position: fixed;
    inset: 0;
    z-index: 100100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 28px;
    overflow-y: auto;
    overscroll-behavior: contain;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.22s ease, visibility 0.22s ease;
}

.product-help-modal.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.product-help-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(17, 17, 17, 0.46);
}

.product-help-dialog {
    position: relative;
    z-index: 2;
    box-sizing: border-box;
    width: min(640px, 100%);
    max-height: min(86vh, 760px);
    max-height: min(calc(100dvh - 56px), 760px);
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    background: #ffffff;
    border: 1px solid var(--line);
    border-top: 3px solid var(--brand-red);
    box-shadow: 0 26px 72px rgba(0, 0, 0, 0.22);
    padding: 24px;
}

.product-help-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 38px;
    height: 38px;
    border: 1px solid #e6e6e6;
    background: #ffffff;
    color: #111111;
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
}

.product-help-close:hover {
    color: var(--brand-red);
    border-color: var(--brand-red);
}

.product-help-dialog h2 {
    margin: 0;
    max-width: 560px;
    font-size: 22px;
    line-height: 1.18;
    letter-spacing: -0.02em;
    color: var(--brand-black);
}

.product-help-intro {
    margin: 10px 44px 20px 0;
    max-width: 620px;
    font-size: 14px;
    line-height: 1.55;
    color: var(--muted);
}

.product-help-form {
    display: grid;
    gap: 16px;
}

.product-help-subject {
    display: grid;
    grid-template-columns: 86px minmax(0, 1fr);
    gap: 14px;
    align-items: center;
    padding: 12px;
    border: 1px solid #eeeeee;
    background: #fafafa;
}

.product-help-subject-no-image {
    grid-template-columns: 1fr;
}

.product-help-subject-image {
    width: 86px;
    height: 86px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    border: 1px solid #eeeeee;
    overflow: hidden;
}

.product-help-subject-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.product-help-subject-info {
    min-width: 0;
}

.product-help-subject-label,
.product-help-subject-name,
.product-help-subject-meta {
    margin: 0;
}

.product-help-subject-label {
    color: var(--brand-red);
    font-size: 10px;
    line-height: 1.2;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.product-help-subject-name {
    margin-top: 5px;
    color: #111111;
    font-size: 14px;
    line-height: 1.3;
    font-weight: 700;
}

.product-help-subject-meta {
    margin-top: 5px;
    color: #666666;
    font-size: 12px;
    line-height: 1.35;
}

.product-help-subject-meta a {
    color: var(--brand-red);
    text-decoration: none;
    font-weight: 700;
}

.product-help-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.product-help-form label {
    display: grid;
    gap: 7px;
}

.product-help-form label span {
    font-size: 11px;
    font-weight: 700;
    line-height: 1.2;
    color: #555555;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.product-help-form input,
.product-help-form textarea {
    width: 100%;
    border: 1px solid #dddddd;
    background: #ffffff;
    color: #111111;
    font-family: inherit;
    font-size: 14px;
    outline: none;
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.product-help-form input {
    height: 42px;
    padding: 0 12px;
}

.product-help-form textarea {
    min-height: 120px;
    padding: 12px;
    resize: vertical;
    line-height: 1.5;
}

.product-help-form input:focus,
.product-help-form textarea:focus {
    border-color: var(--brand-red);
    box-shadow: 0 0 0 3px rgba(255, 0, 0, 0.08);
}

.product-help-note {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    background: #fafafa;
    border: 1px solid #eeeeee;
}

.product-help-note .material-symbols-outlined {
    color: var(--brand-red);
    font-size: 20px;
    line-height: 1;
}

.product-help-note p {
    margin: 0;
    font-size: 13px;
    line-height: 1.45;
    color: #666666;
}

.product-help-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    padding-top: 4px;
}

.product-help-actions .product-primary-action,
.product-help-actions .product-secondary-action {
    min-width: 170px;
    border-radius: 0;
    cursor: pointer;
    font-family: inherit;
}

.product-help-status {
    margin: -2px 0 0;
    min-height: 18px;
    color: #666666;
    font-size: 13px;
    line-height: 1.35;
}

.product-help-status.is-success {
    color: #1f7a31;
}

.product-help-status.is-error {
    color: #b3261e;
}

html.product-help-modal-open,
body.product-help-modal-open {
    overflow: hidden;
}

@media (max-width: 720px) {
    .product-help-modal {
        align-items: flex-end;
        padding: 12px;
    }

    .product-help-dialog {
        width: 100%;
        max-height: 90vh;
        max-height: calc(100dvh - 24px);
        padding: 24px 18px 18px;
    }

    .product-help-dialog h2 {
        font-size: 21px;
        padding-right: 40px;
    }

    .product-help-intro {
        margin-right: 0;
        font-size: 13px;
    }

    .product-help-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .product-help-subject {
        grid-template-columns: 68px minmax(0, 1fr);
        gap: 11px;
    }

    .product-help-subject-image {
        width: 68px;
        height: 68px;
    }

    .product-help-actions {
        flex-direction: column-reverse;
        align-items: stretch;
    }

    .product-help-actions .product-primary-action,
    .product-help-actions .product-secondary-action {
        width: 100%;
    }
}
