/* page layout */
img {
    max-width: 100%;
    border: 0;
}

.product-wrapper {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
}

.product-title h1 {
    display: inline-block;
    margin-top: 0;
}

.product-title img {
    position: relative;
    top: 7px;
    left: 10px;
}

.product-image {
    flex-basis: 50%;
    margin-right: 5%;
}

.product-image img {
    display: block;
    margin: 0 auto;
}

.product-offer {
    flex-basis: 20%;
    margin-right: 5%;
}

.related-products {
    flex-basis: 20%;
}

.product-tabs {
    flex-basis: 100%;
}

@media screen and (max-width: 1200px) {
    .product-offer {
        flex-basis: 45%;
        margin-right: 0;
    }

    .related-products {
        flex-basis: 50%;
    }
}

@media screen and (max-width: 1200px) {
    div.product-wrapper .related-products {
        order: 10;
    }
}

@media screen and (max-width: 465px) {
    div.product-wrapper div {
        flex-basis: 100%;
    }

    .product-image {
        margin-right: 0;
    }

    .product-offer {
        margin-right: 0;
    }

    .product-offer div {
        width: 100%;
    }

    div.product-offer .tablesmall.permalink {
        width: 100%;
    }
}

/* breadcrumbs */
.product-breadcrumbs {
    width: 80%;
}

.product-breadcrumbs ul {
    list-style: none;
    padding: 0;
    display: inline-block;
}

@media screen and (max-width: 465px) {
    .product-breadcrumbs ul {
        margin: 0.5rem 0;
    }
}

.product-breadcrumbs li {
    display: inline;
    font-weight: bold;
}

.product-breadcrumbs li:after {
    content: " > ";
}

.product-breadcrumbs li:last-child::after {
    content: "";
}

.product-breadcrumbs .brand-link {
    float: right;
    margin-top: 1rem;
    font-weight: bold;
}

@media screen and (max-width: 465px) {
    .product-breadcrumbs {
        width: 100%;
        line-height: 2;
    }

    .product-breadcrumbs .brand-link {
        display: none;
    }
}

/* price box */
.price-box {
    width: 100%;
    background: #d9d9d9;
    text-align: center;
    padding: 1rem 0;
    border: 1px solid black;
    line-height: 1.3;
}

.price-box .discontinued {
    color: red;
}

.price-box .onsale,
.price-box .valuepack.onsale {
    background: #ffff99;
}

.price-box .valuepack {
    background: #e2e2e2;
}

.price-box .head_c {
    margin: 0.5rem 0;
    padding: 0.5rem;
}

.price-box .current-price {
    font-weight: bold;
    font-size: 18px;
}

.price-box input[type="text"] {
    padding: 0.5rem;
    margin: 1rem 0;
    text-align: center;
}

.price-box input[type="button"],
.price-box input[type="submit"] {
    color: #000;
    padding: 0.5rem 1rem;
    background: #ffff99;
    border: 1px solid black;
    font-weight: bold;
}

.price-box .tablesmall {
    padding: 0 0.5rem;
}

@media screen and (max-width: 465px) {
    .price-box #AlertBox {
        position: relative !important;
        width: 95% !important;
        margin: 0 auto;
        top: 0 !important;
        left: 0 !important;
    }
}

.product-offer .product-permalink {
    font-size: 16px;
    line-height: 1.3;
    text-align: center;
    display: block;
    margin: 1rem 0;
}

@media screen and (max-width: 465px) {
    .product-offer .product-permalink {
        margin: 1rem 0 0 0;
    }
}

.group-permalink {
    font-size: 16px;
    line-height: 1.3;
    margin-top: -35px;
}

.product-offer .promo-tip-bug {
    margin: 1rem 0;
    background: #FFFFCC;
    padding: 1rem 0.5rem;
    text-align: center;
    width: 100%;
}

.product-offer .product-paypal {
    width: 100%;
    text-align: center;
    margin-bottom: 1rem;
}

/* related products */
.product-wrapper .related-products {
    text-align: center;
    background: #fff;
    border: 1px solid black;
    padding: 1rem;
    margin-bottom: 1rem;
}

@media screen and (max-width: 1200px) {
    div.related-products {
        flex-basis: 100%;
        display: flex;
        justify-content: space-between;
        overflow-x: scroll;
    }

    div.related-products p {
        align-self: baseline;
    }

    div.related-products p.rp-title {
        align-self: center;
        text-align: center;
    }
}

@media screen and (max-width: 600px) {
    div.related-products {
        flex-wrap: wrap;
    }

    div.related-products p.rp-title {
        flex-basis: 100%;
    }
}

