
:root{
    --background:#fff4ee;
    --primary:#9e8ff4;
    --secondary:#ffa8e0;
    --font:#4b4b4b;
}

*{
    box-sizing:border-box;
    margin:0;
    padding:0;
    font-family:Arial,sans-serif;
}

body{
    background-image: url('../images/background.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
}

.overlay{
    min-height:100vh;
    padding:20px;
    background:rgba(255,244,238,0.55);
}

h1{
    text-align:center;
    margin-bottom:20px;
}

.catalog{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(180px,1fr));
    gap:15px;
}

.product{
    background:white;
    border:2px solid var(--primary);
    border-radius:12px;
    padding:12px;
    text-align:center;
}

.product img{
    width:100%;
    aspect-ratio:1/1;
    object-fit:contain;
    background:#fff;
    border-radius:10px;
    padding:6px;
}

.product h3{
    margin:10px 0 5px;
}

.product p{
    color:var(--secondary);
    font-weight:bold;
}

.product input{
    width:55px;
    margin-top:8px;
    padding:4px;
}

.product button{
    margin-top:8px;
    padding:8px 12px;
    border:none;
    border-radius:8px;
    background:var(--primary);
    color:white;
    cursor:pointer;
    font-weight:bold;
}

.cart{
    position:fixed;
    top:0;
    right:0;
    width:350px;
    max-width:100%;
    height:100%;
    background:white;
    border-left:3px solid var(--primary);
    display:flex;
    flex-direction:column;
    transform:translateX(100%);
    transition:transform 0.3s ease;
}

#cart-toggle{
    position:fixed;
    bottom:20px;
    right:20px;
    background:var(--primary);
    color:white;
    padding:14px 18px;
    border-radius:50px;
    cursor:pointer;
    font-weight:bold;
    box-shadow:0 8px 20px rgba(0,0,0,0.2);
    z-index:9999;
}

.cart-item{
    display:flex;
    gap:10px;
    margin-bottom:15px;
    align-items:center;
}

.cart-item img{
    width:60px;
    height:60px;
    object-fit:contain;
    background:#fff;
    border-radius:10px;
}

.cart button{
    margin-top:12px;
    padding:10px 14px;
    border:none;
    border-radius:8px;
    background:var(--primary);
    color:white;
    cursor:pointer;
    font-weight:bold;
    width:100%;
    transition:0.2s ease;
}

.cart-content{
    flex:1;
    overflow-y:auto;
    padding:15px;
}

.summary{
    margin-top:15px;
    font-size:18px;
}

.cart-item button{
    padding:6px 10px;
    margin-left:4px;
    border:none;
    border-radius:6px;
    cursor:pointer;
}

.cart-footer{
    padding:15px;
    border-top:1px solid #eee;
    background:white;
}

.cart-header{
    display:flex;
    justify-content:space-between;
    align-items:center;
    margin-bottom:10px;
}

.clear-btn{
    background:transparent;
    border:1px solid var(--secondary);
    color:var(--font);
    padding:4px 25%;
    border-radius:6px;
    cursor:pointer;
    font-size:15px;
    transition:0.2s ease;
}

.clear-btn:hover{
    background:var(--secondary);
    color:white;
}

.confirm-box{
    background:white;
    padding:20px;
    border-radius:12px;
    width:90%;
    max-width:320px;
    text-align:center;
    display:flex;
    flex-direction:column;
    gap:10px;
}

.confirm-box h3{
    color:var(--font);
}

.confirm-box p{
    font-size:14px;
    color:var(--font);
    opacity:0.8;
}

.confirm-actions{
    display:flex;
    gap:10px;
    margin-top:10px;
}

.confirm-actions button{
    flex:1;
    padding:10px;
    border:none;
    border-radius:8px;
    cursor:pointer;
    font-weight:bold;
}

.confirm-actions .danger{
    background:#ff6b6b;
    color:white;
}

.confirm-actions .primary{
    background:var(--primary);
    color:white;
    transition:0.2s ease;
}

.confirm-actions .primary:hover{
    background:var(--secondary);
}

