@import url('https://fonts.googleapis.com/css2?family=Vazirmatn:wght@400;500;600;700;800&display=swap');


*{
    box-sizing:border-box;
}


body{

    margin:0;

    font-family:"Vazirmatn",sans-serif;

    background:
    linear-gradient(
        135deg,
        #eef7ff,
        #ffffff
    );

    color:#1f2937;

}



.product-page{

    min-height:100vh;

    padding-bottom:100px;

}



/* HEADER */


.product-header{

    background:
    linear-gradient(
        135deg,
        #0077ff,
        #00b4ff
    );

    color:white;

    padding:25px 20px;

    display:flex;

    align-items:center;

    gap:15px;

    border-radius:0 0 30px 30px;

    box-shadow:
    0 10px 30px rgba(0,120,255,.25);

}



.product-header h1{

    margin:0;

    font-size:22px;

}


.product-header span{

    font-size:13px;

    opacity:.85;

}




.back-btn{

    width:45px;

    height:45px;

    border:none;

    border-radius:15px;

    background:
    rgba(255,255,255,.2);

    color:white;

    font-size:22px;

    cursor:pointer;

}





/* CONTAINER */


.product-container{

    padding:20px;

    max-width:600px;

    margin:auto;

}



/* CARD */


.product-card{

    background:white;

    border-radius:25px;

    padding:20px;

    margin-bottom:20px;


    box-shadow:

    0 10px 35px rgba(0,0,0,.06);


    animation:

    fadeUp .5s ease;


}



@keyframes fadeUp{

    from{

        opacity:0;

        transform:translateY(25px);

    }


    to{

        opacity:1;

        transform:none;

    }

}




/* TITLE */


.section-title{

    display:flex;

    align-items:center;

    gap:10px;

    margin-bottom:20px;

    font-weight:700;

    font-size:17px;

}



.section-title i{

    width:38px;

    height:38px;

    border-radius:12px;

    display:flex;

    align-items:center;

    justify-content:center;


    background:
    linear-gradient(
        135deg,
        #0077ff,
        #00c6ff
    );


    color:white;

    font-size:20px;

}





/* IMAGE UPLOAD */


.upload-box{

    height:170px;

    border-radius:25px;

    border:2px dashed #b7d9ff;


    display:flex;

    flex-direction:column;

    align-items:center;

    justify-content:center;

    cursor:pointer;

    background:#f7fbff;

    transition:.3s;


}



.upload-box:hover{

    background:#edf7ff;

    transform:translateY(-3px);

}



.upload-box i{

    font-size:45px;

    color:#0077ff;

}



.upload-box span{

    font-weight:700;

    margin-top:10px;

}



.upload-box small{

    color:#777;

}





.image-preview{

    display:flex;

    flex-wrap:wrap;

    gap:10px;

    margin-top:15px;

}




/* INPUT */


.input-group{

    margin-bottom:18px;

}



.input-group label{

    display:block;

    margin-bottom:8px;

    font-size:14px;

    font-weight:600;

}



.input-group input,
.input-group textarea,
.category-select{


    width:100%;

    border:none;

    background:#f6f9fc;

    padding:14px 16px;

    border-radius:18px;

    font-family:inherit;

    outline:none;

    transition:.3s;

}



.input-group input:focus,
.input-group textarea:focus,
.category-select.active{


    background:white;

    box-shadow:

    0 0 0 3px rgba(0,119,255,.15);

}





textarea{

    resize:none;

}



/* CATEGORY */


.category-select{

    display:flex;

    justify-content:space-between;

    align-items:center;

    cursor:pointer;

}



.category-dropdown{


    margin-top:10px;

    display:none;

    background:white;

    border-radius:18px;

    overflow:hidden;

    box-shadow:

    0 10px 25px rgba(0,0,0,.1);

}



.category-dropdown.open{

    display:block;

}




/* PRICE ROW */


.row{

    display:grid;

    grid-template-columns:1fr 1fr;

    gap:12px;

}





/* PURCHASE */


.purchase-options{

    display:grid;

    grid-template-columns:repeat(2,1fr);

    gap:12px;

}



.purchase-options label input{

    display:none;

}



.purchase-options span{


    display:flex;

    flex-direction:column;

    align-items:center;

    gap:8px;

    padding:15px 5px;

    border-radius:20px;

    background:#f6f9fc;

    cursor:pointer;

    transition:.3s;

    font-size:13px;

}



.purchase-options i{

    font-size:25px;

    color:#0077ff;

}




.purchase-options input:checked + span{


    background:

    linear-gradient(
        135deg,
        #0077ff,
        #00c6ff
    );

    color:white;

    transform:translateY(-4px);


}



