/* ============================================================
   Ah Product Section — Product Card 1
   Matches product-card-1.html design exactly
   ============================================================ */

.elementor-widget-ah_product_card_1 {
    flex-shrink: 0 !important;
    height: auto !important;
    min-width: 0;
}

.elementor-widget-ah_product_card_1 > .elementor-widget-container {
    height: auto !important;
    min-width: 0;
}

.ahps-wrap {
    padding: 10px 0;
    background: #fff;
    width: 100%;
}

.ahps-container {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    padding: 0 65px;
    font-family: inherit;
    box-sizing: border-box;
    min-width: 0;
}
@media (max-width: 768px) {
    .ahps-container { padding: 0 5px; }
}

/* ── Section title ───────────────────────────────────────── */
.ahps-sec-title {
    text-align: center;
    font-size: 26px;
    font-weight: 700;
    color: #5a3e1b;
    margin: 0 0 8px;
    letter-spacing: 0.2px;
}
.ahps-sec-line {
    width: 44px;
    height: 3px;
    background: #2d7a4f;
    margin: 0 auto 28px;
    border-radius: 2px;
}

.ahps-header-align-left .ahps-sec-title {
    text-align: left;
}
.ahps-header-align-left .ahps-sec-line {
    margin: 0 0 28px;
}

.ahps-header-align-center .ahps-sec-title {
    text-align: center;
}
.ahps-header-align-center .ahps-sec-line {
    margin: 0 auto 28px;
}

.ahps-header-align-right .ahps-sec-title {
    text-align: right;
}
.ahps-header-align-right .ahps-sec-line {
    margin: 0 0 28px auto;
}

/* ── Grid ────────────────────────────────────────────────── */
.ahps-grid {
    display: grid;
    grid-template-columns: repeat( var(--ahps-cols, 5), minmax(0, 1fr) );
    gap: 14px;
    width: 100%;
    min-width: 0;
}

/* ── Card ────────────────────────────────────────────────── */
.ahps-card {
    --ahps-btn-accent: #e63b2e;
    --ahps-btn-hover: #cf3125;
    --ahps-view-cart-bg: var(--ahps-btn-accent);
    --ahps-btn-outline-border: var(--ahps-btn-accent);
    --ahps-btn-outline-border-hover: var(--ahps-btn-hover);
    --ahps-btn-text-hover: #ffffff;
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    transition: box-shadow .2s, transform .15s;
    display: flex;
    flex-direction: column;
    min-width: 0;
}
.ahps-card:hover {
    box-shadow: 0 6px 22px rgba(0,0,0,.11);
    transform: translateY(-2px);
}

/* Image box */
.ahps-img-box {
    display: block;
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: #f7f4ef;
    position: relative;
    text-decoration: none;
}

.ahps-card--img-framed .ahps-img-box {
    border-radius: 13px;
    padding: 2px;
    box-sizing: border-box;
}
.ahps-img-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    transition: transform .3s;
    backface-visibility: hidden;
    transform: translateZ(0);
    image-rendering: -webkit-optimize-contrast;
}
.ahps-card:hover .ahps-img-box img {
    transform: translateZ(0) scale(1.04);
}

/* Sale badge */
.ahps-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: #e63b2e;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 4px;
    font-family: inherit;
}

/* Card body */
.ahps-body {
    padding: 6px 4px 5px;
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
}

/* Product name */
.ahps-name {
    display: block;
    overflow: hidden;
    font-size: 13px;
    font-weight: 500;
    color: #1a1a1a;
    line-height: 1.45;
    text-decoration: none;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.ahps-name:hover { color: #e63b2e; }

/* Price row */
.ahps-price-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}
.ahps-price {
    font-size: 15px;
    font-weight: 700;
    color: #e63b2e;
}
/* Override WooCommerce wrapper */
.ahps-price .woocommerce-Price-amount,
.ahps-price bdi {
    color: inherit !important;
    font-size: inherit !important;
    font-weight: inherit !important;
}
.ahps-old {
    font-size: 12px;
    color: #aaa;
    text-decoration: line-through;
}
.ahps-old .woocommerce-Price-amount,
.ahps-old bdi {
    color: inherit !important;
    font-size: inherit !important;
}

/* Add to cart button */
.ahps-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 10px 0;
    font-size: 12.5px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    letter-spacing: 0.3px;
    transition: background .15s, filter .15s;
    text-decoration: none;
    margin-top: auto;
}
.ahps-btn svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

.ahps-card--btn-solid .ahps-btn {
    background: var(--ahps-btn-accent);
    color: #fff;
    border: none;
}
.ahps-card--btn-solid .ahps-btn:hover {
    background: var(--ahps-btn-hover);
    color: var(--ahps-btn-text-hover);
    filter: none;
}

.ahps-card--btn-outline .ahps-btn {
    background: #fff;
    color: var(--ahps-btn-accent);
    border: 2px solid var(--ahps-btn-outline-border);
}
.ahps-card--btn-outline .ahps-btn:hover {
    background: var(--ahps-btn-hover);
    border-color: var(--ahps-btn-outline-border-hover);
    color: var(--ahps-btn-text-hover);
    filter: none;
}

/* View Cart link — styled as button (original button hidden via JS) */
.ahps-card .added_to_cart {
    display: flex !important;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    border-width: 2px;
    border-style: solid;
    border-radius: 6px;
    padding: 10px 0;
    font-size: 12.5px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    letter-spacing: 0.3px;
    text-decoration: none !important;
    transition: filter .15s;
    margin-top: auto;
    box-sizing: border-box;
}

.ahps-card--btn-solid .added_to_cart {
    background: var(--ahps-view-cart-bg);
    color: #fff !important;
    border-color: var(--ahps-view-cart-bg);
}
.ahps-card--btn-solid .added_to_cart:hover {
    filter: brightness(.9);
    color: var(--ahps-btn-text-hover) !important;
}

.ahps-card--btn-outline .added_to_cart {
    background: #fff;
    color: var(--ahps-view-cart-bg) !important;
    border-color: var(--ahps-btn-outline-border);
}
.ahps-card--btn-outline .added_to_cart:hover {
    background: var(--ahps-view-cart-bg);
    color: var(--ahps-btn-text-hover) !important;
    filter: none;
}

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 1024px) {
    .ahps-grid { grid-template-columns: repeat( min( var(--ahps-cols, 5), 3 ), minmax(0, 1fr) ); }
}
@media (max-width: 768px) {
    .ahps-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 480px) {
    .ahps-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
    .ahps-sec-title { font-size: 20px; }
    .ahps-btn,
    .ahps-card .added_to_cart {
        padding: 7px 0;
    }
}
