/* =========================================================
   EMDY PRODUCT DETAIL
========================================================= */

:root{
    --pd-primary:#ff2e74;
    --pd-primary-2:#ff7aa5;
    --pd-dark:#21151b;
    --pd-muted:#7d6871;
    --pd-soft:#fff3f8;
    --pd-border:rgba(255,46,116,0.16);
    --pd-shadow:0 18px 55px rgba(255,46,116,0.16);
}

.emdy-product-detail-page,
.emdy-product-detail-page *{
    box-sizing:border-box;
    font-family:"Times New Roman", Times, serif;
}

.emdy-product-detail-page{
    background:
        radial-gradient(circle at 12% 18%,rgba(255,122,165,.18),transparent 28%),
        linear-gradient(180deg,#fff8fb,#fff);
    color:var(--pd-dark);
    padding-bottom:80px;
}

/* Breadcrumb */

.emdy-product-breadcrumb{
    width:min(1400px,92%);
    margin:0 auto;
    padding:26px 0;
    display:flex;
    align-items:center;
    gap:10px;
    flex-wrap:wrap;
    color:var(--pd-muted);
    font-weight:800;
}

.emdy-product-breadcrumb a{
    color:var(--pd-primary);
    text-decoration:none;
}

.emdy-product-breadcrumb strong{
    color:var(--pd-dark);
}

/* Detail */

.emdy-product-detail{
    width:min(1400px,92%);
    margin:0 auto;
    display:grid;
    grid-template-columns:minmax(0,0.95fr) minmax(0,1.05fr);
    gap:42px;
    align-items:start;
}

.emdy-product-gallery,
.emdy-product-info,
.emdy-tab-card,
.emdy-review-form,
.emdy-review-list,
.emdy-related-card,
.emdy-product-reviews,
.emdy-related-products{
    background:#fff;
    border:1px solid var(--pd-border);
    box-shadow:var(--pd-shadow);
    border-radius:32px;
}

.emdy-product-gallery{
    padding:22px;
}

.emdy-main-image{
    overflow:hidden;
    border-radius:28px;
    background:var(--pd-soft);
    aspect-ratio:4/5;
}

.emdy-main-image img{
    width:100%;
    height:100%;
    object-fit:cover;
    display:block;
}

.emdy-thumb-list{
    margin-top:18px;
    display:flex;
    gap:12px;
    overflow-x:auto;
    padding-bottom:4px;
}

.emdy-thumb-list button{
    width:82px;
    height:92px;
    border:2px solid transparent;
    padding:0;
    border-radius:18px;
    background:var(--pd-soft);
    cursor:pointer;
    overflow:hidden;
    flex:0 0 auto;
}

.emdy-thumb-list button.active,
.emdy-thumb-list button:hover{
    border-color:var(--pd-primary);
}

.emdy-thumb-list img{
    width:100%;
    height:100%;
    object-fit:cover;
}

/* Info */

.emdy-product-info{
    padding:38px;
}

.emdy-product-category{
    display:inline-flex;
    min-height:38px;
    padding:8px 18px;
    border-radius:999px;
    color:#fff;
    background:linear-gradient(135deg,var(--pd-primary-2),var(--pd-primary));
    align-items:center;
    font-weight:900;
}

.emdy-product-info h1{
    margin:22px 0 14px;
    font-size:46px;
    line-height:1.15;
}

.emdy-product-rating{
    display:flex;
    align-items:center;
    gap:12px;
    flex-wrap:wrap;
    color:var(--pd-muted);
    font-weight:800;
}

.stars{
    color:#ead2dc;
    display:flex;
    gap:3px;
}

.stars .active{
    color:#f59e0b;
}

.stars.small{
    margin:6px 0;
    font-size:14px;
}

.emdy-product-price{
    margin:22px 0;
    color:var(--pd-primary);
    font-size:42px;
    font-weight:900;
}

.emdy-product-status{
    display:flex;
    gap:10px;
    flex-wrap:wrap;
    margin-bottom:22px;
}

.emdy-product-status span,
.emdy-product-status small{
    min-height:34px;
    padding:8px 14px;
    border-radius:999px;
    display:inline-flex;
    align-items:center;
    font-weight:800;
    background:var(--pd-soft);
    color:var(--pd-muted);
}

.emdy-product-status .in-stock{
    color:#137333;
    background:#e9f8ee;
}

.emdy-product-status .out-stock{
    color:#b42318;
    background:#fff0ef;
}

.emdy-product-description{
    color:var(--pd-muted);
    font-size:19px;
    line-height:1.8;
}

.emdy-product-specs{
    margin:26px 0;
    display:grid;
    grid-template-columns:repeat(2,1fr);
    gap:14px;
}

.emdy-product-specs div{
    padding:18px;
    border-radius:20px;
    background:var(--pd-soft);
}

.emdy-product-specs span{
    display:block;
    color:var(--pd-muted);
    font-size:15px;
    font-weight:800;
    margin-bottom:7px;
}

.emdy-product-specs strong{
    font-size:18px;
}

.emdy-product-actions{
    display:grid;
    grid-template-columns:1fr 180px 170px;
    gap:12px;
}

.emdy-cart-form{
    display:grid;
    grid-template-columns:145px 1fr;
    gap:12px;
}

.emdy-qty-box{
    height:54px;
    border-radius:999px;
    background:var(--pd-soft);
    border:1px solid var(--pd-border);
    display:flex;
    align-items:center;
    overflow:hidden;
}

.emdy-qty-box button{
    width:44px;
    height:100%;
    border:none;
    background:transparent;
    color:var(--pd-primary);
    cursor:pointer;
    font-size:24px;
    font-weight:900;
}

.emdy-qty-box input{
    flex:1;
    width:50px;
    border:none;
    outline:none;
    background:transparent;
    text-align:center;
    font-size:18px;
    font-weight:900;
}

.emdy-add-cart,
.emdy-buy-now,
.emdy-favorite-form button,
.emdy-out-button,
.emdy-review-form button,
.emdy-review-form a{
    height:54px;
    padding:0 22px;
    border:none;
    border-radius:999px;
    cursor:pointer;
    color:#fff;
    background:linear-gradient(135deg,var(--pd-primary-2),var(--pd-primary));
    font-size:17px;
    font-weight:900;
    text-decoration:none;
    display:inline-flex;
    align-items:center;
    justify-content:center;
}

.emdy-buy-now{
    width:100%;
    background:#21151b;
}

.emdy-favorite-form button{
    width:100%;
    color:var(--pd-primary);
    background:var(--pd-soft);
    border:1px solid var(--pd-border);
}

.emdy-favorite-form button.active,
.emdy-favorite-form button:hover{
    color:#fff;
    background:var(--pd-primary);
}

.emdy-out-button{
    grid-column:1/-1;
    background:#b42318;
    cursor:not-allowed;
}

/* Tabs */

.emdy-product-tabs,
.emdy-product-reviews,
.emdy-related-products{
    width:min(1400px,92%);
    margin:42px auto 0;
}

.emdy-tab-grid{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:24px;
}

.emdy-tab-card{
    padding:32px;
}

.emdy-tab-card h2,
.emdy-section-title h2{
    margin:0 0 18px;
    font-size:34px;
}

.emdy-tab-card p,
.emdy-tab-card li{
    color:var(--pd-muted);
    font-size:18px;
    line-height:1.8;
}

/* Reviews */

.emdy-product-reviews{
    padding:34px;
}

.emdy-section-title span{
    color:var(--pd-primary);
    font-weight:900;
    letter-spacing:2px;
}

.emdy-review-layout{
    display:grid;
    grid-template-columns:390px 1fr;
    gap:24px;
}

.emdy-review-form,
.emdy-review-list{
    padding:26px;
    box-shadow:none;
}

.emdy-review-form h3{
    margin:0 0 18px;
    font-size:28px;
}

.emdy-review-form label{
    display:block;
    margin:15px 0 8px;
    font-size:17px;
    font-weight:900;
}

.emdy-review-form select,
.emdy-review-form textarea{
    width:100%;
    border:1px solid var(--pd-border);
    border-radius:18px;
    outline:none;
    background:var(--pd-soft);
    padding:14px 16px;
    font-size:17px;
}

.emdy-review-form select{
    height:52px;
}

.emdy-review-form textarea{
    resize:vertical;
}

.emdy-review-form button,
.emdy-review-form a{
    width:100%;
    margin-top:16px;
}

.emdy-review-item{
    display:grid;
    grid-template-columns:58px 1fr;
    gap:14px;
    padding:18px;
    border-radius:20px;
    background:var(--pd-soft);
    margin-bottom:14px;
}

.review-avatar{
    width:58px;
    height:58px;
    border-radius:50%;
    overflow:hidden;
    background:#fff;
    color:var(--pd-primary);
    display:flex;
    align-items:center;
    justify-content:center;
    font-size:26px;
    font-weight:900;
}

.review-avatar img{
    width:100%;
    height:100%;
    object-fit:cover;
}

.emdy-review-item p{
    margin:8px 0;
    color:var(--pd-muted);
    line-height:1.7;
}

.emdy-empty-review{
    padding:24px;
    border-radius:20px;
    background:var(--pd-soft);
    color:var(--pd-muted);
    font-weight:800;
}

.emdy-alert{
    padding:15px 18px;
    border-radius:18px;
    margin:18px 0;
    font-size:17px;
    font-weight:800;
}

.emdy-alert.error{
    color:#b42318;
    background:#fff0ef;
    border:1px solid #ffc9c5;
}

.emdy-alert.success{
    color:#137333;
    background:#e9f8ee;
    border:1px solid #bde9c8;
}

/* Related */

.emdy-related-products{
    padding:34px;
}

.emdy-related-grid{
    display:grid;
    grid-template-columns:repeat(4,1fr);
    gap:22px;
}

.emdy-related-card{
    overflow:hidden;
    text-decoration:none;
    color:var(--pd-dark);
    transition:.25s;
}

.emdy-related-card:hover{
    transform:translateY(-5px);
}

.emdy-related-card img{
    width:100%;
    aspect-ratio:4/5;
    object-fit:cover;
    display:block;
}

.emdy-related-card h3{
    margin:16px 16px 8px;
    font-size:19px;
    line-height:1.35;
}

.emdy-related-card strong{
    display:block;
    margin:0 16px 18px;
    color:var(--pd-primary);
    font-size:22px;
}

/* Responsive */

@media(max-width:1100px){
    .emdy-product-detail{
        grid-template-columns:1fr;
    }

    .emdy-product-actions{
        grid-template-columns:1fr;
    }

    .emdy-cart-form{
        grid-template-columns:145px 1fr;
    }

    .emdy-review-layout{
        grid-template-columns:1fr;
    }

    .emdy-related-grid{
        grid-template-columns:repeat(3,1fr);
    }
}

@media(max-width:760px){
    .emdy-product-info h1{
        font-size:34px;
    }

    .emdy-product-price{
        font-size:34px;
    }

    .emdy-product-specs,
    .emdy-tab-grid,
    .emdy-cart-form{
        grid-template-columns:1fr;
    }

    .emdy-related-grid{
        grid-template-columns:repeat(2,1fr);
    }
}

@media(max-width:520px){
    .emdy-related-grid{
        grid-template-columns:1fr;
    }
}