.purchase-options input:checked + span i{

    color:white;

}




/* SUBMIT */


.submit-btn{


    width:100%;

    padding:17px;

    border:none;

    border-radius:22px;


    background:

    linear-gradient(
        135deg,
        #0077ff,
        #00b4ff
    );


    color:white;

    font-family:inherit;

    font-size:17px;

    font-weight:700;

    cursor:pointer;


    box-shadow:

    0 12px 30px rgba(0,119,255,.3);


    transition:.3s;

}



.submit-btn:hover{

    transform:translateY(-3px);

}




/* MOBILE */


@media(max-width:450px){


    .product-container{

        padding:15px;

    }


    .row{

        grid-template-columns:1fr;

    }


}

/* ==========================
PRODUCT IMAGE PREVIEW
========================== */

.image-preview {

    display: flex;

    flex-wrap: wrap;

    gap: 12px;

    margin-top: 18px;

}



.preview-item {

    position: relative;

    width: 90px;

    height: 90px;

    border-radius: 16px;

    overflow: hidden;

    background: #f1f5f9;

    box-shadow: 0 8px 20px rgba(0,0,0,.08);

    animation: previewShow .25s ease;

}



.preview-item img {

    width: 100%;

    height: 100%;

    object-fit: cover;

    display: block;

}



/* دکمه حذف */

.preview-item button {


    position: absolute;

    top: 6px;

    right: 6px;


    width: 28px;

    height: 28px;


    border-radius: 50%;


    border: none;


    background: rgba(239,68,68,.9);


    color: white;


    display: flex;

    align-items: center;

    justify-content: center;


    cursor: pointer;


    font-size: 18px;


    transition: .2s;


}



.preview-item button:hover {


    transform: scale(1.1);

    background:#dc2626;


}



.preview-item button i {

    line-height: 1;

}





@keyframes previewShow {


    from {

        opacity:0;

        transform:scale(.8);

    }


    to {

        opacity:1;

        transform:scale(1);

    }


}

/* ==========================
CATEGORY DROPDOWN
========================== */

.category-select {

    background: #f8fafc;

    border: 1px solid #e2e8f0;

    border-radius: 16px;

    padding: 14px 16px;

    display:flex;

    align-items:center;

    justify-content:space-between;

    cursor:pointer;

    transition:.3s;

}



.category-select:hover {

    border-color:#2563eb;

    background:#eff6ff;

}



.category-select i {

    color:#2563eb;

    font-size:18px;

}




.category-dropdown {


    display:none;

    margin-top:12px;


    background:white;


    border-radius:20px;


    padding:10px;


    box-shadow:

    0 15px 35px rgba(0,0,0,.12);


    max-height:280px;

    overflow-y:auto;


    animation: dropdownShow .25s ease;


}



.category-dropdown.open {

    display:block;

}





.category-item {


    display:flex;


    align-items:center;


    gap:12px;


    padding:14px;


    border-radius:14px;


    cursor:pointer;


    transition:.25s;


    margin-bottom:6px;


    background:#f8fafc;


}



.category-item:hover {


    background:#eff6ff;


    transform:translateX(-4px);


}




.category-item i {


    width:38px;


    height:38px;


    border-radius:12px;


    background:#dbeafe;


    color:#2563eb;


    display:flex;


    align-items:center;


    justify-content:center;


    font-size:20px;


}




.category-item span {


    font-size:14px;


    font-weight:600;


    color:#1e293b;


}





@keyframes dropdownShow {


    from{

        opacity:0;

        transform:translateY(-10px);

    }


    to{

        opacity:1;

        transform:translateY(0);

    }


}

.category-icon {

    width:42px;
    height:42px;

    border-radius:14px;

    background:#dbeafe;

    color:#2563eb;

    display:flex;

    align-items:center;

    justify-content:center;

    font-size:20px;

    flex-shrink:0;

}


.store-message {

    position: fixed;

    bottom: 30px;

    right: 50%;

    transform: translateX(50%);

    min-width: 280px;

    max-width: 90%;

    padding: 16px 22px;

    border-radius: 18px;

    display: flex;

    align-items: center;

    justify-content: center;

    gap: 12px;

    font-family: Vazirmatn, sans-serif;

    font-size: 14px;

    font-weight: 600;

    color: white;

    z-index: 99999;

    box-shadow: 0 10px 30px rgba(0,0,0,.18);

    animation: messageShow .3s ease;

}


.store-message i {

    font-size: 22px;

}



.store-message.success {

    background: linear-gradient(
        135deg,
        #16a34a,
        #22c55e
    );

}



.store-message.error {

    background: linear-gradient(
        135deg,
        #dc2626,
        #ef4444
    );

}
