/* ============================================================
   GMA POPUP CSS — GrowMore Appliance
   Link karo: <link rel="stylesheet" href="gma-popup.css">
   ============================================================ */

/* ── OVERLAY ── */
.gma-xoverlay {
    position: fixed;
    inset: 0;
    background: rgba(8, 8, 20, 0.62);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.28s ease, visibility 0.28s ease;
}
.gma-xoverlay.gma-xopen {
    opacity: 1;
    visibility: visible;
}

/* ── POPUP BOX ── */
.gma-xbox {
    background: #faf8f3;
    border-radius: 22px;
    width: 100%;
    max-width: 820px;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transform: translateY(40px) scale(0.97);
    transition: transform 0.36s cubic-bezier(0.22, 1, 0.36, 1);
    box-shadow: 0 32px 80px rgba(0, 0, 0, 0.28);
}
.gma-xoverlay.gma-xopen .gma-xbox {
    transform: translateY(0) scale(1);
}

/* ── HEADER ── */
.gma-xhead {
    background: #1a1a2e;
    padding: 22px 28px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
    position: relative;
}
.gma-xhead::after {
    content: '';
    position: absolute;
    bottom: 0; left: 28px; right: 28px;
    height: 1px;
    background: rgba(255, 255, 255, 0.07);
}
.gma-xhead-left {
    display: flex;
    align-items: center;
    gap: 16px;
}
.gma-xcat-icon {
    width: 50px;
    height: 50px;
    border-radius: 14px;
    background: rgba(245, 168, 0, 0.14);
    border: 1.5px solid rgba(245, 168, 0, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.gma-xcat-icon svg {
    width: 28px;
    height: 28px;
}
.gma-xhead-title {
    color: #ffffff;
    font-size: 1.08rem;
    font-weight: 700;
    margin: 0;
    letter-spacing: -0.2px;
}
.gma-xhead-sub {
    color: rgba(255, 255, 255, 0.42);
    font-size: 0.74rem;
    margin-top: 3px;
    font-weight: 400;
}
.gma-xclose {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.09);
    border: 1px solid rgba(255, 255, 255, 0.14);
    color: rgba(255, 255, 255, 0.8);
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, color 0.2s;
    flex-shrink: 0;
    line-height: 1;
}
.gma-xclose:hover {
    background: rgba(245, 168, 0, 0.2);
    color: #f5a800;
    border-color: rgba(245, 168, 0, 0.35);
}

/* ── BODY / SCROLL AREA ── */
.gma-xbody {
    padding: 24px 28px 20px;
    overflow-y: auto;
    flex: 1;
    scrollbar-width: thin;
    scrollbar-color: #e0dcdc transparent;
}
.gma-xbody::-webkit-scrollbar { width: 5px; }
.gma-xbody::-webkit-scrollbar-track { background: transparent; }
.gma-xbody::-webkit-scrollbar-thumb { background: #e0dcdc; border-radius: 10px; }

/* ── CARDS GRID ── */
.gma-xgrid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(152px, 1fr));
    gap: 14px;
}

/* ── SINGLE CARD ── */
.gma-xcard {
    background: #ffffff;
    border: 1.5px solid #ede9e0;
    border-radius: 14px;
    overflow: hidden;
    transition: transform 0.24s ease, border-color 0.24s ease, box-shadow 0.24s ease;
    opacity: 0;
    transform: translateY(16px);
    animation: gmaXCardIn 0.32s ease forwards;
}
@keyframes gmaXCardIn {
    to { opacity: 1; transform: translateY(0); }
}
.gma-xcard:hover {
    transform: translateY(-5px);
    border-color: #f5a800;
    box-shadow: 0 10px 28px rgba(245, 168, 0, 0.16);
}

/* card image */
.gma-xcard-img {
    width: 100%;
    height: 76px;
    overflow: hidden;
    background: #f0ece3;
}
.gma-xcard-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}
.gma-xcard:hover .gma-xcard-img img {
    transform: scale(1.08);
}

/* card body */
.gma-xcard-body {
    padding: 9px 11px 11px;
}
.gma-xcard-title {
    font-size: 0.73rem;
    font-weight: 600;
    color: #1a1a2e;
    line-height: 1.38;
    margin: 0 0 8px;
    min-height: 2.1em;
}
.gma-xcard-btn {
    display: block;
    width: 100%;
    text-align: center;
    font-size: 0.69rem;
    font-weight: 700;
    padding: 6px 0;
    border-radius: 50px;
    border: 1.5px solid #e5e2da;
    background: transparent;
    color: #999;
    cursor: pointer;
    text-decoration: none;
    letter-spacing: 0.2px;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.gma-xcard-btn:hover {
    background: #f5a800;
    border-color: #f5a800;
    color: #1a1a2e;
}

/* ── FOOTER ── */
.gma-xfooter {
    padding: 13px 28px;
    border-top: 1px solid #ede9e0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
    background: #fff;
}
.gma-xfooter-count {
    font-size: 0.78rem;
    color: #aaa;
    font-weight: 400;
}
.gma-xfooter-count b {
    color: #1a1a2e;
    font-weight: 700;
}
.gma-xfooter-link {
    font-size: 0.8rem;
    font-weight: 700;
    color: #f5a800;
    text-decoration: none;
    letter-spacing: 0.2px;
    transition: opacity 0.2s;
}
.gma-xfooter-link:hover { opacity: 0.75; }

/* ── RESPONSIVE ── */
@media (max-width: 600px) {
    .gma-xhead { padding: 18px 18px 16px; }
    .gma-xbody { padding: 18px 16px 16px; }
    .gma-xgrid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
    .gma-xfooter { padding: 11px 18px; }
    .gma-xbox { border-radius: 16px; }
    .gma-xcat-icon { width: 42px; height: 42px; }
}
@media (max-width: 380px) {
    .gma-xgrid { grid-template-columns: 1fr 1fr; }
}