/* ============================================================
   DETAIL PAGE — IMAGE + VIDEO SLIDER + PRODUCT DETAILS
   (FINAL WORKING CODE — NO CONFLICTS)
============================================================ */

/* Main container */
.detail-page {
    width: 100%;
    display: flex;
    justify-content: center;
}

.detail-wrapper {
    display: flex;
    gap: 40px;
    max-width: 1100px;
    width: 90%;
    margin: 40px auto;
    padding: 30px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* --------------------------
   LEFT COLUMN — SLIDER
--------------------------- */
.detail-gallery {
    flex: 1;
    max-width: 500px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Main display box */
.detail-main-box {
    width: 100%;
    height: 420px;
    background: #fdfdfd;
    border: 1px solid #ddd;
    border-radius: 8px;
    position: relative;
    overflow: hidden;
    margin-bottom: 15px;
}

/* Each slide */
.detail-slide {
    position: absolute;
    inset: 0;
    display: none;
    justify-content: center;
    align-items: center;
}

.detail-slide.active {
    display: flex;
}

/* Media inside slide */
.detail-main-box img,
.detail-main-box video {
    width: auto !important;
    height: auto !important;
    max-width: 100% !important;
    max-height: 100% !important;
    object-fit: contain !important;
}

/* --------------------------
   THUMBNAILS
--------------------------- */
.detail-thumbs {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    width: 100%;
    padding: 5px 0;
    justify-content: center;
}

.detail-thumb-box {
    position: relative;
    cursor: pointer;
}

.detail-thumb {
    width: 70px;
    height: 70px;
    object-fit: cover;
    border: 2px solid transparent;
    border-radius: 5px;
    opacity: 0.6;
    transition: all 0.3s ease;
}

.detail-thumb.active-thumb {
    opacity: 1;
    border-color: #007bff;
    transform: scale(1.05);
}

/* Video icon on thumbnail */
.detail-video-badge {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 10px;
}

/* --------------------------
   NEXT / PREVIOUS BUTTONS
--------------------------- */
.detail-buttons {
    display: flex;
    gap: 20px;
    margin-top: 15px;
}

.detail-buttons button {
    padding: 8px 20px;
    background: #f0f0f0;
    border: 1px solid #ccc;
    cursor: pointer;
    font-weight: bold;
    border-radius: 6px;
}

.detail-buttons button:hover {
    background: #e0e0e0;
}

/* --------------------------
   RIGHT COLUMN — PRODUCT INFO
--------------------------- */
.detail-info {
    flex: 1;
    padding-top: 10px;
}

.detail-info h2 {
    font-size: 2em;
    margin-bottom: 15px;
}

.detail-price {
    font-size: 1.1em;
}

.detail-discount {
    font-size: 1.3em;
    color: #d9534f;
    font-weight: bold;
}

.detail-description {
    margin: 20px 0 30px;
    line-height: 1.8;
    /* Slightly increased for better readability */
    color: #444;
    /* Softer black reduces eye strain */

    /* --- The "Box" Effect --- */
    background-color: #f9f9f9;
    /* Very light gray background */
    padding: 25px;
    /* Adds breathing room inside the box */
    border-radius: 8px;
    /* Soft rounded corners */
    border: 1px solid #e0e0e0;
    /* Subtle border for definition */

    /* Optional: A nice accent line on the left */
    border-left: 5px solid #a1ed14;
}

.detail-add-cart {
    display: inline-block;
    padding: 15px 40px;
    background-color: #28a745;
    color: white;
    border-radius: 8px;
    font-size: 1.2em;
    font-weight: bold;
    text-decoration: none;
}

.detail-add-cart:hover {
    background-color: #218838;
}

/* --------------------------
   MOBILE RESPONSIVE
--------------------------- */
@media (max-width: 768px) {
    .detail-wrapper {
        flex-direction: column;
        align-items: center;
        padding: 15px;
    }

    .detail-gallery,
    .detail-info {
        width: 100%;
        max-width: 100%;
    }

    .detail-main-box {
        height: 320px;
    }

    .detail-thumb {
        width: 55px;
        height: 55px;
    }

    .detail-add-cart {
        width: 100%;
    }
}