/**
 * MD Care Landing - Product Page Styles
 * Hero/Banner layout for product pages
 */

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* ==========================================================================
   PRODUCT HERO SECTION
   ========================================================================== */
   /* md-product-pro-retinol-10 */
   .md-product-pro-retinol-10 .md-product-hero-container .md-product-visual-area{
    order: -1;
   }
   .image-stack img{
    width: 105% !important;
   }

.md-product-hero-banner {
    position: relative;
    width: 100%;
    height: calc(100vh - 100px );
    max-height: 1280px;
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
    /* aspect-ratio: 2592/1485; */
}

.md-product-hero-container {
    max-width: 1380px;
    width: 100%;
    margin: 0 auto;
    padding: 60px 20px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
}
.gradient-line{
    height:2px;
    width:100%;
    background:linear-gradient(90deg, #E3C880 0%, #EFE4A6 43.75%, #C69A50 84.13%);
    margin:10px 0 15px 0;
}
/* Left Side - Content Panel */
.md-product-content-panel {
    background: rgba(0, 10, 46, 0.55);
    border-radius: 24px;
    padding: 40px 35px;
    color: #ffffff;
}

.md-product-hero-title {
    font-family: 'SVN Quiche Sans', serif;
    font-size: 54px;
    font-weight: 700;
    text-transform: uppercase;
    margin: 0 0 10px 0;
}

.md-product-tagline {
    font-family: 'SVN Poppins', sans-serif;
    font-size: 22px;
    font-weight: 500;
    color: #ffffff;
    margin: 0 0 10px 0;
}

.md-product-price-line {
    font-family: 'SVN Poppins', sans-serif;
    font-size: 46px;
    font-weight: 600;    
    margin: 0 0 5px 0;
}

.md-product-description-text {
    font-family: 'SVN Poppins', sans-serif;
    font-size: 19px;
    font-weight: 500;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.9);
    margin: 0 0 20px 0;
    text-align: justify;
}

/* Action Row */
.md-product-action-row {
    display: flex;
    align-items: center;
    gap: 15px;
}

.md-quantity-selector {
    display: flex;
    align-items: center;
    gap: 0;
    background: #000b2e;
    border: solid 1px #ffffff;
    border-radius: 8px;
    
    min-height: 56px;
    max-height: 56px;
}

.md-qty-btn {
    width: 40px;
    height: 32px;
    border: none;
    background: transparent !important;
    color: #ffffff;
    font-size: 20px;
    cursor: pointer;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 5px;
}

.md-qty-btn:hover {
    /* background: rgba(255, 255, 255, 0.3); */
}

.md-care-landing.md-product-page .md-qty-input {
    width: 38px ;
    text-align: center;
    border: none;
    background: transparent;
    color: #ffffff;
    font-size: 18px;
    font-weight: 600;
    margin: 0 !important;
    padding: 0;
    padding-left: 10px;
    display: block;
    font-family: 'SVN Poppins', sans-serif;
     text-align: center;
  -moz-appearance: textfield;
   -webkit-appearance: none;
  margin: 0;
  box-shadow: none;
}

.md-care-landing.md-product-page .md-qty-input:focus {
    outline: none;
    box-shadow: none;
}

.md-btn-buy-now {
    text-align: center;
    min-width: 160px;
    /* padding: 14px 20px; */
    display: flex !important;
    justify-content: center;
    align-items: center;
    background: #000b2e;
    border: solid 1px #ffffff;
    color: #ffffff;
    font-family: 'SVN Poppins', sans-serif;
    font-size: 18px;
    font-weight: 600;
    text-transform: uppercase;   
    border-radius: 8px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    min-height: 56px;
    max-height: 56px;;
}

