/*
	Gallery before:
		5, 4: 767-, 3: 550-, 2: 399-, 1: 320-
	Gallery after:
		5, 4: 959-, 3: 767-, 2: 550-, 1: 399-
*/

@media all and (max-width: 1199px) {
	/* 4up becomes a 3up */
	.generic__4up .generic__part { width: 33.333%; }
	.generic__4up .generic__part:nth-child(4n+1) {
		clear: none;
	}
	.generic__4up .generic__part:nth-child(3n+1) {
		clear: left;
	}
	
	.generic__4space .generic__part { width: 32%; }
	.generic__4space .generic__part:nth-child(4n+1) {
		clear: none;
		margin-left: 2%;
	}
	.generic__4space .generic__part:nth-child(3n+1) {
		clear: left;
		margin-left: 0;
	}
}

@media all and (max-width: 959px) {
	.module-gallery__sentinel {
		width: 25%;
		padding-top: 25%;
	}
	
	.module-gallery__item {
		left: -25%;
		
		width: 25%;
	}
	.module-gallery__item__active { left: 0; }
	.module-gallery__item__active + .module-gallery__item { left: 25%; }
	.module-gallery__item__active + .module-gallery__item + .module-gallery__item { left: 50%; }
	.module-gallery__item__active + .module-gallery__item + .module-gallery__item + .module-gallery__item { left: 75%; }
	.module-gallery__item__active + .module-gallery__item + .module-gallery__item + .module-gallery__item + .module-gallery__item { left: 100%; }
	
	.module-gallery__item-image {
		background-color: #000004;
	}
}

@media all and (max-width: 899px) {
	/* 4up & 3up becomes a 2up */
	.generic__4up .generic__part,
	.generic__3up .generic__part {
		width: 50%;
	}
	.generic__4up .generic__part:nth-child(3n+1),
	.generic__3up .generic__part:nth-child(3n+1) {
		clear: none;
	}
	.generic__4up .generic__part:nth-child(odd),
	.generic__3up .generic__part:nth-child(odd) {
		clear: left;
	}
	
	.generic__4space .generic__part,
	.generic__3space .generic__part {
		width: 49%;
	}
	.generic__4space .generic__part:nth-child(3n+1),
	.generic__3space .generic__part:nth-child(3n+1) {
		clear: none;
		margin-left: 2%;
	}
	.generic__4space .generic__part:nth-child(odd),
	.generic__3space .generic__part:nth-child(odd) {
		clear: left;
		margin-left: 0;
	}
}

@media all and (max-width: 767px) {
	.nav {
		display: none;
	}
	
	.dynamic-nav {
		display: block;
	}
	
	.module-gallery__sentinel {
		width: 33.333%;
		padding-top: 33.333%;
	}
	
	.module-gallery__item {
		left: -33.333%;
		
		width: 33.333%;
	}
	.module-gallery__item__active { left: 0; }
	.module-gallery__item__active + .module-gallery__item { left: 33.333%; }
	.module-gallery__item__active + .module-gallery__item + .module-gallery__item { left: 66.666%; }
	.module-gallery__item__active + .module-gallery__item + .module-gallery__item + .module-gallery__item { left: 100%; }
	
	.module-gallery__item-image {
		background-color: #000003;
	}
	
	/*
	.module-gallery__control {
		font-size: 200%;
	}
	
	.module-gallery__wrap {
		margin-left: 2em;
		margin-right: 2em;
	}
	*/
}

@media all and (max-width: 699px) {
	.shop__primary {
		float: none;
		margin-bottom: 1em;
		width: 100%;
	}
	
	.shop__products-list-item {
		width: 48%;
	}
	
	.shop__secondary {
		float: none;
		width: 100%;
	}
	
	.shop-cart__table,
	.shop-cart__table > tbody,
	.shop-cart__tr,
	.shop-cart__th,
	.shop-cart__td {
		display: block;
	}
	
	.shop-cart__table > thead,
	.shop-cart__table > tfoot {
		display: none;
	}
	
	.shop-cart__table .cart-item-product:after {
		clear: both;
		content: " ";
		display: block;
		height: 0;
		overflow: hidden;
	}
	
	.shop-cart__tr {
		margin: 1em 0;
	}
	
	.shop-cart__td {
		margin-left: 160px;
	}
	
	.shop-cart__td__thumb {
		float: left;
		margin-left: 0;
		width: 140px;
	}
	.shop-cart__td__thumb img {
		display: block;
		max-height: 100%;
		max-width: 100%;
		width: 100%;
		height: auto;
	}
	
	.shop-cart__td__unit-price,
	.shop-cart__td__price {
    	text-align: left;
	}
	.shop-cart__td__unit-price:before {
		content: "Unit Price: ";
		display: inline;
	}
	.shop-cart__td__price:before {
		content: "Price: ";
		display: inline;
	}
	
	.shop-cart__after-footer {
		display: block;
	}
	
}

@media all and (max-width: 550px) {
	.module-gallery__sentinel {
		width: 50%;
		padding-top: 50%;
	}
	
	.module-gallery__item {
		left: -50%;
		
		width: 50%;
	}
	.module-gallery__item__active { left: 0; }
	.module-gallery__item__active + .module-gallery__item { left: 50%; }
	.module-gallery__item__active + .module-gallery__item + .module-gallery__item { left: 100%; }
	
	.module-gallery__item-image {
		background-color: #000002;
	}
	
	/* All ups become a 1up */
	.generic__2up .generic__part,
	.generic__3up .generic__part,
	.generic__4up .generic__part {
		width: 100%;
	}
	
	.generic__2space .generic__part,
	.generic__3space .generic__part,
	.generic__4space .generic__part {
		width: 100%;
	}
	.generic__2space .generic__part:nth-child(n),
	.generic__3space .generic__part:nth-child(n),
	.generic__4space .generic__part:nth-child(n) {
		margin-left: 0;
	}
	
}

@media all and (max-width: 499px) {
	.shop__products-list-item {
		display: block;
		width: 100%;
	}
	
	.shop-product__info {
		float: none;
		width: 100%;
	}
	
	.shop-product__photos {
	    float: none;
	    width: 100%;
	    margin-bottom: 1em;
	}
}

@media all and (max-width: 479px) {
	.fb3__field__address .fb3__field-part__city {
		width: 100%;
	}
	
	.fb3__field__address .fb3__field-part__state {
		width: 48%;
		margin-left: 0;
	}
	
	.fb3__field__address .fb3__field-part__postal_code {
		width: 48%;
	}
	
	.module-gallery__sentinel {
		width: 100%;
		padding-top: 100%;
	}
	
	.module-gallery__item {
		left: -100%;
		
		width: 100%;
	}
	.module-gallery__item__active { left: 0; }
	.module-gallery__item__active + .module-gallery__item { left: 100%; }
	
	.module-gallery__item-image {
		background-color: #000001;
	}
}

@media all and (max-width: 399px) {
	.shop-cart__td {
		margin-left: 0;
	}
	
	.shop-cart__td__thumb {
		float: none;
		margin-left: 0;
		width: 100%;
	}
}

@media all and (max-width: 320px) {
	.fb3__field__address .fb3__field-part__state {
		width: 100%;
	}
	
	.fb3__field__address .fb3__field-part__postal_code {
		width: 100%;
		margin-left: 0;
	}
	
	.fb3__field__phone .fb3__field-part__area,
	.fb3__field__phone .fb3__field-part__exchange,
	.fb3__field__phone .fb3__field-part__subscriber {
		width: 100%;
		margin-left: 0;
	}
}
