/* Path: assets/css/common-style.css */

/* font used for body and site title */
@import url('https://fonts.googleapis.com/css2?family=Major+Mono+Display&family=Open+Sans:ital,wght@0,300..800;1,300..800&family=VT323&display=swap');

/*-- VARIABLES CSS--*/
:root{
    /* COLOR VARIABLES */
    --accent-color: #FF5151;
    --accent-color-hover: #ff3232;
    --light-color: #ffffff;
    --dark-color: #161616;

    /* FONT VARIABLES */
    --title-font: 'Major Mono Display', monospace;
    --special-font: 'VT323', monospace;
    --body-font: 'Open Sans', sans-serif;

    /* FONT SIZE VARIABLES */
    --h1-font-size: 1.5rem;
    --normal-font-size: 0.938rem;
    --smaller-font-size: 0.75rem;
}

/*-- Navigation CSS --*/
nav {
    padding: 1rem 0;
    background-color: var(--dark-color);
    font-family: var(--special-font);
    box-shadow: 3px 3px 5px rgba(0, 0, 0, 0.1);
}

nav ul {
    width: 100%;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    list-style: none;
}

nav li {
    height: 50px;
    display: flex;
    align-items: center;
}

#site-title {
    font-family: var(--title-font);
    font-weight: 800;
    font-style: normal;
}

nav a {
    display: flex;
    height: 100%;
    padding: 0 2rem;
    align-items: center;
    cursor: pointer;
    color: var(--light-color);
    text-decoration: none;
    font-size: 1.2rem; 
}

nav button {
    margin-right: 1em;
    font-size: 1.5rem;
    padding: 0.5rem 1rem;
    border-radius: 1em;
    border: none;
    cursor: pointer;
    font-family: var(--special-font);
    color: var(--light-color);
    background-color: var(--accent-color);
    transition: .3s;
}

nav button:hover {
    background-color: var(--accent-color-hover);
}

.icon-cart {
    position: relative;
    margin-right: 1rem;
    cursor: pointer;
}

.icon-cart span {
    display: flex;
    position: absolute;
    width: 1.2rem;
    height: 1.2rem;
    background-color: var(--accent-color);
    justify-content: center;
    align-items: center;
    color: var(--light-color);
    border-radius: 1rem;
    font-family: var(--body-font);
    font-size: 0.8rem;
    top: 0;
    right: -0.5rem;
    transition: .3s;
}

.icon-cart:hover span {
    background-color: var(--accent-color-hover);
}

.icon-cart a {
    margin: 0;
    padding: 0;
}

nav .align-left {
    margin-right: auto;
}

nav li:nth-child(2) {
    margin-left: 1rem;
}

nav .align-right {
    margin-left: auto;
}

.sidebar {
    position: fixed;
    top: 0;
    right: 0;
    height: 100vh;
    width: 250px;
    z-index: 999;
    background-color: var(--dark-color);
    box-shadow: -10px 0 10px rgba(0, 0, 0, 0.1);
    display: none;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
}

.sidebar li {
    width: 100%;
}

.sidebar a {
    width: 100%;
}

.menu-button {
    display: none;
}
/* End of Navigation CSS */

/* Hero section CSS */
.hero {
    position: relative;
    height: 50vh;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.full-width-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background-color: var(--dark-color);
}

.hero-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--dark-color);
    font-family: var(--special-font);
    font-size: 6rem;
    text-align: center;
}
/* End of Hero section CSS */

/*-- PRODUCT CARD CSS --*/
.listProduct{
    display: grid;
    grid-template-columns: auto auto auto;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    align-items: center;
    gap: 2rem;
}

.listProduct .item{
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1.5rem 2rem;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 3px 3px 5px #d8dde6;
    cursor: pointer;
    transition: box-shadow .5s;
}

.listProduct .item-img{
    width: 180px;
    height: auto;
    padding: 3rem 0;
    transition: .5s;
}

.listProduct .item-name{
    position: absolute;
    left: -25%;
    top: 0;
    width: 3.5rem;
    padding: 1rem;
    height: 100%;
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    text-align: center;
    background-color: var(--dark-color);
    color: var(--light-color);
    font-size: 1.5rem;
    font-family: var(--special-font);
    transition: .5s;
}

.listProduct .item-icon-btn{
    background-color: transparent; 
    border: none;
    cursor: pointer;
}