.modal{
    display:none;
    position:fixed;
    top:0;
    left:0;
    width:100%;
    height:100%;
    background:rgba(0,0,0,0.9);
    justify-content:center;
    align-items:center;
    z-index:9999;
}

/* General button hover */
.product button:hover,
.cart-footer button:hover,
.clear-btn:hover{
    background:var(--secondary);
    color:white;
    transition:0.2s ease;
}

.cart-actions{
    display:flex;
    gap:10px;
    margin-top:10px;
}

.cart-actions button{
    flex:1;
    padding:12px;
    border:none;
    border-radius:8px;
    background:var(--primary);
    color:white;
    font-weight:bold;
    cursor:pointer;
    transition:0.2s ease;
}

.cart-actions button:hover{
    background:var(--secondary);
}

.cart-actions{
    display:flex;
    gap:10px;
    flex-wrap:wrap;
}

.cart-actions button{
    flex:1;
    min-width:0;
    padding:10px 8px;
    font-size:14px;
    text-align:center;

    /* IMPORTANT FIX */
    white-space:normal;
    overflow-wrap:break-word;
    line-height:1.2;
}

/* WhatsApp = primary */
#btn-whatsapp{
    background:#25D366;
    color:white;
}

/* Download = secondary */
#btn-download{
    background:var(--primary);
    color:white;
}

/* Hover effect (your requirement: pink on hover) */
.cart-actions button:hover{
    background:var(--secondary);
}

@media(max-width:480px){
    .cart-actions{
        flex-direction:column;
    }

    .cart-actions button{
        width:100%;
    }
}

@media(max-width:600px){
    .catalog{
        grid-template-columns:repeat(2,1fr);
    }
}

@media (max-width: 768px){

    body{
        background-image: url('../images/background-mobile.png');
        background-attachment: scroll; /* important fix for mobile performance */
    }

}

/* =======================
   HERO HEADER
======================= */

.hero-header{
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    text-align:center;

    margin-bottom:30px;
    padding:20px;
}

.hero-logo img{
    width:120px;
    max-width:60vw;
    margin-bottom:12px;

    filter:drop-shadow(0 4px 12px rgba(0,0,0,0.12));
}

.hero-text h1{
    font-size:38px;
    color:var(--primary);
    margin-bottom:6px;
    font-weight:700;
    letter-spacing:1px;
}

.hero-text p{
    font-size:15px;
    color:var(--font);
    opacity:0.8;
    max-width:500px;
    line-height:1.4;
}

/* Mobile */
@media(max-width:600px){

    .hero-logo img{
        width:90px;
    }

    .hero-text h1{
        font-size:28px;
    }

    .hero-text p{
        font-size:13px;
    }
}

/* =======================
   LOGIN PAGE LAYOUT
======================= */

.login-page{
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;

    /* SAME BACKGROUND SYSTEM AS CATALOG */
    background-image: url('../images/background.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
}

/* ADD OVERLAY LAYER */
.login-page::before{
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* background: rgba(255,244,238,0.55); */
    z-index: 0;
}

/* Card */
.login-box{
    background: white;
    padding: 30px 25px;
    border-radius: 14px;
    width: 320px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    text-align: center;
    border: 2px solid var(--primary);
    position: relative;
    z-index: 1;
}
}

/* Title */
.login-box h2{
    margin-bottom: 20px;
    color: var(--primary);
}

/* Input */
.login-box input{
    width: 100%;
    padding: 10px;
    margin-bottom: 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    outline: none;
}

/* Button */
.login-box button{
    width: 100%;
    padding: 10px;
    border: none;
    border-radius: 8px;
    background: var(--primary);
    color: white;
    font-weight: bold;
    cursor: pointer;
    transition: 0.2s;
}

.login-box button:hover{
    background: var(--secondary);
}

/* Error */
.error{
    color: red;
    font-size: 13px;
    margin-bottom: 10px;
}

@media (max-width: 768px){

    .login-page{
        background-image: url('../images/background-mobile.png');
        background-attachment: scroll;
    }

}
