/* GLOBAL */

:root {
    --blue-standar: rgb(14, 118, 189);
    --dark-blue: rgb(5, 46, 73);
    --grey-standar: #999D9E;
    --red-standar: rgb(217, 83, 79);
    --footer-color: rgb(3, 28, 44);
}

* {
    font-family: "poppins";
    margin: 0px;
    padding: 0px;
    max-width: 100vw;
    box-sizing: border-box;
      
}

html, body {
    display: flex;
    flex-direction: column;
    min-height: 100vh; /* 100% tinggi viewport */
    overflow-x: hidden;
}

a {
    position: relative;
    color: black;
    text-decoration: none;
    color: var(--blue-standar);
    padding: 5px 10px;
    cursor: pointer;
}

#overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.0); /* Warna abu-abu transparan */
    z-index: 9; /* Di bawah detail-fixed-nav */
    transition: 0.3s linear;
    pointer-events: none;
}

a::after {
    content: ""; /* Tidak ada teks dalam pseudo-element */
    position: absolute;
    left: 50%;
    bottom: -5px; /* Posisi kotak sedikit di bawah elemen a */
    transform: translateX(-50%); /* Mengatur posisi horizontal agar terpusat */
    width: 5px; /* Awalnya, kotak tidak terlihat */
    height: 5px; /* Tinggi kotak kecil */
    border-radius: 10px;
    background-color: var(--blue-standar); /* Warna kotak kecil */
    transition: 0.3s ease; /* Efek transisi untuk animasi */
    transform: scale(0);
}

a:hover::after {
    transform: scale(1);
}

button {
    cursor: pointer;
}

h1 {
    color: var(--blue-standar);
}

/* NAV */

.nav-fixed-container {
    position: fixed;
    top: 0;
    right: 0;
    display: flex;
    align-items: center;
    margin: 15px;
    transition: 0.5s cubic-bezier(.74,.38,.32,1.26);
    transform: scale(0);
    z-index: 100;
}

.nav-fixed {
    width: 60px;
    height: 60px;
    background-color: var(--blue-standar);
    border-radius: 50px;
    border: none;
    box-shadow: 0 0 25px rgba(0, 0, 0, 0.5);
}

.nav-animation {
    width: 70%;
    height: 70%;
    color: white;
    display: block;
    z-index: 2;
    margin: auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.nav-animation * {
    transition: 0.3s cubic-bezier(.74,.38,.32,1.26);
}

.nav-animation .line-1 {
    width: 18px;
    height: 2px;
    background-color: white;
}

.nav-animation .line-2 {
    width: 18px;
    margin-top: 3px;
    height: 1px;
    background-color: white;
}

.detail-fixed-nav {
    transform: scale(0);
    opacity: 0;
    top: 60px;
    right: 50px;
    z-index: 10;
    height: 500px;
    width: 300px;
    background-color: var(--dark-blue);
    position: absolute;
    border-radius: 50px;
    border-top-right-radius: 0px;
    transform-origin: top right;
    transition: 0.5s cubic-bezier(.74,.38,.32,1.26);
    box-shadow: 0 0 25px rgba(0, 0, 0, 0.5);
}

.detail-fixed-nav ul {
    width: 90%;
}

.detail-fixed-nav ul li {
    font-size: 25px;
    text-align: right;
    margin-top: 20px;
}

.detail-fixed-nav ul li *{
    color: white;
}

.logo-container {
    position: fixed;
    margin: 15px;
    z-index: 100;
}

.logo {
    width: 80px;
}

nav {
    top: 0;
    left: 0;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    height: 50px;
}

.router-link-container {
    width: 35%;
    display: flex;
    justify-content: space-around;
    align-items: center;
}

@media (max-width: 1200px) {

    .router-link-container {
        width: 50%;
    } 

}

@media (max-width: 790px) {

    .router-link-container {
        display: none;
    } 

    #search-products {
        left: 50%;
    }

}


#search-products {
    position: fixed;
    top: 15px;
    left: 30%;
    transform: translate(-50%, 0%);
    display: flex;
    align-items: center;
    background-color: var(--blue-standar);
    border-radius: 50px;
    width: 210px;
    z-index: 100;
    box-shadow: 0 0 25px rgba(0, 0, 0, 0.5);
    padding: 5px 10px;
    box-sizing: border-box;
}

