/* Meatball Affiliate Storefront */

.mas-category-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.mas-category-card {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 150px;
    padding: 25px 18px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    text-align: center;
    text-decoration: none !important;
    color: #202124 !important;
    box-shadow: 0 3px 12px rgba(0,0,0,0.04);
    transition: transform .2s ease, box-shadow .2s ease;
}

.mas-category-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.10);
}

.mas-category-title {
    display: block;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 12px;
}

.mas-category-link {
    display: inline-block;
    font-size: 13px;
    font-weight: 600;
    color: #c64034;
}

.mas-category-card:hover .mas-category-link {
    text-decoration: underline;
}

.mas-category-card:focus-visible {
    outline: 3px solid #c64034;
    outline-offset: 3px;
}

@media (max-width: 900px) {
    .mas-category-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 600px) {
    .mas-category-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .mas-category-card {
        min-height: 110px;
        padding: 20px;
    }

    .mas-category-title {
        font-size: 16px;
    }
}

/* Featured Product Grid */

.mas-product-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.mas-product-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 3px 12px rgba(0,0,0,.05);
    transition: transform .2s ease, box-shadow .2s ease;
}

.mas-product-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0,0,0,.10);
}

.mas-product-content {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 22px;
}

.mas-product-content h3 {
    font-size: 18px;
    line-height: 1.4;
    margin: 0 0 12px;
}

.mas-product-content p {
    font-size: 14px;
    line-height: 1.6;
    color: #555;
    margin-bottom: 20px;
}

.mas-product-button {
    display: block;
    margin-top: auto;
    padding: 12px 16px;
    background: #c64034;
    color: #fff !important;
    text-align: center;
    font-size: 14px;
    font-weight: 700;
    border-radius: 6px;
    text-decoration: none !important;
}

.mas-product-button:hover {
    background: #a93229;
}

.mas-product-button.mas-disabled {
    background: #e5e7eb;
    color: #666 !important;
    cursor: default;
}

@media (max-width: 900px) {
    .mas-product-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 600px) {
    .mas-product-grid {
        grid-template-columns: 1fr;
    }
}

/* Advertising placement previews */

.mas-ad {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 20px;
    margin: 24px 0;
    background: #f7f8fa;
    border: 1px dashed #cbd5e1;
    border-radius: 8px;
    text-align: center;
}

.mas-ad-label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.5px;
    color: #64748b;
}

.mas-ad-description {
    font-size: 12px;
    color: #94a3b8;
}

.mas-ad-leaderboard {
    min-height: 100px;
    width: 100%;
}

.mas-ad-sidebar {
    min-height: 250px;
    width: 100%;
}

.mas-ad-inarticle {
    min-height: 180px;
    width: 100%;
}

@media (max-width: 600px) {
    .mas-ad {
        width: 100%;
        min-height: 100px;
    }
}

/* Hybrid Storefront Layout */

.mas-storefront {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

.mas-storefront-section {
    margin: 0 0 48px;
}

.mas-storefront-section > h2 {
    font-size: clamp(22px, 3vw, 30px);
    font-weight: 800;
    line-height: 1.25;
    color: #202124;
    margin: 0 0 22px;
    padding-bottom: 12px;
    border-bottom: 3px solid #c64034;
}

.mas-storefront .mas-category-grid,
.mas-storefront .mas-product-grid {
    margin-top: 0;
}

.mas-article-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
}

.mas-article-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
    transition: box-shadow .2s ease, transform .2s ease;
}

.mas-article-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0,0,0,.08);
}

.mas-article-card a {
    color: inherit;
    text-decoration: none !important;
}

.mas-article-card img {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
}

.mas-article-card h3 {
    font-size: 18px;
    line-height: 1.4;
    padding: 18px 18px 0;
    margin: 0;
}

.mas-article-card p {
    font-size: 14px;
    line-height: 1.65;
    color: #555;
    padding: 12px 18px 20px;
    margin: 0;
}

@media (max-width: 900px) {
    .mas-article-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 600px) {
    .mas-storefront-section {
        margin-bottom: 32px;
    }

    .mas-article-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .mas-storefront-section > h2 {
        font-size: 22px;
    }
}

/* Inactive affiliate category cards */

.mas-category-pending {
    cursor: default;
    background: #f8f9fa;
}

.mas-category-pending:hover {
    transform: none;
    box-shadow: 0 3px 12px rgba(0,0,0,0.04);
}

.mas-category-pending .mas-category-link {
    color: #888;
}

/* Automatically generated product thumbnails */

.mas-product-image {
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: #f5f6f8;
}

.mas-product-thumbnail {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform .25s ease;
}

.mas-product-card:hover .mas-product-thumbnail {
    transform: scale(1.04);
}

/* Photographic category cards */

.mas-category-card {
    position: relative;
    isolation: isolate;
    min-height: 205px;
    overflow: hidden;
    background: #29323a;
    color: #fff !important;
    padding: 24px 16px;
}

