/* Public commodity catalog and product-detail presentation. */

.catalog-hero,
.product-detail-hero {
    background:
        radial-gradient(circle at 8% 10%, rgba(229, 199, 103, 0.16), transparent 28%),
        radial-gradient(circle at 90% 18%, rgba(63, 133, 87, 0.2), transparent 30%),
        linear-gradient(132deg, var(--ior-navy-deep) 0%, var(--ior-navy) 46%, var(--ior-green-deep) 100%);
    color: var(--ior-white);
    isolation: isolate;
    overflow: hidden;
    padding: 142px 0 74px;
}

.catalog-hero-pattern,
.product-detail-pattern {
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
    background-size: 42px 42px;
    inset: 0;
    mask-image: linear-gradient(90deg, transparent, #000 20%, #000 80%, transparent);
    opacity: 0.55;
    position: absolute;
    z-index: -1;
}

.catalog-breadcrumb {
    align-items: center;
    color: rgba(255, 255, 255, 0.72);
    display: flex;
    flex-wrap: wrap;
    font-size: 0.8rem;
    font-weight: 750;
    gap: 8px;
    margin-bottom: 26px;
}

.catalog-breadcrumb a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
}

.catalog-breadcrumb a:hover,
.catalog-breadcrumb a:focus {
    color: var(--ior-light-gold);
}

.catalog-breadcrumb svg {
    height: 14px;
    width: 14px;
}

.catalog-hero-content {
    max-width: 900px;
}

.catalog-hero-content h1,
.product-detail-summary h1 {
    color: var(--ior-white);
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(2.8rem, 5vw, 5.2rem);
    letter-spacing: -0.045em;
    line-height: 0.98;
    margin: 0;
}

.catalog-hero-content > p:last-child {
    color: rgba(255, 255, 255, 0.78);
    font-size: 1.02rem;
    line-height: 1.8;
    margin: 24px 0 0;
    max-width: 830px;
}

.catalog-main {
    background: #f7f8f5;
}

.catalog-filter {
    align-items: end;
    background: var(--ior-white);
    border: 1px solid rgba(11, 40, 95, 0.1);
    box-shadow: 0 22px 55px rgba(7, 28, 66, 0.08);
    display: grid;
    gap: 16px;
    grid-template-columns: minmax(260px, 1.35fr) minmax(190px, 0.75fr) minmax(190px, 0.7fr) auto;
    margin-top: -108px;
    padding: 22px;
    position: relative;
    z-index: 5;
}

.catalog-filter-field {
    display: grid;
    gap: 7px;
}

