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

.product-page {
    padding-top: 32px;
    padding-bottom: 50px;
}

/* =========================================================
   MAIN LAYOUT
========================================================= */

.single-product-top {
    display: grid;
    grid-template-columns: minmax(280px, 420px) minmax(320px, 1fr) 320px;
    gap: 40px;
    align-items: start;
}

/* =========================================================
   PRODUCT IMAGE
========================================================= */

.product-media {
    width: 100%;
    height: 500px;
    background: #f3f4f6;
    border-radius: 18px;
    overflow: hidden;

    display: flex;
    align-items: center;
    justify-content: center;

    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
}

.product-image {
    width: 100%;
    height: 100%;

    object-fit: contain;
    object-position: center;

    display: block;
}

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

.product-details {
    width: 100%;
}

.product-title {
    font-size: 22px;
    line-height: 1;
    font-weight: 200;
    margin-bottom: 14px;
    color: #0f172a;
}

.product-stock {
    display: inline-flex;
    align-items: center;
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 18px;
}

.product-stock.in-stock {
    background: rgba(22, 163, 74, 0.12);
    color: #014219;
}

.product-stock.out-of-stock {
    background: rgba(220, 38, 38, 0.12);
    color: #dc2626;
}

.product-price {
    font-size: 24px;
    font-weight: 400;
    color: #014657;
    margin-bottom: 10px;
}

.product-total {
    font-size: 20px;
    margin-bottom: 22px;
    color: #111827;
}

.product-desc {
    font-size: 15px;
    line-height: 1.8;
    color: #4b5563;
    margin-bottom: 28px;
    max-width: 700px;
}

/* =========================================================
   QUANTITY
========================================================= */

.qty-row {
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
}

.qty-box {
    display: inline-flex;
    align-items: center;
    border: 1px solid #d1d5db;
    border-radius: 14px;
    overflow: hidden;
    background: #ffffff;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

.qty-btn {
    width: 52px;
    height: 52px;
    border: none;
    background: #f8fafc;
    font-size: 22px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.qty-btn:hover {
    background: #e2e8f0;
}

.qty-box input {
    width: 72px;
    height: 52px;
    border: none;
    text-align: center;
    font-size: 18px;
    font-weight: 700;
    color: #111827;
    background: #ffffff;
}

/* =========================================================
   ADD TO CART BUTTON
========================================================= */

.btn-cart {
    height: 52px;
    padding: 0 28px;
    border: none;
    border-radius: 14px;
    background: linear-gradient(
        135deg,
        #0891b2,
        #2563eb
    );
    color: #ffffff;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s ease;
    box-shadow: 0 10px 24px rgba(37, 99, 235, 0.22);
}

.btn-cart:hover {
    transform: translateY(-1px);
    opacity: 0.95;
}

.btn-cart:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.btn-cart.small {
    width: 100%;
    margin-top: 12px;
    height: 44px;
    font-size: 14px;
}

/* =========================================================
   ORDER SUMMARY
========================================================= */

.product-order-summary {
    background: #ffffff;
    border-radius: 22px;
    padding: 28px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 10px 30px rgba(0,0,0,0.06);
    position: sticky;
    top: 20px;
}

.product-order-summary h2 {
    font-size: 24px;
    font-weight: 800;
    margin-bottom: 26px;
    color: #0f172a;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    padding: 14px 0;
    border-bottom: 1px solid #f1f5f9;
    font-size: 15px;
    color: #334155;
}

.summary-row strong {
    color: #0f172a;
}

.summary-row.net {
    border-bottom: none;
    margin-top: 10px;
    padding-top: 22px;
    font-size: 18px;
    font-weight: 800;
}

.summary-row.net strong {
    color: #0891b2;
}

/* =========================================================
   RELATED PRODUCTS
========================================================= */

.related-products {
    margin-top: 70px;
}

.related-products h3 {
    font-size: 28px;
    font-weight: 800;
    margin-bottom: 28px;
    color: #0f172a;
}

.product-card-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 24px;
}

.product-card {
    display: block;
    background: #ffffff;
    border-radius: 20px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    border: 1px solid #e5e7eb;
    box-shadow: 0 10px 26px rgba(0,0,0,0.05);
    transition: all 0.25s ease;
    padding-bottom: 18px;
}

.product-card:hover {
    transform: translateY(-3px);
}

.product-card img {
    width: 100%;
    height: 220px;
    object-fit: contain;
    background: #f3f4f6;
}

.product-card h4 {
    font-size: 16px;
    font-weight: 700;
    margin: 16px 16px 8px;
    color: #0f172a;
}

.product-card p {
    margin: 0 16px;
    color: #0891b2;
    font-weight: 700;
}

/* =========================================================
   CLEAN DEFAULTS
========================================================= */

ul,
li {
    list-style: none;
}

/* =========================================================
   RESPONSIVE
========================================================= */

@media (max-width: 1200px) {

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

    .product-order-summary {
        position: relative;
        top: auto;
    }
}

@media (max-width: 991px) {

    .product-title {
        font-size: 30px;
    }

    .product-price {
        font-size: 28px;
    }

    .product-card-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {

    .product-page {
        padding-top: 18px;
    }

    .single-product-top {
        gap: 24px;
    }

    .product-title {
        font-size: 24px;
    }

    .product-price {
        font-size: 24px;
    }

    .product-total {
        font-size: 18px;
    }

    .qty-row {
        flex-direction: column;
        align-items: stretch;
    }

    .btn-cart {
        width: 100%;
    }

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

    .product-order-summary {
        padding: 22px;
    }
}
/* =========================================================
   CART CONTROLS FIX
========================================================= */

.cart-controls {
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
    width: 100%;
    margin-top: 24px;
}

.cart-controls .btn-cart {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    min-width: 220px;
    height: 54px;
    flex-shrink: 0;
}
