/* ── Custom Components ── */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: 0.5rem;
    transition: all 0.15s ease;
    cursor: pointer;
    line-height: 1.25rem;
    border: none;
}
.btn-primary { background: #6366f1; color: #fff; }
.btn-primary:hover { background: #4f46e5; box-shadow: 0 4px 12px rgba(99,102,241,0.3); transform: translateY(-1px); }
.btn-secondary { background: #fff; color: #111827; border: 1px solid #e5e7eb; }
.btn-secondary:hover { background: #f9fafb; border-color: #9ca3af; }
.btn-success { background: #10b981; color: #fff; }
.btn-danger { background: #ef4444; color: #fff; }
.btn-sm { padding: 0.375rem 0.75rem; font-size: 0.8125rem; }
.btn-lg { padding: 0.75rem 1.75rem; font-size: 0.9375rem; }

.card { background: #fff; border: 1px solid #e5e7eb; border-radius: 0.75rem; transition: border-color 0.2s, box-shadow 0.2s; }
.card-elevated { box-shadow: 0 1px 3px rgba(0,0,0,0.04), 0 1px 2px rgba(0,0,0,0.02); }
.card-interactive:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.06); transform: translateY(-2px); border-color: #9ca3af; transition: all 0.25s ease; }

.input { width: 100%; padding: 0.625rem 0.875rem; font-size: 0.875rem; color: #111827; background: #fff; border: 1px solid #e5e7eb; border-radius: 0.5rem; outline: none; transition: border-color 0.15s, box-shadow 0.15s; }
.input:focus { border-color: #6366f1; box-shadow: 0 0 0 3px rgba(99,102,241,0.1); }

.badge { display: inline-flex; align-items: center; padding: 0.25rem 0.625rem; font-size: 0.75rem; font-weight: 500; border-radius: 9999px; }
.badge-success { background: rgba(16,185,129,0.1); color: #10b981; }
.badge-danger { background: rgba(239,68,68,0.1); color: #ef4444; }
.badge-warning { background: rgba(245,158,11,0.1); color: #f59e0b; }
.badge-accent { background: rgba(99,102,241,0.1); color: #6366f1; }
.badge-neutral { background: #f3f4f6; color: #6b7280; }

.variant-card { position: relative; padding: 1rem 1.25rem; border: 1.5px solid #e5e7eb; border-radius: 0.625rem; cursor: pointer; transition: all 0.2s ease; background: #fff; }
.variant-card:hover { border-color: rgba(99,102,241,0.4); background: rgba(99,102,241,0.02); }
.variant-card.selected { border-color: #6366f1; background: rgba(99,102,241,0.04); box-shadow: 0 0 0 3px rgba(99,102,241,0.08); }
.variant-card .check-icon { display: none; position: absolute; top: 0.625rem; right: 0.625rem; width: 1.25rem; height: 1.25rem; border-radius: 9999px; background: #6366f1; color: #fff; align-items: center; justify-content: center; }
.variant-card.selected .check-icon { display: flex; }

.qty-picker { display: inline-flex; align-items: center; border: 1px solid #e5e7eb; border-radius: 0.5rem; overflow: hidden; }
.qty-picker button { width: 2.75rem; height: 2.5rem; display: flex; align-items: center; justify-content: center; background: #f9fafb; color: #6b7280; font-size: 0.8125rem; font-weight: 500; cursor: pointer; border: none; transition: background 0.1s; flex-shrink: 0; }
.qty-picker button:hover { background: #e5e7eb; color: #111827; }
.qty-picker input { width: 4rem; height: 2.5rem; text-align: center; border: none; border-left: 1px solid #e5e7eb; border-right: 1px solid #e5e7eb; font-size: 0.9375rem; font-weight: 600; color: #111827; background: #fff; outline: none; -moz-appearance: textfield; flex-shrink: 0; }
/* Full-width variant for product page */
.qty-picker-full { display: flex; width: 100%; }
.qty-picker-full button { flex: 1; }

/* ── Mobile tweaks ── */
@media (max-width: 639px) {
    .product-card .product-header { padding: 1rem 1rem 0.75rem; }
    .product-card .product-body { padding: 0 1rem; }
    .product-card .product-footer { padding: 0.75rem 1rem 1rem; }
    .variant-card { padding: 0.75rem 1rem; }
    .attr-tag { font-size: 0.6875rem; padding: 0.125rem 0.375rem; }
    .btn-lg { padding: 0.625rem 1.25rem; font-size: 0.875rem; }
}
.qty-picker input::-webkit-inner-spin-button, .qty-picker input::-webkit-outer-spin-button { -webkit-appearance: none; }

.attr-tag { display: inline-flex; align-items: center; gap: 0.25rem; padding: 0.25rem 0.5rem; background: #f9fafb; border: 1px solid #f3f4f6; border-radius: 0.375rem; font-size: 0.75rem; color: #6b7280; }
.attr-tag strong { color: #111827; font-weight: 600; }

.product-card { display: flex; flex-direction: column; height: 100%; }
.product-card .product-header { padding: 1.25rem 1.5rem 1rem; }
.product-card .product-body { padding: 0 1.5rem; flex: 1; }
.product-card .product-footer { padding: 1rem 1.5rem 1.25rem; border-top: 1px solid #f3f4f6; margin-top: auto; }

.feature-card { text-align: center; padding: 2rem 1.5rem; }
.feature-icon { width: 3rem; height: 3rem; margin: 0 auto 1rem; display: flex; align-items: center; justify-content: center; border-radius: 0.75rem; background: rgba(99,102,241,0.08); color: #6366f1; }
