/* =============================================
   MANASWINI SOCIAL GALLERY v1.0
   Instagram-style photo grid with product cards
============================================= */

/* Wrapper */
.msg-wrap {
    display: flex;
    align-items: flex-start;
    gap: 0;
    padding: 4rem 4vw;
    background: #fff;
    width: 100%;
    box-sizing: border-box;
}

/* ── LEFT PANEL ── */
.msg-left {
    width: 28%;
    flex-shrink: 0;
    padding-right: 3rem;
    padding-top: 0.5rem;
}

.msg-label {
    display: block;
    font-size: 10px;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: #888;
    font-weight: 500;
    margin-bottom: 14px;
}

.msg-heading {
    font-size: clamp(1.6rem, 2.5vw, 2.2rem);
    font-weight: 400;
    color: #1a1410;
    line-height: 1.25;
    margin: 0 0 20px;
    letter-spacing: -0.01em;
}

.msg-subheading {
    font-size: 13.5px;
    font-weight: 600;
    color: #1a1410;
    margin: 0 0 6px;
    padding-left: 12px;
    border-left: 2px solid #d0c0b8;
}

.msg-desc {
    font-size: 13px;
    color: #888;
    line-height: 1.8;
    margin: 0 0 24px;
    padding-left: 12px;
    border-left: 2px solid #d0c0b8;
    font-weight: 300;
}

.msg-cta {
    display: inline-block;
    font-size: 13px;
    font-weight: 600;
    color: #1a1410;
    text-decoration: none;
    letter-spacing: 0.04em;
    border-bottom: 1.5px solid #1a1410;
    padding-bottom: 2px;
    transition: opacity 0.2s;
}
.msg-cta:hover { opacity: 0.6; }

/* ── GALLERY GRID ── */
.msg-grid {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    min-width: 0;
    /* Masonry-like with grid rows */
    grid-auto-rows: 220px;
}

/* ── CARD ── */
a.msg-card {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    text-decoration: none !important;
    color: inherit !important;
    background: #f0e8e0;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    grid-row: span 1;
}

a.msg-card--tall {
    grid-row: span 2;
}

a.msg-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.12);
}

/* Gallery image */
.msg-card-img {
    width: 100%;
    flex: 1;
    object-fit: cover;
    display: block;
    min-height: 0;
    transition: transform 0.5s ease;
}
a.msg-card:hover .msg-card-img {
    transform: scale(1.04);
}

/* Placeholder */
.msg-card-placeholder {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3.5rem;
    min-height: 160px;
    transition: transform 0.5s ease;
}
a.msg-card:hover .msg-card-placeholder {
    transform: scale(1.04);
}

/* Media icon — top right */
.msg-media-icon {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 3;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: rgba(255,255,255,0.85);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #333;
}
.msg-grid .msg-card:nth-child(even){margin-top:40px;}
/* ── PRODUCT BAR ── */
.msg-product-bar {
    position: absolute;
    bottom: 15px;
    left: 0;
    right: 0;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    gap: 8px;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    z-index: 2;
    width: 80%;
    margin: 0 auto;
}

.msg-prod-left {
    display: flex;
    align-items: center;
    gap: 9px;
    min-width: 0;
    flex: 1;
}

/* Product thumbnail */
.msg-prod-thumb {
    width: 34px;
    height: 34px;
    border-radius: 4px;
    object-fit: cover;
    flex-shrink: 0;
    background: #f0ebe5;
}
.msg-prod-thumb--placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    background: #f0ebe5;
}

.msg-prod-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
    gap: 2px;
}

.msg-prod-name {
    font-size: 12px;
    font-weight: 500;
    color: #1a1410;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
}

.msg-prod-price {
    font-size: 11.5px;
    color: #666;
    font-weight: 400;
    display: block;
}
.msg-prod-price .woocommerce-Price-amount { color: inherit !important; }

/* Cart icon button */
.msg-cart-btn {
    width: 30px;
    height: 30px;
    flex-shrink: 0;
    border-radius: 50%;
    border: 1.5px solid #ddd;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #555;
    transition: all 0.2s ease;
    padding: 0;
    outline: none;
}
.msg-cart-btn:hover {
    background: #1a1410;
    border-color: #1a1410;
    color: #fff;
}

/* ── MOBILE ── */
@media (max-width: 900px) {
    .msg-wrap { flex-direction: column; }
    .msg-left {
        width: 100%;
        padding-right: 0;
        padding-bottom: 2rem;
    }
}

@media (max-width: 600px) {
    .msg-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-auto-rows: 170px;
        gap: 8px;
    }
    .msg-prod-name { font-size: 11px; }
    .msg-prod-price { font-size: 10.5px; }
}
