/* ============================================================
   MenaQ7 Products – Frontend Styles
   ============================================================ */

:root {
  --mq7-dark:        #303030;
  --mq7-black:       #000000;
  --mq7-white:       #ffffff;
  --mq7-green-dark:  #08463A;
  --mq7-green-light: #ACC280;
  --mq7-blue:        #69ACDF;
  --mq7-divider:     rgba(48,48,48,0.20);
}

/* ---- Wrapper layout ---- */
.mq7-wrapper {
  display: flex;
  gap: 40px;
  align-items: flex-start;
  width: 100%;
  font-family: 'Roboto', sans-serif;
}

/* ============================================================
   FILTERS SIDEBAR
   ============================================================ */
.mq7-filters-panel {
  flex-shrink: 0;
  width: 290px;
  padding: 20px 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.mq7-filters-title {
  font-size: 16px;
  font-weight: 800;
  color: var(--mq7-dark);
}

.mq7-filter-mobile-toggle {
  display: none;
  width: 100%;
  padding: 10px 16px;
  background: var(--mq7-green-dark);
  color: var(--mq7-white);
  border: none;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  text-align: left;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.mq7-filters-body {
  display: flex;
  flex-direction: column;
  gap: 20px;
  width: 100%;
}

/* ---- Filter group ---- */
.mq7-filter-group {
  width: 100%;
}

.mq7-filter-group__header {
  width: 100%;
  min-height: 40px;
  padding: 0 10px;
  border-top: 1px solid var(--mq7-dark);
  background: none;
  border-left: none;
  border-right: none;
  border-bottom: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  gap: 4px;
}

.mq7-filter-group__title {
  flex: 1;
  text-align: left;
  font-size: 20px;
  font-weight: 800;
  color: var(--mq7-dark);
  text-transform: uppercase;
}

.mq7-filter-icon {
  display: flex;
  align-items: center;
}

.mq7-filter-group__body {
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

/* ---- Region items ---- */
.mq7-region-item {
  width: 100%;
  margin-bottom: 5px;
}

.mq7-region-header {
  width: 100%;
  padding: 0 10px;
  min-height: 30px;
  background: var(--mq7-green-light);
  border: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  gap: 8px;
}

.mq7-region-label {
  flex: 1;
  text-align: left;
  font-size: 16px;
  font-weight: 600;
  color: var(--mq7-white);
  text-transform: uppercase;
  line-height: 30px;
}

.mq7-region-icon {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.mq7-region-sublist {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding-top: 5px;
}

.mq7-region-sublist__item {
  padding-left: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

.mq7-region-sublist__item input[type="checkbox"] {
  accent-color: var(--mq7-green-dark);
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  cursor: pointer;
}

.mq7-region-sublist__item span {
  font-size: 16px;
  font-weight: 300;
  color: var(--mq7-dark);
  line-height: 30px;
}

/* ---- Benefit / Brand options ---- */
.mq7-filter-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-left: 10px;
  cursor: pointer;
}

.mq7-filter-option input[type="checkbox"] {
  accent-color: var(--mq7-green-dark);
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  cursor: pointer;
}

.mq7-filter-option__label {
  font-size: 16px;
  font-weight: 300;
  color: var(--mq7-dark);
  line-height: 30px;
}

.mq7-divider {
  width: 100%;
  height: 1px;
  background: var(--mq7-dark);
  opacity: 0.20;
}

/* ============================================================
   PRODUCT AREA
   ============================================================ */
.mq7-products-area {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.mq7-products-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
}

/* Loading state */
.mq7-products-grid.mq7-loading {
  opacity: 0.4;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

/* ============================================================
   PRODUCT CARD
   ============================================================ */
.mq7-product-card {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.mq7-card-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
  text-decoration: none;
  color: inherit;
  width: 100%;
  transition: opacity 0.2s ease;
}

.mq7-card-link:hover {
  opacity: 0.85;
}

.mq7-card-image {
  width: 100%;
  aspect-ratio: 1 / 1;
  background: #f5f5f5;
  overflow: hidden;
  position: relative;
}

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

.mq7-card-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #ebebeb;
  color: #aaa;
  font-size: 13px;
  text-align: center;
  padding: 10px;
}

.mq7-card-info {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.mq7-card-badge {
  display: inline-block;
  padding: 3px 8px;
  background: var(--mq7-green-dark);
  color: var(--mq7-white);
  font-size: 14px;
  font-weight: 800;
}

.mq7-card-names {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  width: 100%;
}

.mq7-card-title {
  display: block;
  font-size: clamp(16px, 1.4vw, 24px);
  font-weight: 800;
  color: var(--mq7-black);
  text-align: center;
}

.mq7-card-brand {
  font-size: 16px;
  font-weight: 800;
  color: var(--mq7-black);
  text-align: center;
}

.mq7-card-footer {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
}

.mq7-card-divider {
  width: 100%;
  border: none;
  border-top: 1px solid var(--mq7-divider);
  margin: 0;
}

.mq7-card-benefit {
  font-size: 16px;
  font-weight: 300;
  color: var(--mq7-black);
  text-align: center;
}

/* ============================================================
   PAGINATION
   ============================================================ */
.mq7-pagination-wrap {
  display: flex;
  justify-content: center;
}

.mq7-pagination {
  display: flex;
  gap: 40px;
  align-items: center;
}

.mq7-page {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: 1px solid var(--mq7-black);
  background: var(--mq7-white);
  font-size: 24px;
  font-weight: 800;
  color: var(--mq7-green-dark);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mq7-page.active,
.mq7-page:hover {
  background: var(--mq7-green-dark);
  color: var(--mq7-white);
  border-color: var(--mq7-green-dark);
}

/* ---- No results ---- */
.mq7-no-results {
  grid-column: 1 / -1;
  padding: 40px;
  text-align: center;
  color: var(--mq7-dark);
  font-size: 18px;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

/* 3 columns */
@media (max-width: 1200px) {
  .mq7-products-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
  }
  .mq7-filters-panel {
    width: 240px;
  }
}

/* Tablet */
@media (max-width: 900px) {
  .mq7-wrapper {
    flex-direction: column;
    gap: 24px;
  }

  .mq7-filters-panel {
    width: 100%;
  }

  .mq7-filter-mobile-toggle {
    display: flex;
  }

  .mq7-filters-body {
    display: none;
  }

  .mq7-filters-body.mq7-open {
    display: flex;
  }

  .mq7-products-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }
}

/* Mobile */
@media (max-width: 580px) {
  .mq7-products-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .mq7-card-title {
    font-size: 14px;
  }

  .mq7-card-brand,
  .mq7-card-benefit,
  .mq7-card-badge {
    font-size: 13px;
  }

  .mq7-pagination {
    gap: 16px;
  }

  .mq7-page {
    width: 40px;
    height: 40px;
    font-size: 18px;
  }
}

@media (max-width: 380px) {
  .mq7-products-grid {
    grid-template-columns: 1fr;
  }
}

.mq7-card-title {
    max-width: 170px;
    white-space: nowrap;
    text-overflow: ellipsis;
    height: 30px;
    overflow: hidden;
}

span.mq7-region-icon.mq7-icon-close {
    width: 12px;
    position: relative;
    left: -2px;
}

.mq7-region-sublist {
    max-height: 300px;
    overflow: scroll;
}

button:not(.mq7-is-open) ~ .mq7-region-sublist {
    display: none;
}

span.mq7-filter-icon.mq7-icon-close {
    width: 12Px;
}

@media (max-width: 600px) {
	.mq7-products-area {
		width:100%;
	}
	.mq7-card-title {
		max-width:100%;
	}
}
