/* =========================================================
   MATSYORA - MOBILE PRODUCT DETAILS
   STANDARD MOBILE HEADER + PROFESSIONAL PRODUCT DETAILS
========================================================= */

@media screen and (max-width: 768px) {


    /* ==========================================
       GLOBAL
    ========================================== */

    * {
        box-sizing: border-box;
    }

    html,
    body {
        margin: 0;
        padding: 0;
        width: 100%;
    }

    body {
        background: #f4f7fb;
        color: #0f172a;
        font-family: Arial, sans-serif;
        overflow-x: hidden;
    }


    /* ==========================================
       TOP HEADER
       SAME AS MY ORDERS
    ========================================== */

    .top-header {
        width: 100%;
        height: auto;

        padding: 12px 12px 10px;

        background: linear-gradient(
            90deg,
            #fff7ed 0%,
            #fffbeb 50%,
            #ffffff 100%
        );

        display: flex;
        flex-direction: column;

        align-items: center;
        justify-content: center;

        gap: 0;

        border-bottom: 1px solid #dbeafe;

        box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);

        position: sticky;
        top: 0;

        z-index: 100;
    }


    /* ==========================================
       BRAND
    ========================================== */

    .brand {
        display: flex;

        align-items: center;
        justify-content: center;

        gap: 9px;

        width: fit-content;
        max-width: 100%;

        margin: 0 auto 14px;

        padding: 0;

        min-width: 0;
    }


    /* ==========================================
       LOGO
    ========================================== */

    .logo {
        width: 52px;
        height: 52px;

        margin: 0;
        padding: 0;

        flex-shrink: 0;

        display: flex;

        align-items: center;
        justify-content: center;
    }

    .logo img {
        width: 100px;
        height: 100px;

        object-fit: contain;

        display: block;

        margin: 0;
        padding: 0;

        transform: none;
    }


    /* ==========================================
       BRAND TEXT
    ========================================== */

    .brand > div:last-child {
        display: flex;

        flex-direction: column;

        align-items: flex-start;
        justify-content: center;

        min-width: 0;
    }

    .brand h2 {
        margin: 0;

        padding: 0;

        font-size: 38px;

        line-height: 0.95;

        font-weight: 800;

        letter-spacing: -1.4px;

        white-space: nowrap;

        color: #0b376d;
    }

    .brand h2 span {
        color: #ff8c00;
    }

    .brand p {
        margin: 5px 0 0;

        padding: 0;

        font-size: 12px;

        line-height: 1.2;

        font-weight: 500;

        color: #5d6b82;

        letter-spacing: 0.1px;

        white-space: nowrap;
    }


    /* ==========================================
       NAVIGATION
    ========================================== */

    .nav-buttons {
        display: grid;

        grid-template-columns: 1fr 1fr;

        gap: 10px;

        width: 100%;

        margin: 0;

        padding: 0;
    }

    .nav-buttons .outline-btn {
        display: flex;

        align-items: center;
        justify-content: center;

        width: 100%;
        min-width: 0;

        min-height: 56px;

        padding: 14px 8px;

        margin: 0;

        background: #ffffff;

        border: 1px solid #3b82f6;
        border-radius: 16px;

        color: #2563eb;

        font-size: 15px;
        font-weight: 700;

        line-height: 1.2;

        text-align: center;

        text-decoration: none;

        white-space: nowrap;

        box-shadow: none;
    }


    /* Hide My Orders only on product details mobile */

    .nav-buttons .outline-btn.green {
        display: none;
    }


    /* Profile */

    .nav-buttons .outline-btn.profile {
        border-color: #6366f1;

        color: #4f46e5;
    }


    /* Logout */

    .nav-buttons .outline-btn.red {
        border-color: #ef4444;

        color: #dc2626;
    }


    /* ==========================================
       CART BUTTON / BADGE
    ========================================== */

    .nav-buttons .cart-btn {
        position: relative;
    }

    .cart-badge {
        position: absolute;

        top: -7px;
        right: -5px;

        min-width: 25px;
        height: 25px;

        padding: 0 7px;

        display: flex;

        align-items: center;
        justify-content: center;

        background: #dc2626;

        border: 2px solid #ffffff;

        border-radius: 999px;

        color: #ffffff;

        font-size: 11px;
        font-weight: 800;

        line-height: 1;

        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15);

        z-index: 5;
    }


    /* ==========================================
       PRODUCT PAGE WRAPPER
    ========================================== */

    .product-detail-wrapper {
        width: 100%;
        max-width: 100%;

        margin: 0 auto;

        padding: 16px 12px 30px;
    }


    /* ==========================================
       PRODUCT CARD
    ========================================== */

    .product-detail-card {
        width: 100%;

        display: flex;
        flex-direction: column;

        margin: 0 0 12px;

        padding: 0;

        background: #ffffff;

        border: 1px solid #e2e8f0;
        border-radius: 16px;

        overflow: hidden;

        box-shadow:
            0 4px 14px rgba(15, 23, 42, 0.06);
    }


    /* ==========================================
       PRODUCT IMAGE
    ========================================== */

    .product-image-box {
        width: 100%;

        height: auto;
        min-height: 0;

        display: flex;

        align-items: center;
        justify-content: center;

        padding: 14px;

        background: #ffffff;

        border: none;
        border-radius: 0;
    }

    .product-image-box img {
        display: block;

        width: 100%;
        height: auto;

        max-width: 360px;
        max-height: 280px;

        margin: 0 auto;

        object-fit: contain;

        border-radius: 12px;
    }


    /* ==========================================
       PRODUCT INFORMATION
    ========================================== */

    .product-info-box {
        width: 100%;

        padding: 16px;

        background: #ffffff;
    }


    /* ==========================================
       BREADCRUMB
    ========================================== */

    .breadcrumb {
        margin: 0 0 7px;

        padding: 0;

        color: #94a3b8;

        font-size: 10.5px;
        font-weight: 500;

        line-height: 1.4;

        word-break: break-word;
    }


    /* ==========================================
       PRODUCT TITLE
    ========================================== */

    .product-info-box h1 {
        margin: 0 0 8px;

        padding: 0;

        color: #0f172a;

        font-size: 23px;
        font-weight: 800;

        line-height: 1.2;

        word-break: break-word;
    }


    /* ==========================================
       RATING
    ========================================== */

    .rating {
        margin: 0 0 10px;

        padding: 0;

        color: #f59e0b;

        font-size: 13px;

        line-height: 1.4;
    }

    .rating span {
        margin-left: 4px;

        color: #64748b;

        font-size: 11.5px;
        font-weight: 600;
    }


    /* ==========================================
       PRICE
    ========================================== */

    .detail-price {
        margin: 0 0 8px;

        padding: 0;

        color: #0f172a;

        font-size: 27px;
        font-weight: 800;

        line-height: 1.2;
    }

    .detail-price span {
        margin-left: 2px;

        color: #64748b;

        font-size: 14px;
        font-weight: 600;
    }


    /* ==========================================
       STOCK
    ========================================== */

    .stock {
        width: fit-content;

        margin: 0 0 13px;

        padding: 6px 10px;

        border-radius: 999px;

        font-size: 11.5px;
        font-weight: 700;

        line-height: 1.2;
    }

    .stock.available {
        background: #dcfce7;

        color: #166534;
    }

    .stock.unavailable {
        background: #fee2e2;

        color: #b91c1c;
    }


    /* ==========================================
       ADD TO CART
    ========================================== */

    .detail-add-btn {
        width: 100%;

        min-height: 46px;

        margin: 0;

        padding: 12px 16px;

        background: #16a34a;

        border: none;
        border-radius: 10px;

        color: #ffffff;

        font-size: 14px;
        font-weight: 700;

        font-family: inherit;

        line-height: 1.2;

        cursor: pointer;

        box-shadow:
            0 3px 8px rgba(22, 163, 74, 0.16);
    }

    .detail-add-btn:active {
        background: #15803d;

        transform: scale(0.99);
    }

    .detail-add-btn.disabled,
    .detail-add-btn:disabled {
        background: #cbd5e1;

        color: #64748b;

        cursor: not-allowed;

        opacity: 1;

        box-shadow: none;
    }


    /* ==========================================
       QUANTITY CONTROLS
    ========================================== */

    .detail-qty-box {
        width: 100%;

        min-height: 46px;

        display: flex;

        align-items: center;
        justify-content: space-between;

        gap: 10px;

        margin: 0;

        padding: 5px;

        background: #f8fafc;

        border: 1px solid #dbeafe;
        border-radius: 10px;
    }

    .detail-minus,
    .detail-plus {
        width: 42px;
        height: 36px;

        flex-shrink: 0;

        display: flex;

        align-items: center;
        justify-content: center;

        margin: 0;
        padding: 0;

        background: #2563eb;

        border: none;
        border-radius: 8px;

        color: #ffffff;

        font-size: 20px;
        font-weight: 700;

        font-family: inherit;

        line-height: 1;

        cursor: pointer;
    }

    .detail-minus:active,
    .detail-plus:active {
        background: #1d4ed8;
    }

    .detail-qty {
        flex: 1;

        display: flex;

        align-items: center;
        justify-content: center;

        color: #0f172a;

        font-size: 15px;
        font-weight: 800;

        text-align: center;
    }

