/**
 * EcoFlow Category Grid - Styles
 * Dosya: assets/css/ecoflow-category-grid.css
 * NOT: grid kullanılmamıştır, tüm layout flex ile yapılmıştır.
 * Tüm selector'lar .ecf-grid-wrap ile scope'lanmıştır.
 */

/* ─────────────────────────────────────────
   WRAPPER
───────────────────────────────────────── */
.ecf-grid-wrap {
	width: 100%;
	font-family: 'Helvetical Neue', sans-serif;
}

/* ─────────────────────────────────────────
   KARŞILAŞTIR & GÜÇ HESAPLAYICI BUTONLARI
───────────────────────────────────────── */
.ecf-grid-wrap .ecf-action-buttons {
	margin-bottom: 28px;
}

.ecf-grid-wrap .ecf-action-buttons__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.ecf-grid-wrap .ecf-action-buttons__left {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-shrink: 0;
}

.ecf-grid-wrap .ecf-action-buttons__right {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.ecf-grid-wrap .ecf-action-btn {
	display: flex;
	align-items: center;
	gap: 4px;
	border-radius: 8px;
	text-decoration: none;
	color: #03060B;
	font-size: 14px;
	font-weight: 500;
	cursor: pointer;
	transition: background 0.2s ease, border-color 0.2s ease;
}

.ecf-grid-wrap .ecf-action-btn:hover {
	border-color: #c0c0c0;
	color: #2164FF;
	text-decoration: none;
}

.ecf-grid-wrap .ecf-action-btn__icon {
	display: flex;
	align-items: center;
	flex-shrink: 0;
}

.ecf-grid-wrap .ecf-action-btn__text {
	white-space: nowrap;
}

/* ─────────────────────────────────────────
   TAB NAVİGASYON
───────────────────────────────────────── */
.ecf-grid-wrap .ecf-tabs__nav-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    border-bottom: 1px solid #e0e0e0;
    margin-bottom: 32px;
    touch-action: pan-x;
}

.ecf-grid-wrap .ecf-tabs__nav-wrap::-webkit-scrollbar {
	display: none;
}

.ecf-grid-wrap .ecf-tabs__nav {
	display: flex;
	align-items: flex-end;
	gap: 32px;
	white-space: nowrap;
	min-width: min-content;
}

.ecf-grid-wrap .ecf-tabs__btn {
	display: flex;
	align-items: center;
	background: none;
	border: none;
	border-bottom: 2px solid transparent;
	padding: 12px 0;
	margin-bottom: -1px;
	font-size: 15px;
	font-weight: 500;
	color: #888;
	cursor: pointer;
	white-space: nowrap;
	transition: color 0.2s ease, border-color 0.2s ease;
	outline: none;
}

.ecf-grid-wrap .ecf-tabs__btn:hover {
	color: #03060B;
}

.ecf-grid-wrap .ecf-tabs__btn.is-active {
	color: #03060B;
	border-bottom-color: #03060B;
	font-weight: 600;
}

/* ─────────────────────────────────────────
   TAB PANELLERİ
───────────────────────────────────────── */
.ecf-grid-wrap .ecf-tabs__panel {
	display: none;
}

.ecf-grid-wrap .ecf-tabs__panel.is-active {
	display: block;
}

/* ─────────────────────────────────────────
   AKSESUAR BÖLÜMÜ
───────────────────────────────────────── */
.ecf-grid-wrap .ecf-accessories-section {
	margin-top: 64px;
}

.ecf-grid-wrap .ecf-accessories-header {
	display: flex;
	align-items: center;
	margin-bottom: 24px;
}

.ecf-grid-wrap .ecf-accessories-title {
	font-size: 28px;
	font-weight: 700;
	color: #03060B;
	margin: 0;
	line-height: 1.2;
}

/* ─────────────────────────────────────────
   ÜRÜN LİSTESİ
───────────────────────────────────────── */
.ecf-grid-wrap .ecf-products {
	display: flex;
	flex-wrap: wrap;
	gap: 24px;
}

