/* =====================================================
   MARINA PUBLICATIONS CATEGORY PAGE
   Shared content width: 1240px
===================================================== */
.mp-cat-page {
    --mp-primary: #C43F0C;
    --mp-primary-dark: #152250;
    --mp-accent: #FFC02E;
    --mp-text: #243246;
    --mp-muted: #667085;
    --mp-border: #E5EAF5;
    --mp-surface: #FFFFFF;
    --mp-page-bg: #F7F9FC;
    --mp-layout-width: 1240px;
    --mp-layout-gutter: 24px;
    width: 100%;
    margin: 0;
    padding: 0 0 40px;
    overflow: hidden;
    color: var(--mp-text);
    background: var(--mp-page-bg);
    font-family: Arial, Helvetica, sans-serif;
    -webkit-font-smoothing: antialiased;
}
.mp-cat-page,
.mp-cat-page *,
.mp-cat-page *::before,
.mp-cat-page *::after {
    box-sizing: border-box;
}
.mp-cat-page img {
    max-width: 100%;
}
.mp-cat-page h1,
.mp-cat-page h2,
.mp-cat-page h3,
.mp-cat-page p {
    overflow-wrap: anywhere;
}
.mp-cat-page a {
    text-decoration: none;
}
/* Shared container for hero and content */
.mp-cat-page .mp-cat-container {
    width: calc(100% - (var(--mp-layout-gutter) * 2));
    max-width: var(--mp-layout-width);
    margin-right: auto;
    margin-left: auto;
    padding-right: 0;
    padding-left: 0;
}
/* =====================================================
   HERO
===================================================== */
.mp-cat-page .mp-cat-hero {
    position: relative;
    isolation: isolate;
    width: 100%;
    padding: 42px 0 38px;
    overflow: hidden;
    color: #4C5877;
    background: linear-gradient(
        120deg,
        #EEF3FF 0%,
        #FFFFFF 46%,
        #FFF6EC 100%
    );
}
.mp-cat-page .mp-cat-hero::before,
.mp-cat-page .mp-cat-hero::after {
    position: absolute;
    z-index: -1;
    display: block;
    border-radius: 50%;
    content: "";
    pointer-events: none;
}
.mp-cat-page .mp-cat-hero::before {
    top: -120px;
    right: -60px;
    width: 340px;
    height: 340px;
    background: radial-gradient(
        circle at 40% 40%,
        rgba(255, 192, 46, .30),
        transparent 70%
    );
}
.mp-cat-page .mp-cat-hero::after {
    bottom: -180px;
    left: 28%;
    width: 320px;
    height: 320px;
    background: radial-gradient(
        circle,
        rgba(0, 169, 165, .16),
        transparent 70%
    );
}
.mp-cat-page .mp-cat-hero-inner {
    position: relative;
    z-index: 1;
    min-width: 0;
}
/* Breadcrumbs */
.mp-cat-page .mp-cat-breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin: 0 0 12px;
    padding: 0;
    color: var(--mp-primary);
    font-size: 11px;
    font-weight: 700;
    line-height: 1.7;
    letter-spacing: 1.3px;
    text-transform: uppercase;
    overflow-wrap: anywhere;
}
.mp-cat-page .mp-cat-breadcrumbs a {
    color: var(--mp-primary);
}
.mp-cat-page .mp-cat-breadcrumbs a:hover {
    color: var(--mp-primary-dark);
}
.mp-cat-page .mp-cat-breadcrumbs span[aria-hidden="true"] {
    color: #9AA4B8;
}
.mp-cat-page .mp-cat-breadcrumbs [aria-current="page"] {
    color: var(--mp-primary);
}
/* Hero heading and description */
.mp-cat-page .mp-cat-hero h1 {
    max-width: 900px;
    margin: 0;
    padding: 0;
    color: #152250;
    font-size: clamp(34px, 4.2vw, 54px);
    font-weight: 800;
    line-height: 1.12;
    letter-spacing: -1.1px;
    text-align: left;
    overflow-wrap: anywhere;
}
.mp-cat-page .mp-cat-hero-description {
    max-width: 760px;
    margin: 12px 0 0;
    padding: 0;
    color: #4C5877;
    font-size: 16px;
    line-height: 1.65;
    text-align: left;
}
.mp-cat-page .mp-cat-hero-description p {
    margin: 0 0 8px;
}
.mp-cat-page .mp-cat-hero-description p:last-child {
    margin-bottom: 0;
}
/* =====================================================
   MAIN CONTENT
===================================================== */
.mp-cat-page .mp-cat-content {
    padding-top: 32px;
    padding-bottom: 24px;
}
.mp-cat-page .mp-cat-section {
    width: 100%;
    margin: 0 0 34px;
}
.mp-cat-page .mp-cat-section:last-child {
    margin-bottom: 0;
}
.mp-cat-page .mp-cat-section-heading {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0 0 18px;
    padding: 0;
    color: var(--mp-primary-dark);
    font-size: clamp(22px, 2.5vw, 28px);
    font-weight: 750;
    line-height: 1.35;
}
.mp-cat-page .mp-cat-section-heading::before {
    display: block;
    flex: 0 0 5px;
    width: 5px;
    height: 28px;
    border-radius: 5px;
    background: var(--mp-accent);
    content: "";
}
/* =====================================================
   CATEGORY GRID AND CARDS
===================================================== */
.mp-cat-page .mp-cat-grid {
    display: grid;
    width: 100%;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    align-items: stretch;
    gap: 20px;
}
.mp-cat-page .mp-cat-card {
    display: flex;
    min-width: 0;
    width: 100%;
    flex-direction: column;
    overflow: hidden;
    margin: 0;
    border: 1px solid var(--mp-border);
    border-radius: 12px;
    background: var(--mp-surface);
    box-shadow: 0 3px 12px rgba(20, 42, 70, .035);
    transition: transform .2s ease, box-shadow .2s ease;
}
.mp-cat-page .mp-cat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(20, 42, 70, .09);
}
.mp-cat-page .mp-cat-card-image-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    padding: 7px;
    background: #FFFFFF;
}
.mp-cat-page .mp-cat-card-image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform .25s ease;
}
.mp-cat-page .mp-cat-card:hover .mp-cat-card-image {
    transform: scale(1.035);
}
/* Decorative fallback for categories without an uploaded thumbnail. */
.mp-cat-page .mp-cat-card-fallback {
    position: relative;
    display: flex;
    width: 100%;
    height: 100%;
    min-height: 150px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 9px;
    isolation: isolate;
    background: var(--mp-cat-fallback-bg);
    color: #FFFFFF;
}
.mp-cat-page .mp-cat-fallback-orbit {
    position: absolute;
    z-index: -1;
    top: -34px;
    right: -22px;
    width: 145px;
    height: 145px;
    border: 22px solid rgba(255,255,255,.20);
    border-radius: 50%;
}
.mp-cat-page .mp-cat-fallback-book {
    display: flex;
    align-items: center;
    gap: 4px;
    height: 62px;
    transform: rotate(-7deg);
    filter: drop-shadow(0 8px 8px rgba(20,30,60,.16));
}
.mp-cat-page .mp-cat-fallback-book span {
    display: block;
    width: 27px;
    height: 48px;
    border: 2px solid rgba(255,255,255,.72);
    border-radius: 4px 7px 7px 4px;
    background: rgba(255,255,255,.25);
}
.mp-cat-page .mp-cat-fallback-book span:nth-child(2) {
    height: 60px;
    background: rgba(255,255,255,.38);
}
.mp-cat-page .mp-cat-fallback-caption {
    margin-top: 10px;
    color: inherit;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 1.2px;
    text-transform: uppercase;
}
.mp-cat-page .mp-cat-color-0 { --mp-cat-fallback-bg: linear-gradient(135deg,#173B70,#397FC4); }
.mp-cat-page .mp-cat-color-1 { --mp-cat-fallback-bg: linear-gradient(135deg,#7B2F65,#D66A91); }
.mp-cat-page .mp-cat-color-2 { --mp-cat-fallback-bg: linear-gradient(135deg,#14665D,#4DB69A); }
.mp-cat-page .mp-cat-color-3 { --mp-cat-fallback-bg: linear-gradient(135deg,#A64B20,#F0A34B); }
.mp-cat-page .mp-cat-color-4 { --mp-cat-fallback-bg: linear-gradient(135deg,#4D438C,#9185D9); }
.mp-cat-page .mp-cat-color-5 { --mp-cat-fallback-bg: linear-gradient(135deg,#53632A,#A6B957); }
.mp-cat-page .mp-cat-card-content {
    display: flex;
    flex: 1;
    min-width: 0;
    flex-direction: column;
    align-items: flex-start;
    padding: 16px;
    border-top: 1px solid #F0F2F6;
}
.mp-cat-page .mp-cat-card-title {
    width: 100%;
    margin: 0 0 12px;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.5;
    overflow-wrap: anywhere;
}
.mp-cat-page .mp-cat-card-title a {
    color: var(--mp-text);
}
.mp-cat-page .mp-cat-card-title a:hover {
    color: var(--mp-primary);
}
.mp-cat-page .mp-cat-browse-link {
    display: inline-flex;
    min-height: 40px;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: auto;
    padding: 9px 16px;
    border-radius: 7px;
    background: var(--mp-primary);
    color: #FFFFFF;
    font-size: 13px;
    font-weight: 800;
    box-shadow: 0 4px 10px rgba(196,63,12,.16);
    transition: background .2s ease, transform .2s ease, box-shadow .2s ease;
}
.mp-cat-page .mp-cat-browse-link:hover {
    transform: translateY(-1px);
    background: var(--mp-primary-dark);
    color: #FFFFFF;
    box-shadow: 0 6px 14px rgba(21,34,80,.18);
}
/* =====================================================
   PRODUCT TOOLBAR AND GRID
===================================================== */
.mp-cat-page .mp-cat-product-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--mp-border);
}
.mp-cat-page .mp-cat-result-count {
    margin: 0;
    color: var(--mp-muted);
    font-size: 14px;
}
.mp-cat-page .mp-cat-product-grid {
    display: grid;
    width: 100%;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    align-items: stretch;
    gap: 20px;
}
.mp-cat-page .mp-cat-product-card {
    display: flex;
    min-width: 0;
    width: 100%;
    height: 100%;
    flex-direction: column;
    overflow: hidden;
    margin: 0;
    border: 1px solid #E5EAF5;
    border-radius: 12px;
    background: #FFFFFF;
    transition: transform .2s ease, box-shadow .2s ease;
}
.mp-cat-page .mp-cat-product-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 24px rgba(20, 42, 70, .08);
}
/* Four products per desktop row; the four-color palette repeats every 16 products. */
.mp-cat-page .mp-cat-product-card:nth-child(16n + 1),
.mp-cat-page .mp-cat-product-card:nth-child(16n + 2),
.mp-cat-page .mp-cat-product-card:nth-child(16n + 3),
.mp-cat-page .mp-cat-product-card:nth-child(16n + 4) {
    --mp-product-row-bg: #FFF9F3;
    --mp-product-row-border: #F1E2D3;
    --mp-product-image-bg: linear-gradient(145deg,#FFF0E1,#FFF9F3);
}
.mp-cat-page .mp-cat-product-card:nth-child(16n + 5),
.mp-cat-page .mp-cat-product-card:nth-child(16n + 6),
.mp-cat-page .mp-cat-product-card:nth-child(16n + 7),
.mp-cat-page .mp-cat-product-card:nth-child(16n + 8) {
    --mp-product-row-bg: #F3F8FF;
    --mp-product-row-border: #DCE8F7;
    --mp-product-image-bg: linear-gradient(145deg,#E7F0FF,#F5F9FF);
}
.mp-cat-page .mp-cat-product-card:nth-child(16n + 9),
.mp-cat-page .mp-cat-product-card:nth-child(16n + 10),
.mp-cat-page .mp-cat-product-card:nth-child(16n + 11),
.mp-cat-page .mp-cat-product-card:nth-child(16n + 12) {
    --mp-product-row-bg: #F3FBF7;
    --mp-product-row-border: #D9EEE2;
    --mp-product-image-bg: linear-gradient(145deg,#E4F5EA,#F5FBF7);
}
.mp-cat-page .mp-cat-product-card:nth-child(16n + 13),
.mp-cat-page .mp-cat-product-card:nth-child(16n + 14),
.mp-cat-page .mp-cat-product-card:nth-child(16n + 15),
.mp-cat-page .mp-cat-product-card:nth-child(16n + 16) {
    --mp-product-row-bg: #F8F5FF;
    --mp-product-row-border: #E6DFF5;
    --mp-product-image-bg: linear-gradient(145deg,#EEE8FF,#FAF8FF);
}
.mp-cat-page .mp-cat-product-image {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    aspect-ratio: 3 / 4;
    padding: 7px;
    background: var(--mp-product-image-bg, linear-gradient(145deg, #F2F5FF, #FFF7F0));
}
.mp-cat-page .mp-cat-product-image a {
    display: flex;
    width: 100%;
    height: 100%;
    align-items: center;
    justify-content: center;
}
.mp-cat-page .mp-cat-product-image img {
    display: block;
    width: 100%;
    height: 100%;
    margin: 0 !important;
    object-fit: contain;
}
.mp-cat-page .mp-cat-product-info {
    display: flex;
    flex: 1;
    min-width: 0;
    flex-direction: column;
    align-items: flex-start;
    padding: 12px;
    border-top: 1px solid var(--mp-product-row-border, #F0F2F6);
    background: var(--mp-product-row-bg, #FFFFFF);
}
.mp-cat-page .mp-cat-product-title {
    margin: 0 0 10px;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.5;
    overflow-wrap: anywhere;
}
.mp-cat-page .mp-cat-product-title a {
    color: var(--mp-text);
}
.mp-cat-page .mp-cat-product-title a:hover {
    color: var(--mp-primary);
}
.mp-cat-page .mp-cat-product-price {
    margin-bottom: 14px;
    color: var(--mp-primary);
    font-size: 14px;
    font-weight: 700;
}
.mp-cat-page .mp-cat-product-price del {
    color: var(--mp-muted);
    font-size: 12px;
    font-weight: 400;
}
.mp-cat-page .mp-cat-product-price ins {
    text-decoration: none;
}
.mp-cat-page .mp-cat-product-actions {
    width: 100%;
    margin-top: auto;
}
.mp-cat-page .mp-cat-product-actions .button,
.mp-cat-page .mp-cat-product-actions a.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 42px;
    margin: 0;
    padding: 10px 12px;
    border: 0;
    border-radius: 6px;
    background: var(--mp-primary);
    color: #FFFFFF;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.4;
    text-align: center;
    text-decoration: none;
}
.mp-cat-page .mp-cat-product-actions .button:hover,
.mp-cat-page .mp-cat-product-actions a.button:hover {
    background: var(--mp-primary-dark);
    color: #FFFFFF;
}
.mp-cat-page .mp-cat-product-actions .added_to_cart {
    display: block;
    margin-top: 8px;
    font-size: 13px;
    text-align: center;
}
/* =====================================================
   PAGINATION AND EMPTY STATE
===================================================== */
.mp-cat-page .mp-cat-pagination {
    margin-top: 28px;
}
.mp-cat-page .mp-cat-pagination .page-numbers {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}
.mp-cat-page .mp-cat-pagination .page-numbers li {
    margin: 0;
    padding: 0;
}
.mp-cat-page .mp-cat-pagination .page-numbers a,
.mp-cat-page .mp-cat-pagination .page-numbers span {
    display: inline-flex;
    min-width: 40px;
    min-height: 40px;
    align-items: center;
    justify-content: center;
    padding: 8px 12px;
    border: 1px solid var(--mp-border);
    border-radius: 7px;
    background: #FFFFFF;
    color: var(--mp-primary);
    font-size: 14px;
    text-decoration: none;
}
.mp-cat-page .mp-cat-pagination .page-numbers .current {
    border-color: var(--mp-primary);
    background: var(--mp-primary);
    color: #FFFFFF;
}
.mp-cat-page .mp-cat-pagination .page-numbers a:hover {
    border-color: var(--mp-primary);
}
.mp-cat-page .mp-cat-empty {
    padding: 28px;
    border: 1px dashed #CBD5E1;
    border-radius: 10px;
    background: #FFFFFF;
    color: var(--mp-muted);
    text-align: center;
}
.mp-cat-page .mp-cat-empty p {
    margin: 0;
}
/* =====================================================
   RESPONSIVE: TABLET
===================================================== */
@media (max-width: 1024px) {
    .mp-cat-page .mp-cat-grid,
    .mp-cat-page .mp-cat-product-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 16px;
    }
}
/* =====================================================
   RESPONSIVE: MOBILE
   Match How To Order container spacing.
===================================================== */
@media (max-width: 767px) {
    .mp-cat-page {
        --mp-layout-gutter: 18px;
    }
    .mp-cat-page .mp-cat-hero {
        padding: 30px 0;
    }
    .mp-cat-page .mp-cat-breadcrumbs {
        gap: 6px;
        margin-bottom: 10px;
        font-size: 10px;
        letter-spacing: .8px;
    }
    .mp-cat-page .mp-cat-hero h1 {
        font-size: clamp(29px, 7vw, 38px);
        line-height: 1.15;
        letter-spacing: -.4px;
    }
    .mp-cat-page .mp-cat-hero-description {
        margin-top: 10px;
        font-size: 14px;
    }
    .mp-cat-page .mp-cat-content {
        padding-top: 24px;
        padding-bottom: 24px;
    }
    .mp-cat-page .mp-cat-section {
        margin-bottom: 26px;
    }
    .mp-cat-page .mp-cat-section-heading {
        margin-bottom: 15px;
        font-size: 22px;
    }
    .mp-cat-page .mp-cat-grid,
    .mp-cat-page .mp-cat-product-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }
    .mp-cat-page .mp-cat-card-image-link {
        aspect-ratio: 1 / 1;
        padding: 10px;
    }
    .mp-cat-page .mp-cat-card-content,
    .mp-cat-page .mp-cat-product-info {
        padding: 11px;
    }
    .mp-cat-page .mp-cat-card-title {
        margin-bottom: 10px;
        font-size: 14px;
    }
    .mp-cat-page .mp-cat-browse-link {
        font-size: 13px;
    }
    .mp-cat-page .mp-cat-product-actions .button,
    .mp-cat-page .mp-cat-product-actions a.button {
        min-height: 39px;
        padding: 8px;
        font-size: 12px;
    }
    .mp-cat-page .mp-cat-product-toolbar {
        align-items: flex-start;
        flex-direction: column;
    }
}
@media (max-width: 380px) {
    .mp-cat-page {
        --mp-layout-gutter: 14px;
    }
    .mp-cat-page .mp-cat-grid,
    .mp-cat-page .mp-cat-product-grid {
        gap: 9px;
    }
    .mp-cat-page .mp-cat-card-content,
    .mp-cat-page .mp-cat-product-info {
        padding: 9px;
    }
    .mp-cat-page .mp-cat-card-title,
    .mp-cat-page .mp-cat-product-title {
        font-size: 13px;
    }
}
/* Publication-site image quality and responsive refinements. */
.mp-cat-page .mp-cat-container { max-width: 1320px; }
.mp-cat-page .mp-cat-product-grid { gap: 16px; }
.mp-cat-page .mp-cat-product-image img,
.mp-cat-page .mp-cat-card-image {
    object-fit: contain;
    object-position: center;
    image-rendering: auto;
}
.mp-cat-page .mp-cat-product-card { border-radius: 10px; }
.mp-cat-page .mp-cat-product-title { line-height: 1.4; }
@media (min-width: 1400px) {
    .mp-cat-page .mp-cat-product-grid, .mp-cat-page .mp-cat-grid { gap: 18px; }
}
@media (max-width: 767px) {
    .mp-cat-page .mp-cat-product-image { aspect-ratio: 3 / 4; padding: 5px; }
    .mp-cat-page .mp-cat-card-image-link { aspect-ratio: 3 / 4; padding: 5px; }
    .mp-cat-page .mp-cat-product-grid, .mp-cat-page .mp-cat-grid { gap: 10px; }
}
@media (max-width: 380px) {
    .mp-cat-page .mp-cat-product-info { padding: 8px; }
    .mp-cat-page .mp-cat-product-image { padding: 4px; }
}

/* Reduced motion accessibility */
@media (prefers-reduced-motion: reduce) {
    .mp-cat-page *,
    .mp-cat-page *::before,
    .mp-cat-page *::after {
        scroll-behavior: auto !important;
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }
}

/* Mobile/tablet fix: keep the Explore collection fallback artwork inside its card. */
.mp-cat-page .mp-cat-card-image-link {
    display: block;
    position: relative;
    width: 100%;
    min-width: 0;
    overflow: hidden;
}
.mp-cat-page .mp-cat-card-fallback {
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    min-height: 0;
    height: 100%;
    padding: clamp(10px, 3vw, 20px);
    overflow: hidden;
}
.mp-cat-page .mp-cat-fallback-orbit {
    max-width: 55%;
    max-height: 55%;
}
.mp-cat-page .mp-cat-fallback-book {
    max-width: 100%;
    transform: rotate(-7deg) scale(.9);
}
.mp-cat-page .mp-cat-fallback-caption {
    max-width: 100%;
    padding: 0 6px;
    font-size: clamp(9px, 2.2vw, 12px);
    line-height: 1.25;
    text-align: center;
    overflow-wrap: anywhere;
}
@media (max-width: 767px) {
    .mp-cat-page .mp-cat-card-image-link {
        aspect-ratio: 3 / 4;
    }
    .mp-cat-page .mp-cat-card-fallback {
        min-height: 0;
        border-radius: 7px;
    }
    .mp-cat-page .mp-cat-fallback-orbit {
        top: -24px;
        right: -24px;
        width: 110px;
        height: 110px;
        border-width: 16px;
    }
    .mp-cat-page .mp-cat-fallback-book {
        height: 48px;
        gap: 3px;
        transform: rotate(-7deg) scale(.78);
    }
    .mp-cat-page .mp-cat-fallback-book span {
        width: 22px;
        height: 38px;
    }
    .mp-cat-page .mp-cat-fallback-book span:nth-child(2) {
        height: 48px;
    }
    .mp-cat-page .mp-cat-fallback-caption {
        margin-top: 5px;
        font-size: 9px;
        letter-spacing: .7px;
    }
}
@media (max-width: 380px) {
    .mp-cat-page .mp-cat-fallback-book {
        transform: rotate(-7deg) scale(.68);
    }
    .mp-cat-page .mp-cat-fallback-caption {
        font-size: 8px;
        letter-spacing: .4px;
    }
}


/* =====================================================
   MOBILE & TABLET HORIZONTAL SCROLL FIX
   Marina Publications
===================================================== */

/* Prevent category page from exceeding viewport */
html,
body {
    max-width: 100%;
}

.mp-cat-page {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow-x: clip;
}

/* Prevent children from expanding grid width */
.mp-cat-page *,
.mp-cat-page *::before,
.mp-cat-page *::after {
    min-width: 0;
    box-sizing: border-box;
}

/* Grid protection */
.mp-cat-page .mp-cat-grid,
.mp-cat-page .mp-cat-product-grid {
    width: 100%;
    max-width: 100%;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

/* Category and product cards */
.mp-cat-page .mp-cat-card,
.mp-cat-page .mp-cat-product-card {
    width: 100%;
    max-width: 100%;
    min-width: 0;
}

/* Image overflow protection */
.mp-cat-page .mp-cat-card-image-link,
.mp-cat-page .mp-cat-product-image {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
}

.mp-cat-page img {
    max-width: 100%;
    height: auto;
}

/* Fallback artwork protection */
.mp-cat-page .mp-cat-card-fallback {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
}

.mp-cat-page .mp-cat-fallback-caption {
    max-width: 100%;
    overflow-wrap: anywhere;
    text-align: center;
}

/* Tablet */
@media (max-width: 1024px) {
    .mp-cat-page .mp-cat-grid,
    .mp-cat-page .mp-cat-product-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 14px;
    }
}

/* Mobile */
@media (max-width: 767px) {
    .mp-cat-page {
        overflow-x: clip;
    }

    .mp-cat-page .mp-cat-container {
        width: calc(100% - 28px);
        max-width: 100%;
    }

    .mp-cat-page .mp-cat-grid,
    .mp-cat-page .mp-cat-product-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .mp-cat-page .mp-cat-card-content,
    .mp-cat-page .mp-cat-product-info {
        padding: 9px;
    }

    .mp-cat-page .mp-cat-browse-link {
        max-width: 100%;
        white-space: normal;
    }

    .mp-cat-page .mp-cat-product-actions .button {
        max-width: 100%;
        white-space: normal;
        overflow-wrap: anywhere;
    }

    .mp-cat-page .mp-cat-product-toolbar {
        width: 100%;
        max-width: 100%;
    }

    .mp-cat-page .mp-cat-breadcrumbs {
        max-width: 100%;
        overflow-wrap: anywhere;
    }
}

/* Small phones */
@media (max-width: 380px) {
    .mp-cat-page .mp-cat-grid,
    .mp-cat-page .mp-cat-product-grid {
        gap: 8px;
    }

    .mp-cat-page .mp-cat-card-title,
    .mp-cat-page .mp-cat-product-title {
        overflow-wrap: anywhere;
    }
}
