/* ============================================================
   EED Catalog – Frontend Styles
   ============================================================ */

#eed-catalog-wrap {
	font-family: inherit;
	max-width: 1200px;
	margin: 0 auto;
}

/* Breadcrumb */
#eed-catalog-breadcrumb {
	margin-bottom: 20px;
	font-size: 0.9em;
	color: #555;
}
#eed-catalog-breadcrumb .eed-bc-link {
	cursor: pointer;
	color: #2271b1;
	text-decoration: underline;
}
#eed-catalog-breadcrumb .eed-bc-link:hover { color: #135e96; }
#eed-catalog-breadcrumb .eed-bc-current { font-weight: 600; color: #333; }

/* Loading */
#eed-catalog-loading {
	text-align: center;
	padding: 40px 20px;
	font-size: 1.1em;
	color: #555;
}
.eed-spinner {
	display: inline-block;
	width: 20px;
	height: 20px;
	border: 3px solid #ddd;
	border-top-color: #2271b1;
	border-radius: 50%;
	animation: eed-spin 0.8s linear infinite;
	vertical-align: middle;
	margin-right: 6px;
}
@keyframes eed-spin { to { transform: rotate(360deg); } }

/* ============================================================
   GENERIC GRID
   ============================================================ */
.eed-catalog-grid {
	display: grid;
	gap: 16px;
}

/* ============================================================
   BRAND CARDS
   ============================================================ */
.eed-brand-grid {
	grid-template-columns: repeat(6, 1fr);
	column-gap: 16px;
	row-gap: 32px;
}

.eed-brand-item {
	display: flex;
	flex-direction: column;
	align-items: center;
	cursor: pointer;
	text-align: center;
}
.eed-brand-item:hover .eed-brand-name {
	color: #d9534f;
}
.eed-brand-card {
	background: #fff;
	border: 1.5px solid #d9534f;
	border-radius: 10px;
	overflow: hidden;
	transition: box-shadow 0.2s;
	text-align: center;
	display: flex;
	flex-direction: column;
	aspect-ratio: 1;
	width: 100%;
}
.eed-brand-item:hover .eed-brand-card,
.eed-brand-item:focus .eed-brand-card {
	box-shadow: 0 2px 10px rgba(217, 83, 79, 0.25);
	outline: none;
}

.eed-brand-thumb {
	flex: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 14px;
	background: #fff;
	box-sizing: border-box;
	overflow: hidden;
}
.eed-brand-logo {
	max-width: 100%;
	max-height: 100%;
	width: auto;
	height: auto;
	object-fit: contain;
	display: block;
	filter: grayscale(30%);
	transition: filter 0.2s;
}
.eed-brand-card:hover .eed-brand-logo {
	filter: grayscale(0%);
}
.eed-brand-initial {
	font-size: 2.2em;
	font-weight: 700;
	color: #fff;
	text-shadow: 0 2px 4px rgba(0,0,0,0.2);
	line-height: 1;
}

.eed-brand-name {
	padding: 6px 4px 0;
	font-family: 'Playfair Display', 'Playfair', serif;
	font-weight: 600;
	font-style: normal;
	font-size: 20px;
	line-height: 30px;
	letter-spacing: -0.02em;
	text-transform: capitalize;
	color: #13120E;
	text-align: center;
	transition: color 0.2s;
}

/* ============================================================
   CATEGORY CARDS
   ============================================================ */
.eed-cat-grid {
	grid-template-columns: repeat(6, 1fr);
	column-gap: 16px;
	row-gap: 32px;
}

.eed-cat-item {
	display: flex;
	flex-direction: column;
	align-items: center;
	cursor: pointer;
	text-align: center;
}
.eed-cat-item:hover .eed-cat-name {
	color: #d9534f;
}
.eed-cat-card {
	background: #fff;
	border: 1.5px solid #d9534f;
	border-radius: 10px;
	overflow: hidden;
	transition: box-shadow 0.2s;
	display: flex;
	flex-direction: column;
	aspect-ratio: 1;
	width: 100%;
}
.eed-cat-item:hover .eed-cat-card,
.eed-cat-item:focus .eed-cat-card {
	box-shadow: 0 2px 10px rgba(217, 83, 79, 0.25);
	outline: none;
}
.eed-cat-thumb {
	flex: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 14px;
	box-sizing: border-box;
	overflow: hidden;
	background: none;
}
.eed-cat-initial {
	font-size: 2.2em;
	font-weight: 700;
	color: #fff;
	text-shadow: 0 2px 4px rgba(0,0,0,0.2);
	line-height: 1;
}
.eed-cat-name {
	padding: 6px 4px 0;
	font-family: 'Playfair Display', 'Playfair', serif;
	font-weight: 600;
	font-size: 20px;
	line-height: 30px;
	letter-spacing: -0.02em;
	color: #444;
	text-align: center;
	transition: color 0.2s;
}
.eed-cat-logo {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
}

