/* ==========================================================
   PRODUCT DETAILS PAGE
========================================================== */

.product-page {
    padding: 70px 0 100px;
    background: #f8f6ef;
    min-height: 70vh;
}

.product-back {
    margin-bottom: 30px;
}

.product-back-link {
    color: #314b1f;
    font-weight: 700;
    text-decoration: none;
}

.product-back-link:hover {
    color: #c59b39;
}

.product-details {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
    gap: 55px;
    align-items: start;
}

.product-image-wrap {
    position: relative;
    overflow: hidden;
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 15px 35px rgba(0, 0, 0, .08);
}

.product-image {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
}

.product-badge {
    position: absolute;
    top: 20px;
    padding: 10px 16px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 14px;
}

.product-badge-best {
    left: 20px;
    background: #dfa719;
    color: #fff;
}

.product-badge-promotion {
    left: 20px;
    bottom: 20px;
    top: auto;
    background: #c59b39;
    color: #fff;
}

.product-info {
    padding: 10px 0;
}

.product-category {
    display: inline-block;
    margin-bottom: 15px;
    padding: 7px 14px;
    border-radius: 50px;
    background: #edf4e8;
    color: #314b1f;
    font-size: 13px;
    font-weight: 700;
    text-transform: capitalize;
}

.product-info h1 {
    margin: 0 0 15px;
    color: #17361e;
    font-size: 46px;
    line-height: 1.15;
}

.product-rating {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 25px;
}

.product-stars {
    color: #c59b39;
    font-weight: 700;
}

.product-reviews {
    color: #777;
}

.product-description {
    margin: 0 0 25px;
    color: #52605a;
    font-size: 17px;
    line-height: 1.7;
}

.product-price {
    margin-bottom: 25px;
    color: #284b1b;
    font-size: 32px;
    font-weight: 800;
}

.product-meta {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 28px;
}

.product-meta-item {
    padding: 16px;
    border: 1px solid #e1e5dc;
    border-radius: 14px;
    background: #fff;
}

.product-meta-label {
    display: block;
    margin-bottom: 6px;
    color: #888;
    font-size: 12px;
}

.product-meta-item strong {
    color: #314b1f;
    font-size: 14px;
}

.product-available {
    color: #159447 !important;
}

.product-sold {
    color: #c43b32 !important;
}

.product-quantity {
    margin-bottom: 22px;
}

.product-quantity label {
    display: block;
    margin-bottom: 8px;
    color: #314b1f;
    font-weight: 700;
}

.quantity-control {
    display: inline-flex;
    align-items: center;
    overflow: hidden;
    border: 1px solid #dfe5dc;
    border-radius: 12px;
    background: #fff;
}

.quantity-btn {
    width: 42px;
    height: 42px;
    border: 0;
    background: #edf4e8;
    color: #314b1f;
    font-size: 20px;
    cursor: pointer;
}

.quantity-control input {
    width: 55px;
    height: 42px;
    border: 0;
    text-align: center;
    font-weight: 700;
    color: #314b1f;
}

.product-actions {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
}

.product-add-cart,
.product-menu-btn {
    min-height: 48px;
    padding: 12px 24px;
    border-radius: 50px;
    font-weight: 700;
    text-decoration: none;
}

.product-add-cart {
    border: 0;
    background: #314b1f;
    color: #fff;
    cursor: pointer;
}

.product-menu-btn {
    border: 1px solid #314b1f;
    color: #314b1f;
    background: #fff;
}

.product-links {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    padding: 18px 0;
    border-top: 1px solid #e3e3dc;
    border-bottom: 1px solid #e3e3dc;
}

.product-links button,
.product-links a {
    padding: 0;
    border: 0;
    background: none;
    color: #52605a;
    font-size: 13px;
    cursor: pointer;
    text-decoration: none;
}

.product-links button:hover,
.product-links a:hover {
    color: #c59b39;
}

.product-halal {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-top: 22px;
    padding: 18px;
    border-radius: 14px;
    background: #edf4e8;
}

.product-halal strong {
    color: #314b1f;
}

.product-halal span {
    color: #52605a;
    font-size: 14px;
}


/* ==========================================================
   MOBILE
========================================================== */