@media (max-width: 790px) {

    #search-products {
        left: 50%;
    }

}

#search-products i {
    font-size: 12px;
    margin-right: 10px;
    padding: 10px;
    border-radius: 50px;
    color: white;
}

#search-products input {
    border: none;
    background-color: transparent;
    width: 100px;
    color: white;
}

#search-products input:focus {
    border: none;
    background-color: transparent;
    outline: none;
}

#search-products input::placeholder {
    color: white;
    opacity: 0.5;
}

#search-products button {
    background-color: var(--dark-blue);
    border: none;
    color: white;
    padding: 5px 15px;
    border-radius: 25px;
}

#logoutLink {
    color: white;
    border: 1px var(--redStandar) solid;
    border-radius: 5px;
    padding: 5px 15px;
    background-color: var(--red-standar);
}

/* SIGN_UP */

.sign-up-login-container {
    margin: 50px auto;
    background-color: var(--blue-standar);
    width: 50%;
    padding: 15px 50px;
    border-radius: 15px;
    position: relative; /* Relative positioning to handle the ::before pseudo-element */
    box-sizing: border-box;
}

.sign-up-login-container::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    background-color: var(--dark-blue);
    z-index: -1; /* Place behind the container */
    transform: translate(15px, 15px);/* Translate and rotate to skew it to the bottom right corner */
    border-radius: 15px; /* Optional: Make the background look smoother */
}

@media (max-width: 550px) {

    .sign-up-login-container {
        width: 95%;
    }
}

.sign-up-login-container * {
    color: white;
}

.sign-up-login-container input {
    background-color: rgba(255, 255, 255, 0.8);
    border: none;
    padding: 3px 10px;
    color: black;
}

.sign-up-login-container input::placeholder {
    color: black;
}

.sign-up-login-container input:focus {
    border: none;
    outline: none;
}

.sign-up-login-container button {
    background-color: var(--dark-blue);
    padding: 5px 15px;
    border-radius: 5px;
    border: none;
}

.alert {
    margin: 10px;
    padding: 15px 30px;
    border-radius: 10px;
    color: white;
    text-align: center;
}

.alert-success {
    background-color: var(--blue-standar);
}

.alert-error {
    background-color: var(--red-standar);
}

/* MAIN */

main {
    width: 100%;
}

/* HOME */

.banner-container {
    position: relative; /* Agar gradient bisa ditempatkan di atas gambar */
    width: 100%; /* Sesuaikan dengan kebutuhan */
    height: 300px; /* Sesuaikan dengan kebutuhan */
    margin-top: 25px;
    z-index: -1;
}

.banner-container img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Menjaga gambar agar menutupi area */
}

.gradient-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 200px;
    background: linear-gradient(to bottom, white, transparent);
}

header {
    position: relative;
}

.title-container {
    width: 100%;
    height: 50px;
}

.title-container h1 {
    text-align: center;
    margin: 10px auto;
    width: 750px;
    padding: 5px 10px;
    border-radius: 10px;
    color: white;
    background-color: var(--blue-standar);
    position: absolute;
    left: 50%;
    transform: translate(-50%, 0%);
    transition: 0.5s;
}

.title-container h1:first-child {
    z-index: 2;
}

.title-container h1:nth-child(2) {
    background-color: var(--dark-blue);
    transform: translate(-48%, 25%);
    z-index: 1;
}

main {
    width: 100%;
    height: 300px;
    background-color: white;
    z-index: 3;
    border-radius: 20px;
    margin-top: -20px;
    box-shadow: 0px -25px 25px rgba(0, 0, 0, 0.25);
}

.featured-products-container {
    padding-top: 15px;
}

.featured-products-container h2 {
    width: 300px;
    text-align: center;
    padding: 5px 10px;
    border-radius: 10px;
    background-color: var(--blue-standar);
    color: white;
    margin: 0px auto;
    box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.5);
}

.category-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 20px;
    padding: 10px 20px;
}

.category-title {
    text-align: center;
    padding: 5px 10px;
    background-color: var(--red-standar);
    color: white;
    width: 150px;
    margin: 10px auto;
    border-radius: 10px;
    border-radius: 15px;
}

