/* =========================================================================
   COMPONENTS — nút, card, badge, form, breadcrumb, phân trang
   ========================================================================= */

/* ---------------------------------------------------------------- BUTTON */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 0 30px;
    min-height: 59px;
    border-radius: var(--radius-pill);
    font-size: var(--fs-btn);
    font-weight: 600;
    line-height: 1.2;
    text-align: center;
    white-space: nowrap;
    transition: transform var(--dur) var(--ease),
                box-shadow var(--dur) var(--ease),
                background-color var(--dur) var(--ease),
                color var(--dur) var(--ease),
                border-color var(--dur) var(--ease);
}

.btn:hover {
    transform: translateY(-2px);
}

.btn:active {
    transform: translateY(0);
}

.btn .icon {
    width: 21px;
    height: 21px;
    flex: none;
}

.btn--primary {
    background: var(--c-red);
    color: #fff;
    box-shadow: var(--shadow-red);
}

.btn--primary:hover {
    background: var(--c-red-dark);
    color: #fff;
}

.btn--ghost {
    background: #fffdfb;
    color: var(--c-heading);
    border: 1.5px solid var(--c-border);
    box-shadow: var(--shadow-xs);
}

.btn--ghost:hover {
    color: var(--c-red);
    border-color: rgba(189, 35, 30, .4);
}

.btn--green {
    background: var(--c-green);
    color: #fff;
    box-shadow: 0 10px 24px rgba(35, 121, 34, .26);
}

.btn--green:hover {
    background: var(--c-green-dark);
    color: #fff;
}

.btn--sm {
    min-height: 50px;
    padding: 0 26px;
    font-size: var(--fs-btn-sm);
}

.btn--outline-red {
    background: #fffdfb;
    color: var(--c-red);
    border: 1.5px solid rgba(189, 35, 30, .42);
    font-weight: 600;
}

.btn--outline-red:hover {
    background: var(--c-red);
    color: #fff;
    border-color: var(--c-red);
}

.btn--block {
    width: 100%;
}

/* Nút 2 dòng: nhãn nhỏ + nội dung chính */
.btn--stack {
    flex-direction: column;
    gap: 1px;
    padding: 11px 30px;
    line-height: 1.25;
}

.btn--stack .btn__label {
    font-size: var(--fs-small);
    font-weight: 500;
    opacity: .92;
}

.btn--stack .btn__value {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: .01em;
}

.btn--icon-stack {
    flex-direction: row;
    align-items: center;
    gap: 14px;
    text-align: left;
    padding: 10px 26px;
}

.btn--icon-stack .btn__text {
    display: flex;
    flex-direction: column;
    line-height: 1.28;
}

.btn--icon-stack .btn__title {
    font-size: var(--fs-body-sm);
    font-weight: 700;
}

.btn--icon-stack .btn__note {
    font-size: var(--fs-small);
    font-weight: 400;
    color: var(--c-muted);
}

/* ---------------------------------------------------------------- ICON */
.icon {
    width: 22px;
    height: 22px;
    display: block;
}

.icon--lg { width: 44px; height: 44px; }

/* ---------------------------------------------------------------- CARD */
.card {
    position: relative;
    display: flex;
    flex-direction: column;
    background: var(--c-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xs);
    overflow: hidden;
    transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.card__media {
    position: relative;
    display: block;
    overflow: hidden;
}

.card__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .5s var(--ease);
}

.card:hover .card__media img {
    transform: scale(1.025);
}

.card__body {
    padding: 22px 26px 26px;
}

.card__title {
    font-size: var(--fs-h3);
    font-weight: 700;
    color: var(--c-heading);
    margin-bottom: 8px;
}

.card__title a:hover {
    color: var(--c-red);
}

.card__text {
    font-size: var(--fs-body-sm);
    color: var(--c-text);
    line-height: var(--lh-tight);
}

.card__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 18px;
    margin-bottom: 10px;
    font-size: var(--fs-meta);
    color: var(--c-muted);
}

.card__meta span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.card__meta .icon {
    width: 15px;
    height: 15px;
}

/* ---------------------------------------------------------------- GIA MON */
/* Dòng giá trong thẻ món. Bài không có giá thì PHP không in khối này ra. */
.card__gia {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 12px;
}

.card__gia-so {
    font-size: var(--fs-h4);
    font-weight: 800;
    line-height: 1.1;
    color: var(--c-red);
}

.card__gia-dv {
    font-size: var(--fs-meta);
    font-weight: 500;
    color: var(--c-muted);
}

