/* components.css */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; min-height: 48px; padding: 0.85rem 1.3rem; border-radius: 999px; font-weight: 700; transition: 0.2s ease; }
.btn:hover { transform: translateY(-1px); }
.btn--primary { background: var(--color-primary); color: #fff; }
.btn--primary:hover { background: var(--color-primary-strong); }
.btn--secondary { background: rgba(13, 90, 74, 0.08); color: var(--color-primary); }
.btn--ghost { border: 1px solid var(--color-border); color: var(--color-text); }
.btn--sm { min-height: 40px; padding: 0.65rem 1rem; font-size: 0.92rem; }
.btn--full { width: 100%; }
.badge { position: absolute; left: 1rem; top: 1rem; padding: 0.35rem 0.7rem; border-radius: 999px; background: var(--color-accent); color: #fff; font-size: 0.72rem; font-weight: 700; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 1rem; margin-bottom: 1.8rem; flex-wrap: wrap; }
.section-heading--sm { margin-bottom: 1rem; }
.product-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 1.5rem; }
.product-media-wrap { position: relative; display: block; min-width: 0; }
.product-media-wrap > a { display: block; }
.product-frequent-toggle {
    position: absolute;
    right: 12px;
    bottom: 12px;
    z-index: 5;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 1px solid rgba(20, 20, 20, 0.08);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.94);
    color: #8f8f8f;
    box-shadow: 0 10px 24px rgba(18, 18, 18, 0.12);
    opacity: 1;
    transform: translateY(0);
    transition: opacity .18s ease, transform .18s ease, color .18s ease, background .18s ease;
}
.product-frequent-toggle svg { width: 20px; height: 20px; fill: currentColor; }
.product-frequent-toggle:hover,
.product-frequent-toggle:focus-visible {
    color: #e23b3b;
    background: #fff;
}
.product-frequent-toggle.is-frequent {
    color: #e23b3b;
}
.product-frequent-toggle[disabled] {
    cursor: wait;
    opacity: .68;
}
@media (hover: hover) and (pointer: fine) {
    .product-frequent-toggle {
        opacity: 0;
        transform: translateY(4px);
    }
    .product-media-wrap:hover .product-frequent-toggle,
    .product-media-wrap:focus-within .product-frequent-toggle,
    .product-frequent-toggle.is-frequent {
        opacity: 1;
        transform: translateY(0);
    }
}
.product-card { display: grid; gap: 1rem; border-radius: var(--radius-md); padding: 1rem; background: rgba(255,255,255,0.92); border: 1px solid rgba(217,201,180,0.55); box-shadow: var(--shadow-sm); }
.product-card__media { position: relative; overflow: hidden; border-radius: calc(var(--radius-md) - 4px); background: linear-gradient(180deg, #f7ebd8 0%, #fff 100%); aspect-ratio: 1 / 1; }
.product-card__media img { width: 100%; height: 100%; object-fit: cover; }
.product-card__body { display: grid; gap: 0.7rem; }
.product-card__category { color: var(--color-primary); font-size: 0.85rem; font-weight: 700; }
.product-card__summary { min-height: 3.2em; font-size: 0.93rem; }
.price-stack { display: flex; align-items: baseline; flex-wrap: wrap; gap: 0.5rem; }
.price-stack--lg strong { font-size: 2rem; }
.price-stack strong { font-size: 1.3rem; color: var(--color-text); }
.price-stack del { color: var(--color-text-soft); }
.price-stack__sale { color: var(--color-danger); font-weight: 700; }
.sidebar-card, .detail-panel, .order-summary, .account-card, .admin-card, .admin-table-wrap, .product-summary-card { padding: 1.5rem; border-radius: var(--radius-md); background: rgba(255,255,255,0.88); border: 1px solid rgba(217,201,180,0.55); box-shadow: var(--shadow-sm); }
.category-filter-list, .sidebar-form { display: grid; gap: 0.8rem; }
.category-filter-list a { display: block; padding: 0.85rem 1rem; border: 1px solid var(--color-border); border-radius: 999px; }
.category-filter-list a.is-active { background: var(--color-primary); color: #fff; border-color: var(--color-primary); }
.checkbox-field { display: flex; align-items: center; gap: 0.7rem; }
.checkbox-field input { width: auto; }
.modal { position: fixed; inset: 0; display: grid; place-items: center; padding: 1rem; }
.modal[hidden] { display: none; }
.modal__overlay { position: absolute; inset: 0; background: rgba(15, 12, 10, 0.52); }
.modal__dialog { position: relative; width: min(100%, 420px); border-radius: var(--radius-md); background: #fff; padding: 1.5rem; box-shadow: var(--shadow-md); }
.modal__header, .modal__footer { display: flex; align-items: center; justify-content: space-between; }
.modal__body { padding: 1rem 0; }
.quantity-control { display: inline-grid; grid-template-columns: 44px 80px 44px; overflow: hidden; border: 1px solid var(--color-border); border-radius: 999px; }
.quantity-control input { border: 0; border-left: 1px solid var(--color-border); border-right: 1px solid var(--color-border); text-align: center; border-radius: 0; }
.pagination { display: flex; gap: 0.5rem; margin-top: 2rem; }
.pagination a { display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--color-border); }
.pagination a.is-current { background: var(--color-primary); color: #fff; border-color: var(--color-primary); }
@media (max-width: 1199px) { .product-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 767px) { .product-grid, .section-heading { grid-template-columns: 1fr; display: grid; } }
