/* ==========================================================================
   COMPONENT: CARD PRODUCT
   Path: template-parts/cards/card-product/style.css
   ========================================================================== */

.product-card {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    background-color: var(--color-bg-main, #FAF3E8);
    border-radius: 14px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
    border: 1px solid rgba(121, 75, 56, 0.12);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.02);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px rgba(121, 75, 56, 0.1);
}

.product-card__img {
    display: block;
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background-color: var(--color-neutral, #f0e6d6);
}

.product-card__img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-top-left-radius: 14px;
    border-top-right-radius: 14px;
    transition: transform 0.4s ease;
}

.product-card:hover .product-card__img img {
    transform: scale(1.04);
}

.product-card__body {
    padding: 10px !important;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    box-sizing: border-box;
}

.product-card__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 6px;
    margin-bottom: 8px;
}

.product-card__title {
    margin: 0;
    font-family: var(--font-primary, 'Parastoo', serif);
    font-size: 15px !important;
    font-weight: 700;
    line-height: 1.25;
    color: var(--color-accent-2, #5C3A21);
    flex: 1;
    word-break: normal !important; /* Giữ câu chữ tự nhiên không xé lẻ */
    overflow-wrap: break-word;
}

.product-card__title a {
    color: inherit;
    text-decoration: none;
}

.product-card__cart-btn {
    width: 32px !important;
    height: 32px !important;
    border-radius: 50%;
    background-color: var(--color-accent-2, #8A5038);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    text-decoration: none;
}

.product-card__cart-btn svg {
    width: 15px;
    height: 15px;
}

.product-card__excerpt {
    font-family: var(--font-secondary, 'Be Vietnam Pro', sans-serif);
    font-size: 11px !important;
    font-weight: var(--fw-caption, 600);
    color: var(--text-body, #5C5752);
    line-height: 1.35;
    margin: 0 0 8px 0 !important;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-card__price {
    font-family: var(--font-secondary, 'Be Vietnam Pro', sans-serif);
    font-size: 14px !important;
    font-weight: 700;
    color: var(--color-accent-2, #5C3A21);
    margin-bottom: 10px !important;
    margin-top: auto;
}

.product-card__actions {
    display: flex;
    align-items: center;
    gap: 5px !important;
    width: 100%;
}

.product-card__btn {
    flex: 1;
    padding: 7px 4px !important;
    border: 1.5px solid var(--color-accent-2, #8A5038);
    border-radius: 6px !important;
    background-color: transparent;
    color: var(--color-accent-2, #8A5038);
    font-family: var(--ff-btn-m, var(--font-secondary, sans-serif));
    font-size: var(--fs-btn-m, 11px) !important;
    font-weight: var(--fw-btn-m, 600) !important;
    line-height: 1.2;
    text-align: center;
    text-decoration: none;
    box-sizing: border-box;
    white-space: nowrap !important; /* Không cho chữ bị rớt vụn thành n/ga/y */
    word-break: normal !important;
}

.product-card__btn:hover {
    background-color: var(--color-accent-2, #8A5038);
    color: #ffffff;
}

