:root {
    --hmd-primary: #2ecc71;
    --hmd-dark: rgb(78, 79, 82);
    --hmd-gray: #64748b;
    --hmd-slate: #f1f5f9;
    --hmd-white: #ffffff;
    --hmd-accent: #f59e0b;
    --hmd-transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

body.dark-theme  {
    background-color: var(--color-bg-readable);		
}

/* back button */
.hmd-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    color: var(--hmd-gray);
    text-decoration: none;
    font-weight: 500;
    transition: var(--hmd-transition);
    margin-bottom: 25px; 
    border-radius: 12px;
    background: transparent;
}

body.dark-theme .hmd-back-btn {
    color: var(--color-text-warm-bright);
}

.hmd-back-btn:hover {
    color: var(--hmd-primary);
    transform: translateX(-5px); 
}

.hmd-back-btn i {
    font-size: 0.9rem;
}

.hmd-back-btn:hover {
    background: rgba(46, 204, 113, 0.1);
}


/* Container */
.hmd-page-wrapper {
    max-width: 1450px;
    margin: 10px auto 80px;
    padding: 0 30px;
    font-family: 'Kanit', sans-serif;
}

/* Grid Layout */
.hmd-main-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 50px;
    align-items: start;
}

/* Gallery System */
.hmd-gallery-sticky {
    position: sticky;
    top: 140px;
}

.hmd-main-img-box {
    position: relative;
    border-radius: 32px;
    overflow: hidden;
    height: 550px;
    background: var(--hmd-slate);
    box-shadow: 0 30px 60px rgba(0,0,0,0.1);
}
body.dark-theme .hmd-main-img-box {
    background: none;
}

.hmd-main-img-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--hmd-transition);
}

.hmd-thumbs-flex {
    display: flex;
    gap: 15px;
    margin-top: 25px;
}

.hmd-thumb-node {
    width: 100px;
    height: 100px;
    border-radius: 16px;
    overflow: hidden;
    cursor: pointer;
    border: 3px solid transparent;
    transition: var(--hmd-transition);
    opacity: 0.6;
}

.hmd-thumb-node.is-active {
    border-color: var(--hmd-primary);
    opacity: 1;
    transform: translateY(-5px);
}
body.dark-theme .hmd-thumb-node.is-active {
    border-color: var(--color-btn-orange-earth);		
}


/* Models VDO show */
.hmd-main-img-box video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: #000;
}

.fade-in {
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.hmd-thumb-node {
    position: relative; 
}

.vdo-thumb-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    z-index: 2;
    transition: var(--hmd-transition);
}

.hmd-thumb-node:hover .vdo-thumb-overlay {
    background: var(--hmd-slate);
    opacity: 0.2;
}

.hmd-main-img-box {
    box-shadow: 0 40px 80px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(255,255,255,0.1);
}


/* Info Card */
.hmd-info-panel {
    background: var(--hmd-white);
    padding: 45px;
    border-radius: 32px;
    border: 1px solid rgba(226, 232, 240, 0.8);
}
body.dark-theme .hmd-info-panel {
    /* background-color: #ffffffcf; */
    background: none;
    border: 1px solid rgba(214, 111, 0, 0.8);
}

.hmd-tag {
    background: #ecfdf5;
    color: var(--hmd-primary);
    padding: 6px 18px;
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 20px;
    display: inline-block;
}
body.dark-theme .hmd-tag {
    background: #ecfdf5;
    color: var(--color-btn-orange-earth);		
}

.hmd-title {
    font-size: 2.8rem;
    color: var(--hmd-dark);
    line-height: 1.2;
    margin-bottom: 10px;
    font-weight: 700;
}
body.dark-theme .hmd-title {
    color: var(--color-btn-orange-dark);		
}

.hmd-style-text {
    color: var(--hmd-accent);
    font-size: 1.1rem;
    display: block;
    margin-bottom: 30px;
}
body.dark-theme .hmd-style-text {
    color: var(--color-btn-orange-earth);		
}

.hmd-description {
    color: var(--hmd-gray);
    line-height: 1.8;
    font-size: 1.05rem;
    margin-bottom: 40px;
}
body.dark-theme .hmd-description {
    color: var(--color-text-warm-bright);		
}

/* Specs Grid */
.hmd-specs-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 45px;
}

.hmd-spec-card {
    background: #f8fafc;
    padding: 20px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    gap: 15px;
}
body.dark-theme .hmd-spec-card {
    background: none;
}

.hmd-spec-icon {
    width: 45px;
    height: 45px;
    background: white;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--hmd-primary);
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}
body.dark-theme .hmd-spec-icon {
    background: rgba(255, 255, 255, 0.062);
    color: var(--color-btn-orange-dark);				
}