/* ==========================================
   PREMIUM QUICK FEATURES
========================================== */

.quick-points {
    width: 100%;

    display: grid;
    grid-template-columns: 1fr 1fr;

    gap: 8px;

    margin-top: 14px;
}

.quick-points > div {
    min-height: 44px;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 9px 6px;

    background: linear-gradient(
        145deg,
        #ffffff 0%,
        #f8fbff 100%
    );

    border: 1px solid #dbe4f0;
    border-radius: 12px;

    color: #334155;

    font-size: 10.5px;
    font-weight: 700;

    line-height: 1.25;

    text-align: center;

    box-shadow:
        0 3px 8px rgba(15, 23, 42, 0.04);
}


/* ==========================================
   PREMIUM DETAIL CARDS
========================================== */

.detail-section {
    position: relative;

    width: 100%;

    margin: 0 0 14px;

    padding: 18px 16px 16px;

    background: linear-gradient(
        180deg,
        #ffffff 0%,
        #fdfefe 100%
    );

    border: 1px solid #dfe7f1;
    border-radius: 16px;

    overflow: hidden;

    box-shadow:
        0 6px 18px rgba(15, 23, 42, 0.06);
}


/* colored premium accent line */

.detail-section::before {
    content: "";

    position: absolute;

    top: 0;
    left: 0;

    width: 100%;
    height: 4px;

    background: linear-gradient(
        90deg,
        #2563eb,
        #38bdf8,
        #22c55e
    );
}


