/************ responsive ****************/

@media screen and (max-width: 979px) {
    html {
        -webkit-text-size-adjust: none;
    }
    #djcatalog input.button, 
    #djcatalog button, 
	#djcatalog .btn {
        -webkit-appearance: none;
    }
    #djcatalog table {
        position: relative;
        width: auto;
        overflow-x: scroll;
        display: block;
    }
    #djcatalog .djc_attributes table {
        position: static;
        width: 100%;
        overflow-x: none;
        display: table;
    }
	#djcatalog img {
		max-width: 100%;
		box-sizing: border-box;
		-moz-box-sizing: border-box;
		-webkit-box-sizing: border-box;
	}
	#djcatalog #fbcomments,
	#djcatalog .fb-comments,
	#djcatalog .fb-comments iframe,
	#djcatalog .fb-comments span {
		width: 100% !important;
	}
}

@media screen and (max-width: 767px) {
   	#djcatalog .djc_subcategories_grid .djc_subcategory,
   	#djcatalog .djc_items .djc_item, 
   	#djcatalog .djc_related_items .djc_item {
   		float: none;
   		width: 100% !important;
   	}
   	#djcatalog .djc_subcategory_bg,
	#djcatalog .djc_item_bg {
		height: auto !important;
		margin: 0 0 10px !important;
	}
	#djcatalog .djc_filter_list li, 
	#djcatalog .djc_filter_search li,
	#djcatalog .djc_filter_map_search li,
	#djcatalog .djc_filter_map_search li, 
	#djcatalog .djc_order_buttons li {
		float: none;
		margin-top: 5px;
		margin-bottom: 5px;
	}
	#djcatalog .djc_atoz_list li:nth-child(14) {
    	clear: both;
	}
	#djcatalog .djc_atoz_list li {
    	width: 7.2%;
    	margin: 0.2%;
	}
	#djcatalog .djc_images {
		width: 100%;
		margin-left: 0;
	}
	#djcatalog .djc_mainimage {
		text-align: left;
	}
	.mod_djc_item,
	.mod_djc2filters .mod_djc2filters_attribute,
	.mod_djc2fw .mod_djc2fw_attribute {
		float: none !important;
		width: 100% !important;
		height: auto !important;
	}
}

@media screen and (max-width: 480px) {
	#djcatalog .djc_attributes table {
		width: 100%;
	}
	#djcatalog .djc_attributes table tr:nth-of-type(2n) {
		background-color: inherit;
	}
	#djcatalog .djc_attributes table tbody td {
		display: block;
		text-align: center;
		width: 100%;
		box-sizing: border-box;
		box-shadow: none;
		-webkit-box-shadow: none;
	}
	
	#djcatalog .djc_attributes table tr.djc_attribute td.djc_label {
		background: url(/components/com_djcatalog2/themes/ciahoo/images/bg1.png) repeat !important;
	}
	#djcatalog .djc_attributes table tr.djc_attribute td.djc_value {
		background: url(/components/com_djcatalog2/themes/ciahoo/images/bg2.png) repeat !important;
	}
}

/** Cart styling **/

@media screen and (max-width: 979px)  {

	/* Force table to not be like tables anymore */
	#djcatalog .djc_cart table
	{ 
		display: flex;
		flex-direction: column; 
	}
	
	#djcatalog .djc_cart table thead, 
	#djcatalog .djc_cart table tfoot, 
	#djcatalog .djc_cart table tbody
	#djcatalog .djc_cart table th, 
	#djcatalog .djc_cart table td, 
	#djcatalog .djc_cart table tr { 
		display: block;
	}
	
	/* Hide table headers (but not display: none;, for accessibility) */
	#djcatalog .djc_cart table thead tr { 
		position: absolute;
		top: -9999px;
		left: -9999px;
	}
	
	#djcatalog .djc_cart table tr { border: 1px solid #ccc; }
	
	#djcatalog .djc_cart table td { 
		/* Behave  like a "row" */
		border: none;
		border-bottom: 1px solid #eee; 
		position: relative;
		padding-left: 20%; 
		text-align: right;
		line-height: 2em;
		width: auto;
		padding-right: 8px;
	}
	
	#djcatalog .djc_cart table td .djc_image  {
		float: none;
		margin: 0 5px;
	}
	
	#djcatalog .djc_cart table td:before { 
		/* Now like a table header */
		position: absolute;
		/* Top/left values mimic padding */
		top: 6px;
		left: 6px;
		width: 15%; 
		padding-right: 10px; 
		white-space: nowrap;
		text-align: left;
		line-height: 2em;
	}
	
	#djcatalog .djc_cart table tbody {
		order: 5;
		margin-bottom: 20px;
	}
	
	#djcatalog .djc_cart table tbody tr,
	#djcatalog .djc_cart table tfoot tr {
		margin-bottom: 5px;
	}
	
	#djcatalog .djc_cart table tfoot {
		margin-bottom: 20px;
		order: 10;
	}
}
