/*
Theme Name: Afilliate
Theme URI: https://github.com/janmikael
Description: Child theme for Afilliate
Author: Michael
Author URI: https://github.com/janmikael
Template: astra
Version: 1.5.1
Text Domain: afilliate-child
*/

/* Add your custom CSS below this line */

/* ==========================================================
   BASE LAYOUT ONLY (v1.1.0)
   Grid, columns, breakpoints, image ratio, spacing.
   No colors, fonts, borders, shadows, backgrounds or button
   styling. Visual design lives in sites/<slug>/build/site.css.
   Breakpoints: 921px (tablet), 544px (mobile) = Astra's own.
   ========================================================== */


/* ----------------------------------------------------------
   [latest-blogs] + [latest-products]  (ua-*)
   ---------------------------------------------------------- */
.ua-blogs-wrap,
.ua-products-wrap {
    margin-bottom: 2rem;
}

.ua-disclosure {
    margin-bottom: 1.5rem;
}

.ua-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.5rem;
}

.ua-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.ua-card-thumb-link {
    display: block;
}

.ua-thumb {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 10;
    object-fit: cover;
}

.ua-card-body {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    gap: 0.75rem;
    padding: 1rem 0;
}

.ua-card-title {
    margin: 0;
}

.ua-card-excerpt {
    margin: 0;
}

/* Push the button to the bottom so cards in a row line up */
.ua-btn-wrap,
.ua-card-body > .ua-btn {
    margin-top: auto;
}

.ua-card-body > .ua-btn {
    align-self: flex-start;
}


/* ----------------------------------------------------------
   [side-bar-latest-blogs]  (sb-blog-*)
   Thumbnail left, text right.
   ---------------------------------------------------------- */
.sb-blogs-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.sb-blog-card {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 0.75rem;
}

.sb-blog-thumb-link {
    display: block;
    flex: 0 0 5rem;
    width: 5rem;
}

.sb-blog-thumb {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
    object-fit: cover;
}

.sb-blog-card-body {
    flex: 1 1 auto;
    min-width: 0;
}

.sb-blog-card-title {
    margin: 0 0 0.25rem;
}

.sb-blog-meta {
    margin: 0;
}


/* ----------------------------------------------------------
   [side-bar-latest-products]  (sb-*)
   Thumbnail left, text right. Always a single column list.
   ---------------------------------------------------------- */
.sb-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.sb-card {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 0.75rem;
}

.sb-card-thumb-link {
    display: block;
    flex: 0 0 5rem;
    width: 5rem;
}

.sb-thumb {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
    object-fit: cover;
}

.sb-card-body {
    flex: 1 1 auto;
    min-width: 0;
}

.sb-card-title {
    margin: 0 0 0.25rem;
}

.sb-card-excerpt {
    margin: 0 0 0.5rem;
}

.sb-btn-wrap {
    margin: 0;
}


/* ----------------------------------------------------------
   [product-categories]  (pc-*)
   ---------------------------------------------------------- */
.pc-wrap {
    display: flex;
    flex-direction: column;
    gap: 3rem;
    margin-bottom: 2rem;
}

.pc-category-title {
    margin: 0 0 1.25rem;
}

.pc-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.5rem;
}

.pc-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.pc-card-thumb-link {
    display: block;
}

.pc-thumb {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 10;
    object-fit: cover;
}

.pc-card-body {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    gap: 0.75rem;
    padding: 1rem 0;
}

.pc-card-title {
    margin: 0;
}

.pc-card-excerpt {
    margin: 0;
}

.pc-btn-wrap {
    margin-top: auto;
}


/* ----------------------------------------------------------
   RESPONSIVE: tablet (2 columns)
   ---------------------------------------------------------- */
@media (max-width: 921px) {
    .ua-grid,
    .pc-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}


/* ----------------------------------------------------------
   RESPONSIVE: mobile (1 column)
   ---------------------------------------------------------- */
@media (max-width: 544px) {
    .ua-grid,
    .pc-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 1.25rem;
    }

    .pc-wrap {
        gap: 2rem;
    }
}
