/*
 * HTML5 Boilerplate
 *
 * What follows is the result of much research on cross-browser styling.
 * Credit left inline and big thanks to Nicolas Gallagher, Jonathan Neal,
 * Kroc Camen, and the H5BP dev community and team.
 */

/* ==========================================================================
   Base styles: opinionated defaults
   ========================================================================== */

@media all {

    html,
    button,
    input,
    select,
    textarea {
        color: #222;
    }

    body {
        font-size: 1em;
        line-height: 1.4;
    }

    /*
     * Remove text-shadow in selection highlight: h5bp.com/i
     * These selection rule sets have to be separate.
     * Customize the background color to match your design.
     */

    ::-moz-selection {
        background: #b3d4fc;
        text-shadow: none;
    }

    ::selection {
        background: #b3d4fc;
        text-shadow: none;
    }

    /*
     * A better looking default horizontal rule
     */

    hr {
        display: block;
        height: 1px;
        border: 0;
        border-top: 1px solid #ccc;
        margin: 1em 0;
        padding: 0;
    }

    /*
     * Remove the gap between images and the bottom of their containers: h5bp.com/i/440
     */

    img {
        vertical-align: middle;
    }

    /*
     * Remove default fieldset styles.
     */

    fieldset {
        border: 0;
        margin: 0;
        padding: 0;
    }

    /*
     * Allow only vertical resizing of textareas.
     */

    textarea {
        resize: vertical;
    }

    /* ==========================================================================
       Chrome Frame prompt
       ========================================================================== */

    .chromeframe {
        margin: 0.2em 0;
        background: #ccc;
        color: #000;
        padding: 0.2em 0;
    }

    /* ==========================================================================
       Author's custom styles
       ========================================================================== */

    * {margin:0;padding:0;} 

    a {color: #999; text-decoration: none;}
    a:hover {color: #333 !important;}
    a:visited {color: #999;}

    html {
        background-image: url(../img/bg.png);
        background-repeat: repeat;
    }

    body {
        font-family: 'Open Sans', sans-serif;
        font-weight: 400;
        font-size: 14px;
    }

    #wrapper {
        width:100%;
        min-height: 80%;
    }

    #header {
        width:1000px;
        margin:40px auto 0px auto;
    }

    #logo, #navigation {
        display:inline-block;
    }

    #navigation {
        float:right;
        font-weight: 700;
        font-size: 1.3em;
        color: #818181;
        margin-top: 20px;
    }

    #navigation ul {margin:0; list-style: none;}
    #navigation ul>li {display:inline-block;padding: 0 0 0 20px;}

    #main {
        overflow:auto;
        padding-bottom: 20px;
        width:1000px;
        margin: 0 auto;
    }

    #main #welcome {
        float:left;    
        width:289px;
        height:350px;
        background-color:#FFF;
        border: 1px solid #DDD;
        border-bottom: 3px solid #DDD;
        box-shadow: 0px 3px 0px #CCC;
        margin-top: 30px;
        padding:25px;
        text-align: center;
        position: relative;
        margin-right:10px;
    }

    #main #welcome h1 {
        color:#565656;
    }

    #main #welcome p {
        line-height:32px;
        color:#565656;
        padding: 0 20px;
    }

    #main #welcome .welcome_corniceleft {
        position:absolute;
        left:0;
        top:0;
    }

    #main #welcome .welcome_corniceright {
        position:absolute;
        right:0;
        top:0;
    }

    #main #products {
        float:left;    
        width:596px;
        height:350px;
        background-color:#FFF;
        border: 1px solid #DDD;
        border-bottom: 3px solid #DDD;
        box-shadow: 0px 3px 0px #CCC;
        margin-top: 30px;
        padding:25px;
        text-align: center;
        position: relative;
    }

    #main #products {
        text-align: left;
    }

    #main #products_list {
        margin-top: 40px;
        border-bottom: 1px solid #DDD;
    }

    #main #products .product {
        display:inline-block;
        *display:inline;
        zoom: 1;
        padding :10px;
        margin-bottom: 30px;
    }

    #main #products .product:hover {
        background-color:#DDD;
        border-bottom:3px solid #CCC;
        border-radius:3px;
        margin-bottom: 27px;
    }

    #main #products p {
        text-align: center;
    }

    #main #products p.fine {
        margin-top: 25px;
        color: #999;
    }

    #main #about, #gallery {
        width:943px;
        min-height:450px;
        background-color:#FFF;
        border: 1px solid #DDD;
        border-bottom: 3px solid #DDD;
        box-shadow: 0px 3px 0px #CCC;
        padding:25px;
        text-align: center;
        position: relative;
        margin: 30px auto 0 auto;
        text-align: left;
    }

    #main #about h1 {
        color: #999;
        font-size:22px;
    }

    #main #about p {
        color: #666;
        line-height:34px;
    }

    #main #about .left {
        float: left;
        width: 60%;
    }

    #main #about .right {
        float: right;
        width: 35%;
    }

    #whoarewe_video {
        margin-top: 10px;
        display: block;
        float: left;
        background-color: #FFF;
        border: 1px solid #DDD;
    }

    #showroom_video {
        margin-top: 10px;
        margin-left:10px;
        display: block;
        float: left;
        background-color: #FFF;
        border: 1px solid #DDD;
    }

    #contact_block {
        margin-top: 10px;
        margin-left:10px;
        display: block;
        float: left;
        background-color: #FFF;
        border: 1px solid #DDD;
        width: 295px;
        height: 176px; 
    }

    #contact_block h3 {
        color:#666666;
        font-size:18px;
        padding: 20px 10px 0 20px;
        margin:0;
    }

    #contact_block p {
        color:#999999;
        font-size:16px;
        padding: 0px 20px 0 20px;
    }

    #footer {
        position: relative;
        margin-top: -20px; /* negative value of footer height */
        height: 20px;
        width:973px;
        margin: 0 auto;
        display: block;
        background-color: #FFF;
        border: 1px solid #DDD;
        padding:10px;
        color:#999;
        font-size:13px;
    }

    #footer .footerlink {}
    #footer .footerlink p {display:block;margin:0;}
    #footer .footerlink span {float:right;}
    #footer .footerlink a {text-decoration: none;color:#6699cc;font-weight:600;}

    /* ============ PRODUCTS PAGE ============= */

    #main #products_page {
        float:left;    
        width:596px;
        min-height:529px;
        background-color:#FFF;
        border: 1px solid #DDD;
        border-bottom: 3px solid #DDD;
        box-shadow: 0px 3px 0px #CCC;
        margin-top: 30px;
        padding:25px;
        text-align: center;
        position: relative;
    }

    #main #products_page {
        text-align: left;
    }

    #main #products_page_list {
        margin-top: 10px;
    }

    #main #products_page .product {
        display:inline-block;
        *display:inline;
        zoom: 1;
        padding :10px;
        margin-bottom: 30px;
    }

    #main #products_page .product:hover {
        background-color:#DDD;
        border-bottom:3px solid #CCC;
        border-radius:3px;
        margin-bottom: 27px;
    }

    #main #products_page p {
        text-align: left;
        color: #999;
        border-bottom: 1px solid #DDD;
        padding-bottom: 10px;
    }

    #main #products_page p.fine {
        margin-top: 25px;
        color: #999;
    }

    #main #products_page h2 {
        color: #999999;
        margin: 0;
    }

    .product_page h1 {
        padding: 25px;
        text-align: left;
        margin: 0;
        border-bottom: 1px solid #d9d7d9;
    }

    #main #welcome.product_page {
        padding: 0;
        width: 338px;
        height: auto;
    }

    #main #welcome .product {
        padding: 10px;
        text-align: left;
    }

    #main #welcome .product img {
        width: 60px;
        float: right;
        border: 1px solid #FFF;
    }

    #main #welcome .product p {
        float: left;
    }

    #main #welcome .product:hover {
        background-color:#eeeeee;
    }

    #main #welcome .product:hover img {
        border: 1px solid #CCC;
    }

    /* ============ FIRE SUCCOUNDS PAGE ============= */

    .product.selected {
        background-color: #EEE;
        border-bottom: 1px solid #d9d7d9;
    }

    .product.selected img {
        border: 1px solid #CCC !important; 
    }

    .product_info_wrap {
        float:left;
        padding-left: 20px;
    }

    .product_info_wrap p {
        border: 0 !important;
    }

    .productMain {
        margin-bottom: 10px;
        border-bottom: 1px solid #DDD;
    }

    .productMain .prod_img {
        width: 120px;
        float: left;
        display: inline-block;
    }

    /* ============ GALLERY ============= */

    #gallery .thumb {
        display: inline-block;
        padding: 5px;
    }


    /* ==========================================================================
       Helper classes
       ========================================================================== */

    /*
     * Image replacement
     */

    .ir {
        background-color: transparent;
        border: 0;
        overflow: hidden;
        /* IE 6/7 fallback */
        *text-indent: -9999px;
    }

    .ir:before {
        content: "";
        display: block;
        width: 0;
        height: 150%;
    }

    /*
     * Hide from both screenreaders and browsers: h5bp.com/u
     */

    .hidden {
        display: none !important;
        visibility: hidden;
    }

    /*
     * Hide only visually, but have it available for screenreaders: h5bp.com/v
     */

    .visuallyhidden {
        border: 0;
        clip: rect(0 0 0 0);
        height: 1px;
        margin: -1px;
        overflow: hidden;
        padding: 0;
        position: absolute;
        width: 1px;
    }

    /*
     * Extends the .visuallyhidden class to allow the element to be focusable
     * when navigated to via the keyboard: h5bp.com/p
     */

    .visuallyhidden.focusable:active,
    .visuallyhidden.focusable:focus {
        clip: auto;
        height: auto;
        margin: 0;
        overflow: visible;
        position: static;
        width: auto;
    }

    /*
     * Hide visually and from screenreaders, but maintain layout
     */

    .invisible {
        visibility: hidden;
    }

    /*
     * Clearfix: contain floats
     *
     * For modern browsers
     * 1. The space content is one way to avoid an Opera bug when the
     *    `contenteditable` attribute is included anywhere else in the document.
     *    Otherwise it causes space to appear at the top and bottom of elements
     *    that receive the `clearfix` class.
     * 2. The use of `table` rather than `block` is only necessary if using
     *    `:before` to contain the top-margins of child elements.
     */

    .clearfix:before,
    .clearfix:after {
        content: " "; /* 1 */
        display: table; /* 2 */
    }

    .clearfix:after {
        clear: both;
    }

    /*
     * For IE 6/7 only
     * Include this rule to trigger hasLayout and contain floats.
     */

    .clearfix {
        *zoom: 1;
    }

    ]

}

    /* ==========================================================================
       EXAMPLE Media Queries for Responsive Design.
       These examples override the primary ('mobile first') styles.
       Modify as content requires.
       ========================================================================== */

