/* DSE Catalog v0.3 Build 1 — single Product page */
.dse-product-template {
    width: 100%;
}

.dse-product-template__main {
    width: min(1180px, calc(100% - 40px));
    margin: 0 auto;
    padding: clamp(30px, 5vw, 64px) 0 clamp(48px, 7vw, 90px);
}

.dse-product {
    --dse-bg: var(--global-palette9, #fff);
    --dse-soft: var(--global-palette7, #f4f6f8);
    --dse-text: var(--global-palette3, #1f2933);
    --dse-muted: var(--global-palette5, #667085);
    --dse-border: var(--global-gray-400, #d0d5dd);
    --dse-accent: var(--global-palette1, #1f6aa5);
    --dse-accent-hover: var(--global-palette2, #16527f);
    color: var(--dse-text);
}

.dse-product a {
    text-underline-offset: 2px;
}

.dse-product__topline {
    min-height: 28px;
    margin-bottom: 18px;
}

.dse-product__back {
    font-size: .95rem;
    font-weight: 600;
    text-decoration: none;
}

.dse-product__header {
    max-width: 900px;
    margin-bottom: 30px;
}

.dse-product__badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.dse-product__badge {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 4px 10px;
    border: 1px solid var(--dse-border);
    border-radius: 999px;
    background: var(--dse-soft);
    font-size: .78rem;
    font-weight: 700;
    line-height: 1.2;
}

.dse-product__title {
    margin: 0 0 14px;
    font-size: clamp(2rem, 5vw, 3.5rem);
    line-height: 1.05;
    letter-spacing: -.025em;
}

.dse-product__description {
    max-width: 820px;
    font-size: clamp(1rem, 1.8vw, 1.18rem);
    line-height: 1.65;
}

.dse-product__description p:last-child {
    margin-bottom: 0;
}

.dse-product__hero {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(280px, .75fr);
    gap: clamp(24px, 4vw, 46px);
    align-items: start;
    margin-bottom: 46px;
}

.dse-product__hero--no-photo {
    grid-template-columns: minmax(280px, 440px);
    justify-content: start;
}

.dse-product__primary-photo {
    margin: 0;
    overflow: hidden;
    border: 1px solid var(--dse-border);
    border-radius: 12px;
    background: var(--dse-bg);
}

.dse-product__primary-photo a {
    display: block;
}

.dse-product__primary-image {
    display: block;
    width: 100%;
    height: auto;
    max-height: 680px;
    object-fit: contain;
}

.dse-product__order-card {
    padding: 24px;
    border: 1px solid var(--dse-border);
    border-radius: 12px;
    background: var(--dse-soft);
}

.dse-product__order-card h2 {
    margin: 0 0 18px;
    font-size: 1.25rem;
}

.dse-product__price {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    padding-bottom: 16px;
    margin-bottom: 16px;
    border-bottom: 1px solid var(--dse-border);
}

.dse-product__price-label {
    color: var(--dse-muted);
    font-weight: 600;
}

.dse-product__price strong {
    font-size: 1.8rem;
    line-height: 1;
}

.dse-product__order-status {
    margin: 8px 0;
}

.dse-product__order-copy {
    margin-top: 22px;
    padding-top: 20px;
    border-top: 1px solid var(--dse-border);
}

.dse-product__order-copy p {
    margin: 6px 0 16px;
    color: var(--dse-muted);
    line-height: 1.55;
}

.dse-product__button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 44px;
    margin-top: 10px;
    padding: 10px 16px;
    border: 2px solid var(--dse-accent);
    border-radius: 7px;
    background: var(--dse-accent);
    color: #fff !important;
    font-weight: 700;
    text-align: center;
    text-decoration: none !important;
    transition: background-color .15s ease, border-color .15s ease;
}

.dse-product__button:hover,
.dse-product__button:focus {
    border-color: var(--dse-accent-hover);
    background: var(--dse-accent-hover);
}

.dse-product__button--secondary {
    background: transparent;
    color: var(--dse-accent) !important;
}

.dse-product__button--secondary:hover,
.dse-product__button--secondary:focus {
    color: #fff !important;
}

.dse-product__section {
    margin-top: 46px;
}

.dse-product__section > h2 {
    margin: 0 0 20px;
    font-size: clamp(1.45rem, 2.5vw, 2rem);
}

.dse-product__spec-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin: 0;
    border-top: 1px solid var(--dse-border);
    border-left: 1px solid var(--dse-border);
    border-radius: 8px;
    overflow: hidden;
}

.dse-product__spec {
    display: grid;
    grid-template-columns: minmax(120px, .8fr) minmax(0, 1.2fr);
    border-right: 1px solid var(--dse-border);
    border-bottom: 1px solid var(--dse-border);
    background: var(--dse-bg);
}

.dse-product__spec dt,
.dse-product__spec dd {
    margin: 0;
    padding: 13px 15px;
}

.dse-product__spec dt {
    background: var(--dse-soft);
    font-weight: 700;
}

.dse-product__spec dd {
    overflow-wrap: anywhere;
}

.dse-product__photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 16px;
}

.dse-product__photo-thumb {
    display: block;
    aspect-ratio: 4 / 3;
    padding: 6px;
    overflow: hidden;
    border: 1px solid var(--dse-border);
    border-radius: 8px;
    background: var(--dse-bg);
}

.dse-product__photo-thumb img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.dse-product__document-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 18px;
}

.dse-product__document {
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--dse-border);
    border-radius: 10px;
    background: var(--dse-bg);
}

.dse-product__document-preview {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 180px;
    padding: 8px;
    background: var(--dse-soft);
}

.dse-product__document-preview img {
    width: 100%;
    height: 180px;
    object-fit: contain;
}

.dse-product__document-file {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 180px;
    background: var(--dse-soft);
    text-decoration: none;
}

.dse-product__document-file span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 76px;
    height: 76px;
    border: 2px solid var(--dse-accent);
    border-radius: 10px;
    color: var(--dse-accent);
    font-size: 1.1rem;
    font-weight: 800;
    letter-spacing: .05em;
}

.dse-product__document-meta {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 14px;
}

.dse-product__document-meta small {
    color: var(--dse-muted);
    overflow-wrap: anywhere;
}

.dse-product__manual-history details {
    padding: 16px 18px;
    border: 1px solid var(--dse-border);
    border-radius: 8px;
    background: var(--dse-soft);
}

.dse-product__manual-history summary {
    cursor: pointer;
    font-weight: 700;
}

.dse-product__manual-history ul {
    margin-bottom: 0;
}

.dse-product__updated {
    margin-top: 52px;
    padding-top: 18px;
    border-top: 1px solid var(--dse-border);
    color: var(--dse-muted);
    font-size: .88rem;
}

@media (max-width: 820px) {
    .dse-product-template__main {
        width: min(100% - 28px, 1180px);
    }

    .dse-product__hero,
    .dse-product__hero--no-photo {
        grid-template-columns: 1fr;
        justify-content: stretch;
    }

    .dse-product__order-card {
        width: 100%;
    }

    .dse-product__spec-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 520px) {
    .dse-product__spec {
        grid-template-columns: 1fr;
    }

    .dse-product__spec dt {
        padding-bottom: 6px;
    }

    .dse-product__spec dd {
        padding-top: 6px;
    }

    .dse-product__document-grid {
        grid-template-columns: 1fr;
    }
}