.category {
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    background-color: var(--blue-standar);
    height: 250px;
    border-radius: 25px;
}

.category h4 {
    text-align: center;
}

/* OTHER PRODUCT */

.main-other-product-container {
    width: 95%;
    margin: 10px auto;
    padding: 15px;
    border-radius: 25px;
    background-color: var(--dark-blue);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.other-product-container-1-2 {
    display: flex;
    width: 40%;
    align-items: flex-start;
    justify-content: center;
    mask: linear-gradient(to bottom, transparent 0%, black 25%, black 75%, transparent 100%);
}

.other-product-container-1 .product img , .other-product-container-2 .product img {
    width: 200px;
    height: 300px;
    
}

.other-product-container-1 .product , .other-product-container-2 .product {
    margin-bottom: 0px;
    height: 310px;
}

.other-product-container-1, .other-product-container-2 {
    position: relative;
    height: 300px;
    display: flex;
    flex-direction: column;
    margin-right: 10px;
}

.other-product-container-1 {
    animation: other-product-container-1 linear; 
    animation-timeline: view();
}

.other-product-container-2 {
    transform: translateY(-300px);
    animation: other-product-container-2 linear;
    animation-timeline: view();
}

@keyframes other-product-container-1 {
    from {
        transform: translateY(0px);
    }
    to {
        transform: translateY(-300px);
    }
}

@keyframes other-product-container-2 {
    from {
        transform: translateY(-300px);
    }
    to {
        transform: translateY(0px);
    }
}

.other-product-title-container {
    text-align: center;
    padding: 5px 10px;
    color: white;
    width: 40%;
    margin: 10px auto;
    border-radius: 10px;
    border-radius: 15px;
}

.other-product-title-container h3 {
    margin-bottom: 20px;
}

.other-product-title-container p {
    text-align: left;
}

.other-product-title-container p b {
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

@media (max-width: 700px) {

    .main-other-product-container {
        flex-direction: column;
    }    

    .other-product-title-container {
        width: 90%;
        margin: 0px;
    }

    .other-product-container-1-2 {
        width: 90%;
        margin-top: 15px;
    }    

}


/* MEDIA QUERY */

@media (max-width: 820px) {

    .title-container h1 {
        font-size: 18px;
        width: 500px;
    }    

    .featured-products-container h2 {
        font-size: 18px;
        width: 250px;
    }
}

@media (max-width: 560px) {

    .title-container h1 {
        font-size: 12px;
        width: 350px;
    }    

    .featured-products-container h2 {
        font-size: 13px;
        width: 200px;
    }

}

/* PRODUCTS */

.product-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    padding: 10px 20px;
}

.product-container .title h3 {
    font-size: 12px;
}

.product-container .desc small {
    font-size: 10px;
}

.product {
    position: relative; /* Supaya posisi anak-anaknya bisa absolute */
    border-radius: 15px;
    padding: 0px;
    margin-bottom: 45px;
}

.product .img-container {
    width: 100%;
    height: 400px;
    overflow: hidden;
}

.product .product-category {
    position: absolute;
    padding: 2.5px 5px 2.5px 10px;
    background-color: var(--blue-standar);
    color: white;
    border-bottom-left-radius: 25px;
    border-top-right-radius: 15px;
    right: 0;
}

.product img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    border-radius: 15px;
}

.product .title, .product .desc {
    height: 100px;
    transition: 0.5s;
}

.product .title {
    width: 80%; /* Lebarnya 80% dari gambar */
    background-color: white;
    position: absolute;
    bottom: 25px; /* Berada di bawah gambar */
    left: 50%; /* Mulai dari tengah */
    transform: translate(-50%, 50%); /* Agar betul-betul berada di tengah */
    border-radius: 10px;
    padding: 5px;
    text-align: center; /* Untuk merapikan teks di tengah */
    z-index: 3;
    border: 2px var(--blue-standar) solid;
    overflow: hidden;
}

.product .desc {
    width: 80%; /* Lebarnya 80% dari gambar */
    background-color: white;
    position: absolute;
    bottom: 25px; /* Berada di bawah gambar */
    left: 50%; /* Mulai dari tengah */
    transform: translate(-45%, 60%); /* Agar betul-betul berada di tengah */
    border-radius: 10px;
    padding: 5px;
    background-color: var(--blue-standar);
    color: white;
    z-index: 2;
    overflow: hidden;
}