/* ==========================================
   SECTION HEADINGS
========================================== */

.detail-section > h2 {
    display: flex;

    align-items: baseline;
    flex-wrap: wrap;

    gap: 5px;

    margin: 0 0 13px;

    padding: 0 0 10px;

    color: #0f172a;

    font-size: 18px;
    font-weight: 800;

    line-height: 1.25;

    border-bottom: 1px solid #edf2f7;
}

.detail-section > h2 span {
    color: #64748b;

    font-size: 10.5px;
    font-weight: 500;
}


/* ==========================================
   DESCRIPTION
========================================== */

.detail-section > p {
    margin: 0;

    color: #475569;

    font-size: 13px;
    font-weight: 400;

    line-height: 1.65;

    letter-spacing: 0.05px;
}


/* ==========================================
   NUTRITION GRID
========================================== */

.nutrition-grid {
    width: 100%;

    display: grid;
    grid-template-columns: 1fr 1fr;

    gap: 9px;

    margin: 0;
}

.nutrition-grid > div {
    position: relative;

    min-height: 82px;

    display: flex;
    flex-direction: column;

    align-items: center;
    justify-content: center;

    padding: 12px 8px;

    background: #ffffff;

    border: 1px solid #dbe4ee;
    border-radius: 12px;

    overflow: hidden;

    text-align: center;

    box-shadow:
        0 3px 9px rgba(15, 23, 42, 0.04);
}


