/******************************

Journal - Advanced Opencart Theme Framework
Version 3.0.0
Copyright (c) 2018 Digital Atelier
https://www.journal-theme.com/

*******************************/

$icons: icomoon;
$sans: Helvetica, Arial, sans-serif;

$red: #EA2349;
$f4: #f4f4f4;
$ee: #eee;
$dark: #333;
$green: #27ae60;
$blue: #238CD2;
$gray: #5F6874;
$orange:#ED5149;
$quartz:#37485E;
$marine:#6670B1;


/******************************
 Family.scss
*******************************/

@mixin first($num) {
  @if $num == 1 {
    &:first-child {
      @content;
    }
  } @else {
    &:nth-child(-n + #{$num}) {
      @content;
    }
  }
}

@mixin last($num) {
  &:nth-last-child(-n + #{$num}) {
    @content;
  }
}

@mixin after-first($num) {
  &:nth-child(n + #{$num + 1}) {
    @content;
  }
}

@mixin from-end($num) {
  &:nth-last-child(#{$num}) {
    @content;
  }
}

@mixin between($first, $last) {
  &:nth-child(n + #{$first}):nth-child(-n + #{$last}) {
    @content;
  }
}

@mixin even-between($first, $last) {
  &:nth-child(even):nth-child(n + #{$first}):nth-child(-n + #{$last}) {
    @content;
  }
}

@mixin odd-between($first, $last) {
  &:nth-child(odd):nth-child(n + #{$first}):nth-child(-n + #{$last}) {
    @content;
  }
}

@mixin n-between($num, $first, $last) {
  &:nth-child(#{$num}n):nth-child(n + #{$first}):nth-child(-n + #{$last}) {
    @content;
  }
}

@mixin all-but($num) {
  &:not(:nth-child(#{$num})) {
    @content;
  }
}

@mixin each($num) {
  &:nth-child(#{$num}n) {
    @content;
  }
}

@mixin every($num) {
  &:nth-child(#{$num}n) {
    @content;
  }
}

@mixin from-first-last($num) {
  &:nth-child(#{$num}),
  &:nth-last-child(#{$num}) {
    @content;
  }
}

@mixin middle($num) {
  &:nth-child(#{round($num / 2)}) {
    @content;
  }
}

@mixin all-but-first-last($num) {
  &:nth-child(n + #{$num}):nth-last-child(n + #{$num}) {
    @content;
  }
}

@mixin first-of($limit) {
  &:nth-last-child(#{$limit}):first-child {
    @content;
  }
}

@mixin last-of($limit) {
  &:nth-of-type(#{$limit}):nth-last-of-type(1) {
    @content;
  }
}

@mixin at-least($num) {
  $selector: &;
  $child: nth(nth($selector, -1), -1);

  &:nth-last-child(n + #{$num}),
  &:nth-last-child(n + #{$num}) ~ #{$child} {
    @content;
  }
}

@mixin at-most($num) {
  $selector: &;
  $child: nth(nth($selector, -1), -1);

  &:nth-last-child(-n + #{$num}):first-child,
  &:nth-last-child(-n + #{$num}):first-child ~ #{$child} {
    @content;
  }
}

@mixin in-between($min, $max) {
  $selector: &;
  $child: nth(nth($selector, -1), -1);

  &:nth-last-child(n + #{$min}):nth-last-child(-n + #{$max}):first-child,
  &:nth-last-child(n + #{$min}):nth-last-child(-n + #{$max}):first-child ~ #{$child} {
    @content;
  }
}

@mixin first-child() {
  &:first-of-type {
    @content
  }
}

@mixin last-child() {
  &:last-of-type {
    @content
  }
}

@mixin even() {
  &:nth-child(even) {
    @content;
  }
}

@mixin odd() {
  &:nth-child(odd) {
    @content;
  }
}

@mixin first-last() {
  &:first-child,
  &:last-child {
    @content;
  }
}

@mixin unique() {
  &:only-child {
    @content;
  }
}

@mixin only() {
  &:only-child {
    @content;
  }
}

@mixin not-unique() {
  &:not(:only-child) {
    @content;
  }
}

