/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Mulish:ital,wght@0,200..1000;1,200..1000&display=swap');

/* GLOBALES */
*{
    font-family: 'Poppins', sans-serif;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    list-style: none;
    text-decoration: none;
    scroll-behavior: smooth;
    scroll-padding: 2rem;
}

h1{
    font-family: "Mulish", sans-serif;
}

/* VARIABLES */
:root {
    --main-color: /*#ff002b*/ #d39dc2c7;
    --sec-color: /*#4946fd*/ #d39cbdc7;
    --text-color: /*#fdfffc*/ #fff;
    --bg-color: /*#000814*/ #683142 ;
}

h2, div{
    color: #ffffff;
}

::selection {
    color: var(--text-color);
    background-color: var(--main-color);
}

.container{
    max-width: 1068px;
    margin: auto;
    width: 100%;
}

.logopng {
    width: 39px;
    margin-right: 870px;
}

section {
    padding: 4rem 0 3rem;
}

body {
    color:var(--text-color);
    background-color: var(--bg-color);
}

img {
    width: 100%;
}

/* ============================================ */

/* HEADER */

header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: var(--bg-color);
    box-shadow: 0 1px 4px hsl(0 4% 15% / 10%);
    z-index: 100;
}

.nav{
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 0;
}

.logo{
    font-size: 1.8rem;
    font-weight: bold;
    color: var(--text-color);
    text-transform: uppercase;
}

.logo span {
    color: var(--main-color);
    font-weight: bold;
}

/* Botón Primario */
.btn-primary {
    display: inline-block;
    padding: 10px 20px;
    background-color: var(--main-color);
    color: var(--text-color);
    font-size: 1rem;
    font-weight: bold;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    width: 100px;
}

.btn-primary:hover {
    background-color: var(--sec-color);
}

#cart-icon {
    margin-left: 130px;
    font-size: 1.8rem;
    cursor: pointer;
}

#cart-icon:hover{
    color: #683142;
}


/* CART */
.cart{
    position: fixed;
    top: 0;
    right: 0;
    right: -100%;
    width: 360px;
    height: 100vh;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 20px;
    background-color: var(--bg-color);
    box-shadow: -2px solid 4px hsl(0 4% 15% / 10%);
    border: 1px solid var(--main-color);
    transition: 1.7s;
}

.cart.active{
    right: 0;
    transition: .5s;
}

.cart-title {
    text-align: center;
    font-size: 1.5rem;
    font-weight: 600;
    margin-top: 2rem;
}

.cart-box{
    display:grid;
    grid-template-columns: 32% 50% 18%;
    align-items: center;
    gap: 1rem;
    margin-top: 1rem;
}

.cart-img{
    width: 100px;
    height: 100px;
    object-fit: contain;
    padding: 10px;
}

.detail.box{
    display: grid;
    row-gap: .5rem;
}

.cart-product-title{
    font-size: 1rem;
    text-transform: uppercase;
}

.cart-price{
    font-weight: 500;
}

.cart-quantity{
    border: 1px solid var(--text-color);
    outline-color: var(--main-color);
    width: 1.4rem;
    text-align: center;
    font-size: 1rem;
}

.cart-remove{
    font-size: 24px;
    color: var(--main-color);
    cursor: pointer;
}

.total{
    display: flex;
    justify-content: flex-end;
    margin-top: 1.5rem;
    border-top: 1px solid var(--text-color);
}

.total-title{
    font-size: 1rem;
    font-weight: 600;
}

.total-price{
    margin-left: .5rem;
}

.btn-buy{
    display: flex;
    margin: 1.5rem auto 0 auto;
    padding: 12px 20px;
    border: none;
    background-color: var(--sec-color);
    color: var(--bg-color);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: .4s;
}

.btn-buy:hover{
    background-color: var(--main-color);
    color: var(--text-color);
}

#cart-close {
    position: absolute;
    top: 1rem;
    right: .8rem;
    font-size: 2rem;
    color: var(--text-color);
    cursor: pointer;
}

/* SHOP SECTION */
.shop{
    margin-top: 2rem;
}

.section-title{
    font-size: 1.5rem;
    font-weight: 600;
    text-align: center;
    margin-bottom: 1.5rem;
}

.shop-content{
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, auto));
    gap: 1.5rem;
    text-align: center;
}

.product-box{
    position: relative;
    transition: .5s ease-in-out;
}

.product-box:hover{
    padding: 10px;
    border: 2px solid var(--sec-color);
}

.product-img{
    width: 100%;
    aspect-ratio: 1/1;
    object-fit: cover;
    margin-bottom: .5rem;
}

.product-title{
    font-size: 1.1rem;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: .5rem;
}

.product-price{
    font-weight: 500;
}

.styleaddcartproduct{
    align-items: center;
    width: 600px;
    bottom: 0;
    right: 0;
    background-color: var(--text-color);
    color: var(--bg-color);
    padding: 11px;
    cursor: pointer;
    transition: .5s;
   
}

.styleaddcartshop {
    position: absolute;
    bottom: 0;
    right: 0;
    background-color: var(--text-color);
    color: var(--bg-color);
    padding: 11px;
    cursor: pointer;
    transition: .5s;
}

.add-cart:hover{
    background: var(--sec-color);
    color: var(--text-color)
}

/* Hacer mas ancho el input de cantidad de productos */
.cart-quantity{
    width: 3rem;
    background-color: var(--bg-color);
    color: var(--text-color);
}

/* Establece un color diferente para todos los enlaces */
a {
    color: #ffffff; /* Color blanco */
    text-decoration: none; /* Elimina el subrayado predeterminado de los enlaces */
}

/* Establece un color diferente para los enlaces al pasar el ratón sobre ellos */
a:hover {
    color: #d39cbdc7/*#ff002b*/; /* Color rojo */
}



/* ==== RESPONSIVE ==== */
@media (max-width: 1080px){
    .nav{
        padding: 15px;
    }
    .container{
        width: 90%;
        margin: 0 auto;
    }
    section{
        padding: 3rem 0 2rem;
    }
    .shop{
        margin-top: 2rem;
    }
}

/* ==== Medium Devices ==== */
@media (max-width:400px){
    .nav{
        padding: 11px;
    }
    .logo{
        font-size: 1rem
    }
    .cart{
        width: 320px;
    }
}

/* ==== Small Devices ==== */
@media (max-width:360px){
    .shop{
        margin-top: 1rem;
    }
    .cart{
        width: 280px;
    } 
}