/* ─────────────────────────────────────────
   ÜRÜN KARTI
───────────────────────────────────────── */
.ecf-grid-wrap .ecf-card {
	position: relative;
	display: flex;
	flex-direction: column;
	width: calc((100% - 72px) / 4);
	background: #ffffff;
	/* border: 1px solid #e8e8e8; */
	border-radius: 16px;
	overflow: hidden;
	transition: box-shadow 0.25s ease;
}

.ecf-grid-wrap .ecf-card:hover {
	box-shadow: 0px 22px 24px -20px rgba(0, 0, 0, 0.12156862745098039);
}

.ecf-grid-wrap .ecf-card__link {
	position: absolute;
	inset: 0;
	z-index: 1;
}

/* ─────────────────────────────────────────
   KART GÖRSELİ
───────────────────────────────────────── */
.ecf-grid-wrap .ecf-card__image-wrap {
	position: relative;
	width: 100%;
	padding-top: 75%;
	background: #fff;
	overflow: hidden;
	flex-shrink: 0;
}

.ecf-grid-wrap .ecf-card__img {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100% !important;
	object-fit: cover;
	padding: 0;
	transition: opacity 0.35s ease;
}

.ecf-grid-wrap .ecf-card__img--main {
	opacity: 1;
}

.ecf-grid-wrap .ecf-card__img--hover {
	opacity: 0;
}

.ecf-grid-wrap .ecf-card:hover .ecf-card__img--main {
	opacity: 0;
}

.ecf-grid-wrap .ecf-card:hover .ecf-card__img--hover {
	opacity: 1;
}

.ecf-grid-wrap .ecf-card__discount-badge {
	position: absolute;
	top: 12px;
	left: 12px;
	background: #e00;
	color: #fff;
	font-size: 12px;
	font-weight: 700;
	padding: 4px 8px;
	border-radius: 6px;
	z-index: 2;
	line-height: 1;
}

/* ─────────────────────────────────────────
   KART İÇERİK
───────────────────────────────────────── */
.ecf-grid-wrap .ecf-card__content {
	display: flex;
	flex-direction: column;
	flex: 1;
	padding: 0 20px 24px;
	text-align: center;
	font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif !important;
}

.ecf-grid-wrap .ecf-card__meta {
	display: flex;
	flex-direction: column;
	align-items: center;
	flex: 1;
	margin: 0px 37px 0px 37px;
	padding: 20px 0;
}

.ecf-grid-wrap .ecf-card__badge-wrap {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 22px;
	margin-bottom: 8px;
	width: 100%;
}

.ecf-grid-wrap .ecf-badge {
	font-size: 13px;
	font-weight: 600;
	line-height: 1;
}

.ecf-grid-wrap .ecf-badge-new {
	color: #0066cc;
}

.ecf-grid-wrap .ecf-badge-popular {
	color: #e07b00;
}

.ecf-grid-wrap .ecf-badge-out-of-stock {
	color: #cc0000;
}

.ecf-grid-wrap .ecf-card__title-wrap {
	display: flex;
	align-items: flex-start;
	justify-content: center;
	min-height: 70px;
	margin-bottom: 10px;
	width: 100%;
	font-size: 17px;
}

.ecf-grid-wrap .ecf-card__title {
	font-size: 15px;
	font-weight: 600;
	color: #03060B;
	text-decoration: none;
	line-height: 1.45;
	position: relative;
	z-index: 2;
	transition: color 0.2s ease;
}

.ecf-grid-wrap .ecf-card__title:hover {
	color: #0052cc;
	text-decoration: none;
}

.ecf-grid-wrap .ecf-card__attrs-wrap {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 22px;
	width: 100%;
}

.ecf-grid-wrap .ecf-card__attrs {
	display: flex;
	align-items: center;
	justify-content: center;
	flex-wrap: wrap;
	gap: 0;
	font-size: 13px;
	color: #707070;
	line-height: 1.4;
	font-weight: 600;
}

.ecf-grid-wrap .ecf-card__attr-item {
	display: inline;
}

.ecf-grid-wrap .ecf-card__attrs-sep {
	color: #bbb;
	margin: 0 5px;
}

