.page-khuyen-mai {
    font-family: 'Arial', sans-serif;
    color: #333333; /* Body background is light #F5F7FA, so text is dark */
    line-height: 1.6;
    background-color: #F5F7FA; /* Consistent with body background info */
}

.page-khuyen-mai__hero-section {
    position: relative;
    width: 100%;
    padding-top: 10px; /* Small top padding, shared.css handles body padding */
    padding-bottom: 40px;
    background-color: #E53935; /* Primary brand color for hero section background */
    overflow: hidden; /* Ensure content doesn't overflow */
}

.page-khuyen-mai__hero-image-wrapper {
    width: 100%;
    max-height: 500px; /* Limit height for desktop */
    overflow: hidden;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.page-khuyen-mai__hero-image {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover; /* Cover for desktop, will change to contain for mobile */
    opacity: 0.8; /* Slight overlay for text readability */
}

.page-khuyen-mai__hero-content {
    position: relative; /* Relative for normal flow */
    z-index: 2; /* Ensure content is above image overlay if any */
    text-align: center;
    max-width: 900px;
    margin: 30px auto 0 auto;
    padding: 0 20px;
    color: #ffffff; /* White text on dark primary brand color background */
}

.page-khuyen-mai__main-title {
    font-size: clamp(2.5rem, 5vw, 3.5rem); /* Use clamp for H1 font size */
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 15px;
    color: #ffffff;
}

.page-khuyen-mai__intro-text {
    font-size: clamp(1rem, 2vw, 1.25rem);
    margin-bottom: 30px;
    opacity: 0.9;
}

.page-khuyen-mai__cta-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap; /* Allow wrapping on smaller screens */
    width: 100%; /* Ensure container takes full width */
    max-width: 100%;
    box-sizing: border-box;
    padding: 0 15px;
}

.page-khuyen-mai__btn-primary,
.page-khuyen-mai__btn-secondary,
.page-khuyen-mai__btn-tertiary {
    display: inline-block;
    padding: 14px 28px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    box-sizing: border-box; /* Crucial for responsive buttons */
    white-space: normal; /* Allow text to wrap */
    word-wrap: break-word; /* Allow long words to break */
}

.page-khuyen-mai__btn-primary {
    background: linear-gradient(180deg, #FF5A4F 0%, #E53935 100%);
    color: #ffffff;
    border: 2px solid transparent;
}

.page-khuyen-mai__btn-primary:hover {
    background: linear-gradient(180deg, #E53935 0%, #FF5A4F 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.page-khuyen-mai__btn-secondary {
    background: #ffffff;
    color: #E53935;
    border: 2px solid #E53935;
}

.page-khuyen-mai__btn-secondary:hover {
    background: #f0f0f0;
    color: #FF5A4F;
    border-color: #FF5A4F;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.page-khuyen-mai__btn-tertiary {
    background: #E53935;
    color: #ffffff;
    border: none;
    padding: 10px 20px;
    font-size: 0.9rem;
    border-radius: 5px;
}

.page-khuyen-mai__btn-tertiary:hover {
    background: #FF5A4F;
    transform: translateY(-1px);
}

.page-khuyen-mai__btn-small {
    padding: 10px 20px;
    font-size: 0.9rem;
    border-radius: 5px;
    max-width: 200px; /* Limit width for small buttons */
}

.page-khuyen-mai__section {
    padding: 60px 0;
    background-color: #F5F7FA;
}

.page-khuyen-mai__section--overview {
    background-color: #ffffff;
}

.page-khuyen-mai__section--types {
    background-color: #F5F7FA;
}

.page-khuyen-mai__section--details {
    background-color: #ffffff;
}

.page-khuyen-mai__section--howto {
    background-color: #F5F7FA;
}

.page-khuyen-mai__section--terms {
    background-color: #ffffff;
}

.page-khuyen-mai__section--faq {
    background-color: #F5F7FA;
}

.page-khuyen-mai__section--cta-final {
    background-color: #E53935;
    color: #ffffff;
    text-align: center;
}

.page-khuyen-mai__section--cta-final .page-khuyen-mai__section-title,
.page-khuyen-mai__section--cta-final .page-khuyen-mai__text-block {
    color: #ffffff;
}

.page-khuyen-mai__container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    box-sizing: border-box;
}

.page-khuyen-mai__container--center {
    text-align: center;
}

.page-khuyen-mai__section-title {
    font-size: clamp(1.8rem, 3.5vw, 2.5rem);
    font-weight: 700;
    color: #E53935; /* Primary brand color for titles */
    text-align: center;
    margin-bottom: 40px;
    line-height: 1.3;
}

.page-khuyen-mai__section--cta-final .page-khuyen-mai__section-title {
    color: #ffffff;
}

.page-khuyen-mai__text-block {
    font-size: 1rem;
    margin-bottom: 20px;
    text-align: left;
}

.page-khuyen-mai__text-block:last-child {
    margin-bottom: 0;
}

.page-khuyen-mai__promo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

.page-khuyen-mai__promo-card {
    background: #ffffff;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #e0e0e0;
}

.page-khuyen-mai__promo-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.page-khuyen-mai__card-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

.page-khuyen-mai__card-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #E53935;
    margin: 20px 15px 10px;
    line-height: 1.4;
}