.md-btn-buy-now:hover {
    background-color: #051752;    
    /* background: linear-gradient(90deg, #E3C880 0%, #EFE4A6 43.75%, #C69A50 84.13%); */
    border-color: transparent;
    
}
.md-btn-buy-now:hover span{     
    background: linear-gradient(90deg, #E3C880 0%, #EFE4A6 43.75%, #C69A50 84.13%);    
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-fill-color: transparent;
}

.md-btn-cart {
    width: 56px;
    height: 56px;
    background: #000b2e;
    border: solid 1px #ffffff;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 !important;
    padding: 10px;
}

.md-care-landing.md-product-page button.md-qty-btn {
    margin: 0 !important;
}

.md-btn-cart:hover {
    background-color: #051752;    
    border-color: transparent;
}
.md-btn-cart:hover svg{
    fill: #E3C880;     
}

.md-btn-cart svg {
    width: 24px;
    height: 24px;
    fill: #ffffff;
}

/* Right Side - Product Visuals */
.md-product-visual-area {
    
}

.md-product-bottle-img {
    width: 200px;
    height: auto;
    object-fit: contain;
}

.md-product-bottle-img:nth-child(2) {
    margin-top: 60px;
}

/* ==========================================================================
   PRODUCT ACTIONS - LOADING & TOAST STYLES
   ========================================================================== */

/* Loading state for buttons */
.md-btn-cart.loading,
.md-btn-buy-now.loading {
    opacity: 0.6;
    pointer-events: none;
}

.md-btn-cart .spinner {
    width: 20px;
    height: 20px;
    animation: spin 1s linear infinite;
}

.md-btn-cart .spinner circle {
    stroke: currentColor;
    stroke-dasharray: 50;
    stroke-dashoffset: 25;
    animation: dash 1.5s ease-in-out infinite;
}

@keyframes spin {
    100% { transform: rotate(360deg); }
}

@keyframes dash {
    0% { stroke-dasharray: 1, 150; stroke-dashoffset: 0; }
    50% { stroke-dasharray: 90, 150; stroke-dashoffset: -35; }
    100% { stroke-dasharray: 90, 150; stroke-dashoffset: -124; }
}

/* Quantity input animation */
.md-qty-input.updated {
    animation: pulse 0.3s ease-out;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* Toast notifications */
.md-toast {
    position: fixed;
    bottom: -100px;
    right: 30px;
    background: #04175D;
    color: #ffffff;
    padding: 16px 24px;
    border-radius: 8px;
    font-family: 'SVN Poppins', sans-serif;
    font-size: 16px;
    font-weight: 500;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    z-index: 10000;
    transition: bottom 0.3s ease-out;
}

.md-toast.show {
    bottom: 30px;
}

.md-toast-success {
    background: #04175D;
}

.md-toast-error {
    background: #d32f2f;
}

@media (max-width: 768px) {
    .md-toast {
        right: 20px;
        left: 20px;
        text-align: center;
    }
    
    .md-toast.show {
        bottom: 20px;
    }
}

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



@media (max-width: 768px) {
    .md-product-hero-container {
        padding: 30px 20px;
    }
    .md-product-hero-banner{
        background-size: contain;
        background-position: top center;
    }
    .md-product-content-panel{
        order: 2;
        color: #011250;
        border-radius: unset;
        padding: unset;
        background: #ffffff;
    }

    .md-product-description-text,
    .md-product-hero-title.md-gradient-text,
    .md-product-tagline {
        color: #011250 !important;
        -webkit-text-fill-color: #011250 !important;
        /* background: #011250; */
    }

    .md-product-tagline {
        font-family: 'SVN Poppins', sans-serif;
        font-size: 18px;
        font-weight: 500;        
    }
    .md-product-price-line {
    font-size: 35px;
    font-weight: 600;
}

    .gradient-line {
        background: #011250;
    }
    .md-quantity-selector *{
        color: #011250 !important  ;
    }
    .md-quantity-selector input {
        padding: 0 !important;
    }
    
    .md-care-landing.md-product-page  .md-btn-buy-now {
        background: #fff;
        padding: 14px;
        font-size: 18px;
        font-weight: 500;
         flex: 1;
        text-align: center;
        border: solid 2px #011250;
        color: #011250;
    }
    .md-btn-cart{        
        background: rgba(255, 255, 255, 0.1);
        border: 2px solid #011250;
        border-radius: 8px;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    .md-care-landing.md-product-page .md-qty-input {
        width: 32px;
    }
    .md-quantity-selector {
        border: solid 2px #011250  ;
        gap: 0;
        padding: 1px;
        background: #ffffff;
    }
    .md-btn-cart svg{
        fill: #011250;        
    }
    .md-product-visual-area {
        order: 1;
        aspect-ratio: 430/568;
    }

    .md-product-hero-banner {
        min-height: auto;
    }

    .md-product-hero-container {
        grid-template-columns: 1fr;
    }

    .md-product-visual-area {
        min-height: 300px;        
    }

    .md-product-hero-title {
        font-size: 32px;
    }

    .md-product-action-row {
        flex-wrap: nowrap;
        gap: 5px;
    }
    .md-qty-btn {
    width: 28px;}    
}

/* ==========================================================================
   PRODUCT INFORMATION SECTION
   ========================================================================== */

.md-product-info {
    padding: 80px 0;
    background: #ffffff;
}

.md-product-info-title {
    font-family: 'SVN Quiche Sans', serif;
    font-size: 42px;
    font-weight: 700;
    text-align: center;
    text-transform: uppercase;
    color: #04175D;
    margin: 0 0 50px 0;

}

/* Desktop Tabs */
.md-info-tabs {
    display: flex;
    justify-content: center;     
    gap: 30px;   
}

.md-care-landing.md-product-page .md-info-tab {
    font-family: 'SVN Poppins', sans-serif;
    font-size: 24px;
    font-weight: 400;
    padding: 10px 20px;
    background: transparent;
    border: none;
    color: #000000;
    cursor: pointer;
    margin: 0 !important;
    letter-spacing: 0;
    /* transition: all 0.3s ease; */
}

.md-care-landing.md-product-page .md-info-tab span {
    
    letter-spacing: 0;
    text-transform: none;
    line-height: 1.4;
}

.md-care-landing.md-product-page .md-info-tab:hover {
    color: #04175D;
}

.md-care-landing.md-product-page .md-info-tab.active {
    background-color: #011250;
    color: #ffffff;
    border-bottom-color: #ffffff;
    position: relative;
    border-radius: 20px 20px 0 0 !important;
    font-weight: 500;
      /* transition: all 0.3s ease; */

}
.md-care-landing.md-product-page .md-info-tab.active::before,
.md-care-landing.md-product-page .md-info-tab.active::after {
  content: '';
  position: absolute;
  bottom: 0px;
  width: 20px;
  height: 20px;
  background-size: contain;
  /* transition: all 0.3s ease; */
}
.md-care-landing.md-product-page .md-info-tab.active::before {
  left: -20px;  
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='342' height='342' viewBox='0 0 342 342'%3E%3Cpath id='Path_67449' data-name='Path 67449' d='M342,0C341.9,188.8,188.85,341.83,0,342H342Z' fill='%23011250'/%3E%3C/svg%3E%0A");
}
.md-care-landing.md-product-page .md-info-tab.active::after {
  right: -20px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='342' height='342' viewBox='0 0 342 342'%3E%3Cpath id='Path_67449' data-name='Path 67449' d='M0,0C.1,188.8,153.15,341.83,342,342H0Z' fill='%23011250'/%3E%3C/svg%3E%0A");
}


.md-care-landing.md-product-page .md-info-tab.active span{
    position: relative;
}
.md-care-landing.md-product-page .md-info-tab.active span::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    height: 2px;
    background: #ffffff;
}

/* Mobile Accordion Headers */
.md-info-header {
    display: none;
    width: 100%;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: #f5f5f5;
    border: none;
    border-radius: 12px;
    margin-bottom: 15px;
    cursor: pointer;
    font-family: 'SVN Poppins', sans-serif;
    font-size: 18px;
    font-weight: 600;
    color: #04175D;
}

.md-info-arrow {
    transition: transform 0.3s ease;
}

.md-info-group.is-open .md-info-arrow {
    transform: rotate(180deg);
}

.md-info-card.cong-dung-card{
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}
/* Content Container */
.md-info-content {
    background: #011250;
    border-radius: 20px;
    padding: 30px 40px;    
    min-height: auto;
    justify-content: center;
    display: flex;
    min-height: 500px;
}

/* Cards Row */
.md-info-cards {
    display: flex;
    gap: 30px;
}
.img-cong-dung{
    width:100%;
    height:auto;
    border-radius: 16px;
 
}
.md-info-card {
    flex: 1;    
    /* min-height: 280px; */
    border-radius: 12px;
    
}

.md-care-landing.md-product-page .thanh-phan .md-info-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
    grid-auto-flow: column;
    grid-template-rows: 1fr;
    gap: 10px;
    width: 100%;
}
.md-care-landing.md-product-page .thanh-phan .md-info-card {
    height: auto;
    min-width: 0;
    max-height: 540px;
}


.thanh-phan-card .md-card-label {
    font-size: 22px;
    letter-spacing: -1.5px;
    
}
.thanh-phan-card .md-card-label .small{
    font-size: 14px;
    line-height: 1.3 !important;
    display: inline-flex;
}

.thanh-phan-card  {
    display: flex;    
    padding: 20px;
    background: linear-gradient(to top, rgb(255 255 255 / 80%), transparent);
    color: #000000;   
    flex-direction: column; 
        justify-content: end;
        background-size: cover;
}

.md-card-label {
    display: flex;
    flex-direction: column;        
    font-family: 'SVN Poppins', sans-serif;
    font-size: 16px;
    font-weight: 500;
    line-height: 1.2;
}


/* ==========================================================================
   BENEFITS LIST
   ========================================================================== */

.md-info-group.cong-dung   .md-info-content .md-info-cards{
    gap: 40px;
}
.md-info-group.cong-dung .md-info-card{
    display: flex;
    justify-content: flex-start;
    align-items: center;
}
.md-benefits-list {
    list-style: none;
    padding: 0;
    margin: 0;
    width: 100%;
}

.md-benefit-item {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 24px;
}

.md-benefit-item:last-child {
    margin-bottom: 0;
}

.md-benefit-icon {
    width: 100px;
    height: 100px;
    min-width: 100px;
    border-radius: 50%;
    /* background: rgba(255, 255, 255, 0.1); */
    display: flex;
    align-items: center;
    justify-content: center;
}

.md-benefit-icon img {
    width: 100px;
    height: 100px;
    object-fit: contain;
}

.md-benefit-text {
    font-family: 'SVN Poppins', sans-serif;
    font-size: 22px;
    font-weight: 400;
    line-height: 1.5;
    color: #ffffff;
}


/*  Danh Cho */
.img-danh-cho{
    width:100%;
    height:auto;
    border-radius: 16px; 
}

.danh-cho-card .md-card-label{
    font-size: 20px;
    text-align: center;
    color: #ffffff;
    font-weight: 300;
    padding: 20px;
    text-wrap: balance;
}


/* Chung minh lam sang */
.img-cmls{
    width:90%;
    height:auto;
    object-fit: contain;    
}

/* ==========================================================================
   BEFORE/AFTER STACKED IMAGES
   ========================================================================== */
.md-info-cards.cmls-cards{
    display: grid;
    grid-template-columns: 4fr 2fr;
    gap: 40px;
}
/* ==========================================================================
   BEFORE/AFTER STACKED IMAGES
   ========================================================================== */

.before-after-container {
    display: flex;
    gap: 60px;
    width: 100%;
}

.before-container,
.after-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.image-stack {
    position: relative;
    width: 100%;
    aspect-ratio: 380/380;
    border-radius: 16px;
    overflow: hidden;
}

.stack-text-content {
    font-family: 'SVN Poppins', sans-serif;
  font-size: 17px;
    font-weight: 300;
    color: #ffffff;    
    margin: 0;    
    text-wrap: balance;
}

.stack-text-content b {
    font-weight: 500;
}

.stack-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: bottom center;
    opacity: 0;
    transform: scale(0.95);
    transition: opacity 0.6s ease-in-out, transform 0.6s ease-in-out;
}