/* ─────────────────────────────────────────
   FİYAT
───────────────────────────────────────── */
.ecf-grid-wrap .ecf-card__price-wrap {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: max-content;
	margin-bottom: 16px;
	width: 100%;
}

.ecf-grid-wrap .ecf-price {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	flex-wrap: wrap;
}

.ecf-grid-wrap .ecf-price--sale .ecf-price__regular {
	font-size: 14px;
	font-weight: 400;
	color: #999;
	text-decoration: line-through;
}

.ecf-grid-wrap .ecf-price--sale .ecf-price__regular .woocommerce-Price-amount {
	font-size: 13px;
}

.ecf-grid-wrap .ecf-price--sale .ecf-price__sale {
	font-size: 14px;
	font-weight: 700;
	color: #2164FF;
}

.ecf-grid-wrap .ecf-price--sale .ecf-price__sale .woocommerce-Price-amount {
	font-size: 14px;
	font-weight: 700;
}

.ecf-grid-wrap .ecf-price__normal {
	font-size: 14px;
	font-weight: 700;
	color: #03060B;
}

.ecf-grid-wrap .ecf-price__normal .woocommerce-Price-amount {
	font-size: 14px;
	font-weight: 700;
}

.ecf-grid-wrap .ecf-card__price-wrap .woocommerce-Price-currencySymbol {
	font-size: 0.85em;
}

/* ─────────────────────────────────────────
   BUTON
───────────────────────────────────────── */
.ecf-grid-wrap .ecf-card__button-wrap {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: max-content;
	width: 100%;
}

.ecf-grid-wrap .ecf-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 75%;
	padding: 10px 20px 10px 20px;
	border: none;
	border-radius: 100px;
	font-size: 16px;
	font-weight: 500;
	cursor: pointer;
	transition: background 0.2s ease, color 0.2s ease;
	position: relative;
	z-index: 2;
	height: max-content;
	line-height: 1;
	text-decoration: none;
}

.ecf-grid-wrap .ecf-btn--add-to-cart {
	background: #1a75ff;
	color: #fff;
}

.ecf-grid-wrap .ecf-btn--add-to-cart:hover {
	background: #0052cc;
	color: #fff;
}

.ecf-grid-wrap .ecf-btn--add-to-cart.is-loading {
	opacity: 0.7;
	cursor: wait;
}

.ecf-grid-wrap .ecf-btn--notify {
	background: #03060B !important;
	color: #fff;
	max-width: 75% !important;
}

.ecf-grid-wrap .ecf-btn--notify:hover {
	background: #1a1a1a;
	color: #fff;
}

/* ─────────────────────────────────────────
   SAYFALAMA
───────────────────────────────────────── */
.ecf-grid-wrap .ecf-pagination {
	margin-top: 40px;
	width: 100%;
}

.ecf-grid-wrap .ecf-pagination__inner {
	display: flex;
	align-items: center;
	justify-content: center;
	flex-wrap: wrap;
	gap: 8px;
}

.ecf-grid-wrap .ecf-pagination__btn {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	border: 1px solid #e0e0e0;
	border-radius: 8px;
	background: #fff;
	font-size: 14px;
	font-weight: 500;
	color: #03060B;
	cursor: pointer;
	transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
	flex-shrink: 0;
}

.ecf-grid-wrap .ecf-pagination__btn:hover:not(.is-active) {
	border-color: #03060B;
}

.ecf-grid-wrap .ecf-pagination__btn.is-active {
	background: #03060B;
	border-color: #03060B;
	color: #fff;
	cursor: default;
}

/* ─────────────────────────────────────────
   YÜKLEME DURUMU
───────────────────────────────────────── */
.ecf-grid-wrap .ecf-product-section.is-loading {
	opacity: 0.45;
	pointer-events: none;
	transition: opacity 0.2s ease;
}

.ecf-grid-wrap .ecf-loading {
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 60px 20px;
	font-size: 14px;
	color: #888;
	width: 100%;
}