/* ============================================================
   PRODUCT CARDS
   ============================================================ */
.eed-product-grid {
	grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
}

.eed-product-card {
	background: #fff;
	border-radius: 8px;
	overflow: hidden;
	display: flex;
	flex-direction: column;
}
.eed-product-card:hover {
	box-shadow: none;
}
.eed-product-img-wrap {
	width: 100%;
	aspect-ratio: 1;
	border: 1px solid rgba(244, 100, 91, 0.478);
	box-shadow: 0px 0px 12px 0px rgba(0, 0, 0, 0.169);
	background: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
	box-sizing: border-box;
}
.eed-product-thumb {
	width: 100%;
	height: 100%;
	object-fit: contain;
	padding: 10px;
	box-sizing: border-box;
	display: block;
}
.eed-product-body {
	padding: 12px 4px;
	flex: 1;
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
}
.eed-product-name {
	font-family: 'Playfair Display', 'Playfair', serif;
	font-weight: 600;
	font-size: 18px;
	line-height: 34px;
	letter-spacing: -0.02em;
	color: #13120E;
	flex: 1;
	margin-bottom: 6px;
}
.eed-product-name a,
.eed-product-name a:visited,
.eed-product-name a:hover {
	color: #13120E;
	text-decoration: none;
}
.eed-product-sku {
	font-size: 0.75em;
	color: #999;
	margin-bottom: 6px;
}
.eed-product-price {
	font-size: 1em;
	font-weight: 700;
	color: #13120E;
	margin-bottom: 10px;
}
.eed-product-price ins { text-decoration: none; }
.eed-product-actions {
	display: flex;
	gap: 6px;
	flex-wrap: wrap;
}
.eed-product-btn,
.eed-cart-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 1;
	text-align: center;
	padding: 10px 12px!important;
	border-radius: 3px;
	border: 1px solid #4D100E;
	background: #fff;
	color: #4D100E;
	font-family: 'Plus Jakarta Sans', sans-serif;
	font-weight: 600;
	font-size: 16px;
	line-height: 155%;
	letter-spacing: 0.03em;
	text-transform: uppercase;
	appearance: none;
	-webkit-appearance: none;
	cursor: pointer;
	transition: background 0.2s, opacity 0.2s, color 0.2s;
}
.eed-product-btn {
	color: #4D100E !important;
	text-decoration: none;
}
.eed-product-btn:hover { background: #4D100E; color: #fff !important; }
.eed-cart-btn {
	text-decoration: none;
}
.eed-cart-btn:hover:not(:disabled) { background: #4D100E; color: #fff; }
.eed-cart-btn:disabled { opacity: 0.65; cursor: default; }
.eed-cart-btn--added { background: #38c172; color: #fff; border-color: #38c172; }
.eed-cart-btn--added:hover { background: #2d9f5d; border-color: #2d9f5d; }

/* ============================================================
   VIEW TOGGLE (grid / list)
   ============================================================ */
#eed-catalog-view-toggle { display: flex; justify-content: flex-end; margin-bottom: 12px; gap: 6px; }
.eed-view-btn {
	background: #fff;
	border: 1.5px solid #d9534f;
	border-radius: 6px;
	width: 36px;
	height: 36px;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	color: #d9534f;
	transition: background 0.2s, color 0.2s;
	padding: 0;
}
.eed-view-btn svg,
.eed-view-btn svg * { pointer-events: none; }
.eed-view-btn i { pointer-events: none; font-size: 16px; color: #d9534f; transition: color 0.2s; }
.eed-view-btn--active i,
.eed-view-btn:hover i { color: #fff; }
.eed-view-btn:hover,
.eed-view-btn--active { background: #4D100E; color: #fff; border-color: #4D100E; }

/* LIST MODE – product grid container */
.eed-product-grid--list {
	grid-template-columns: 1fr !important;
	gap: 10px !important;
}

/* LIST MODE – individual card */
.eed-product-grid--list .eed-product-card {
	flex-direction: row;
	align-items: center;
	gap: 0;
	border: 1px solid rgba(244, 100, 91, 0.35);
	border-radius: 8px;
	overflow: hidden;
}

.eed-product-grid--list .eed-product-img-wrap {
	width: 100px;
	min-width: 100px;
	height: 100px;
	aspect-ratio: auto;
	border: none;
	border-right: 1px solid rgba(244, 100, 91, 0.25);
	box-shadow: none;
	flex-shrink: 0;
}

.eed-product-grid--list .eed-product-body {
	flex-direction: row;
	align-items: center;
	text-align: left;
	padding: 10px 16px;
	gap: 12px;
	flex-wrap: nowrap;
}

.eed-product-grid--list .eed-product-name {
	font-size: 18px;
	line-height: 22px;
	margin-bottom: 0;
	flex: 2 1 0;
	min-width: 0;
	text-align: left;
}

.eed-product-grid--list .eed-product-sku {
	flex: 1 1 0;
	min-width: 60px;
	margin-bottom: 0;
	font-size: 0.78em;
	color: #aaa;
	white-space: nowrap;
}

.eed-product-grid--list .eed-product-price {
	flex: 1 1 0;
	min-width: 70px;
	margin-bottom: 0;
	white-space: nowrap;
}

.eed-product-grid--list .eed-product-actions {
	flex: 0 0 auto;
	margin-left: auto;
}

@media (max-width: 600px) {
	.eed-product-grid--list .eed-product-body {
		flex-wrap: wrap;
		gap: 6px;
	}
	.eed-product-grid--list .eed-product-img-wrap {
		width: 80px;
		min-width: 80px;
		height: 80px;
	}
}

/* ============================================================
   PAGINATION
   ============================================================ */
#eed-catalog-pagination {
	margin-top: 24px;
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	justify-content: center;
}
.eed-page-btn {
	padding: 7px 14px;
	border: 1px solid #ddd;
	border-radius: 5px;
	background: #fff;
	cursor: pointer;
	font-size: 0.9em;
	transition: background 0.15s, border-color 0.15s;
}
.eed-page-btn:hover { background: #f0f4f8; border-color: #2271b1; }
.eed-page-btn.active { background: #4D100E; color: #fff; border-color: #4D100E; cursor: default; }

/* ============================================================
   EMPTY / ERROR
   ============================================================ */
.eed-catalog-empty {
	padding: 30px;
	text-align: center;
	color: #777;
	font-style: italic;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
	#eed-catalog-wrap { padding: 0 14px; }
	.eed-brand-grid { grid-template-columns: repeat(4, 1fr); }
	.eed-cat-grid { grid-template-columns: repeat(4, 1fr); }
	.eed-product-grid { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
}

@media (max-width: 768px) {
	#eed-catalog-breadcrumb {
		display: block;
		line-height: 1.5;
		word-break: break-word;
	}
	.eed-brand-grid { grid-template-columns: repeat(3, 1fr); }
	.eed-cat-grid { grid-template-columns: repeat(3, 1fr); }
	.eed-product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.eed-brand-name,
	.eed-cat-name {
		font-size: 16px;
		line-height: 24px;
	}
	.eed-product-name {
		font-size: 18px;
		line-height: 28px;
	}
	.eed-product-btn,
	.eed-cart-btn {
		font-size: 16px;
		padding: 9px 10px;
	}
}

@media (max-width: 600px) {
	.eed-brand-grid { grid-template-columns: repeat(2, 1fr); }
	.eed-cat-grid { grid-template-columns: repeat(2, 1fr); }
	.eed-product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
	#eed-catalog-view-toggle { justify-content: flex-start; }

	.eed-product-grid--list .eed-product-card {
		flex-direction: column;
		align-items: stretch;
	}
	.eed-product-grid--list .eed-product-img-wrap {
		width: 100%;
		min-width: 0;
		height: auto;
		aspect-ratio: 1;
		border-right: none;
		border-bottom: 1px solid rgba(244, 100, 91, 0.25);
	}
	.eed-product-grid--list .eed-product-body {
		flex-direction: column;
		align-items: stretch;
		text-align: left;
		padding: 12px;
		gap: 8px;
	}
	.eed-product-grid--list .eed-product-name,
	.eed-product-grid--list .eed-product-sku,
	.eed-product-grid--list .eed-product-price {
		flex: 0 0 auto;
		min-width: 0;
		white-space: normal;
	}
	.eed-product-grid--list .eed-product-actions {
		margin-left: 0;
	}
}

@media (max-width: 420px) {
	.eed-product-grid { grid-template-columns: 1fr; }
	.eed-brand-grid,
	.eed-cat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.eed-product-body { padding: 10px 2px; }
	.eed-product-name {
		font-size: 18px;
		line-height: 24px;
	}
}