/* ---------------------------------------------------------------- BADGE */
.badge-brush {
    position: absolute;
    right: -6px;
    bottom: 16px;
    display: grid;
    place-items: center;
    min-width: 152px;
    height: 44px;
    padding: 0 26px 3px;
    background: url("../icons/badge-brush.svg") center / 100% 100% no-repeat;
    color: #fff;
    font-family: var(--font-script);
    font-size: 24px;
    font-weight: 700;
    line-height: 1;
    transform: rotate(-2.4deg);
    filter: drop-shadow(0 6px 12px rgba(120, 20, 16, .28));
    pointer-events: none;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 5px 14px;
    border-radius: var(--radius-pill);
    background: rgba(189, 35, 30, .09);
    color: var(--c-red);
    font-size: var(--fs-meta);
    font-weight: 600;
}

.badge--soft {
    background: rgba(53, 28, 20, .07);
    color: var(--c-heading);
}

/* ---------------------------------------------------------------- BREADCRUMB */
.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    font-size: var(--fs-meta);
    color: var(--c-muted);
}

.breadcrumb li {
    display: flex;
    align-items: center;
    gap: 8px;
}

.breadcrumb li + li::before {
    content: "/";
    color: rgba(111, 101, 93, .55);
}

.breadcrumb a:hover {
    color: var(--c-red);
}

.breadcrumb [aria-current="page"] {
    color: var(--c-heading);
    font-weight: 600;
}

/* ---------------------------------------------------------------- FORM */
.field {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.field__label {
    font-size: var(--fs-small);
    font-weight: 600;
    color: var(--c-heading);
}

.input,
.textarea,
.select {
    width: 100%;
    padding: 14px 18px;
    background: #fffdfb;
    border: 1.5px solid var(--c-border);
    border-radius: var(--radius-sm);
    font-size: var(--fs-body-sm);
    color: var(--c-text);
    transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}

.input::placeholder,
.textarea::placeholder {
    color: rgba(111, 101, 93, .68);
}

.input:focus,
.textarea:focus,
.select:focus {
    outline: none;
    border-color: rgba(189, 35, 30, .5);
    box-shadow: 0 0 0 4px rgba(189, 35, 30, .12);
}

.textarea {
    min-height: 140px;
    resize: vertical;
}

/* Ô tìm kiếm dạng pill */
.search-form {
    display: flex;
    gap: 10px;
    align-items: center;
    width: 100%;
    max-width: 620px;
}

.search-form .input {
    border-radius: var(--radius-pill);
    padding-inline: 24px;
    min-height: 59px;
}

/* ---------------------------------------------------------------- PAGINATION */
.pagination {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 8px;
}

.pagination a,
.pagination span {
    display: grid;
    place-items: center;
    min-width: 46px;
    height: 46px;
    padding: 0 14px;
    border-radius: var(--radius-pill);
    background: #fffdfb;
    border: 1.5px solid var(--c-border);
    font-size: var(--fs-body-sm);
    font-weight: 600;
    color: var(--c-heading);
    transition: all var(--dur) var(--ease);
}

.pagination a:hover {
    border-color: rgba(189, 35, 30, .45);
    color: var(--c-red);
}

.pagination [aria-current="page"] {
    background: var(--c-red);
    border-color: var(--c-red);
    color: #fff;
}

.pagination .is-dots {
    border-color: transparent;
    background: transparent;
    color: var(--c-muted);
}

/* ---------------------------------------------------------------- TAGS */
.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tag-list a {
    display: inline-flex;
    padding: 7px 16px;
    border-radius: var(--radius-pill);
    background: rgba(53, 28, 20, .06);
    font-size: var(--fs-meta);
    font-weight: 500;
    color: var(--c-heading);
    transition: all var(--dur) var(--ease);
}

.tag-list a:hover {
    background: var(--c-red);
    color: #fff;
}

/* ---------------------------------------------------------------- NOTE */
.handnote {
    font-family: var(--font-script);
    font-weight: 700;
    line-height: 1.32;
    pointer-events: none;
    user-select: none;
}

/* ---------------------------------------------------------------- UTILITY */
.icon--xs {
    display: inline-block;
    width: 16px;
    height: 16px;
    vertical-align: -3px;
}

.icon--md { width: auto; height: 30px; }

.mt-18 { margin-top: 18px; }
.mt-28 { margin-top: 28px; }
.mt-32 { margin-top: 32px; }
.mt-34 { margin-top: 34px; }

.form-title {
    margin-top: 34px;
    font-size: 28px;
}
