/* ==========================================
   PRODUCT MODAL
========================================== */

.adpai-modal{

    position:fixed;

    inset:0;

    display:none;

    align-items:center;

    justify-content:center;

    padding:40px;

    background:rgba(15,23,42,.55);

    backdrop-filter:blur(8px);

    z-index:99999;

}

.adpai-modal.active{

    display:flex;

}

body.modal-open{

    overflow:hidden;

}

/* ==========================================
   DIALOG
========================================== */

.product-modal-dialog{

    width:min(1100px,100%);

    max-width:1100px;

    height:min(92vh,900px);

    display:flex;

    flex-direction:column;

    background:#ffffff;

    border-radius:24px;

    border:1px solid #e2e8f0;

    box-shadow:

        0 30px 80px rgba(15,23,42,.18);

    overflow:hidden;

    animation:

        productModalIn .22s ease;

}

@keyframes productModalIn{

    from{

        opacity:0;

        transform:

            translateY(20px)

            scale(.98);

    }

    to{

        opacity:1;

        transform:

            translateY(0)

            scale(1);

    }

}

/* ==========================================
   HEADER
========================================== */

.product-modal-header{

    display:flex;

    align-items:center;

    justify-content:space-between;

    gap:24px;

    padding:24px 30px;

    border-bottom:1px solid #edf2f7;

    background:#fff;

    flex-shrink:0;

}

.product-modal-title{

    display:flex;

    align-items:center;

    gap:18px;

}

.product-modal-icon{

    width:58px;

    height:58px;

    display:flex;

    align-items:center;

    justify-content:center;

    border-radius:18px;

    background:#f8fafc;

    border:1px solid #e2e8f0;

    color:#334155;

    font-size:22px;

}

.product-modal-title h2{

    margin:0;

    font-size:26px;

    font-weight:700;

    color:#0f172a;

}

.product-modal-title p{

    margin-top:6px;

    color:#64748b;

    font-size:14px;

}

.product-modal-close{

    width:46px;

    height:46px;

    display:flex;

    align-items:center;

    justify-content:center;

    border:none;

    border-radius:14px;

    background:#f8fafc;

    cursor:pointer;

    transition:.25s;

}

.product-modal-close:hover{

    background:#eef2f7;

}

/* ==========================================
   CONTENT
========================================== */

.product-modal-content{

    flex:1;

    overflow-y:auto;

    padding:32px;

    background:#fafbfc;

}

/* ==========================================
   SECTION
========================================== */

.product-section{

    background:#fff;

    border:1px solid #e8edf5;

    border-radius:22px;

    padding:28px;

    margin-bottom:24px;

}

.product-section-header{

    margin-bottom:24px;

}

.product-section-header h3{

    margin:0;

    font-size:24px;

    color:#0f172a;

}

.product-section-header p{

    margin-top:8px;

    color:#64748b;

    line-height:1.8;

}

/* ==========================================
   FORM
========================================== */

.product-form{

    display:flex;

    flex-direction:column;

    gap:28px;

}

/* ==========================================
   GRID
========================================== */

.product-grid{

    display:grid;

    grid-template-columns:

        repeat(2,minmax(0,1fr));

    gap:22px;

}

.product-grid-3{

    display:grid;

    grid-template-columns:

        repeat(3,minmax(0,1fr));

    gap:22px;

}

.product-grid-full{

    grid-column:1/-1;

}

/* ==========================================
   FIELD
========================================== */

.product-field{

    display:flex;

    flex-direction:column;

    gap:10px;

}

.product-field label{

    display:flex;

    align-items:center;

    gap:8px;

    font-size:14px;

    font-weight:600;

    color:#334155;

}

.product-field label i{

    width:18px;

    text-align:center;

    color:#64748b;

    font-size:13px;

}

.product-field input,

.product-field textarea,

.product-field select{

    width:100%;

    min-height:52px;

    padding:0 16px;

    border:1px solid #dbe3ec;

    border-radius:14px;

    background:#fff;

    font-size:14px;

    color:#0f172a;

    transition:.25s;

    outline:none;

}

.product-field textarea{

    min-height:140px;

    padding:16px;

    resize:vertical;

    line-height:1.8;

}

.product-field input:focus,

.product-field textarea:focus,

.product-field select:focus{

    border-color:#334155;

    box-shadow:

        0 0 0 4px

        rgba(15,23,42,.05);

}