.hmd-spec-val {
    font-weight: 700;
    color: var(--hmd-dark);
    display: block;
}
body.dark-theme .hmd-spec-val {
    color: var(--color-text-warm-bright);		
}

.hmd-spec-lab {
    font-size: 0.8rem;
    color: var(--hmd-gray);
}
body.dark-theme .hmd-spec-lab {
    color: var(--color-text-warm-bright);		
}
/* Buttons */
.hmd-btn-group {
    display: grid;
    gap: 15px;
}

.hmd-btn-primary {
    background: var(--hmd-dark);
    color: white;
    text-align: center;
    padding: 20px;
    border-radius: 16px;
    font-weight: 600;
    text-decoration: none;
    transition: var(--hmd-transition);
}
body.dark-theme .hmd-btn-primary {
    background-color: var(--color-btn-orange-earth);		
}

.hmd-btn-primary:hover {
    background: var(--hmd-primary);
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(46, 204, 113, 0.2);
}

.hmd-btn-outline {
    border: 2px solid #06c755;
    color: #06c755;
    text-align: center;
    padding: 18px;
    border-radius: 16px;
    font-weight: 600;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: var(--hmd-transition);
}
body.dark-theme .hmd-btn-outline {
    border: 2px solid var(--color-btn-orange-earth);
    color: var(--color-text-warm-bright);			
}

body.dark-theme .hmd-btn-outline i {
    color: var(--color-btn-orange-earth);		
}

.hmd-btn-outline:hover {
    background: #06c755;
    color: white;
}



/* --- Responsive Design System --- */

/* Tablet & Laptop (Small) */
@media (max-width: 1100px) {
    .hmd-page-wrapper {
        margin-top: 10px;
        padding: 0 20px;
    }

    .hmd-title {
        font-size: 2.5rem;
    }

    .hmd-main-img-box {
        height: 450px;
    }
}

/* Tablet (Portrait) */
@media (max-width: 992px) {
    .hmd-main-grid {
        grid-template-columns: 1fr; 
        gap: 30px;
    }

    .hmd-gallery-sticky {
        position: relative; 
        top: 0;
    }

    .hmd-info-panel {
        padding: 30px;
    }

    .hmd-main-img-box {
        height: 500px; 
    }
}

/* Mobile (Large & Small) */
@media (max-width: 600px) {
    .hmd-page-wrapper {
        margin-top: 10px;
        padding: 0 15px;
    }

    .hmd-main-img-box {
        height: 300px; 
        border-radius: 20px;
    }

    .hmd-thumbs-flex {
        gap: 10px;
        overflow-x: auto; 
        padding-bottom: 5px;
    }

    .hmd-thumb-node {
        width: 70px;
        height: 70px;
        flex-shrink: 0;
    }

    .hmd-info-panel {
        padding: 25px 20px;
        border-radius: 24px;
    }

    .hmd-title {
        font-size: 2rem; 
        line-height: 1.3;
    }

    .hmd-description {
        font-size: 0.95rem;
        margin-bottom: 30px;
    }

    .hmd-specs-grid {
        grid-template-columns: 1fr; 
        gap: 10px;
    }

    .hmd-spec-card {
        padding: 15px;
    }

    .hmd-btn-primary, .hmd-btn-outline {
        padding: 16px;
        font-size: 1rem;
    }
}

@media (max-width: 380px) {
    .hmd-title {
        font-size: 1.7rem;
    }
    
    .hmd-main-img-box {
        height: 250px;
    }
}




.hmd-gallery-sticky {
    width: 100%; 
    max-width: 100%;
    overflow: hidden; 
}

.hmd-main-img-box {
    width: 100%; 
    max-width: 100%;
    height: auto;
    aspect-ratio: 16 / 10; 
    position: relative;
}

.hmd-thumbs-flex {
    display: flex;
    gap: 12px;
    margin-top: 15px;
    width: 100%;
    
    overflow-x: auto; 
    padding: 5px 2px 15px 2px; 
    
    scrollbar-width: none; 
    -ms-overflow-style: none; 
}

.hmd-thumbs-flex::-webkit-scrollbar {
    display: none; 
}

.hmd-thumb-node {
    flex: 0 0 80px; 
    height: 80px;
    border-radius: 12px;
    overflow: hidden;
}

@media (max-width: 600px) {
    .hmd-main-img-box {
        height: auto;
        aspect-ratio: 1 / 1; 
        border-radius: 20px;
    }
    
    .hmd-thumb-node {
        flex: 0 0 70px; 
        height: 70px;
    }
}