/*
 * AMC Secure — final typography + media guard
 * Loaded last to stop legacy cascade layers from oversizing text and graphics.
 */

/* ── Commerce / listing headings ── */
body:not(.admin-body) .amz-toolbar__copy h1,
body:not(.admin-body) .amz-listing-main > .market-section > .section-title-row h2,
body:not(.admin-body) .catalog-page .amz-toolbar h1 {
    font-size: clamp(20px, 2vw, 28px) !important;
    line-height: 1.15 !important;
}

body:not(.admin-body) .amz-pdp__info h1,
body:not(.admin-body) .pdp-premium .amz-pdp__info h1,
body:not(.admin-body) .product-detail-page .detail-info h1 {
    font-size: clamp(22px, 2.4vw, 30px) !important;
    line-height: 1.14 !important;
}

body:not(.admin-body) .amz-deal-grid .deal-card h2,
body:not(.admin-body) .deal-card h2 {
    font-size: clamp(17px, 1.6vw, 22px) !important;
    line-height: 1.2 !important;
}

body:not(.admin-body) .amz-product-title,
body:not(.admin-body) .amz-product-title a,
body:not(.admin-body) .product-card h3,
body:not(.admin-body) .global-product-card h3 {
    font-size: 13px !important;
    line-height: 1.25 !important;
}

body:not(.admin-body) .section-title-row h2 {
    font-size: clamp(20px, 2.2vw, 28px) !important;
    line-height: 1.18 !important;
}

body:not(.admin-body) .section-title-row p,
body:not(.admin-body) .section-title-row > div > span {
    font-size: 12px !important;
}

body:not(.admin-body) .error-card h2,
body:not(.admin-body) .success-card h2 {
    font-size: clamp(18px, 2vw, 24px) !important;
}

/* ── About page enterprise inline-style overrides ── */
body:not(.admin-body) .about-enterprise-page .about-profile-card h1 {
    font-size: clamp(24px, 2.6vw, 34px) !important;
    line-height: 1.08 !important;
}

body:not(.admin-body) .about-enterprise-page .about-hero-metric strong,
body:not(.admin-body) .about-enterprise-page .about-snapshot-card strong {
    font-size: clamp(18px, 1.8vw, 24px) !important;
}

body:not(.admin-body) .about-enterprise-page .about-section-head h2,
body:not(.admin-body) .about-enterprise-page .about-board-card h3 {
    font-size: clamp(18px, 1.7vw, 24px) !important;
}

/* ── Graphics / media containment ── */
body:not(.admin-body) main img:not(.brand-wordmark-img):not(.amz-product-photo):not([data-zoom-image]) {
    max-width: 100%;
    height: auto;
}

body:not(.admin-body) .amc-visual {
    width: 40px;
    height: 40px;
    max-width: 72px;
    max-height: 72px;
}

body:not(.admin-body) .amc-visual--xs { width: 24px; height: 24px; }
body:not(.admin-body) .amc-visual--sm { width: 30px; height: 30px; }
body:not(.admin-body) .amc-visual--md { width: 40px; height: 40px; }
body:not(.admin-body) .amc-visual--lg { width: 52px; height: 52px; }
body:not(.admin-body) .amc-visual--xl { width: 72px; height: 72px; }

body:not(.admin-body) .amz-product-visual,
body:not(.admin-body) .amz-product-visual img,
body:not(.admin-body) .amz-product-photo {
    max-height: 132px !important;
    object-fit: contain !important;
}

body:not(.admin-body) .deal-card > i,
body:not(.admin-body) .amz-deal-grid .deal-card > i {
    width: 40px !important;
    height: 40px !important;
}

body:not(.admin-body) .deal-card > i svg {
    width: 20px !important;
    height: 20px !important;
}

body:not(.admin-body) .ui-icon-card img,
body:not(.admin-body) .service-icon-cloud .ui-icon-card img {
    width: 48px !important;
    height: 48px !important;
    max-width: 48px !important;
    max-height: 48px !important;
    object-fit: contain !important;
}

body:not(.admin-body) .featured-card img,
body:not(.admin-body) .client-logo-card img,
body:not(.admin-body) .about-institution-pill img {
    max-height: 56px !important;
    width: auto !important;
    object-fit: contain !important;
}

body:not(.admin-body) .nav-icon svg {
    width: 18px !important;
    height: 18px !important;
}

body:not(.admin-body) .brand-wordmark-img {
    max-height: 68px !important;
    width: auto !important;
    max-width: 100% !important;
    object-fit: contain !important;
}

body:not(.admin-body) .amz-pdp-thumbs button,
body:not(.admin-body) .amz-pdp-thumbs button img {
    width: 52px !important;
    height: 52px !important;
    max-width: 52px !important;
    max-height: 52px !important;
    object-fit: contain !important;
}

body:not(.admin-body) .amz-pdp-stage img,
body:not(.admin-body) .amz-pdp-stage [data-zoom-image] {
    max-height: min(52vh, 420px) !important;
    width: auto !important;
    max-width: 100% !important;
    object-fit: contain !important;
}

@media (max-width: 720px) {
    body:not(.admin-body):not(.global-homepage) main h1 {
        font-size: clamp(20px, 5.8vw, 26px) !important;
    }

    body:not(.admin-body) .amz-toolbar__copy h1 {
        font-size: clamp(18px, 4.8vw, 24px) !important;
    }

    body:not(.admin-body) .amz-pdp {
        grid-template-columns: 1fr !important;
    }
}
