body, html
{
	height: 100%;
}

body
{
    margin: 0;
    padding: 0;

    line-height: 1.45;
    font-family: "Open Sans", sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    color: #1f1f1f;
    font-size: 1rem;
}

.header-demo
{
	background: #44a9d7;
	color: #ffffff;
    padding: .2rem 0;
    font-weight: 600;
    text-transform: uppercase;
    text-align: center;
}

.content
{
    max-width: 1400px;
    margin: auto;
}

header
{
    background: #000000;
}

header .content
{
    padding: 10px 20px;
    box-sizing: border-box;
}

footer
{
    background: rgba(0,0,0, .5);
    height: 140px;
}

header img.vendreo-coffee-logo,
footer img.vendreo-coffee-logo
{
    display: block;
    max-width: 80%;
    max-height: 50px;
    margin: 0;
}

footer .content
{
    display: grid;
	align-items: center;
	height: 100%;
}

footer img.vendreo-coffee-logo
{
	margin: 0 auto;
    opacity: .5;
}

.product-info,
.product-actions,
.product-description
{
    padding: 20px;
}

/****************************************************************************************************
	PRODUCT INFO
****************************************************************************************************/

.product-info
{
    display: grid;
    grid-template-columns: auto min-content;
    grid-template-rows: minmax(4rem, auto) auto;
    align-items: center;
}

.product-name
{
    margin: 0;
    padding: 0;
    font-size: 1.4rem;
    font-weight: 600;
}

.product-price
{
    width: fit-content;
    font-weight: 600;
}

.product-info .product-detail-wrap
{
    grid-column: 1 / 3;
    display: grid;
    grid-template-columns: repeat(2, auto);
    grid-template-columns: min-content auto;
    align-items: center;
    column-gap: 1rem;

    height: 2rem;
}

.product-rating-summary
{
    display: grid;
    grid-template-columns: repeat(5, fit-content(24px)) auto;
    align-items: center;

}

.product-rating-summary .material-icons
{
    color: #D60057;
}

.product-rating-summary .material-icons:nth-child(5)
{
    color: rgba(0,0,0, .25);
}

.product-rating-summary .product-rating
{
    display: block;
    margin-left: 1rem;
}

button[name="favourite"]
{
    width: var(--size);
    height: var(--size);
    padding: 0;
    background: none;
    border: 0;
    border-radius: calc(var(--size) / 2);
    box-shadow: 0 -1px 11px -3px rgba(0,0,0, .5);
    text-align: center;

    --size: 48px;
    --size: 36px;
}

button[name="favourite"] .material-icons
{
    display: block;
    margin: 0 auto;
    width: 24px;
    line-height: var(--size);
    color: #333333;
}

/****************************************************************************************************
	PRODUCT CAROUSEL
****************************************************************************************************/

.product-carousel
{
    display: grid;
    grid-template-columns: repeat(3, auto);
    grid-template-rows: repeat(2, min-content);
    column-gap: 10px;
    row-gap: 10px;

    max-width: 500px;
    margin: 0 auto;
    padding-top: 20px;
}

.product-carousel img
{
    /*
    width: 100vw;
    scroll-snap-align: start;
    */
}

.product-carousel img
{
    width: calc((100% - 20px) / 3);
    /*
    scroll-snap-align: start;
    */
    width: 100%;
    grid-row: 2 / 3;
}

.product-carousel img:nth-child(1)
{
    grid-column: 1 / 4;
    grid-row: 1 / 2;
}

.product-carousel img:nth-child(2)
{
    grid-column: 1 / 2;
}

.product-carousel img:nth-child(3)
{
    grid-column: 2 / 3;
}

.product-carousel img:nth-child(4)
{
    grid-column: 3 / 4;
}

/****************************************************************************************************
	PRODUCT ATIONS
****************************************************************************************************/

.product-actions-wrap
{
    display: grid;
    width: fit-content;
    grid-template-columns: repeat(2, auto);
    column-gap: 1rem;
}

button[name="purchase"]
{
    width: fit-content;
    height: var(--height);
    padding: 0;
    border: 0;
    border-radius: var(--borderRadius);
    box-shadow: 0 -1px 11px -3px rgba(0,0,0, .5);
    color: #ffffff;
    cursor: pointer;

    --height: 50px;
    --borderRadius: calc(var(--height) / 4);
    --highlightColour: #000000;
	--highlightHoverColour: #62b11a;
}

button[name="purchase"] > *
{
    pointer-events: none;
}

button[name="purchase"][data-type="periodic"]
{
    --highlightColour: #3e961c;
    --highlightHoverColour: #62b11a;
}



button[name="purchase"] .btn-grid
{
    display: grid;
    grid-template-columns: auto auto 10px min-content;

    width: 100%;
    height: 100%;
}

button[name="purchase"] .btn-grid .btn-grid-detail
{
    display: grid;
    align-items: center;
    width: fit-content;
    height: 100%;
    border-top-left-radius: var(--borderRadius);
    border-bottom-left-radius: var(--borderRadius);
    padding: 0 calc(var(--height) / 3);
    background: var(--highlightColour);
    text-align: left;

    letter-spacing: .05rem;
    line-height: normal;
    line-height: 12px;
}

