﻿/* === RESET & BASE === */
* {
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 13px;
}

body {
    width: 100%;
}

li {
    list-style: none;
}

a {
    text-decoration: none;
}

.logo {
    width: 150px;
    height: auto;
}

/* === PRODUCT DETAILS === */
.prodetails {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    padding: 60px 10%;
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    margin-top: 30px;
}

.single-pri-image {
    flex: 1 1 40%;
}

    .single-pri-image img {
        width: 100%;
        aspect-ratio: 1 / 1;
        object-fit: cover;
        border-radius: 12px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    }

.small-img-group {
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
}

.small-img-col {
    flex-basis: 23%;
    cursor: pointer;
}

    .small-img-col img {
        width: 100%;
        height: auto;
        aspect-ratio: 1 / 1;
        object-fit: cover;
        border: 1px solid #eee;
        border-radius: 8px;
        transition: transform 0.3s ease;
    }

        .small-img-col img:hover {
            transform: scale(1.05);
            border-color: #c2185b;
        }

.single-pro-details {
    flex: 1 1 55%;
    padding-top: 50px;
}

    .single-pro-details h2 {
        font-size: 28px;
        font-weight: 600;
        color: #222;
        margin-bottom: 10px;
    }

    .single-pro-details h3 {
        font-size: 20px;
        font-weight: 500;
        color: #555;
        margin-bottom: 15px;
    }

    .single-pro-details h4 {
        font-size: 18px;
        color: #333;
        margin: 30px 0 10px;
    }

    .single-pro-details select,
    .single-pro-details input {
        margin: 10px 0;
        padding: 10px;
        font-size: 14px;
        border: 1px solid #ccc;
        border-radius: 6px;
        outline: none;
    }

        .single-pro-details input[type="number"] {
            width: 80px;
            text-align: center;
        }

    .single-pro-details button {
        display: inline-block;
        background-color: #c2185b;
        color: #fff;
        padding: 12px 24px;
        border: none;
        border-radius: 25px;
        cursor: pointer;
        font-size: 14px;
        margin-top: 10px;
        transition: background 0.3s ease;
    }

        .single-pro-details button:hover {
            background-color: #b0124c;
        }

    .single-pro-details span {
        display: block;
        margin-top: 20px;
        line-height: 1.8;
        color: #444;
        font-size: 14px;
    }

/* === REVIEW SECTION === */
.product-reviews {
    margin: 50px auto;
    padding: 20px;
    max-width: 800px;
    border-top: 2px solid #eee;
}

    .product-reviews h4 {
        font-size: 22px;
        color: #222;
        margin-bottom: 20px;
    }

.review {
    background-color: #fefefe;
    border: 1px solid #ddd;
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 15px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s ease;
}

    .review:hover {
        transform: scale(1.01);
    }

.review-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.review .stars {
    color: #ffc107;
    font-size: 14px;
}

.review-form {
    background-color: #fafafa;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #ddd;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

    .review-form h5 {
        font-size: 18px;
        margin-bottom: 15px;
    }

    .review-form input,
    .review-form textarea,
    .review-form select {
        width: 100%;
        padding: 10px;
        margin-bottom: 15px;
        font-size: 14px;
        border: 1px solid #ccc;
        border-radius: 5px;
        box-sizing: border-box;
    }

    .review-form button {
        background-color: #c2185b;
        color: #fff;
        padding: 12px 25px;
        border: none;
        border-radius: 5px;
        cursor: pointer;
        transition: background 0.3s ease;
    }

        .review-form button:hover {
            background-color: #b0124c;
        }

.rating-select label {
    font-weight: bold;
    display: block;
    margin-bottom: 5px;
}

/* === RELATED PRODUCTS === */
.related-products {
    padding: 60px 0;
    background-color: #fafafa;
}

    .related-products h4 {
        font-size: 24px;
        color: #c2185b;
        margin-bottom: 40px;
        text-align: center;
        text-transform: uppercase;
        letter-spacing: 1px;
    }

/* Container */
.related-product-container {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    justify-content: center;
    align-items: stretch;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 16px;
    box-sizing: border-box;
}

/* Each product */
.related-product {
    flex: 0 1 calc(22% - 30px);
    max-width: calc(22% - 30px);
    background-color: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.05);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    padding: 16px;
    box-sizing: border-box;
}

/* Responsive */
@media (max-width: 1024px) {
    .related-product {
        flex: 0 1 calc(30% - 30px);
        max-width: calc(30% - 30px);
    }
}

@media (max-width: 768px) {
    .related-product {
        flex: 0 1 calc(45% - 30px);
        max-width: calc(45% - 30px);
    }
}

@media (max-width: 480px) {
    .related-product {
        flex: 0 1 100%;
        max-width: 100%;
    }
}

.related-product img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 12px;
    margin-bottom: 12px;
    transition: transform 0.3s ease;
}

.related-product h5 {
    font-size: 17px;
    font-weight: 500;
    margin: 10px 0 6px;
    color: #333;
}

.related-product p {
    font-size: 15px;
    color: #d81b60;
    margin-bottom: 12px;
    font-weight: 500;
}

.related-product button {
    background-color: #d81b60;
    color: #fff;
    border: none;
    padding: 8px 18px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: background-color 0.3s ease;
}

    .related-product button:hover {
        background-color: #b0124c;
    }

.related-product:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
}

    .related-product:hover img {
        transform: scale(1.05);
    }

/* === QUANTITY ACTION BUTTONS === */
.action-buttons {
    margin: 20px 0;
    display: block;
}

.quantity-label {
    margin-right: 10px;
    font-weight: 500;
    display: inline-block;
    margin-bottom: 8px;
}

.quantity-selector {
    display: inline-flex;
    align-items: center;
    margin-bottom: 10px;
}

.btn-click {
    display: block;
}

.qty-btn {
    background: #ddd;
    border: none;
    padding: 6px 12px;
    cursor: pointer;
    border-radius: 4px;
    font-size: 16px;
    margin: 0 5px;
    transition: background 0.3s ease;
}

    .qty-btn:hover {
        background: #ccc;
    }

/* === MODAL OVERLAY === */
.modal {
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    /* làm mờ nền */
    display: flex;
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s ease-out;
}

/* === MODAL BOX === */
.modal-content {
    background-color: #ffffff;
    padding: 30px 40px;
    border-radius: 12px;
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.2);
    text-align: center;
    max-width: 400px;
    width: 90%;
    animation: scaleUp 0.3s ease-out;
}

    /* === MODAL TEXT === */
    .modal-content p {
        font-size: 16px;
        font-weight: 500;
        color: #333;
        margin-bottom: 20px;
        line-height: 1.4;
    }

    /* === MODAL BUTTON === */
    .modal-content button {
        padding: 10px 24px;
        background-color: #c2185b;
        color: #fff;
        font-size: 14px;
        font-weight: 500;
        border: none;
        border-radius: 6px;
        cursor: pointer;
        transition: background-color 0.3s ease, transform 0.2s ease;
    }

        .modal-content button:hover {
            background-color: #b0124c;
            transform: scale(1.05);
        }

/* === ANIMATIONS === */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes scaleUp {
    from {
        transform: scale(0.9);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}