.ecf-grid-wrap .ecf-no-products {
	font-size: 14px;
	color: #888;
	padding: 40px 0;
	text-align: center;
	width: 100%;
}

/* ─────────────────────────────────────────
   MOBİL
───────────────────────────────────────── */
@media (max-width: 768px) {
	.ecf-grid-wrap {
		padding-bottom: 30px;
	}
	.ecf-grid-wrap .ecf-action-buttons__inner {
    gap: 0;
}

.ecf-grid-wrap .ecf-action-buttons__left {
    width: 100%;
    justify-content: space-between;
    padding: 10px;
}

.ecf-grid-wrap .ecf-action-buttons__right {
    width: 100%;
}
.ecf-grid-wrap .ecf-main-section,
.ecf-grid-wrap .ecf-accessories-section {
	padding: 0 10px;
}


.ecf-grid-wrap .ecf-sort-wrap {
    width: 100%;
}
	.ecf-grid-wrap .ecf-products {
		gap: 16px;
	}

	.ecf-grid-wrap .ecf-card {
		width: calc((100% - 16px) / 2);
	}

	.ecf-grid-wrap .ecf-card__content {
		padding: 14px 14px 18px;
	}
	.ecf-grid-wrap .ecf-card__meta {
		margin: 0;
		padding: 10px 4px;
	}
	.ecf-grid-wrap .ecf-card__title {
		font-size: 12px;
	}
	.ecf-grid-wrap .ecf-card__title-wrap {
		min-height: 55px;
	}
	.ecf-grid-wrap .ecf-card__attrs {
		font-size: 11px;
	}
	.ecf-grid-wrap .ecf-price {
		gap: 0;
	}
	.ecf-grid-wrap .ecf-card__img {
		padding: 16px;
	}
	.ecf-grid-wrap .ecf-card__price-wrap {
		width: 80%;
		align-self: center;
	}
	.ecf-grid-wrap .ecf-price--sale .ecf-price__sale,
	.ecf-grid-wrap .ecf-price__normal {
		font-size: 15px;
	}

	.ecf-grid-wrap .ecf-price--sale .ecf-price__sale .woocommerce-Price-amount,
	.ecf-grid-wrap .ecf-price__normal .woocommerce-Price-amount {
		font-size: 15px;
	}

	.ecf-grid-wrap .ecf-price--sale .ecf-price__regular {
		font-size: 12px;
	}
	.ecf-grid-wrap .ecf-btn--notify {
		width: 90% !important;
		max-width: 90% !important;
	}
	.ecf-grid-wrap .ecf-btn {
		font-size: 13px;
		padding: 11px 16px;
		width: 80%;
	}

	.ecf-grid-wrap .ecf-accessories-title {
		font-size: 22px;
	}

	.ecf-grid-wrap .ecf-tabs__nav {
		gap: 20px;
	}

	.ecf-grid-wrap .ecf-tabs__btn {
		font-size: 14px;
	}

	.ecf-grid-wrap .ecf-action-btn {
		padding: 0;
		font-size: 12px;
	}

	.ecf-grid-wrap .ecf-action-btn__icon {
		width: 20px;
	}

	.ecf-grid-wrap .ecf-pagination__btn {
		width: 36px;
		height: 36px;
		font-size: 13px;
	}
}
/* ─────────────────────────────────────────
   SIRALAMA
───────────────────────────────────────── */
.ecf-grid-wrap .ecf-sort-wrap {
    display: flex;
    align-items: center;
    min-width: 170px;
    justify-content: flex-end;
}

.ecf-grid-wrap .ecf-sort-icon {
	display: none;
}

.ecf-grid-wrap .ecf-sort-inner {
	position: relative;
	user-select: none;
}

.ecf-grid-wrap .ecf-sort-trigger {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 10px 14px 10px 16px;
	border: solid 1px #d6d6d6;
	border-radius: 4px;
	cursor: pointer;
	transition: border-color 0.2s, box-shadow 0.2s;
	white-space: nowrap;
}

.ecf-grid-wrap .ecf-sort-trigger:hover {
	border-color: #999;
}