/* small top accent on each nutrition card */

.nutrition-grid > div::before {
    content: "";

    position: absolute;

    top: 0;
    left: 0;

    width: 100%;
    height: 3px;

    background: #3b82f6;
}


/* different subtle colors */

.nutrition-grid > div:nth-child(2)::before {
    background: #f59e0b;
}

.nutrition-grid > div:nth-child(3)::before {
    background: #8b5cf6;
}

.nutrition-grid > div:nth-child(4)::before {
    background: #22c55e;
}


/* Nutrition label */

.nutrition-grid h3 {
    margin: 0 0 5px;

    color: #64748b;

    font-size: 10.5px;
    font-weight: 700;
}


/* Nutrition value */

.nutrition-grid p {
    margin: 0;

    color: #0f172a;

    font-size: 18px;
    font-weight: 800;

    line-height: 1.15;
}


/* ==========================================
   VITAMINS / MINERALS
========================================== */

.nutrition-extra {
    width: 100%;

    margin-top: 12px;

    padding: 12px;

    background: linear-gradient(
        145deg,
        #f8fafc,
        #ffffff
    );

    border: 1px solid #e2e8f0;
    border-radius: 11px;
}

.nutrition-extra p {
    margin: 0 0 8px;

    color: #475569;

    font-size: 11.8px;

    line-height: 1.5;
}

.nutrition-extra p:last-child {
    margin-bottom: 0;
}

.nutrition-extra strong {
    color: #0f172a;

    font-weight: 800;
}


/* disclaimer */

.nutrition-extra .nutrition-note {
    margin: 10px -12px -12px;

    padding: 9px 12px;

    background: #f8fafc;

    border-top: 1px solid #e2e8f0;

    color: #94a3b8;

    font-size: 9.3px;

    font-style: italic;

    line-height: 1.45;
}


/* ==========================================
   HEALTH BENEFITS
========================================== */

.benefits-list {
    width: 100%;

    margin: 0;

    padding: 0;

    display: grid;

    grid-template-columns: 1fr;

    gap: 7px;

    list-style: none;
}

.benefits-list li {
    position: relative;

    width: 100%;

    margin: 0;

    padding: 10px 12px;

    background: linear-gradient(
        145deg,
        #f0fdf4,
        #ffffff
    );

    border: 1px solid #d1fae5;
    border-radius: 10px;

    color: #334155;

    font-size: 12px;
    font-weight: 500;

    line-height: 1.45;

    box-shadow:
        0 2px 6px rgba(22, 163, 74, 0.04);
}


/* ==========================================
   SMALL PHONES
========================================== */

@media screen and (max-width: 390px) {

    .detail-section {
        padding: 16px 14px 14px;
    }

    .detail-section > h2 {
        font-size: 17px;
    }

    .nutrition-grid {
        gap: 7px;
    }

    .nutrition-grid > div {
        min-height: 76px;

        padding: 10px 6px;
    }

    .nutrition-grid p {
        font-size: 17px;
    }

    .nutrition-extra {
        padding: 10px;
    }

    .nutrition-extra .nutrition-note {
        margin-left: -10px;
        margin-right: -10px;
        margin-bottom: -10px;
    }

    .quick-points > div {
        font-size: 10px;
    }
}
}