/* Consistent portrait treatment for customer-facing strain photography. */
body:not(.admin-shell) .product-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 220px)); justify-content: space-between; align-items: start; gap: 28px 18px; }
body:not(.admin-shell) .product-grid > .product-card { width: min(100%, 220px); }
body:not(.admin-shell) .product-media { width: min(100%, 200px); height: auto; aspect-ratio: 9 / 16; justify-self: center; }
body:not(.admin-shell) .product-media > .product-card-image { width: 100%; height: 100%; padding: 0; object-fit: cover; object-position: center; }
body:not(.admin-shell) .product-card:hover .product-media > .product-card-image { transform: scale(1.025); }

.product-gallery-shell { width: min(100%, 380px); justify-self: center; }
body:not(.admin-shell) .product-gallery-shell .product-gallery { width: 100%; height: auto; min-height: 0; max-height: none; aspect-ratio: 9 / 16; }
body:not(.admin-shell) .product-gallery-shell .product-gallery > img[data-gallery-main] { width: 100%; height: 100%; max-height: none; object-fit: cover; object-position: center; }
.product-gallery-shell .gallery-thumbnail { aspect-ratio: 9 / 16; }
.product-gallery-shell .gallery-thumbnail > img { width: 100%; height: 100%; object-fit: cover; object-position: center; }

.home-category-list .seed-type-product { grid-template-columns: 82px minmax(0, 1fr) !important; }
.home-category-list .seed-type-product > .seed-type-product-media { width: 82px; height: 146px; min-height: 0; align-self: stretch; aspect-ratio: 9 / 16; }
.home-category-list .seed-type-product > .seed-type-product-media > .seed-type-product-image { width: 100% !important; height: 100% !important; min-height: 0; object-fit: cover; object-position: center; }

.wishlist-card > a > img,
.cart-product-media,
.cart-product-media > img,
.cart-reward-strains img,
.cart-widget-item > img,
.advisor-best-card > img,
.advisor-card > img,
.brand-strain-preview img,
.taste-strain-grid img,
.taste-strains img,
.terpene-strains img,
.effect-strains img { height: auto; aspect-ratio: 9 / 16; padding: 0; object-fit: cover; object-position: center; }
.wishlist-card > a > img { width: min(100%, 210px); margin-inline: auto; }
.cart-product-media { width: clamp(74px, 9vw, 108px); }
.cart-product-media > img { width: 100%; height: 100%; }
.cart-widget-item > img { width: 54px; }
.cart-reward-strains img,
.taste-strains img,
.terpene-strains img,
.effect-strains img { width: 48px; }
.brand-strain-preview img { width: 58px; }
.taste-strain-grid img { width: 100%; }
.advisor-best-card > img { width: 92px; }
.advisor-card > img { width: 100%; }

.action-card:not(.has-banner) .action-card-media { aspect-ratio: 9 / 16; }
.action-card:not(.has-banner) .action-card-media img { width: 100%; height: 100%; object-fit: cover; object-position: center; }

