/* KedaiCode layout utilities — replaces Tailwind CDN for stable production CSS */

/* Display */
.block { display: block; }
.inline-block { display: inline-block; }
.inline-flex { display: inline-flex; }
.flex { display: flex; }
.grid { display: grid; }
.hidden { display: none !important; }

/* Flex */
.flex-1 { flex: 1 1 0%; }
.flex-col { flex-direction: column; }
.flex-1 { flex: 1 1 0%; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.items-end { align-items: flex-end; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.shrink-0 { flex-shrink: 0; }
.gap-1 { gap: 0.25rem; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.gap-5 { gap: 1.25rem; }
.gap-10 { gap: 2.5rem; }

/* Grid */
.grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
.grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

/* Position */
.relative { position: relative; }
.absolute { position: absolute; }
.sticky { position: sticky; }
.top-24 { top: 6rem; }
.left-3 { left: 0.75rem; }
.z-10 { z-index: 10; }

/* Sizing */
.w-4 { width: 1rem; }
.w-8 { width: 2rem; }
.w-10 { width: 2.5rem; }
.w-14 { width: 3.5rem; }
.w-16 { width: 4rem; }
.w-24 { width: 6rem; }
.w-full { width: 100%; }
.h-8 { height: 2rem; }
.h-9 { height: 2.25rem; }
.h-10 { height: 2.5rem; }
.h-12 { height: 3rem; }
.h-16 { height: 4rem; }
.h-24 { height: 6rem; }
.min-w-\[180px\] { min-width: 180px; }
.min-w-\[200px\] { min-width: 200px; }
.max-w-\[100px\] { max-width: 100px; }
.max-w-\[220px\] { max-width: 220px; }
.max-w-xs { max-width: 20rem; }
.max-w-md { max-width: 28rem; }
.max-w-lg { max-width: 32rem; }
.max-w-xl { max-width: 36rem; }
.max-w-2xl { max-width: 42rem; }
.max-w-3xl { max-width: 48rem; }
.mx-auto { margin-left: auto; margin-right: auto; }
.min-h-\[70vh\] { min-height: 70vh; }
.w-5 { width: 1.25rem; }
.h-5 { height: 1.25rem; }

/* Spacing */
.p-4 { padding: 1rem; }
.p-5 { padding: 1.25rem; }
.p-6 { padding: 1.5rem; }
.p-8 { padding: 2rem; }
.p-10 { padding: 2.5rem; }
.px-1 { padding-left: 0.25rem; padding-right: 0.25rem; }
.px-3 { padding-left: 0.75rem; padding-right: 0.75rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.py-0\.5 { padding-top: 0.125rem; padding-bottom: 0.125rem; }
.pb-16 { padding-bottom: 4rem; }
.pl-1 { padding-left: 0.25rem; }
.pl-9 { padding-left: 2.25rem; }
.pr-2 { padding-right: 0.5rem; }
.py-3 { padding-top: 0.75rem; padding-bottom: 0.75rem; }
.py-6 { padding-top: 1.5rem; padding-bottom: 1.5rem; }
.py-8 { padding-top: 2rem; padding-bottom: 2rem; }
.py-10 { padding-top: 2.5rem; padding-bottom: 2.5rem; }
.py-12 { padding-top: 3rem; padding-bottom: 3rem; }
.py-14 { padding-top: 3.5rem; padding-bottom: 3.5rem; }
.py-16 { padding-top: 4rem; padding-bottom: 4rem; }
.py-20 { padding-top: 5rem; padding-bottom: 5rem; }
.pt-2 { padding-top: 0.5rem; }
.pt-3 { padding-top: 0.75rem; }
.pt-6 { padding-top: 1.5rem; }
.pt-8 { padding-top: 2rem; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-5 { margin-bottom: 1.25rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }
.mt-1 { margin-top: 0.25rem; }
.mt-3 { margin-top: 0.75rem; }
.mt-5 { margin-top: 1.25rem; }
.mt-6 { margin-top: 1.5rem; }
.mt-8 { margin-top: 2rem; }
.mt-10 { margin-top: 2.5rem; }
.mr-1 { margin-right: 0.25rem; }
.mr-2 { margin-right: 0.5rem; }
.ml-4 { margin-left: 1rem; }
.-mt-8 { margin-top: -2rem; }
.space-y-1\.5 > * + * { margin-top: 0.375rem; }
.space-y-2 > * + * { margin-top: 0.5rem; }
.space-y-2\.5 > * + * { margin-top: 0.625rem; }
.space-y-3 > * + * { margin-top: 0.75rem; }
.space-y-4 > * + * { margin-top: 1rem; }
.list-decimal { list-style-type: decimal; }
.inline-block { display: inline-block; }

/* Typography */
.text-xs { font-size: 0.75rem; line-height: 1rem; }
.text-sm { font-size: 0.875rem; line-height: 1.25rem; }
.text-lg { font-size: 1.125rem; line-height: 1.75rem; }
.text-xl { font-size: 1.25rem; line-height: 1.75rem; }
.text-2xl { font-size: 1.5rem; line-height: 2rem; }
.text-3xl { font-size: 1.875rem; line-height: 2.25rem; }
.text-4xl { font-size: 2.25rem; line-height: 2.5rem; }
.text-\[10px\] { font-size: 10px; }
.text-\[11px\] { font-size: 11px; }
.text-\[13px\] { font-size: 13px; }
.text-\[15px\] { font-size: 15px; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.font-mono { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; }
.uppercase { text-transform: uppercase; }
.tracking-tight { letter-spacing: -0.025em; }
.tracking-wider { letter-spacing: 0.05em; }
.leading-tight { line-height: 1.25; }
.leading-relaxed { line-height: 1.625; }
.leading-snug { line-height: 1.375; }
.text-center { text-align: center; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.whitespace-nowrap { white-space: nowrap; }
.whitespace-pre-line { white-space: pre-line; }
.underline { text-decoration: underline; }
.no-underline { text-decoration: none; }
.antialiased { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }

/* Colors */
.text-white { color: #fff; }
.text-slate-500 { color: #64748b; }
.text-slate-700 { color: #334155; }
.text-slate-800 { color: #1e293b; }
.text-slate-900 { color: #0f172a; }
.text-emerald-500 { color: #10b981; }
.text-emerald-500\/60 { color: rgba(16, 185, 129, 0.6); }
.text-amber-900 { color: #78350f; }
.text-slate-400 { color: #94a3b8; }
.text-emerald-600 { color: #059669; }
.text-emerald-700 { color: #047857; }
.text-emerald-900 { color: #064e3b; }
.text-blue-600 { color: #2563eb; }
.text-blue-900 { color: #1e3a8a; }
.text-violet-600 { color: #7c3aed; }
.text-amber-600 { color: #d97706; }
.text-red-500 { color: #ef4444; }
.text-red-600 { color: #dc2626; }
.text-muted { color: var(--color-muted, #64748b); }

.bg-white { background-color: #fff; }
.bg-slate-50 { background-color: #f8fafc; }
.bg-slate-900 { background-color: #0f172a; }
.bg-emerald-50 { background-color: #ecfdf5; }
.bg-emerald-600 { background-color: #059669; }
.bg-blue-50 { background-color: #eff6ff; }
.bg-violet-50 { background-color: #f5f3ff; }
.bg-amber-50 { background-color: #fffbeb; }
.bg-emerald-50\/80 { background-color: rgba(236, 253, 245, 0.8); }
.border-amber-200 { border-color: #fde68a; }

/* Borders */
.border { border-width: 1px; border-style: solid; border-color: var(--color-border, #e2e8f0); }
.border-0 { border-width: 0; }
.border-b { border-bottom-width: 1px; border-bottom-style: solid; border-color: var(--color-border, #e2e8f0); }
.border-t { border-top-width: 1px; border-top-style: solid; border-color: var(--color-border, #e2e8f0); }
.border-slate-100 { border-color: #f1f5f9; }
.border-slate-200 { border-color: #e2e8f0; }
.border-slate-300 { border-color: #cbd5e1; }
.border-slate-700 { border-color: #334155; }
.border-slate-800 { border-color: #1e293b; }
.border-emerald-100 { border-color: #d1fae5; }
.border-emerald-200 { border-color: #a7f3d0; }
.rounded { border-radius: 0.25rem; }
.rounded-lg { border-radius: 0.5rem; }
.rounded-xl { border-radius: 0.75rem; }
.rounded-2xl { border-radius: 1rem; }
.rounded-3xl { border-radius: 1.5rem; }
.rounded-full { border-radius: 9999px; }
.rounded-none { border-radius: 0; }

/* Effects */
.shadow-sm { box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05); }
.shadow-md { box-shadow: 0 4px 6px -1px rgba(15, 23, 42, 0.1); }
.shadow-none { box-shadow: none; }
.ring-2 { box-shadow: 0 0 0 2px #fff; }
.opacity-40 { opacity: 0.4; }
.opacity-50 { opacity: 0.5; }
.opacity-60 { opacity: 0.6; }
.opacity-90 { opacity: 0.9; }
.brightness-0 { filter: brightness(0); }
.invert { filter: invert(1); }
.overflow-hidden { overflow: hidden; }
.overflow-x-auto { overflow-x: auto; }
.cursor-pointer { cursor: pointer; }
.cursor-zoom-in { cursor: zoom-in; }
.select-none { user-select: none; }
.transition { transition: all 0.15s ease; }
.transition-transform { transition: transform 0.2s ease; }

/* Transform */
.-translate-y-1\/2 { transform: translateY(-50%); }
.top-1\/2 { top: 50%; }

/* Aspect */
.aspect-\[4\/3\] { aspect-ratio: 4 / 3; }

/* Gradient */
.bg-gradient-to-br { background-image: linear-gradient(to bottom right, var(--tw-gradient-stops, #ecfdf5, #fff, #f8fafc)); }
.from-emerald-50 { --tw-gradient-from: #ecfdf5; }
.via-white { --tw-gradient-via: #fff; }
.to-slate-50 { --tw-gradient-to: #f8fafc; }

/* Line clamp */
.line-clamp-1 { display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.line-clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* Group */
.group:hover .group-hover\:scale-105 { transform: scale(1.05); }
details.group[open] .group-open\:rotate-90 { transform: rotate(90deg); }

/* Responsive — sm (640px) */
@media (min-width: 640px) {
    .sm\:block { display: block; }
    .sm\:inline { display: inline; }
    .sm\:inline-flex { display: inline-flex; }
    .sm\:flex-row { flex-direction: row; }
    .sm\:items-center { align-items: center; }
    .sm\:self-end { align-self: flex-end; }
    .sm\:w-auto { width: auto; }
    .sm\:w-44 { width: 11rem; }
    .sm\:w-64 { width: 16rem; }
    .sm\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .sm\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .sm\:table-cell { display: table-cell; }
}

/* md (768px) */
@media (min-width: 768px) {
    .md\:hidden { display: none !important; }
    .md\:block { display: block; }
    .md\:inline { display: inline; }
    .md\:inline-flex { display: inline-flex; }
    .md\:table-cell { display: table-cell; }
    .md\:flex-row { flex-direction: row; }
    .md\:items-end { align-items: flex-end; }
    .md\:p-5 { padding: 1.25rem; }
    .md\:p-6 { padding: 1.5rem; }
    .md\:p-8 { padding: 2rem; }
    .md\:p-10 { padding: 2.5rem; }
    .md\:py-10 { padding-top: 2.5rem; padding-bottom: 2.5rem; }
    .md\:py-12 { padding-top: 3rem; padding-bottom: 3rem; }
    .md\:py-14 { padding-top: 3.5rem; padding-bottom: 3.5rem; }
    .md\:mt-8 { margin-top: 2rem; }
    .md\:mt-10 { margin-top: 2.5rem; }
    .md\:py-16 { padding-top: 4rem; padding-bottom: 4rem; }
    .md\:py-20 { padding-top: 5rem; padding-bottom: 5rem; }
    .md\:text-3xl { font-size: 1.875rem; line-height: 2.25rem; }
    .md\:text-4xl { font-size: 2.25rem; line-height: 2.5rem; }
    .md\:text-5xl { font-size: 3rem; line-height: 1; }
    .md\:h-10 { height: 2.5rem; }
    .md\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* lg (1024px) */
@media (min-width: 1024px) {
    .lg\:flex-row { flex-direction: row; }
    .lg\:items-center { align-items: center; }
    .lg\:justify-between { justify-content: space-between; }
    .lg\:max-w-sm { max-width: 24rem; }
    .lg\:inline { display: inline; }
    .lg\:inline-flex { display: inline-flex; }
    .lg\:hidden { display: none !important; }
    .lg\:col-span-2 { grid-column: span 2 / span 2; }
    .lg\:col-span-3 { grid-column: span 3 / span 3; }
    .lg\:col-span-5 { grid-template-columns: span 5; }
    .lg\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .lg\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .lg\:grid-cols-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
    .lg\:text-\[3\.25rem\] { font-size: 3.25rem; line-height: 1.1; }
}

/* xl (1280px) */
@media (min-width: 1280px) {
    .xl\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* lg grid col-span fix for product page */
@media (min-width: 1024px) {
    .lg\:col-span-2 { grid-column: span 2 / span 2; }
    .lg\:col-span-3 { grid-column: span 3 / span 3; }
}