.catalog-filter-field label {
    color: var(--ior-navy);
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.catalog-filter input,
.catalog-filter select {
    appearance: none;
    background: #fbfcfa;
    border: 1px solid rgba(11, 40, 95, 0.14);
    border-radius: 2px;
    color: var(--ior-ink);
    font: inherit;
    font-size: 0.9rem;
    min-height: 46px;
    outline: none;
    padding: 0 13px;
    width: 100%;
}

.catalog-filter select {
    background-image:
        linear-gradient(45deg, transparent 50%, var(--ior-navy) 50%),
        linear-gradient(135deg, var(--ior-navy) 50%, transparent 50%);
    background-position:
        calc(100% - 18px) 20px,
        calc(100% - 13px) 20px;
    background-repeat: no-repeat;
    background-size: 5px 5px, 5px 5px;
    padding-right: 34px;
}

.catalog-filter input:focus,
.catalog-filter select:focus {
    border-color: rgba(36, 107, 59, 0.6);
    box-shadow: 0 0 0 3px rgba(36, 107, 59, 0.1);
}

.catalog-input-wrap {
    position: relative;
}

.catalog-input-wrap svg {
    color: var(--ior-green);
    height: 18px;
    left: 14px;
    position: absolute;
    top: 14px;
    width: 18px;
}

.catalog-input-wrap input {
    padding-left: 42px;
}

.catalog-filter-actions {
    display: flex;
    gap: 8px;
}

.catalog-filter-actions .btn {
    min-height: 46px;
    white-space: nowrap;
}

.catalog-result-bar {
    align-items: center;
    display: flex;
    justify-content: space-between;
    margin: 34px 0 17px;
}

.catalog-result-bar p {
    color: var(--ior-muted);
    font-size: 0.86rem;
    font-weight: 800;
    margin: 0;
}

.catalog-product-grid {
    display: grid;
    gap: 22px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.catalog-product-card {
    background: var(--ior-white);
    border: 1px solid rgba(11, 40, 95, 0.1);
    box-shadow: 0 14px 38px rgba(7, 28, 66, 0.055);
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
    transition: border-color 0.22s ease, box-shadow 0.22s ease, transform 0.22s ease;
}

.catalog-product-card:hover {
    border-color: rgba(36, 107, 59, 0.3);
    box-shadow: 0 28px 58px rgba(7, 28, 66, 0.12);
    transform: translateY(-6px);
}

.catalog-product-media {
    aspect-ratio: 3 / 2;
    background: var(--ior-ivory);
    display: block;
    overflow: hidden;
    position: relative;
}

.catalog-product-media::after {
    background: linear-gradient(180deg, transparent 58%, rgba(7, 28, 66, 0.55));
    content: "";
    inset: 0;
    pointer-events: none;
    position: absolute;
}

.catalog-product-media img {
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
    width: 100%;
}

.catalog-product-card:hover .catalog-product-media img {
    transform: scale(1.035);
}

.catalog-product-badge {
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid rgba(255, 255, 255, 0.55);
    bottom: 14px;
    color: var(--ior-navy);
    font-size: 0.65rem;
    font-weight: 900;
    left: 14px;
    letter-spacing: 0.045em;
    max-width: calc(100% - 28px);
    padding: 8px 10px;
    position: absolute;
    text-transform: uppercase;
    z-index: 2;
}

.catalog-product-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: 22px;
}

.catalog-product-category {
    color: var(--ior-green);
    font-size: 0.7rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.catalog-product-body h2 {
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.55rem;
    line-height: 1.12;
    margin: 10px 0 11px;
}

.catalog-product-body h2 a {
    color: var(--ior-navy);
    text-decoration: none;
}

.catalog-product-body > p {
    color: var(--ior-muted);
    font-size: 0.88rem;
    line-height: 1.72;
    margin: 0;
}

.catalog-product-status {
    align-items: flex-start;
    border-top: 1px solid rgba(11, 40, 95, 0.08);
    color: var(--ior-green);
    display: flex;
    font-size: 0.75rem;
    font-weight: 800;
    gap: 8px;
    line-height: 1.45;
    margin-top: 19px;
    padding-top: 15px;
}

.catalog-product-status svg {
    flex: 0 0 auto;
    height: 16px;
    margin-top: 1px;
    width: 16px;
}

.catalog-product-link {
    align-items: center;
    color: var(--ior-navy);
    display: inline-flex;
    font-size: 0.78rem;
    font-weight: 900;
    gap: 8px;
    margin-top: auto;
    padding-top: 20px;
    text-decoration: none;
}

.catalog-product-link:hover,
.catalog-product-link:focus {
    color: var(--ior-green);
}

.catalog-product-link svg {
    height: 16px;
    width: 16px;
}

.catalog-empty-state {
    background: var(--ior-white);
    border: 1px solid rgba(11, 40, 95, 0.1);
    display: grid;
    justify-items: center;
    padding: 70px 24px;
    text-align: center;
}

.catalog-empty-state > span {
    align-items: center;
    background: var(--ior-ivory);
    border-radius: 50%;
    color: var(--ior-green);
    display: inline-flex;
    height: 70px;
    justify-content: center;
    width: 70px;
}

.catalog-empty-state svg {
    height: 31px;
    width: 31px;
}

.catalog-empty-state h2 {
    color: var(--ior-navy);
    font-family: Georgia, "Times New Roman", serif;
    margin: 21px 0 10px;
}

.catalog-empty-state p {
    color: var(--ior-muted);
    max-width: 620px;
}

.catalog-pagination {
    display: flex;
    justify-content: center;
    margin-top: 38px;
}

.catalog-pagination .pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: center;
    list-style: none;
    margin: 0;
    padding: 0;
}

.catalog-pagination .page-link {
    align-items: center;
    background: var(--ior-white);
    border: 1px solid rgba(11, 40, 95, 0.12);
    color: var(--ior-navy);
    display: inline-flex;
    font-size: 0.82rem;
    font-weight: 850;
    justify-content: center;
    min-height: 40px;
    min-width: 40px;
    padding: 0 11px;
    text-decoration: none;
}

.catalog-pagination .active .page-link,
.catalog-pagination .page-link:hover {
    background: var(--ior-green);
    border-color: var(--ior-green);
    color: var(--ior-white);
}

/* Product detail */
.product-detail-hero {
    padding-bottom: 82px;
}

.product-breadcrumb {
    margin-bottom: 30px;
}

.product-detail-grid {
    align-items: start;
    display: grid;
    gap: clamp(34px, 5vw, 72px);
    grid-template-columns: minmax(0, 1.04fr) minmax(390px, 0.96fr);
}

.product-gallery-main {
    aspect-ratio: 3 / 2;
    background: var(--ior-ivory);
    box-shadow: 0 28px 68px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    position: relative;
}

.product-gallery-main img {
    height: 100%;
    object-fit: cover;
    width: 100%;
}

.product-gallery-expand {
    align-items: center;
    background: rgba(255, 255, 255, 0.94);
    border: 0;
    border-radius: 50%;
    bottom: 16px;
    color: var(--ior-navy);
    cursor: pointer;
    display: inline-flex;
    height: 44px;
    justify-content: center;
    position: absolute;
    right: 16px;
    width: 44px;
}

.product-gallery-expand:hover,
.product-gallery-expand:focus {
    background: var(--ior-gold);
    color: var(--ior-white);
}

.product-gallery-expand svg {
    height: 19px;
    width: 19px;
}

.product-gallery-thumbnails {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-top: 12px;
}

.product-gallery-thumb {
    aspect-ratio: 4 / 3;
    background: transparent;
    border: 2px solid transparent;
    cursor: pointer;
    overflow: hidden;
    padding: 0;
}

.product-gallery-thumb.is-active {
    border-color: var(--ior-gold);
}

.product-gallery-thumb img {
    height: 100%;
    object-fit: cover;
    width: 100%;
}

.product-gallery-caption {
    color: rgba(255, 255, 255, 0.64);
    font-size: 0.73rem;
    line-height: 1.55;
    margin: 12px 0 0;
}

.product-gallery-dialog {
    background: rgba(4, 13, 31, 0.96);
    border: 0;
    height: 100vh;
    margin: 0;
    max-height: none;
    max-width: none;
    padding: 40px;
    width: 100vw;
}

.product-gallery-dialog::backdrop {
    background: rgba(4, 13, 31, 0.96);
}

.product-gallery-dialog[open] {
    align-items: center;
    display: flex;
    justify-content: center;
}

.product-gallery-dialog img {
    max-height: calc(100vh - 80px);
    max-width: calc(100vw - 80px);
    object-fit: contain;
}

.product-gallery-dialog-close {
    align-items: center;
    background: var(--ior-white);
    border: 0;
    border-radius: 50%;
    color: var(--ior-navy);
    cursor: pointer;
    display: inline-flex;
    height: 44px;
    justify-content: center;
    position: fixed;
    right: 22px;
    top: 22px;
    width: 44px;
}

.product-detail-summary {
    color: var(--ior-white);
    padding-top: 4px;
}

.product-detail-meta-row {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 18px;
}

.product-detail-category,
.product-detail-badge {
    border: 1px solid rgba(255, 255, 255, 0.2);
    font-size: 0.68rem;
    font-weight: 900;
    letter-spacing: 0.075em;
    padding: 8px 10px;
    text-transform: uppercase;
}

.product-detail-category {
    background: rgba(255, 255, 255, 0.08);
    color: var(--ior-light-gold);
}

.product-detail-badge {
    background: rgba(255, 255, 255, 0.92);
    color: var(--ior-navy);
}

.product-detail-summary h1 {
    font-size: clamp(2.7rem, 4.6vw, 5rem);
}

.product-detail-lead {
    color: rgba(255, 255, 255, 0.78);
    font-size: 1rem;
    line-height: 1.78;
    margin: 22px 0 0;
}

.product-detail-status {
    align-items: center;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-left: 4px solid var(--ior-gold);
    display: flex;
    gap: 13px;
    margin-top: 24px;
    padding: 14px 16px;
}

.product-detail-status > svg {
    color: var(--ior-light-gold);
    height: 23px;
    width: 23px;
}

.product-detail-status div {
    display: grid;
    gap: 2px;
}

.product-detail-status span {
    color: rgba(255, 255, 255, 0.62);
    font-size: 0.68rem;
    font-weight: 850;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.product-detail-status strong {
    font-size: 0.92rem;
    line-height: 1.4;
}

.product-identity-list {
    display: grid;
    gap: 0;
    margin: 22px 0 0;
}

.product-identity-list > div {
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    display: grid;
    gap: 16px;
    grid-template-columns: 140px 1fr;
    padding: 10px 0;
}

.product-identity-list dt {
    color: rgba(255, 255, 255, 0.58);
    font-size: 0.74rem;
    font-weight: 750;
}

.product-identity-list dd {
    color: var(--ior-white);
    font-size: 0.83rem;
    font-weight: 800;
    margin: 0;
}

.product-detail-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 26px;
}

.product-detail-actions .btn-outline-ior {
    border-color: rgba(255, 255, 255, 0.42);
    color: var(--ior-white);
}

.product-detail-actions .btn-outline-ior:hover {
    background: var(--ior-white);
    color: var(--ior-navy);
}

.product-detail-policy {
    align-items: flex-start;
    color: rgba(255, 255, 255, 0.62);
    display: flex;
    font-size: 0.75rem;
    gap: 8px;
    line-height: 1.6;
    margin: 19px 0 0;
}

.product-detail-policy svg {
    flex: 0 0 auto;
    height: 15px;
    margin-top: 2px;
    width: 15px;
}

.product-detail-content {
    background: #f7f8f5;
}

.product-detail-content-grid {
    align-items: start;
    display: grid;
    gap: 24px;
    grid-template-columns: minmax(0, 1fr) 350px;
}

.product-detail-main-column {
    display: grid;
    gap: 20px;
}

.product-content-card,
.product-sidebar-card {
    background: var(--ior-white);
    border: 1px solid rgba(11, 40, 95, 0.1);
    box-shadow: 0 12px 34px rgba(7, 28, 66, 0.045);
    padding: clamp(24px, 3vw, 38px);
}

.product-content-card h2 {
    color: var(--ior-navy);
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(1.9rem, 3vw, 2.8rem);
    margin: 6px 0 18px;
}

.product-content-card > p:not(.eyebrow) {
    color: var(--ior-muted);
    line-height: 1.82;
}

.product-content-card > p:last-child {
    margin-bottom: 0;
}

.product-section-heading {
    align-items: center;
    display: flex;
    justify-content: space-between;
}

.product-section-heading > svg {
    color: rgba(36, 107, 59, 0.35);
    height: 36px;
    width: 36px;
}

.product-specification-list {
    border-top: 1px solid rgba(11, 40, 95, 0.1);
    display: grid;
}

.product-specification-row {
    align-items: center;
    border-bottom: 1px solid rgba(11, 40, 95, 0.08);
    display: grid;
    gap: 16px;
    grid-template-columns: minmax(0, 1fr) auto;
    padding: 15px 0;
}

.product-specification-row > div {
    display: grid;
    gap: 3px;
}

.product-specification-row span {
    color: var(--ior-muted);
    font-size: 0.72rem;
    font-weight: 800;
}

.product-specification-row strong {
    color: var(--ior-ink);
    font-size: 0.93rem;
}

.product-specification-row small {
    border: 1px solid rgba(11, 40, 95, 0.12);
    font-size: 0.63rem;
    font-weight: 900;
    letter-spacing: 0.04em;
    padding: 7px 8px;
    text-transform: uppercase;
}

.product-specification-row .verification-verified {
    background: #edf8f0;
    border-color: rgba(36, 107, 59, 0.2);
    color: var(--ior-green);
}

.product-specification-row .verification-source_reported {
    background: #eef4fb;
    border-color: rgba(23, 61, 120, 0.18);
    color: var(--ior-navy-soft);
}

.product-specification-row .verification-review_required,
.product-specification-row .verification-to_be_confirmed {
    background: #fff8e5;
    border-color: rgba(201, 151, 35, 0.26);
    color: #7c5908;
}

.product-empty-copy {
    color: var(--ior-muted);
    margin-bottom: 0;
}

.product-variant-table-wrap {
    overflow-x: auto;
}

.product-variant-table {
    border-collapse: collapse;
    min-width: 650px;
    width: 100%;
}

.product-variant-table th,
.product-variant-table td {
    border-bottom: 1px solid rgba(11, 40, 95, 0.09);
    padding: 13px 12px;
    text-align: left;
}

.product-variant-table th {
    color: var(--ior-green);
    font-size: 0.68rem;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.product-variant-table td {
    color: var(--ior-ink);
    font-size: 0.84rem;
}

.product-detail-sidebar {
    display: grid;
    gap: 18px;
    position: sticky;
    top: 98px;
}

.product-sidebar-title {
    align-items: center;
    display: flex;
    gap: 10px;
    margin-bottom: 18px;
}

.product-sidebar-title svg {
    color: var(--ior-green);
    height: 20px;
    width: 20px;
}

.product-sidebar-title h2 {
    color: var(--ior-navy);
    font-size: 1rem;
    font-weight: 900;
    margin: 0;
}

.product-sidebar-card > p {
    color: var(--ior-muted);
    font-size: 0.85rem;
    line-height: 1.7;
    margin-bottom: 0;
}

.product-origin-list,
.product-commercial-list {
    display: grid;
    gap: 0;
    margin: 0;
}

.product-origin-list > div,
.product-commercial-list > div {
    border-top: 1px solid rgba(11, 40, 95, 0.08);
    display: grid;
    gap: 4px;
    padding: 12px 0;
}

.product-origin-list span,
.product-commercial-list dt {
    color: var(--ior-muted);
    font-size: 0.7rem;
    font-weight: 800;
    margin: 0;
    text-transform: uppercase;
}

.product-origin-list strong,
.product-commercial-list dd {
    color: var(--ior-ink);
    font-size: 0.86rem;
    font-weight: 800;
    line-height: 1.45;
    margin: 0;
}

.product-requirement-card {
    background: linear-gradient(145deg, var(--ior-green-deep), var(--ior-navy));
    box-shadow: 0 22px 50px rgba(7, 28, 66, 0.15);
    color: var(--ior-white);
    padding: 28px;
}

.product-requirement-icon {
    align-items: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: var(--ior-light-gold);
    display: inline-flex;
    height: 50px;
    justify-content: center;
    width: 50px;
}

.product-requirement-icon svg {
    height: 23px;
    width: 23px;
}

.product-requirement-card h2 {
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.65rem;
    margin: 18px 0 10px;
}

.product-requirement-card p {
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.83rem;
    line-height: 1.7;
}

.product-requirement-card .btn {
    margin-top: 10px;
    width: 100%;
}

.product-back-link {
    align-items: center;
    color: var(--ior-navy);
    display: inline-flex;
    font-size: 0.84rem;
    font-weight: 900;
    gap: 9px;
    margin-top: 26px;
    text-decoration: none;
}

.product-back-link:hover {
    color: var(--ior-green);
}

.product-back-link svg {
    height: 17px;
    width: 17px;
}

@media (max-width: 1199.98px) {
    .catalog-filter {
        grid-template-columns: minmax(260px, 1.4fr) repeat(2, minmax(180px, 0.8fr));
    }

    .catalog-filter-actions {
        grid-column: 1 / -1;
        justify-content: flex-end;
    }

    .catalog-product-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .product-detail-grid {
        grid-template-columns: minmax(0, 1fr) minmax(340px, 0.92fr);
    }
}

@media (max-width: 991.98px) {
    .catalog-hero,
    .product-detail-hero {
        padding-top: 126px;
    }

    .catalog-filter {
        grid-template-columns: 1fr 1fr;
        margin-top: -92px;
    }

    .catalog-filter-search {
        grid-column: 1 / -1;
    }

    .product-detail-grid,
    .product-detail-content-grid {
        grid-template-columns: 1fr;
    }

    .product-detail-summary {
        max-width: 780px;
    }

    .product-detail-sidebar {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        position: static;
    }

    .product-requirement-card {
        grid-column: 1 / -1;
    }
}

@media (max-width: 767.98px) {
    .catalog-hero,
    .product-detail-hero {
        padding: 112px 0 58px;
    }

    .catalog-hero-content h1,
    .product-detail-summary h1 {
        font-size: clamp(2.35rem, 12vw, 3.8rem);
    }

    .catalog-filter {
        grid-template-columns: 1fr;
        margin-top: -72px;
        padding: 18px;
    }

    .catalog-filter-search,
    .catalog-filter-actions {
        grid-column: auto;
    }

    .catalog-filter-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .catalog-product-grid {
        grid-template-columns: 1fr;
    }

    .catalog-product-body {
        padding: 20px;
    }

    .product-detail-actions {
        display: grid;
    }

    .product-detail-actions .btn {
        width: 100%;
    }

    .product-identity-list > div {
        grid-template-columns: 1fr;
        gap: 2px;
    }

    .product-detail-sidebar {
        grid-template-columns: 1fr;
    }

    .product-requirement-card {
        grid-column: auto;
    }

    .product-specification-row {
        align-items: start;
        grid-template-columns: 1fr;
    }

    .product-specification-row small {
        justify-self: start;
    }

    .product-gallery-dialog {
        padding: 18px;
    }

    .product-gallery-dialog img {
        max-height: calc(100vh - 36px);
        max-width: calc(100vw - 36px);
    }
}

@media (max-width: 480px) {
    .catalog-filter-actions {
        grid-template-columns: 1fr;
    }

    .catalog-product-badge {
        font-size: 0.6rem;
    }

    .product-gallery-thumbnails {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .product-content-card,
    .product-sidebar-card,
    .product-requirement-card {
        padding: 22px 18px;
    }
}