.product-field small{

    color:#94a3b8;

    font-size:12px;

    line-height:1.7;

}

/* ==========================================
   PRICE GRID
========================================== */

.product-price-grid{

    display:grid;

    grid-template-columns:

        repeat(3,1fr);

    gap:20px;

}

.product-price-card{

    display:flex;

    flex-direction:column;

    gap:10px;

    padding:22px;

    background:#fff;

    border:1px solid #e5e7eb;

    border-radius:18px;

}

.product-price-card label{

    font-size:13px;

    color:#64748b;

}

.product-price-card input{

    min-height:50px;

    text-align:center;

    font-size:18px;

    font-weight:700;

}

.product-price-note{

    margin-top:18px;

    font-size:13px;

    color:#64748b;

}

/* ==========================================
   CHECKBOXES
========================================== */

.product-switch-list{

    display:flex;

    flex-direction:column;

    gap:16px;

}

.product-switch{

    display:flex;

    justify-content:space-between;

    align-items:center;

    padding:18px 22px;

    border:1px solid #e2e8f0;

    border-radius:18px;

    background:#fff;

}

.product-switch-info{

    display:flex;

    flex-direction:column;

    gap:6px;

}

.product-switch-info strong{

    font-size:15px;

    color:#0f172a;

}

.product-switch-info span{

    font-size:13px;

    color:#64748b;

}

.product-switch input{

    width:20px;

    height:20px;

}


/* ==========================================
   FEATURED IMAGE
========================================== */

.product-media-grid{

    display:grid;

    grid-template-columns:320px 1fr;

    gap:28px;

}

.product-featured{

    display:flex;

    flex-direction:column;

    gap:16px;

}

.product-featured-preview{

    aspect-ratio:1/1;

    border-radius:22px;

    border:1px solid #e2e8f0;

    background:#f8fafc;

    overflow:hidden;

}

.product-featured-preview img{

    width:100%;

    height:100%;

    object-fit:cover;

    display:block;

}

.product-media-actions{

    display:flex;

    gap:12px;

}

/* ==========================================
   GALLERY
========================================== */

.product-gallery{

    display:grid;

    grid-template-columns:

        repeat(auto-fill,minmax(110px,1fr));

    gap:14px;

}

.product-gallery-item{

    aspect-ratio:1;

    border-radius:16px;

    overflow:hidden;

    border:1px solid #e2e8f0;

    background:#fff;

}

.product-gallery-item img{

    width:100%;

    height:100%;

    object-fit:cover;

}

/* ==========================================
   BUTTONS
========================================== */

.product-btn{

    display:inline-flex;

    align-items:center;

    justify-content:center;

    gap:10px;

    min-height:48px;

    padding:0 20px;

    border-radius:14px;

    border:1px solid #dbe3ec;

    background:#fff;

    color:#334155;

    cursor:pointer;

    transition:.25s;

    font-size:14px;

    font-weight:600;

}

.product-btn:hover{

    transform:translateY(-2px);

}

.product-btn-primary{

    background:#0f172a;

    color:#fff;

    border-color:#0f172a;

}

.product-btn-primary:hover{

    box-shadow:

        0 14px 30px

        rgba(15,23,42,.18);

}

.product-btn-light{

    background:#fff;

}

/* ==========================================
   FOOTER
========================================== */

.product-modal-footer{

    display:flex;

    justify-content:space-between;

    align-items:center;

    gap:20px;

    padding:22px 30px;

    background:#fff;

    border-top:1px solid #e2e8f0;

    flex-shrink:0;

}

.product-footer-left,

.product-footer-right{

    display:flex;

    gap:14px;

}

/* ==========================================
   MOBILE
========================================== */

@media(max-width:992px){

.product-modal-dialog{

    width:100%;

    height:100vh;

    max-height:100vh;

    border-radius:0;

}

.product-modal-content{

    padding:22px;

}

.product-grid,

.product-grid-3,

.product-price-grid,

.product-media-grid{

    grid-template-columns:1fr;

}

.product-modal-footer{

    flex-direction:column-reverse;

    align-items:stretch;

}

.product-footer-left,

.product-footer-right{

    width:100%;

}

.product-btn{

    width:100%;

}

}

@media(max-width:640px){

.adpai-modal{

    padding:0;

}

.product-section{

    padding:20px;

}

.product-modal-header{

    padding:20px;

}

.product-modal-title h2{

    font-size:22px;

}

}