@media (max-width: 768px) {

    .product-page {
        padding: 45px 0 70px;
    }

    .product-details {
        grid-template-columns: 1fr;
        gap: 35px;
    }

    .product-info h1 {
        font-size: 36px;
    }

    .product-meta {
        grid-template-columns: 1fr;
    }

    .product-actions {
        flex-direction: column;
    }

    .product-add-cart,
    .product-menu-btn {
        width: 100%;
        text-align: center;
    }

}

/* Product share modal */
body.cdm-share-open { overflow: hidden; }
.cdm-share-modal { position: fixed; inset: 0; z-index: 3000; display: flex; align-items: center; justify-content: center; padding: 24px; }
.cdm-share-modal[hidden] { display: none; }
.cdm-share-backdrop { position: absolute; inset: 0; background: rgba(15, 34, 19, .62); backdrop-filter: blur(3px); }
.cdm-share-dialog { position: relative; z-index: 1; width: min(440px, 100%); padding: 28px; border: 1px solid #e4dccd; border-radius: 22px; background: #fffdf8; box-shadow: 0 24px 70px rgba(0,0,0,.25); text-align: center; }
.cdm-share-close { position: absolute; top: 12px; right: 14px; width: 36px; height: 36px; border: 0; border-radius: 50%; background: #f2eee5; color: #314b1f; font-size: 24px; cursor: pointer; }
.cdm-share-preview { width: 150px; height: 150px; margin: 0 auto 18px; overflow: hidden; border-radius: 16px; background: #f2eee5; }
.cdm-share-preview img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cdm-share-dialog h2 { margin: 0 0 8px; color: #17361e; }
.cdm-share-description { margin: 0 auto 20px; max-width: 360px; color: #68635a; line-height: 1.5; }
.cdm-share-actions { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.cdm-share-actions button { min-height: 46px; padding: 10px 12px; border: 1px solid #d9cfbb; border-radius: 10px; background: #f8f5ec; color: #17361e; font-weight: 800; cursor: pointer; }
.cdm-share-actions button:hover { background: #e9dfc8; }
.cdm-share-status { min-height: 22px; margin-top: 12px; color: #31551f; font-weight: 700; }
@media (max-width: 520px) { .cdm-share-dialog { padding: 24px 18px; } .cdm-share-actions { grid-template-columns: 1fr; } }

/* ==========================================================
   PRODUCT HISTORY / STORY
   ========================================================== */

.product-story {
    margin: 26px 0;
    padding: 22px 24px;
    border: 1px solid #e2d7bb;
    border-radius: 16px;
    background: #fffdf8;
}

.product-story h2 {
    margin: 0 0 10px;
    color: #17361e;
    font-size: 22px;
}

.product-story p {
    margin: 8px 0 0;
    color: #52605a;
    line-height: 1.7;
}

.product-story-origin strong {
    color: #17361e;
}

.product-story a {
    display: inline-block;
    margin-top: 12px;
    color: #a97a00;
    font-weight: 700;
    text-decoration: none;
}

.product-story a:hover {
    text-decoration: underline;
}
.product-favourite-form{display:inline}.product-links .product-favourite-button{font:inherit;background:none;border:0;padding:0;cursor:pointer}.product-links .product-favourite-button.is-favourite{font-weight:700}.product-links .product-favourite-button:disabled{opacity:.6;cursor:wait}

/* ==========================================================
   Customer Favourites
========================================================== */
.product-favourite-form {
    display: inline-flex;
    margin: 0;
}

.product-links .product-favourite-button {
    font: inherit;
    color: inherit;
    background: none;
    border: 0;
    padding: 0;
    cursor: pointer;
}

.product-links .product-favourite-button.is-favourite {
    color: var(--gold);
    font-weight: 800;
}

.product-links .product-favourite-button:disabled {
    opacity: .6;
    cursor: wait;
}


/* Public dish likes on product page */
.product-like-form{display:inline-flex;align-items:center;gap:6px;margin:0}
.product-links .product-like-button{font:inherit;background:none;border:0;padding:0;cursor:pointer;color:#777;font-size:1.55rem;line-height:1}
.product-links .product-like-button.is-liked{color:#b33a3a}
.product-links .product-like-button:disabled{opacity:.55;cursor:wait}
.product-like-count{color:#555;font-size:.86rem;font-weight:700}
.product-like-label{color:#888;font-size:.8rem}
