/* =============================================
   SHOP CONTAINER
   ============================================= */
.shop-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

/* =============================================
   CARD SHELL
   ============================================= */
.shop-card-new {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid #eaecf0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    transition: all 0.25s ease;
    display: flex;
    flex-direction: column;
    /* scroll pop-in animation */
    opacity: 0;
    transform: translateY(24px) scale(0.97);
}
.shop-card-new.visible {
    opacity: 1;
    transform: translateY(0) scale(1);
    transition: opacity 0.45s ease, transform 0.45s cubic-bezier(0.34,1.26,0.64,1), box-shadow 0.25s ease, border-color 0.25s ease;
}
.shop-card-new:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(8,71,135,0.1);
    border-color: #c5d8f0;
}

/* =============================================
   HEADER IMAGE / BANNER
   ============================================= */
.shop-header-img {
    width: 100%;
    height: 120px;
    overflow: hidden;
    flex-shrink: 0;
}
.shop-header-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}
.shop-card-new:hover .shop-header-img img { transform: scale(1.04); }
.shop-header-banner {
    width: 100%;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex-shrink: 0;
}
.shop-banner-emoji { font-size: 2rem; line-height: 1; }
.shop-category-tag {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #9aa5b4;
    background: rgba(255,255,255,0.8);
    padding: 3px 10px;
    border-radius: 100px;
}

/* =============================================
   CARD BODY
   ============================================= */
