/* ============================================================
   Ah Product Section — Category Grid 2 (Overlay style)
   ============================================================ */

.ahcat2-wrap {
    padding: 32px 65px 24px;
    font-family: inherit;
}

/* Title */
.ahcat2-title {
    font-size: 28px;
    font-weight: 700;
    color: #1c1b1b;
    margin-bottom: 24px;
}

/* Grid */
.ahcat2-grid {
    display: grid;
    grid-template-columns: repeat( var(--ahcat2-cols, 3), 1fr );
    gap: 24px;
}

/* Card */
.ahcat2-card {
    position: relative;
    display: block;
    cursor: pointer;
    overflow: hidden;
    border-radius: 12px;
    aspect-ratio: 3 / 4;
    box-shadow: 0 1px 4px rgba(0,0,0,.1);
    text-decoration: none;
    transition: box-shadow .5s ease;
}
.ahcat2-card:hover {
    box-shadow: 0 16px 40px rgba(0,0,0,.22);
}

/* Image — fills entire card */
.ahcat2-img-wrap {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}
.ahcat2-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 1s ease;
    backface-visibility: hidden;
}
.ahcat2-card:hover .ahcat2-img-wrap img {
    transform: scale(1.06);
}

/* Overlay */
.ahcat2-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,.12);
    transition: background .5s ease;
    pointer-events: none;
}
.ahcat2-card:hover .ahcat2-overlay {
    background: rgba(0,0,0,.35);
}

/* Text container — bottom overlay, fixed inside card */
.ahcat2-text {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 60px 24px 20px;
    background: linear-gradient(to top, rgba(0,0,0,.55) 0%, transparent 100%);
}

/* Title row */
.ahcat2-name-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}
.ahcat2-name {
    font-size: 24px;
    font-weight: 700;
    color: #fff;
    line-height: 1.2;
    text-shadow: 0 1px 4px rgba(0,0,0,.4);
}
.ahcat2-arrow {
    color: #fff;
    font-size: 20px;
    line-height: 1;
    transition: transform .3s ease;
    flex-shrink: 0;
}
.ahcat2-card:hover .ahcat2-arrow {
    transform: translateX(6px);
}

/* Subtitle — hidden by default, slides in on hover */
.ahcat2-subtitle {
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    color: rgba(255,255,255,.88);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    transition: max-height .4s ease, opacity .4s ease, margin-top .4s ease;
    margin-top: 0;
}
.ahcat2-card:hover .ahcat2-subtitle {
    max-height: 24px;
    opacity: 1;
    margin-top: 10px;
}

/* Responsive */
@media (max-width: 900px) {
    .ahcat2-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
}
@media (max-width: 768px) {
    .ahcat2-wrap { padding: 20px 0px 24px; }
}
@media (max-width: 480px) {
    .ahcat2-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .ahcat2-name { font-size: 18px; }
    .ahcat2-text { padding: 16px 14px 14px; }
}