.page-khuyen-mai__card-description {
    font-size: 0.95rem;
    color: #555555;
    padding: 0 15px 20px;
    flex-grow: 1;
}

.page-khuyen-mai__promo-card .page-khuyen-mai__btn-tertiary {
    margin: 0 15px 20px;
    width: calc(100% - 30px);
}

.page-khuyen-mai__article-body {
    max-width: 900px;
    margin: 0 auto 40px auto;
    text-align: left;
    padding: 0 20px;
}

.page-khuyen-mai__article-figure {
    width: 100%;
    margin-bottom: 30px;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.page-khuyen-mai__detail-image {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

.page-khuyen-mai__article-subtitle {
    font-size: 1.5rem;
    font-weight: 600;
    color: #E53935;
    margin-top: 30px;
    margin-bottom: 15px;
    line-height: 1.4;
}

.page-khuyen-mai__article-body p {
    margin-bottom: 15px;
}

.page-khuyen-mai__article-body ul {
    list-style: disc;
    margin-left: 20px;
    margin-bottom: 20px;
    padding-left: 0;
}

.page-khuyen-mai__article-body ul li {
    margin-bottom: 8px;
}

.page-khuyen-mai__article-body .page-khuyen-mai__btn-primary {
    margin-top: 20px;
    margin-bottom: 40px;
    display: inline-block;
}

.page-khuyen-mai__steps-list {
    list-style: none;
    counter-reset: step-counter;
    padding: 0;
    max-width: 800px;
    margin: 40px auto;
}

.page-khuyen-mai__steps-list li {
    counter-increment: step-counter;
    font-size: 1.1rem;
    margin-bottom: 25px;
    padding-left: 50px;
    position: relative;
    text-align: left;
}

.page-khuyen-mai__steps-list li::before {
    content: counter(step-counter);
    position: absolute;
    left: 0;
    top: 0;
    width: 35px;
    height: 35px;
    background-color: #E53935;
    color: #ffffff;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: 700;
    font-size: 1.1rem;
}

.page-khuyen-mai__steps-list li strong {
    color: #E53935;
}

.page-khuyen-mai__cta-buttons--center {
    margin-top: 40px;
}

.page-khuyen-mai__terms-list {
    list-style: disc;
    margin-left: 20px;
    padding-left: 0;
    max-width: 900px;
    margin: 30px auto;
    text-align: left;
}

.page-khuyen-mai__terms-list li {
    margin-bottom: 10px;
    font-size: 1rem;
    color: #555555;
}

/* FAQ Styles */
details.page-khuyen-mai__faq-item {
  margin-bottom: 15px;
  border-radius: 5px;
  border: 1px solid #e0e0e0;
  overflow: hidden;
  background: #fff;
}
details.page-khuyen-mai__faq-item summary.page-khuyen-mai__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px;
  cursor: pointer;
  user-select: none;
  list-style: none;
  transition: background-color 0.3s ease;
}
details.page-khuyen-mai__faq-item summary.page-khuyen-mai__faq-question::-webkit-details-marker {
  display: none;
}
details.page-khuyen-mai__faq-item summary.page-khuyen-mai__faq-question:hover {
  background: #f5f5f5;
}
.page-khuyen-mai__faq-qtext {
  flex: 1;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.5;
  text-align: left;
  color: #333333;
}
.page-khuyen-mai__faq-toggle {
  font-size: 24px;
  font-weight: bold;
  color: #666;
  flex-shrink: 0;
  margin-left: 15px;
  width: 28px;
  text-align: center;
}
details.page-khuyen-mai__faq-item .page-khuyen-mai__faq-answer {
  padding: 0 20px 20px;
  background: #f9f9f9;
  border-radius: 0 0 5px 5px;
  color: #555555;
}
details.page-khuyen-mai__faq-item .page-khuyen-mai__faq-answer p {
    margin-bottom: 0;
}


/* --- Responsive Styles --- */

/* Tablet and smaller desktops */
@media (max-width: 1024px) {
    .page-khuyen-mai__hero-content {
        max-width: 800px;
        margin-top: 20px;
    }

    .page-khuyen-mai__main-title {
        font-size: clamp(2.2rem, 4.5vw, 3rem);
    }

    .page-khuyen-mai__intro-text {
        font-size: clamp(0.95rem, 1.8vw, 1.1rem);
    }

    .page-khuyen-mai__section-title {
        font-size: clamp(1.6rem, 3vw, 2.2rem);
    }

    .page-khuyen-mai__promo-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 20px;
    }

    .page-khuyen-mai__btn-primary,
    .page-khuyen-mai__btn-secondary {
        padding: 12px 25px;
        font-size: 0.95rem;
    }

    .page-khuyen-mai__card-title {
        font-size: 1.15rem;
    }

    .page-khuyen-mai__article-subtitle {
        font-size: 1.4rem;
    }
}


