/* Alignware storefront — brand layer on top of Frappe's website theme. */

:root {
	--alf-indigo: #6366F1;
	--alf-indigo-dark: #4F46E5;
	--alf-green: #10B981;
	--alf-amber: #F59E0B;
	--alf-red: #EF4444;
	--alf-grey-50: #F8FAFC;
	--alf-grey-200: #E2E8F0;
	--alf-grey-500: #6B7280;
	--alf-grey-900: #111827;
}

.alf-container { max-width: 1140px; margin: 0 auto; padding: 0 16px; }
.alf-page { padding: 24px 0 56px; color: var(--alf-grey-900); }

/* === Hero === */
.alf-hero {
	background: linear-gradient(135deg, var(--alf-indigo) 0%, var(--alf-indigo-dark) 100%);
	color: white;
	padding: 80px 20px;
	text-align: center;
}
.alf-hero h1 { font-size: 44px; margin: 0 0 14px; font-weight: 800; }
.alf-hero p { font-size: 18px; opacity: 0.95; margin-bottom: 28px; }
.alf-btn {
	display: inline-block;
	padding: 12px 28px;
	border-radius: 8px;
	font-weight: 600;
	text-decoration: none;
	border: none;
	cursor: pointer;
	transition: transform .15s, background .2s;
}
.alf-btn-primary { background: var(--alf-indigo); color: white; }
.alf-btn-primary:hover { background: var(--alf-indigo-dark); transform: translateY(-1px); color: white; }
.alf-btn-light { background: white; color: var(--alf-indigo); }
.alf-btn-light:hover { transform: translateY(-1px); color: var(--alf-indigo-dark); }
.alf-btn-ghost { background: transparent; color: var(--alf-indigo); border: 1px solid var(--alf-indigo); }

.alf-section { padding: 60px 20px; }
.alf-section.alt { background: var(--alf-grey-50); }
.alf-section h2 { font-size: 28px; margin-bottom: 36px; text-align: center; }

/* === Trust pillars === */
.alf-pillars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.alf-pillar { text-align: center; padding: 16px; }
.alf-pillar .icon { font-size: 40px; margin-bottom: 10px; }
.alf-pillar h4 { margin-bottom: 6px; font-size: 18px; }
.alf-pillar p { color: var(--alf-grey-500); margin: 0; }

/* === Product grid === */
.alf-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.alf-product-card {
	background: white;
	border: 1px solid var(--alf-grey-200);
	border-radius: 12px;
	padding: 18px;
	transition: box-shadow .2s, transform .2s;
	display: flex;
	flex-direction: column;
}
.alf-product-card:hover { box-shadow: 0 8px 24px rgba(99, 102, 241, 0.12); transform: translateY(-2px); }
.alf-product-card .image {
	height: 140px;
	display: flex; align-items: center; justify-content: center;
	background: var(--alf-grey-50);
	border-radius: 8px;
	margin-bottom: 14px;
	color: var(--alf-indigo);
	font-size: 36px;
	font-weight: 700;
}
.alf-product-card h3 { margin: 0 0 6px; font-size: 17px; }
.alf-product-card .meta { color: var(--alf-grey-500); font-size: 13px; margin-bottom: 10px; }
.alf-product-card .price { font-size: 20px; font-weight: 700; color: var(--alf-indigo); margin: auto 0 12px; }
.alf-product-card .stock { font-size: 12px; padding: 3px 8px; border-radius: 4px; display: inline-block; }
.alf-product-card .stock.ok { background: #DCFCE7; color: #166534; }
.alf-product-card .stock.out { background: #FEE2E2; color: #991B1B; }

/* === Cart + checkout === */
.alf-card { background: white; border: 1px solid var(--alf-grey-200); border-radius: 12px; padding: 20px; margin-bottom: 16px; }
.alf-cart-line { display: grid; grid-template-columns: 1fr auto auto auto; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--alf-grey-200); }
.alf-cart-line:last-child { border-bottom: 0; }
.alf-qty-stepper { display: inline-flex; gap: 4px; align-items: center; }
.alf-qty-stepper button { width: 28px; height: 28px; border-radius: 4px; border: 1px solid var(--alf-grey-200); background: white; cursor: pointer; }
.alf-qty-stepper input { width: 40px; text-align: center; border: 1px solid var(--alf-grey-200); border-radius: 4px; padding: 4px; }

.alf-totals { margin-top: 14px; padding-top: 14px; border-top: 2px solid var(--alf-grey-200); }
.alf-totals-row { display: flex; justify-content: space-between; padding: 4px 0; }
.alf-totals-row.total { font-weight: 700; font-size: 18px; color: var(--alf-indigo); }

.alf-form-row { display: flex; flex-direction: column; gap: 4px; margin-bottom: 14px; }
.alf-form-row label { font-size: 13px; color: var(--alf-grey-500); font-weight: 600; }
.alf-form-row input, .alf-form-row select, .alf-form-row textarea {
	padding: 10px 12px;
	border: 1px solid var(--alf-grey-200);
	border-radius: 6px;
	font-size: 14px;
}
.alf-form-row input:focus, .alf-form-row select:focus { outline: 2px solid var(--alf-indigo); border-color: var(--alf-indigo); }

.alf-payment-method { padding: 12px 16px; border: 1px solid var(--alf-grey-200); border-radius: 8px; margin-bottom: 8px; cursor: pointer; transition: border .15s; }
.alf-payment-method:hover { border-color: var(--alf-indigo); }
.alf-payment-method.selected { border-color: var(--alf-indigo); background: #EEF2FF; }

/* === Order page === */
.alf-key-block { border: 2px solid var(--alf-indigo); padding: 14px; border-radius: 8px; margin: 10px 0; }
.alf-key-block .key { font-family: monospace; font-size: 16px; background: #EEF2FF; padding: 8px 10px; border-radius: 4px; display: inline-block; margin-top: 6px; }

/* === Tag pills === */
.alf-tag { display: inline-block; padding: 3px 8px; border-radius: 4px; font-size: 12px; font-weight: 600; }
.alf-tag.success { background: #DCFCE7; color: #166534; }
.alf-tag.warning { background: #FEF3C7; color: #92400E; }
.alf-tag.danger { background: #FEE2E2; color: #991B1B; }
.alf-tag.muted { background: var(--alf-grey-50); color: var(--alf-grey-500); }

/* === Mobile === */
@media (max-width: 768px) {
	.alf-hero h1 { font-size: 30px; }
	.alf-pillars { grid-template-columns: 1fr; }
	.alf-grid { grid-template-columns: 1fr 1fr; }
	.alf-cart-line { grid-template-columns: 1fr; }
	.alf-section { padding: 36px 16px; }
}
@media (max-width: 480px) {
	.alf-grid { grid-template-columns: 1fr; }
}

/* === RTL === */
html[dir="rtl"] .alf-cart-line { direction: rtl; text-align: right; }
html[dir="rtl"] .alf-totals-row { flex-direction: row-reverse; }
html[dir="rtl"] .alf-payment-method { text-align: right; }
html[dir="rtl"] .alf-product-card { text-align: right; }