.ecf-grid-wrap .ecf-sort-inner.is-open .ecf-sort-trigger {
	border-color: #111;
	box-shadow: 0 0 0 1px #111;
}

.ecf-grid-wrap .ecf-sort-prefix {
	font-size: 14px;
	color: #000;
	font-weight: 600;
}

.ecf-grid-wrap .ecf-sort-current {
	font-size: 14px;
	color: #111;
	font-weight: 500;
}

.ecf-grid-wrap .ecf-sort-arrow {
	color: #111;
	flex-shrink: 0;
	transition: transform 0.2s ease;
	margin-left: 2px;
	margin-top: 3px;
}

.ecf-grid-wrap .ecf-sort-inner.is-open .ecf-sort-arrow {
	transform: rotate(180deg);
}

.ecf-grid-wrap .ecf-sort-dropdown {
	display: none;
	position: absolute;
	top: calc(100% + 6px);
	right: 0;
	min-width: 220px;
	background: #fff;
	border-radius: 8px;
	border: 1px solid #e8e8e8;
	list-style: none;
	margin: 0;
	padding: 6px 0;
	z-index: 999;
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.10);
}

.ecf-grid-wrap .ecf-sort-inner.is-open .ecf-sort-dropdown {
	display: block;
	animation: ecfSortFadeIn 0.15s ease;
}

@keyframes ecfSortFadeIn {
	from { opacity: 0; transform: translateY(-4px); }
	to   { opacity: 1; transform: translateY(0); }
}

.ecf-grid-wrap .ecf-sort-option {
	padding: 13px 32px 9px;
	font-size: 13px;
	color: #333;
	font-weight: 500;
	cursor: pointer;
	transition: background 0.12s;
}

.ecf-grid-wrap .ecf-sort-option:hover {
	background: #f5f5f7;
}

.ecf-grid-wrap .ecf-sort-option.is-active {
	color: #2164FF;
	font-weight: 600;
}

@media (min-width: 769px) {
	.ecf-grid-wrap .ecf-sort-prefix {
		display: none;
	}
}

@media (max-width: 768px) {
	.ecf-grid-wrap .ecf-sort-wrap {
		width: 100%;
	}

	.ecf-grid-wrap .ecf-sort-inner {
		width: 100%;
	}

	.ecf-grid-wrap .ecf-sort-trigger {
		width: 100%;
		border-radius: 0;
		border-left: none;
		border-right: none;
		border-top: none;
		border-bottom: 1px solid #ebe9e9;
		padding: 8px 10px;
		justify-content: flex-start;
		gap: 6px;
		background: #fff;
		box-shadow: none !important;
	}

	.ecf-grid-wrap .ecf-sort-inner.is-open .ecf-sort-trigger {
		border-color: #ebe9e9;
		box-shadow: none !important;
	}
	
	.ecf-grid-wrap .ecf-sort-trigger:hover {
		border-color: #ebe9e9;
	}

	.ecf-grid-wrap .ecf-sort-icon {
		display: flex;
		align-items: center;
		flex-shrink: 0;
		width: 20px;
	}

	.ecf-grid-wrap .ecf-sort-prefix {
		display: block;
		font-size: 12px;
		color: #111;
		font-weight: 500;
		flex: 1;
	}

	.ecf-grid-wrap .ecf-sort-current {
		font-size: 12px;
		color: #2164FF;
		font-weight: 500;
	}

	.ecf-grid-wrap .ecf-sort-arrow {
		width: 16px;
		height: 16px;
		margin-top: 0;
	}

	.ecf-grid-wrap .ecf-sort-dropdown {
		position: absolute;
		left: 0;
		right: 0;
		border-radius: 0;
		border: none;
		border-top: 1px solid #ebe9e9;
		box-shadow: 0 8px 20px rgba(0, 0, 0, 0.10);
		min-width: 100%;
		padding: 0;
		top: 100%;
	}

	.ecf-grid-wrap .ecf-sort-option {
		padding: 13px 32px 9px;
		font-size: 14px;
		color: #444;
	}

	.ecf-grid-wrap .ecf-sort-option:hover {
		background: transparent;
	}
}