button[name="purchase"] .btn-grid .btn-grid-detail-title
{
    display: block;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
}

button[name="purchase"] .btn-grid-detail-caption
{
    font-size: 10px;
}


button[name="purchase"] .btn-grid .btn-grid-animation-container
{
    width: 0;
    background: var(--highlightHoverColour);
}

button[name="purchase"] .btn-grid .btn-grid-arrow-container
{
    display: grid;
    align-items: center;
    background: #ffffff;
    /*
    width: fit-content;
    height: 100%;
    padding: 0 14px 0 10px;
    border-top-right-radius: calc(var(--height) / 2);
    border-bottom-right-radius: calc(var(--height) / 2);
    background: #ffffff;
    color: #000000;
    font-size: 14px;
    font-weight: 600;
    */

}

button[name="purchase"] .btn-grid .arrow-right
{
    width: 0;
    height: 0;
    border-top: 8px solid transparent;
    border-bottom: 8px solid transparent;
    border-left: 8px solid var(--highlightColour);
}

button[name="purchase"] .btn-grid .btn-grid-price-container
{
    display: grid;
    align-items: center;
    width: fit-content;
    height: 100%;
    padding: 0 14px 0 5px;
    border-top-right-radius: var(--borderRadius);
    border-bottom-right-radius: var(--borderRadius);
    background: #ffffff;
    color: #000000;
    font-size: 14px;
    font-weight: 600;

}

button[name="purchase"]:hover .btn-grid .btn-grid-animation-container
{
    width: 5px;
    transition: all 0.3s;
}

button[name="purchase"]:hover .btn-grid .btn-grid-price-container
{
    padding-left: 0;
    transition: all 0.3s;
}

button[name="purchase"]:hover .btn-grid .btn-grid-detail
{
    background: var(--highlightHoverColour);
}

button[name="purchase"]:hover .btn-grid .arrow-right
{
    border-left-color: var(--highlightHoverColour);
}


















/****************************************************************************************************
	PRODUCT PAYMENT CONFIRMED
****************************************************************************************************/

.payment-confirmed,
.payment-failed
{
    width: fit-content;
	max-width: 80vw;
    margin: auto;
    text-align: center;
}

.payment-confirmed .material-icons,
.payment-failed .material-icons
{
    color: #3e961c;
    font-size: 96px;
}

.payment-failed .material-icons
{
    color: #cc0000;
    font-size: 96px;
}

/****************************************************************************************************
	DESKTOP FULL WINDOW LAYOUT
****************************************************************************************************/

body
{
    display: grid;
    grid-template-rows: repeat(2, min-content) 1fr min-content;
}

body main
{
    align-self: center;
}

.product-desktop-grid
{
    display: grid;
    grid-template-columns: repeat(2, 50%);
    grid-template-rows: repeat(3, min-content);
}

.product-desktop-grid .product-carousel
{
    grid-column: 1 / 2;
    grid-row: 1 / 4;
}

.product-desktop-grid .product-info,
.product-desktop-grid .product-actions,
.product-desktop-grid .product-description
{
    grid-column: 2 / 3;
}

.product-desktop-grid .product-info
{
    grid-row: 1 / 2;
}

.product-desktop-grid .product-actions
{
    grid-row: 2 / 3;
}

.product-desktop-grid .product-description
{
    grid-row: 3 / 4;
}

/****************************************************************************************************
	MOBILE LAYOUT
****************************************************************************************************/

@media (max-width: 768px)
{

	header img.vendreo-coffee-logo
	{
	    margin: 0 auto;
	}

	.product-desktop-grid
	{
	    display: inline;
	}

	.product-carousel
	{

		grid-template-columns: repeat(4, auto);
        grid-template-rows: unset;
	    column-gap: 0;

        width: 100vw;

	    overflow: hidden;
	    overflow-x: scroll;
	    scroll-snap-type: x mandatory;

	    max-width: unset;
	    padding-top: 0;

	}

	.product-carousel img
	{
		width: 100vw;
	    scroll-snap-align: start;
		grid-column: unset !important;
		grid-row: unset !important;
	}

	.product-actions
	{
		background: #D60057;
		color: #ffffff;

	    position: fixed;
		bottom: 0;
		width: 100%;
		padding: 1rem;
		box-shadow: 0 -1px 11px -3px rgba(0,0,0, .8);
		box-sizing: border-box;
		left: 0;
		border-top: 1px solid #d0d0d0;
		z-index: 10;
	    text-align: right;
	}


	.product-actions .product-actions-wrap
	{
	    grid-template-columns: unset;
	    grid-template-rows: repeat(2, auto);
	    column-gap: unset;
	    row-gap: 1rem;

		margin: 0 auto;
	}

	.product-actions .product-actions-wrap button[name="purchase"]
	{
	    margin: 0 auto;
	}

    footer
    {
        background: rgba(0,0,0, .5);
        height: 90px;
    }

    body.page-product footer
    {
        padding-bottom: 100px;
    }

}