.stack-img.active {
    opacity: 1;
    transform: scale(1);
    z-index: 2;
}

.product-page-video-section {
    margin-bottom: 60px;
}

.md-info-card.pro-card {
        display: flex;
        justify-content: center;
        /* align-items: center; */
        /* padding: 0 10%; */
    }
.md-care-landing.md-product-page .md-testimonial-section{
    padding-bottom: 40px;
}

/* Desktop: Show only active category */
@media (min-width: 768px) {
    .md-info-group {
        display: none;
    }

    .md-info-group.is-open {
        display: block;
    }
}


/* Mobile Layout */
@media (max-width: 767px) {
    /*  Danh Cho */
    .img-danh-cho{
        aspect-ratio: 5/3;
    }
    .danh-cho-card .md-card-label {
        font-size: 17px !important;    
        padding: 10px 0;    
    }
    .md-product-hero-banner {
        height: auto;
        background-size: contain;
        background-position: top center;
    }


    .before-after-container {
        flex-direction: row;
        gap: 15px;
    }

    .img-cmls {
        width: 60%;
        height: auto;
    }

    .md-info-card.pro-card {
        display: flex;
        justify-content: center;
        align-items: center;     
    }
    .md-product-info {
        padding: 60px 0;
    }

    .md-product-info-title {
        font-size: 24px;
        margin-bottom: 30px;
    }

    /* Hide desktop tabs */
    .md-info-tabs {
        display: none;
    }

    /* Show accordion headers */
    .md-info-header {
        display: flex;
    }

    /* Hide content by default */
    .md-info-content {
        max-height: 0;
        overflow: hidden;
        padding: 0px;
        background: none;
        transition: max-height 0.4s ease-out, padding 0.4s ease-out;
        min-height: unset;
    }

    /* Show content when open */
    .md-info-group.is-open .md-info-content {
        max-height: 1000px;
        padding: 5px 0;
        width: 100%;
        border-radius: 0;
    }

    /* Stack cards vertically */
    .md-info-cards {
        flex-direction: column;
        gap: 15px;
    }

    .md-product-info .md-card-label,
    .md-product-info .md-benefit-text,
    .md-product-info .stack-text-content {
        font-size: 15px;        
        color: #000000 !important;
    }
    .thanh-phan-card {        
        min-height: 40px;
        aspect-ratio: unset;
    }
    .thanh-phan-card .md-card-label {
        font-size: 20px !important;
        z-index: 1;
    }
    .md-care-landing.md-product-page .thanh-phan .md-info-cards {
        display: grid;
        grid-template-columns: 1fr;
        gap: 1px;
        width: 100%;
        grid-auto-flow: row;
    }
    .md-info-group.thanh-phan .md-info-cards .md-info-card{
        border-radius: 0;
        position: relative;
        background-repeat: no-repeat;
        background-size: cover;
        min-height: 80px;
    }
    .md-info-group.thanh-phan .md-info-cards .md-info-card::before{
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: linear-gradient(to bottom, rgb(255 255 255 /20%), #e9e9e9);
        pointer-events: none;
    }
    .md-info-header {
        padding: 5px 0;
        background: transparent;
        border: none;
        border-radius: 0px !important;
        margin: 0 0 10px 0;
        cursor: pointer;
        font-size: 18px;
        font-weight: 600;
        color: #04175D;
        border-bottom: solid 1px #011250;
    }
    .md-info-cards.cmls-cards {   
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .md-benefit-icon {
        width: 60px;
        height: 60px;
        min-width: 60px;
        padding: 10px;
        border-radius: 50%;
        background: #011250;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    .md-benefit-icon img {
        width: 58px;
        height: 58px;
        object-fit: contain;
    }
    .product-page-video-section{
        margin: 0;
    }
}

/*=======================================================================================*/
/*=======================================================================================*/
/*=======================================================================================*/
/*=======================================================================================*/
/*=======================================================================================*/
/*=======================================================================================*/
/* Desktop/Tablet - max-width: 1024px */
@media (min-width: 769px) and (max-width: 1024px) {
    .md-info-content {
        min-height: 500px;
    }    .md-quantity-selector {    
        padding: 10px;
    }
        .md-product-hero-banner {
        background-size: contain;
        background-position: top center;
    }
    .md-product-hero-container {       
        padding: 20px;
        display: grid;
        grid-template-columns: 1fr;        
    }

    .md-product-visual-area {
        order: -1;
        aspect-ratio: 1780/1000 ;
    }
    .md-product-content-panel{
        background-color: #011250;
    }
    .md-care-landing.md-product-page .md-info-tab  {
        font-size: 18px;
        padding: 10px 16px;        
    }
    .md-info-tabs {     
        gap: 16px;
        padding: 0 32px;
    }
    .md-care-landing.md-product-page .thanh-phan-card .md-card-label {
        font-size: 20px !important;
    }
    .md-care-landing.md-product-page .thanh-phan .md-info-cards {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 10px;
        width: 100%;
        grid-auto-flow: row;
        grid-template-rows: auto;
    }
    .thanh-phan .md-info-cards .md-info-card {
     aspect-ratio: unset;
     min-height: 60px;
     height: auto;
     background-size: cover;
    }

    .md-product-info .md-card-label,
    .md-product-info .md-benefit-text,
    .md-product-info .stack-text-content {
        font-size: 16px;        
    }
    .md-benefit-icon {
        width: 80px;
        height: 80px;
    }
    .md-benefit-icon img {
        width: 70px;
        height: 70px;
    }
    .md-benefit-item {        
        margin-bottom: 10px;        
    }
/* 
    .md-product-content-panel {
        padding: 40px 30px;
    }

    .md-product-hero-title {
        font-size: 36px;
    }

    .md-product-tagline {
        font-size: 18px;
    }

    .md-product-price-line {
        font-size: 28px;
    } */
}

@media (min-width: 1024px) and (max-width: 1280px) {
    .thanh-phan-card .md-card-label {
    font-size: 18px;
    white-space: normal;
    
}
}