.mas-category-photo,
.mas-category-overlay {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.mas-category-photo {
    z-index: -2;
}

.mas-category-thumbnail {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .3s ease;
}

.mas-category-overlay {
    z-index: -1;
    background: linear-gradient(
        180deg,
        rgba(0,0,0,.12) 0%,
        rgba(0,0,0,.72) 100%
    );
}

.mas-category-card:hover .mas-category-thumbnail {
    transform: scale(1.06);
}

.mas-category-title {
    position: relative;
    color: #fff !important;
    text-shadow: 0 2px 8px rgba(0,0,0,.45);
}

.mas-category-link,
.mas-category-pending .mas-category-link {
    position: relative;
    color: #fff !important;
    text-shadow: 0 1px 5px rgba(0,0,0,.5);
}

.mas-category-pending {
    background: #29323a;
}

@media (max-width: 600px) {
    .mas-category-card {
        min-height: 180px;
    }
}

/* Meatball advertising inventory */

.mas-ad {
    box-sizing: border-box;
    background: linear-gradient(145deg, #f8fafc, #eef2f7);
    border: 1px solid #d9e0e8;
    border-radius: 10px;
    box-shadow: inset 0 1px 3px rgba(0,0,0,.025);
}

.mas-ad-label {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .6px;
    color: #64748b;
    text-transform: uppercase;
}

.mas-ad-description {
    font-size: 12px;
    color: #94a3b8;
}

.mas-ad-leaderboard {
    width: 100%;
    min-height: 120px;
}

.mas-ad-sidebar {
    width: 250px;
    max-width: 100%;
    height: 250px;
    min-height: 250px;
    margin: 0 auto 24px;
}

@media (max-width: 600px) {
    .mas-ad-sidebar {
        width: 250px;
        min-height: 250px;
    }
}

/* Storefront main content and advertising sidebar */

.mas-storefront-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 250px;
    gap: 28px;
    align-items: start;
}

.mas-storefront-main {
    min-width: 0;
}

.mas-storefront-sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
    min-width: 0;
}

.mas-sidebar-ad-heading {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #64748b;
    text-align: center;
}

.mas-storefront-sidebar .mas-ad-sidebar {
    margin: 0;
    flex: 0 0 250px;
}

@media (max-width: 1050px) {
    .mas-storefront-layout {
        grid-template-columns: minmax(0, 1fr);
    }

    .mas-storefront-sidebar {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 16px;
    }

    .mas-sidebar-ad-heading {
        grid-column: 1 / -1;
    }

    .mas-storefront-sidebar .mas-ad-sidebar {
        width: 100%;
        max-width: 250px;
    }
}

@media (max-width: 650px) {
    .mas-storefront-sidebar {
        grid-template-columns: 1fr;
        justify-items: center;
    }

    .mas-storefront-sidebar .mas-ad-sidebar {
        width: 250px;
    }
}

/* Two-column niche discovery section */

.mas-discovery {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 24px;
    align-items: stretch;
}

.mas-discovery-intro,
.mas-discovery-categories {
    padding: 32px;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
}

.mas-discovery-intro {
    background: #f8fafc;
}

.mas-discovery-categories {
    background: #fff;
}

.mas-discovery-eyebrow {
    display: block;
    margin-bottom: 12px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1.6px;
    color: #c64034;
}

.mas-discovery h2 {
    margin: 0 0 16px;
    font-size: clamp(20px, 2.3vw, 27px);
    line-height: 1.25;
    color: #202124;
}

.mas-discovery-intro p {
    font-size: 15px;
    line-height: 1.8;
    color: #526071;
    margin: 0 0 24px;
}

.mas-discovery-cta {
    display: inline-block;
    padding: 12px 18px;
    background: #c64034;
    color: #fff !important;
    font-size: 13px;
    font-weight: 700;
    border-radius: 6px;
    text-decoration: none !important;
}

.mas-discovery-cta:hover {
    background: #a93229;
}

.mas-discovery-categories ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.mas-discovery-categories li {
    margin: 0;
    padding: 0;
    border-bottom: 1px solid #edf0f3;
}

.mas-discovery-categories li:last-child {
    border-bottom: none;
}

.mas-discovery-categories li a,
.mas-discovery-pending {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 11px 0;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none !important;
}

.mas-discovery-categories li a {
    color: #334155 !important;
}

.mas-discovery-categories li a:hover {
    color: #c64034 !important;
}

.mas-discovery-pending {
    color: #64748b;
}

.mas-discovery-pending small {
    font-size: 10px;
    font-weight: 500;
    color: #94a3b8;
    white-space: nowrap;
}

@media (max-width: 700px) {
    .mas-discovery {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .mas-discovery-intro,
    .mas-discovery-categories {
        padding: 24px;
    }
}