/* Mobile Styles (max-width: 768px) - MUST INCLUDE ALL LISTED ITEMS */
@media (max-width: 768px) {
    .page-khuyen-mai__section {
        padding: 40px 0;
    }

    .page-khuyen-mai__container {
        padding: 0 15px !important; /* Force padding for containers */
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
    
    /* HERO 主图区域 */
    .page-khuyen-mai__hero-section {
        padding-top: 10px;
        padding-bottom: 30px;
    }

    .page-khuyen-mai__hero-image-wrapper {
        max-height: 300px;
    }
    
    .page-khuyen-mai__hero-image {
        object-fit: contain !important; /* MUST BE CONTAIN for mobile */
        aspect-ratio: unset !important; /* Allow natural aspect ratio */
        width: 100% !important;
        height: auto !important;
    }

    .page-khuyen-mai__hero-content {
        margin-top: 20px;
        padding: 0 15px;
    }

    .page-khuyen-mai__main-title {
        font-size: clamp(1.8rem, 8vw, 2.5rem);
        margin-bottom: 10px;
    }

    .page-khuyen-mai__intro-text {
        font-size: 0.95rem;
        margin-bottom: 20px;
    }

    /* 按钮与按钮容器 */
    .page-khuyen-mai__cta-buttons {
        flex-direction: column; /* Stack buttons vertically */
        gap: 15px;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        padding: 0 15px !important;
    }

    .page-khuyen-mai__btn-primary,
    .page-khuyen-mai__btn-secondary,
    .page-khuyen-mai__btn-tertiary,
    .page-khuyen-mai a[class*="button"],
    .page-khuyen-mai a[class*="btn"] {
        width: 100% !important;
        max-width: 100% !important;
        padding: 12px 15px !important;
        font-size: 1rem !important;
        white-space: normal !important;
        word-wrap: break-word !important;
        box-sizing: border-box !important;
    }
    
    .page-khuyen-mai__cta-buttons--center {
        padding: 0 15px !important;
    }

    .page-khuyen-mai__section-title {
        font-size: clamp(1.5rem, 7vw, 2rem);
        margin-bottom: 30px;
        padding: 0 10px;
    }

    /* 通用图片与容器 */
    .page-khuyen-mai img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block !important;
    }

    /* 产品展示图区域 (promo-grid) */
    .page-khuyen-mai__promo-grid {
        grid-template-columns: 1fr; /* Single column for mobile */
        gap: 20px;
        overflow-x: hidden; /* Prevent horizontal scroll */
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
    
    .page-khuyen-mai__promo-card {
        margin: 0 auto;
        max-width: 400px; /* Constrain card width for better readability */
    }

    .page-khuyen-mai__card-image {
        height: 180px;
    }

    .page-khuyen-mai__card-title {
        font-size: 1.1rem;
        margin: 15px 10px 8px;
    }

    .page-khuyen-mai__card-description {
        font-size: 0.9rem;
        padding: 0 10px 15px;
    }
    
    .page-khuyen-mai__promo-card .page-khuyen-mai__btn-tertiary {
        margin: 0 10px 15px;
        width: calc(100% - 20px);
    }

    /* 装饰主标题 + 长文 SEO 区 */
    .page-khuyen-mai__article-body {
        padding: 0 15px;
        margin-bottom: 30px;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    .page-khuyen-mai__article-figure {
        margin-bottom: 20px;
    }
}