.shop-card-body {
    padding: 12px 14px 14px;
    display: flex;
    flex-direction: column;
    flex: 1;
}
.card-row-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 5px;
}
.shop-card-name {
    font-size: 1rem;
    font-weight: 800;
    color: #1a1a1a;
    line-height: 1.2;
    flex: 1;
}
.status-badge {
    font-size: 0.7rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 100px;
    white-space: nowrap;
    flex-shrink: 0;
    border: 1.5px solid transparent;
}
.status-badge.open   { background: #e8f7ec; color: #1d7a35; border-color: #b8e6c5; }
.status-badge.closed { background: #fff0f0; color: #c0392b; border-color: #f5c6c6; }
.card-row-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}
.card-rating {
    display: flex;
    align-items: center;
    gap: 1px;
    font-size: 0.82rem;
    font-weight: 700;
}
.card-hours { font-size: 0.76rem; color: #9aa5b4; font-weight: 500; }
.card-products-label { font-size: 0.85rem; font-weight: 700; color: #1a1a1a; margin-bottom: 8px; }
.card-divider { border-top: 1px solid #f0f2f5; margin-bottom: 10px; }

/* =============================================
   2-COLUMN PRODUCT GRID  (top 2 only)
   ============================================= */
.product-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 14px;
}
.pgrid-item {
    background: #f8faff;
    border: 1px solid #eaecf0;
    border-radius: 10px;
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}
.pgrid-img {
    width: 100%;
    height: 68px;
    object-fit: cover;
    border-radius: 7px;
    display: block;
}
.pgrid-img-placeholder {
    width: 100%;
    height: 68px;
    border-radius: 7px;
    background: #eef0f5;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
}
.pgrid-name {
    font-size: 0.78rem;
    font-weight: 600;
    color: #1a1a1a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.pgrid-meta { display: flex; align-items: center; gap: 6px; }
.pgrid-price { font-size: 0.76rem; font-weight: 700; color: #084787; }
.pgrid-stock { font-size: 0.7rem; color: #9aa5b4; }
.product-grid-empty { font-size: 0.78rem; color: #9aa5b4; padding: 12px 0; margin-bottom: 14px; }

/* =============================================
   BOTTOM BUTTON ROW — View All | Directions | Contact
   ============================================= */
.card-btn-row {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 6px;
    margin-top: auto;
    align-items: center;
}
.shop-view-btn {
    padding: 9px 10px;
    background: #084787;
    color: #fff;
    border: none;
    border-radius: 10px;
    font-family: 'Segoe UI', Roboto, sans-serif;
    font-weight: 700;
    font-size: 0.76rem;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
    white-space: nowrap;
}
.shop-view-btn:hover { background: #063d73; box-shadow: 0 3px 10px rgba(8,71,135,0.25); }

.get-directions-btn {
    padding: 9px 10px;
    background: #eef4ff;
    color: #084787;
    border: 1.5px solid #c3d6f5;
    border-radius: 10px;
    font-family: 'Segoe UI', Roboto, sans-serif;
    font-size: 0.76rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}
.get-directions-btn:hover { background: #084787; color: #fff; border-color: #084787; }

.contact-shop-btn {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 9px 10px;
    background: #eafaf1;
    color: #1d7a35;
    border: 1.5px solid #a9dfbf;
    border-radius: 10px;
    font-family: 'Segoe UI', Roboto, sans-serif;
    font-size: 0.76rem;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s;
}
.contact-shop-btn svg { flex-shrink: 0; }
.contact-shop-btn:hover { background: #1d7a35; color: #fff; border-color: #1d7a35; }
.contact-shop-btn:hover svg { stroke: #fff; }

/* =============================================
   STAR RATING
   ============================================= */
.star       { font-size: 0.88rem; line-height: 1; }
.star.full  { color: #2ecc71; }
.star.half  { color: #2ecc71; opacity: 0.5; }
.star.empty { color: #d5d8dc; }

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 600px) {
    /* ── TWO SHOPS IN A ROW ON MOBILE ── */
    .shop-container { grid-template-columns: repeat(2, 1fr); gap: 10px; }

    /* ── SHORTER IMAGES so 2-col cards don't look too tall ── */
    .shop-header-img    { height: 85px; }
    .shop-header-banner { height: 65px; }

    .card-btn-row {
        grid-template-columns: 1fr 1fr;
        grid-template-rows: auto auto;
    }
    .shop-view-btn { grid-column: 1 / -1; }
    /* tighten card body padding on small screens */
    .shop-card-body { padding: 8px 10px 10px; }
    .shop-card-name { font-size: 0.82rem; }
    .card-hours     { font-size: 0.68rem; }
    .get-directions-btn,
    .contact-shop-btn,
    .shop-view-btn  { font-size: 0.68rem; padding: 7px 6px; }
}

@media (max-width: 480px) {
    .shop-header-img    { height: 75px; }
    .shop-header-banner { height: 58px; }
}

/* ============================================================
   PGRID NEW LAYOUT (appended)
   ============================================================ */

.pgrid-item {
    background: #fff;
    border: 1px solid #eaecf0;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    padding: 0;
    gap: 0;
    box-shadow: 0 2px 8px rgba(0,0,0,.05);
    transition: transform .2s, box-shadow .2s, border-color .2s;
}
.pgrid-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(8,71,135,.12);
    border-color: #c5d8f0;
}

.pgrid-img-wrap {
    position: relative;
    width: 100%;
    overflow: hidden;
    flex-shrink: 0;
    background: #f0f2f5;
}
.pgrid-img-wrap::before {
    content: '';
    display: block;
    padding-top: 72%;
}
.pgrid-img-wrap .pgrid-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .4s ease;
}
.pgrid-item:hover .pgrid-img-wrap .pgrid-img { transform: scale(1.05); }

.pgrid-img-wrap .pgrid-img-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    background: linear-gradient(135deg, #eef2fa, #dde5f5);
}

.pgrid-avail-ribbon {
    position: absolute;
    top: 7px;
    right: 7px;
    font-size: .6rem;
    font-weight: 800;
    letter-spacing: .03em;
    padding: 3px 9px;
    border-radius: 100px;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border: 1px solid transparent;
    white-space: nowrap;
}
.pgrid-avail-ribbon.available   { background: rgba(234,250,241,.92); color: #1d7a35; border-color: #b8e6c5; }
.pgrid-avail-ribbon.limited     { background: rgba(255,248,236,.92); color: #8a6a20; border-color: #ffd48a; }
.pgrid-avail-ribbon.unavailable { background: rgba(255,240,240,.92); color: #c0392b; border-color: #f5c6c6; }

.pgrid-info {
    padding: 8px 9px 10px;
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.pgrid-info .pgrid-name {
    font-size: .78rem;
    font-weight: 700;
    color: #1a1a1a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.pgrid-info .pgrid-price {
    font-size: .82rem;
    font-weight: 800;
    color: #084787;
}
