/**
 * Amazon Live Affiliate Search – frontend styles.
 */

.almas-section--home {
	width: 100%;
	margin: 0;
	padding: 0;
	background: #051129;
}

.mr-main .almas-section--home {
	margin-left: calc(50% - 50vw);
	margin-right: calc(50% - 50vw);
	width: 100vw;
	max-width: 100vw;
}

.almas-wrap {
	--almas-navy: #051129;
	--almas-navy-light: #0d1a38;
	--almas-navy-box: #0f1e3d;
	--almas-navy-card: #051129;
	--almas-gold: #f1c40f;
	--almas-gold-hover: #e6b800;
	--almas-white: #ffffff;
	--almas-muted: #a9a9a9;
	--almas-radius: 18px;
	--almas-radius-pill: 999px;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, sans-serif;
	color: var(--almas-white);
	box-sizing: border-box;
}

.almas-wrap *,
.almas-wrap *::before,
.almas-wrap *::after {
	box-sizing: border-box;
}

/* ── Home (compact) ─────────────────────────────── */

.almas-wrap--home {
	background: var(--almas-navy);
	padding: 32px 24px 40px;
	border-radius: 0;
	width: 100%;
}

.almas-wrap--home .almas-search-bar {
	max-width: 900px;
	margin: 0 auto;
}

.almas-wrap--home .almas-results-section {
	max-width: 1200px;
	margin: 28px auto 0;
}

.almas-wrap--home .almas-grid--home {
	grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 1024px) {
	.almas-wrap--home .almas-grid--home {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 480px) {
	.almas-wrap--home .almas-grid--home {
		grid-template-columns: 1fr;
	}
}

/* ── Shop (full hero) ───────────────────────────── */

body.almas-shop-body {
	background: var(--almas-navy);
}

body.almas-shop-body .mr-main {
	background: var(--almas-navy) !important;
	padding: 0 !important;
	margin: 0;
	max-width: none;
	width: 100%;
}

.almas-shop-page {
	background: var(--almas-navy);
	min-height: 60vh;
	width: 100%;
	margin: 0;
	padding: 0;
}

.almas-wrap--shop {
	background: transparent;
	padding: 32px 20px 64px;
	max-width: 1200px;
	margin: 0 auto;
	width: 100%;
}

.almas-hero-box {
	background: linear-gradient(180deg, var(--almas-navy-box) 0%, var(--almas-navy-light) 100%);
	border: 1px solid rgba(255, 255, 255, 0.07);
	border-radius: 20px;
	padding: 44px 28px 36px;
	margin-bottom: 44px;
	box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
}

.almas-wrap--shop .almas-grid--trending,
.almas-wrap--shop .almas-grid--results {
	grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 1024px) {
	.almas-wrap--shop .almas-grid--trending,
	.almas-wrap--shop .almas-grid--results {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 480px) {
	.almas-wrap--shop .almas-grid--trending,
	.almas-wrap--shop .almas-grid--results {
		grid-template-columns: 1fr;
	}
}

.almas-hero {
	text-align: center;
	margin-bottom: 0;
}

.almas-badge {
	display: inline-block;
	padding: 6px 18px;
	border: 1px solid var(--almas-gold);
	border-radius: var(--almas-radius-pill);
	color: var(--almas-gold);
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	margin-bottom: 20px;
}

.almas-hero-title {
	font-size: clamp(2rem, 5vw, 3rem);
	font-weight: 800;
	margin: 0 0 12px;
	line-height: 1.15;
	color: var(--almas-white);
}

.almas-hero-accent {
	color: var(--almas-gold);
}

.almas-hero-subtitle {
	font-size: 1rem;
	color: var(--almas-muted);
	margin: 0 auto 28px;
	max-width: 520px;
	line-height: 1.5;
}

.almas-wrap--shop .almas-search-bar {
	max-width: 720px;
	margin: 0 auto;
}

.almas-wrap--shop .almas-trending-section,
.almas-wrap--shop .almas-results-section {
	margin-top: 8px;
}

/* ── Search bar ─────────────────────────────────── */

.almas-search-form {
	position: relative;
	display: flex;
	align-items: center;
}

.almas-search-input {
	width: 100%;
	padding: 16px 60px 16px 24px;
	border: 1px solid rgba(255, 255, 255, 0.12);
	border-radius: var(--almas-radius-pill);
	background: rgba(0, 0, 0, 0.25);
	color: var(--almas-white);
	font-size: 1rem;
	outline: none;
	transition: border-color 0.2s, background 0.2s;
}

.almas-search-input::placeholder {
	color: rgba(255, 255, 255, 0.4);
}

.almas-search-input:focus {
	border-color: rgba(241, 196, 15, 0.45);
	background: rgba(0, 0, 0, 0.35);
}

.almas-search-btn {
	position: absolute;
	right: 6px;
	width: 44px;
	height: 44px;
	border: none;
	border-radius: 50%;
	background: var(--almas-gold);
	color: #1a1a1a;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background 0.2s, transform 0.15s;
	flex-shrink: 0;
}

.almas-search-btn:hover {
	background: var(--almas-gold-hover);
	transform: scale(1.04);
}

.almas-search-btn:disabled {
	opacity: 0.6;
	cursor: not-allowed;
	transform: none;
}

.almas-disclaimer {
	text-align: center;
	font-size: 12px;
	color: var(--almas-muted);
	margin: 12px 0 0;
	line-height: 1.4;
}

/* ── Section headers ────────────────────────────── */

.almas-section-title,
.almas-results-title {
	font-size: 1.35rem;
	font-weight: 700;
	margin: 0 0 20px;
	color: black;
}
.almas-section--home .almas-results-title{
	color: white !important;
}

.almas-results-header {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 16px;
	margin-bottom: 20px;
	flex-wrap: wrap;
}

.almas-results-count {
	font-size: 0.9rem;
	color: #000 !important;
	margin: 6px 0 0;
}


.almas-view-all {
	color: var(--almas-gold);
	font-weight: 600;
	font-size: 0.95rem;
	text-decoration: none;
	white-space: nowrap;
	align-self: center;
	transition: opacity 0.2s;
}

.almas-view-all:hover {
	opacity: 0.85;
	text-decoration: underline;
}

/* ── Product grid ───────────────────────────────── */

.almas-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 18px;
}

@media (max-width: 1024px) {
	.almas-grid {
		grid-template-columns: repeat(3, 1fr);
	}
}

@media (max-width: 768px) {
	.almas-grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 480px) {
	.almas-grid {
		grid-template-columns: 1fr;
	}
}

/* ── Product card ───────────────────────────────── */

.almas-card {
	display: flex;
	flex-direction: column;
	border-radius: 16px;
	overflow: hidden;
	background: var(--almas-navy-card);
	border: 1px solid rgba(255, 255, 255, 0.06);
	text-decoration: none;
	color: inherit;
	transition: transform 0.2s, box-shadow 0.2s;
	height: 100%;
}

.almas-card:hover {
	transform: translateY(-4px);
	box-shadow: 0 12px 28px rgba(0, 0, 0, 0.4);
}

.almas-card-image {
	background: #ffffff;
	padding: 18px;
	display: flex;
	align-items: center;
	justify-content: center;
	aspect-ratio: 1;
	overflow: hidden;
}

.almas-card-image img {
	max-width: 100%;
	max-height: 100%;
	object-fit: contain;
	display: block;
}

.almas-card-body {
	padding: 14px 16px 20px;
	flex: 1;
	display: flex;
	flex-direction: column;
	gap: 8px;
	background: var(--almas-navy-card);
}

.almas-card-brand {
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--almas-gold);
	line-height: 1.3;
}