.main-other-product-container-2 {
    width: 98%;
    margin: 10px auto;
    padding: 5%;
    border-radius: 25px;
    background-color: var(--dark-blue);
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 20px;
    box-sizing: border-box;
}

/* ALL PRODUCT */

.all-products-container {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 20px;
    padding: 10px 20px;
}

/* PRODUCT DETAIL */

.product-detail-container {
    display: flex;
    width: 95%;
    margin: 25px auto;
    justify-content: center;
}

.product-detail-container img {
    border-radius: 25px;
    margin-right: 5%;
    width: 30%;
    height: 500px;
    object-fit: cover;
}


.product-detail-container .product-detail * {
    color: white;
}

.product-detail-container .product-detail {
    background-color: var(--dark-blue);
    width: 50%;
    padding: 25px;
    border-radius: 25px;
}

@media (max-width: 1000px) {

    .product-detail-container {
        flex-direction: column;
        width: 100%;
        align-items: center;
    }

    .product-detail-container img {
        width: 90%;
        margin: 0px;
    }

    .product-detail-container .product-detail {
        background-color: var(--dark-blue);
        width: 90%;
        padding: 25px;
        border-radius: 25px;
        margin-top: 20px;
    }    
   
}

.product-detail img {
    width: 30%;
}

.product-detail h2 {
    margin-bottom: 20px;
}

.product-detail button {
    background-color: var(--blue-standar);
    border-radius: 5px;
    padding: 10px;
    border: none;
    width: 250px;
    margin-top: 20px;
}

/* CART */

.cart-order-container {
    width: 95%;
    margin: 20px auto;
    display: flex;
    justify-content: space-around;
}

.cart {
    width: 100%;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    border-radius: 10px;
    border: 1px solid var(--dark-blue);
}

.cart img {
    border-radius: 10px;
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-top-right-radius: 0px;
    border-bottom-right-radius: 0px;
}

.cart div {
    color: var(--red-standar);
    font-size: 20px;
    margin: 0px;
}

.cart button {
    font-size: 18px;
    border: none;
    background-color: transparent;
    color: var(--red-standar);
}

.cart * {
    margin-right: 10px;
}

.order {
    width: 300px;
    padding: 25px;
    background-color: var(--blue-standar);
    border-radius: 15px;
}

.order * {
    color: white;
}

.order h2 {
    text-align: center;
}

.order .amount {
    display: block;
    padding: 3px 10px;
    background-color: var(--dark-blue);
    border: none;
    border-radius: 5px;
    font-size: 18px;
    margin: 10px auto;
    text-align: center;
}

@media (max-width: 700px) {

    .cart-order-container {
        flex-direction: column;
    }

}

/* FOOTER */

footer {
    width: 100%;
    height: 200px;
    padding: 25px 50px;
    background-color: var(--footer-color);
    display: flex;
    align-items: center;
}

footer .img-container {
    width: 80%;
    display: flex;
    align-items: center;
    mask-image: linear-gradient(to right, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 1) 10%, rgba(255, 255, 255, 1) 90%, rgba(255, 255, 255, 0) 100%);
    -webkit-mask-image: linear-gradient(to right, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 1) 10%, rgba(255, 255, 255, 1) 90%, rgba(255, 255, 255, 0) 100%);
}

footer .img-container img {
    width: 150px;
    height: 75px;
    border-radius: 10px;
}

footer small {
    color: white;
}

@media (max-width: 500px) {

    footer {
        flex-direction: column;
    }

    footer .img-container {
        width: 100%;
    }

}


/* CHECKOUT */

.checkout-container {
    background-color: var(--blue-standar);
    width: 95%;
    margin: 25px auto;
    padding: 2%;
    border-radius: 15px;
}

.checkout-container h3 {
    color: white;
}

.checkout-container input {
    background-color: transparent;
    border: none;
    padding: 3px 10px;
    width: 200px;
    margin-bottom: 20px;
}

.checkout-container input::placeholder {
    color: rgb(87, 148, 189);
}

.checkout-container p {
    color: white;
    margin-bottom: 25px;
}