@media (max-width:400px) {

    #main, #main #welcome, #main #products, #whoarewe_video img, #showroom_video img {
        width: 100%;
        overflow: hidden;
        border: 0;
    };

    #showroom_video {
        margin-left: 0;
    }

    #contact_block, #header, #footer, #logo img {
        width: 100%;
        margin: 0;
        padding:0;
        border: 0;
    }

    #main #welcome {
        padding:0;
        padding-bottom: 20px;
    }

    #main #welcome h1 {
        padding: 0 50px !important;
    }

    #main #products {
        height: auto !important;
        padding: 0;
    }

    #main #products h2 {
        text-align: center;
    }

    #products_list a {
        display: inline-block;
        width: 49%;
        text-align: center;
    }

    #products {
        padding: 0;
    }

    #footer .footerlink span {
        display: none;
    }

    #logo {
        width: 90%;
        margin: 0 auto;
        border: 0;
        text-align: center;
        padding-top: 20px;
    }

    #header {
        text-align: center;
    }

    #navigation ul {
        margin: 0;
        list-style: none;
        padding: 0;
    }

    #navigation ul>li {
        padding: 5px;
    }

    #main #about, #gallery {
        width: 100%;
        padding: 0;
    }

    #main #about .left {
        width: 100%;
    }

    #main #about .right {
        display: none;
    }

    #main #about h1, #main #about p {
        padding: 10px;
    }

}