.almas-card-title {
	font-size: 0.88rem;
	font-weight: 700;
	line-height: 1.4;
	color: var(--almas-white);
	margin: 0;
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.almas-card-pricing {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: auto;
	padding-top: 4px;
}

.almas-card-price {
	font-size: 1.05rem;
	font-weight: 800;
	color: var(--almas-white);
}

.almas-card-list-price {
	font-size: 0.85rem;
	color: var(--almas-muted);
	text-decoration: line-through;
}

.almas-card-savings {
	font-size: 11px;
	font-weight: 700;
	color: #1a1a1a;
	background: var(--almas-gold);
	padding: 2px 8px;
	border-radius: var(--almas-radius-pill);
}

/* ── Load more ──────────────────────────────────── */

.almas-load-more-wrap {
	text-align: center;
	margin-top: 36px;
}

.almas-load-more {
	padding: 14px 48px;
	border: 1px solid var(--almas-gold);
	border-radius: var(--almas-radius-pill);
	background: rgba(0, 0, 0, 0.2);
	color: var(--almas-white);
	font-size: 1rem;
	font-weight: 600;
	cursor: pointer;
	transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.almas-wrap--shop .almas-load-more {
	background: var(--almas-gold);
	color: #1a1a1a;
	border-color: var(--almas-gold);
}

.almas-load-more:hover {
	background: var(--almas-gold);
	color: #1a1a1a;
	border-color: var(--almas-gold);
}

.almas-wrap--shop .almas-load-more:hover {
	background: #fbe077;
	color: #1a1a1a;
	border-color: var(--almas-gold-hover);
}

.almas-load-more:disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

/* ── States ─────────────────────────────────────── */

.almas-message {
	text-align: center;
	padding: 24px;
	color: var(--almas-muted);
	font-size: 0.95rem;
}

.almas-message--error {
	color: #ff8a8a;
}

.almas-message--empty {
	grid-column: 1 / -1;
	width: 100%;
	text-align: center;
	font-weight: 700;
	color: #000;
	white-space: nowrap;
}

.almas-wrap--shop .almas-message--empty {
	color: #000;
}

.almas-loading {
	text-align: center;
	padding: 40px;
	color: var(--almas-muted);
}

.almas-wrap.is-searching .almas-search-btn {
	opacity: 0.6;
}

.almas-trending-section.is-hidden {
	display: none;
}

@media (max-width: 768px) {
	.almas-hero-box {
		padding: 32px 18px 28px;
		border-radius: 16px;
		margin-bottom: 32px;
	}

	.almas-wrap--shop {
		padding: 20px 14px 48px;
	}
}

@media (max-width: 480px) {
	.almas-hero-title {
		font-size: 1.75rem;
	}

	.almas-search-input {
		padding: 14px 54px 14px 18px;
		font-size: 0.95rem;
	}

	.almas-search-btn {
		width: 40px;
		height: 40px;
	}
}