@media screen and (max-width: 465px) {
    div.related-products p {
        flex-basis: 100%;
    }

    div.related-products {
        justify-content: center;
    }
}

/* group list */
.group-info {
    margin: 0 1rem;
    max-width: 400px;
}

@media screen and (max-width: 465px) {
    .group-info {
        margin: 1rem 0;
    }
}

.group-add-to-cart {
    text-align: right;
}

.group-add-to-cart input.btn {
    padding: 0.5rem 1rem;
}

.group-list {
    border-top: 1px solid black;
    margin-bottom: 1rem;
}

.group-item {
    border-bottom: 1px solid black;
    padding: 1rem 0.5rem;
    display: grid;
    grid-template-rows: max-content 30px;
    grid-template-columns: 25% 1fr 20% 25%;
}

.group-item-name {
    grid-row-start: 1;
    grid-row-end: span 1;
    grid-column-start: 1;
    grid-column-end: span 3;
}

.group-item-cta {
    grid-row-start: 1;
    grid-row-end: span 2;
    grid-column-start: 4;
    grid-column-end: span 1;
    text-align: center;
    align-self: end;
}

.group-item-cta input {
    width: 100%;
    padding: 0.3rem;
    margin-top: 5px;
    text-align: center;
}

.group-item-sku {
    grid-row-start: 2;
    grid-row-end: span 1;
    grid-column-start: 1;
    grid-column-end: span 1;
    align-self: end;
}

.group-item-price-box {
    grid-row-start: 2;
    grid-row-end: span 1;
    grid-column-start: 2;
    grid-column-end: span 1;
    font-weight: bold;
    text-align: right;
    align-self: end;
}

/* product tabs */
.product-tabs {
    display: flex;
    margin-bottom: 1rem;
}

.tab-list {
    flex-basis: 15%;
    list-style: none;
    padding: 0;
    margin: 0;
    border-right: 1px solid black;
}

.tab-list li {
    display: block;
    padding: 1rem 2rem;
    margin: 0  -1px -1px 0;
    background: #fff;
    border-top: 1px solid black;
    border-left: 1px solid black;
    border-bottom: 1px solid black;
    border-right: 1px solid black;
    border-collapse: collapse;
}

.tab-list li:last-child {
    margin: 0 -1px 0 0;
}

.tab-list li.current {
    border-right: 1px solid white;
}

.tab-content {
    flex-basis: 85%;
    position: relative;
    background: #fff;
    border-top: 1px solid black;
    border-right: 1px solid black;
    border-bottom: 1px solid black;
}

.tab-panel {
    display: none;
    top: 0;
    right: 0;
    padding: 1rem;
    min-height: 100px;
}

.tab-panel.current {
    display: block;
    height: 100% !important;
}

@media screen and (min-width: 600px) {
    .product-tabs .tab-toggle {
        display: none;
    }
}

@media screen and (max-width: 600px) {
    .product-tabs {
        width: 100%;
    }

    .product-tabs .tab-panel {
        padding: 1rem 0 0 0;
    }

    .product-tabs .tab-panel li {
        line-height: 2;
    }

    .product-tabs .tab-panel.current {
        display: none;
    }

    .product-tabs .tab-wrapper.toggled .tab-panel {
        display: block;
    }

    .product-tabs .tab-content {
        border: none;
        flex-basis: 100%;
    }

    .product-tabs .tab-wrapper {
        border: 1px solid black;
        margin-bottom: 1rem;
        padding: 1rem;
        height: auto !important;
    }

    .product-tabs .tab-toggle {
        display: block;
        text-align: center;
    }

    .product-tabs .tab-list {
        display: none;
    }
}

/* Product tab tables */
.product-tabs .tab-panel table {
    overflow-x: auto;
}

.product-tabs .contents-table,
.product-tabs .specs-table {
    border-spacing: 0;
}

.product-tabs .contents-table caption,
.product-tabs .specs-table caption {
    text-align: left;
    margin-bottom: 0.5rem;
}

.product-tabs .contents-table thead,
.product-tabs .specs-table thead {
    background: #ddd;
}

.product-tabs .contents-table th,
.product-tabs .specs-table th {
    padding: 0.5rem;
}

.product-tabs .contents-table tr:nth-child(2n),
.product-tabs .specs-table tr:nth-child(2n+1) {
    background: #eee;
}

.product-tabs .contents-table td,
.product-tabs .specs-table td {
    padding: 0.5rem;
}

.product-tabs .used-on-table {
    border-spacing: 0;
}

.product-tabs .used-on-table th {
    font-weight: 900;
}

.product-tabs .used-on-table td {
    border-top: 1px solid black;
    padding-top: 1rem;
    vertical-align: top;
}

.product-tabs .used-on-table a {
    display: block;
}