@media (max-width: 700px) {
    body:not(.admin-shell) .product-grid { grid-template-columns: 1fr; justify-content: stretch; gap: 14px; }
    body:not(.admin-shell) .product-grid > .product-card { width: 100%; grid-template-columns: 136px minmax(0, 1fr); grid-template-rows: 1fr; align-items: start; }
    body:not(.admin-shell) .product-grid .product-media { width: 136px; align-self: stretch; }
    body:not(.admin-shell) .product-grid .product-card-body { height: 100%; padding: 14px; }

    body:not(.admin-shell) .catalog-results .product-grid { gap: 12px; }
    body:not(.admin-shell) .catalog-results .product-grid > .product-card {
        grid-template-columns: 112px minmax(0, 1fr);
        grid-template-rows: auto;
        align-items: start;
        overflow: hidden;
        border: 1px solid color-mix(in srgb, var(--border), transparent 10%);
        border-radius: 10px;
        background: color-mix(in srgb, var(--surface), transparent 3%);
        box-shadow: none;
    }
    body:not(.admin-shell) .catalog-results .product-grid .product-media {
        width: 112px;
        height: auto;
        min-height: 0;
        align-self: start;
        aspect-ratio: 9 / 16;
        border: 0;
        border-right: 1px solid var(--border);
        border-radius: 0;
    }
    body:not(.admin-shell) .catalog-results .product-grid .product-card-body {
        min-height: 199px;
        height: auto;
        padding: 12px 13px;
        overflow: hidden;
    }
    body:not(.admin-shell) .catalog-results .product-card h3 {
        margin: 0 0 8px;
        font-size: 1.05rem;
        line-height: 1.2;
    }
    body:not(.admin-shell) .catalog-results .product-card h3 a { min-height: 0; }
    body:not(.admin-shell) .catalog-results .profile-overview { display: none !important; }
    body:not(.admin-shell) .catalog-results .product-card-profile { flex: 0 0 auto; }
    body:not(.admin-shell) .catalog-results .profile-potency { gap: 5px; margin-top: 0; }
    body:not(.admin-shell) .catalog-results .profile-potency > div {
        min-width: 0;
        padding: 5px 7px;
        border-radius: 6px;
    }
    body:not(.admin-shell) .catalog-results .profile-potency dt { font-size: .55rem; }
    body:not(.admin-shell) .catalog-results .profile-potency dd { font-size: .72rem; white-space: nowrap; }
    body:not(.admin-shell) .catalog-results .profile-effect-icons {
        justify-content: flex-start;
        gap: 5px;
        margin-top: 8px;
    }
    body:not(.admin-shell) .catalog-results .profile-effect-icons > dt { display: none; }
    body:not(.admin-shell) .catalog-results .profile-effect-icons .effect-icon { width: 30px; height: 30px; }
    body:not(.admin-shell) .catalog-results .product-bottom {
        gap: 8px;
        margin-top: auto;
        padding-top: 8px;
        font-size: .7rem;
    }
    body:not(.admin-shell) .catalog-results .product-bottom strong { font-size: .98rem; }
    body:not(.admin-shell) .catalog-results .product-media-tastes {
        bottom: 7px;
        max-width: calc(100% - 8px);
        gap: 3px;
    }
    body:not(.admin-shell) .catalog-results .product-media-tastes .taste-icon { width: 28px; height: 28px; }
    html[data-theme=light] body:not(.admin-shell) .catalog-results .product-grid > .product-card {
        border-color: #d9ddd5;
        background: #fff;
    }
    .product-gallery-shell { width: min(100%, 330px); }
    .cart-product-media { width: 82px; }
    .advisor-best-card > img { width: 78px; }
    .brand-strain-preview img { width: 52px; }
}

@media (max-width: 430px) {
    body:not(.admin-shell) .product-grid > .product-card { grid-template-columns: 116px minmax(0, 1fr); }
    body:not(.admin-shell) .product-grid .product-media { width: 116px; }
    body:not(.admin-shell) .product-grid .product-card-body { padding: 11px; }
    body:not(.admin-shell) .catalog-results .product-grid > .product-card { grid-template-columns: 104px minmax(0, 1fr); }
    body:not(.admin-shell) .catalog-results .product-grid .product-media { width: 104px; }
    body:not(.admin-shell) .catalog-results .product-grid .product-card-body { min-height: 185px; padding: 10px 11px; }
    body:not(.admin-shell) .catalog-results .product-card h3 { font-size: 1rem; }
    body:not(.admin-shell) .catalog-results .profile-potency > div { padding-inline: 6px; }
    body:not(.admin-shell) .catalog-results .profile-potency dt { font-size: .5rem; }
    body:not(.admin-shell) .catalog-results .profile-potency dd { font-size: .66rem; }
    body:not(.admin-shell) .catalog-results .profile-effect-icons .effect-icon { width: 28px; height: 28px; }
    body:not(.admin-shell) .catalog-results .product-media-tastes .taste-icon { width: 26px; height: 26px; }
    .product-gallery-shell { width: min(100%, 310px); }
    .cart-product-media { width: 72px; }
    .cart-widget-item > img { width: 48px; }
    .cart-reward-strains img,
    .taste-strains img,
    .terpene-strains img,
    .effect-strains img { width: 44px; }
}