.listProduct .item-icon{
    font-size: 1.7rem;
    color: var(--dark-color);
}

.listProduct .item-icon:hover{
    color: var(--accent-color);
}

.listProduct .item-details-container{
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    transition: .5s;
}

.listProduct .item-price{
    display: block;
    text-align: center;
}

.listProduct .item-price--before{
    font-size: var(--smaller-font-size);
    color: var(--accent-color);
    margin-bottom: .25rem;
}

.listProduct .item-price--now{
    font-size: var(--h3-font-size);
    font-weight: bold;
}

/* Move left */
.listProduct .item:hover{
    box-shadow: 10px 10px 10px #D1D9E6;
}
.listProduct .item:hover .item-name{
    left: 0;
}
.listProduct .item:hover .item-img{
    transform: rotate(30deg);
    margin-left: 3.5rem;
}
.listProduct .item:hover .item-details-container{
    margin-left: 3.5rem;
    padding: 0 1.5rem;
}   

footer {
    position:absolute;
    width:100%;
    bottom:-80px;
    text-align: center;
    background-color: var(--dark-color);
    color: var(--light-color);
    padding: 1rem 0;
    font-family: var(--body-font);
    font-size: 1rem;
    color: var(--light-color);
}

footer span {
    font-family: var(--title-font);
}

/*-- MEDIA QUERIES --*/
@media screen and (max-width: 900px) {
    .hero {
        height: 30vh;
    }

}

@media screen and (max-width: 768px){ 
    .hideOnMobile {
        display: none;
    }

    .menu-button {
        display: block; 
    }

    .menu-button button {
        background-color: var(--accent-color);
        color: var(--light-color);
        font-size: 1.2rem;
        padding: 0.5em 1em;
        border-radius: 1em;
        border: none;
        cursor: pointer;
    }

    .sidebar li:nth-child(2){
        margin-left: 0;
    }

    .menu-button button:hover {
        background-color: var(--accent-color-hover);
    }

    .sidebar a {
        padding: 1rem 2rem;
        font-size: 1.2rem;
        color: var(--light-color);
        text-decoration: none;
    }

    .sidebar .icon-cart {
        margin-right: 0;
    }

    .sidebar .icon-cart span {
        right: 0;
    }


    /* Product Card */
    :root{
        --h1-font-size: 2rem;
        --normal-font-size: 1rem;
        --smaller-font-size: 0.813rem;
    }
    .listProduct .item:hover .item-img{
        transform:none;
    }

    .listProduct{
        grid-template-columns: auto auto;
    }

    .listProduct .item-name{
        left: 0;
    }

    .listProduct .item-img{
        margin-left: 3.5rem;
    }

    .listProduct .item-details-container{
        margin-left: 3.5rem;
        padding: 0 1.5rem;
    }
}

@media screen and (max-width: 600px){
    .listProduct .item{
        padding: 1.5rem 0;
        box-shadow: 3px 3px 5px #d8dde6;
        transition: box-shadow .5s;
    }
    
    .listProduct .item-img{
        margin-left: 0;
        width: auto;
        padding: 0;
    }

    .listProduct .item:hover .item-img{
        margin-left: 0;
    }

    .listProduct .item-name{
        position: relative;
        width: 100%;
        padding: 0;
        line-height: 3rem;
        writing-mode: horizontal-tb;
        transform: rotate(0deg);
    }

    .listProduct .item-details-container{
        margin-top: 1rem;
        margin-left: 0;
        padding: 0 2rem;
    }

    .listProduct .item:hover .item-details-container{
        margin-left: 0;
        padding: 0 2rem;
    }
    
}


@media screen and (max-width: 500px){
    .hero-text {
        font-size: 4rem;
    }

    /* Product Card */
    .listProduct .item-name {
        font-size: 1rem;
    }

    .listProduct .item-details-container{
        padding: 0 .8rem;
    }

    .listProduct .item:hover .item-details-container{
        margin-left: 0;
        padding: 0 0.8rem;
    }
}

@media screen and (max-width: 400px){
    .listProduct .item-name {
        font-size: 1.5rem;
    }

    .listProduct{
        grid-template-columns: auto;
    }

    .listProduct .item-details-container{
        padding: 0 2rem;
    }

    .listProduct .item:hover .item-details-container{
        padding: 0 2rem;
    }
}