/* Phone catalogs use a familiar image-first card instead of a split detail layout. */
@media (max-width: 700px) {
    body:not(.admin-shell) .catalog-results .product-grid > .product-card {
        grid-template-columns: minmax(0, 1fr);
        grid-template-rows: auto auto;
        width: min(100%, 420px);
        margin-inline: auto;
    }
    body:not(.admin-shell) .catalog-results .product-grid .product-media {
        width: 100%;
        aspect-ratio: 4 / 3;
        border-right: 0;
        border-bottom: 1px solid var(--border);
    }
    body:not(.admin-shell) .catalog-results .product-grid .product-card-body {
        min-height: 0;
        padding: 15px 16px 14px;
        overflow: visible;
    }
    body:not(.admin-shell) .catalog-results .product-card h3 {
        margin-bottom: 12px;
        font-size: 1.2rem;
    }
    body:not(.admin-shell) .catalog-results .profile-overview {
        display: grid !important;
        gap: 12px;
        margin-bottom: 12px;
        padding-bottom: 12px !important;
        border-bottom: 1px solid color-mix(in srgb, var(--border), transparent 18%);
    }
    body:not(.admin-shell) .catalog-results .profile-column { gap: 6px; }
    body:not(.admin-shell) .catalog-results .profile-column-right { padding-left: 12px; }
    body:not(.admin-shell) .catalog-results .profile-column dd {
        overflow: visible;
        font-size: .73rem;
        text-overflow: clip;
        white-space: normal;
    }
    body:not(.admin-shell) .catalog-results .product-media-tastes { bottom: 10px; gap: 6px; }
    body:not(.admin-shell) .catalog-results .product-media-tastes .taste-icon { width: 36px; height: 36px; }
}

@media (max-width: 430px) {
    body:not(.admin-shell) .catalog-results .product-grid .product-card-body { padding: 14px; }
    body:not(.admin-shell) .catalog-results .product-card h3 { font-size: 1.12rem; }
    body:not(.admin-shell) .catalog-results .product-media-tastes .taste-icon { width: 34px; height: 34px; }
}

@media (max-width: 700px) {
    body:not(.admin-shell) .home-landing .home-products .product-grid > .product-card {
        grid-template-columns: minmax(0, 1fr);
        grid-template-rows: auto auto;
        width: min(100%, 420px);
        margin-inline: auto;
        overflow: hidden;
        border: 1px solid color-mix(in srgb, var(--border), transparent 10%);
        border-radius: 10px;
        box-shadow: none;
    }
    body:not(.admin-shell) .home-landing .home-products .product-media {
        width: 100%;
        height: auto;
        align-self: start;
        aspect-ratio: 4 / 3;
        border: 0;
        border-bottom: 1px solid var(--border);
        border-radius: 0;
    }
    body:not(.admin-shell) .home-landing .home-products .product-card-body {
        min-height: 0;
        height: auto;
        padding: 15px 16px 14px;
    }
    body:not(.admin-shell) .home-landing .home-products .product-card h3 {
        margin: 0 0 12px;
        font-size: 1.2rem;
    }
    body:not(.admin-shell) .home-landing .home-products .product-media-tastes { bottom: 10px; gap: 6px; }
    body:not(.admin-shell) .home-landing .home-products .product-media-tastes .taste-icon { width: 36px; height: 36px; }

    body:not(.admin-shell) .home-category-list .seed-type-product {
        grid-template-columns: minmax(0, 1fr) !important;
        grid-template-rows: auto auto !important;
        width: min(100%, 420px);
        height: auto;
        margin-inline: auto;
    }
    body:not(.admin-shell) .home-category-list .seed-type-product > .seed-type-product-media {
        grid-column: 1;
        grid-row: 1;
        width: 100%;
        height: auto;
        min-height: 0;
        aspect-ratio: 4 / 3;
        border-radius: 0;
    }
    body:not(.admin-shell) .home-category-list .seed-type-product > .seed-type-product-media > .seed-type-product-image {
        width: 100% !important;
        height: 100% !important;
        min-height: 0;
    }
    body:not(.admin-shell) .home-category-list .seed-type-product-copy {
        grid-column: 1;
        grid-row: 2;
        height: auto;
        min-height: 0;
        padding: 14px 15px;
    }
    body:not(.admin-shell) .home-category-list .seed-type-product .seed-type-image-tastes { bottom: 10px; }
}

@media (max-width: 430px) {
    body:not(.admin-shell) .home-landing .home-products .product-card-body,
    body:not(.admin-shell) .home-category-list .seed-type-product-copy { padding: 14px; }
    body:not(.admin-shell) .home-landing .home-products .product-media-tastes .taste-icon { width: 34px; height: 34px; }
}
