/* hair-diagnosis.css */

/* MODERN STEPPER STYLES */
.hd-modern-stepper {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    margin: 0 auto 30px;
    padding: 0;
    width: 100%;
    max-width: 600px;
}

.hd-stepper-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 2;
    color: #94a3b8;
    /* Default gray for text */
}

.hd-stepper-item.active {
    color: #d14d72;
    /* Active pink text */
}

.hd-stepper-circle {
    width: 50px;
    height: 50px;
    background-color: #f1f5f9;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    transition: all 0.3s ease;
    z-index: 2;
}

.hd-stepper-item.active .hd-stepper-circle {
    background-color: #d14d72;
    color: white;
    box-shadow: 0 0 0 4px rgba(209, 77, 114, 0.2);
}

.hd-stepper-label {
    margin-top: 10px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-family: 'Inter', sans-serif;
}

.hd-stepper-line {
    flex-grow: 1;
    height: 1px;
    background-color: #e2e8f0;
    margin: 0 10px;
    position: relative;
    top: -15px;
    /* Adjust based on circle size so it hits center */
    z-index: 1;
    max-width: 100px;
}

.hd-stepper-line.active-line {
    background-color: #d14d72;
}

/* Modern Progress Bar */
.hd-modern-progress {
    width: 100%;
    max-width: 600px;
    height: 8px;
    background-color: #f1f5f9;
    border-radius: 10px;
    margin: 0 auto 30px;
    overflow: hidden;
    position: relative;
}

.hd-modern-progress-fill {
    height: 100%;
    width: 0%;
    background: #ac147a;
    /* Fallback */
    border-radius: 10px;
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Hide old progress bar */
.hd-progress-bar {
    display: none !important;
}


/* MAIN STYLES */

#hair-diagnosis-app {
    font-family: 'DM Serif Display', serif;
    /* Ajustar a la fuente del tema */
    max-width: 1100px;
    margin: 0 auto;
    padding: 20px;
    min-height: 400px;
    color: #333;
}

/* Typography */
#hair-diagnosis-app h2 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    color: #2c2c2c;
    text-align: center;
}

#hair-diagnosis-app p {
    font-family: 'Inter', sans-serif;
    /* Ajustar a la fuente del cuerpo */
    font-size: 1rem;
    line-height: 1.6;
    color: #666;
}

/* Cards */
.hd-options-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-top: 2rem;
    width: 100%;
    max-width: 600px;
    /* New: Force enough space for horizontal cards */
    justify-content: center;
}

.hd-card {
    background: #fff;
    border: 2px solid #f0f0f0;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.hd-card:hover {
    border-color: #e0a3c2;
    /* Rosa suave */
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(224, 163, 194, 0.2);
}

.hd-card.selected {
    background-color: #fff0f5;
    border-color: #d14d72;
    color: #d14d72;
}

.hd-card-icon {
    font-size: 2rem;
    margin-bottom: 10px;
    display: block;
}

/* Animations */
.fade-in {
    animation: fadeIn 0.5s ease-in forwards;
    opacity: 0;
    /* Start invisible */
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Buttons */
.hd-actions {
    margin-top: 3rem;
    display: flex;
    justify-content: space-between;
}

.hd-btn {
    background-color: #d14d72;
    color: white !important;
    /* Force white text */
    border: none;
    padding: 12px 24px;
    border-radius: 30px;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.3s;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
}

.hd-btn:hover {
    background-color: #a83254;
    color: white !important;
    /* Force white text on hover */
}

.hd-btn-secondary {
    background-color: transparent !important;
    /* Force transparent background */
    color: #999 !important;
    /* Force gray text */
    border: 1px solid #ddd !important;
}

.hd-btn-secondary:hover {
    background-color: #f9f9f9 !important;
    /* Force hover background */
    color: #666 !important;
    /* Override white text from .hd-btn */
}

/* Results */
.hd-result-container {
    text-align: center;
}

.hd-profile-summary {
    background: #fdf2f7;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 2rem;
    border-left: 5px solid #d14d72;
    text-align: left;
}

.hd-products-grid {
    display: grid;
    /* 2 products per row on mobile */
    grid-template-columns: repeat(2, 1fr);
    gap: 15px 10px;
    /* Reduced gap for mobile */
    margin-top: 2rem;
}

@media (min-width: 768px) {
    .hd-products-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 20px;
    }
}

.hd-product-card {
    border: 1px solid #eee;
    padding: 10px;
    /* Reduced padding for mobile */
    border-radius: 8px;
    text-align: center;
    display: flex;
    flex-direction: column;
}

@media (min-width: 768px) {
    .hd-product-card {
        padding: 15px;
    }
}

.hd-product-image {
    width: 100%;
    /* Shorter height on mobile so they don't look huge */
    height: 150px;
    object-fit: contain;
    /* Contain to prevent cutting off product bottles */
    border-radius: 4px;
    margin-bottom: 10px;
}

@media (min-width: 768px) {
    .hd-product-image {
        height: 200px;
    }
}

.hd-product-title {
    font-weight: bold;
    font-size: 0.85rem;
    margin-bottom: 5px;
    min-height: 2.5rem;
    color: #1a1a1a !important;
    /* Force color to prevent theme override */
    transition: none !important;
    /* Prevent opacity animations from theme */
}

.hd-product-title:hover {
    color: #1a1a1a !important;
    opacity: 1 !important;
}

@media (min-width: 768px) {
    .hd-product-title {
        font-size: 1rem;
        min-height: 3rem;
    }
}

.hd-product-price {
    font-size: 0.95rem;
    color: #555 !important;
    margin-bottom: 5px;
    transition: none !important;
}

.hd-product-price:hover {
    color: #555 !important;
    opacity: 1 !important;
}

/* Card Actions */
.hd-card-actions {
    display: flex;
    gap: 8px;
    margin-top: 15px;
    width: 100%;
    align-items: stretch;
}

.hd-card-actions .hd-btn {
    flex: 1;
    margin-top: 0 !important;
    padding: 8px 12px;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hd-card-actions form {
    margin: 0;
    display: flex;
}

.hd-btn-cart {
    background-color: #ac147a;
    /* match pink styling */
    color: white;
    border: none;
    border-radius: 12px;
    width: 44px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.3s, transform 0.2s;
    padding: 0;
}

.hd-btn-cart:hover {
    background-color: #8c0e61;
    transform: translateY(-2px);
}

.hd-card h3 {
    margin: 10px 0 5px;
    font-size: 1rem;
    font-weight: bold;
    color: #000;
}

.hd-card p {
    font-size: 0.85rem;
    color: #777;
    margin: 0;
    line-height: 1.4;
    font-family: 'Inter', sans-serif;
}

/* Custom Image Icon */
.hd-card-img-icon {
    width: 60px;
    height: 60px;
    object-fit: contain;
    margin-bottom: 10px;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.hd-custom-icon {
    width: 100%;
    height: 100%;
    object-fit: cover;
    margin: 0;
    display: block;
}

/* New Image-Focused Ref Grid */
.hd-ref-grid {
    display: grid !important;
    /* Default: 2 per row for 4+ items */
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px !important;
    max-width: 900px !important;
    margin: 1.5rem auto !important;
    width: 100% !important;
}

/* If exactly 3 items, show 3 per row on mobile */
.hd-ref-grid:has(> .hd-ref-card:last-child:nth-child(3)) {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 8px !important;
}

@media (min-width: 768px) {

    .hd-ref-grid,
    .hd-ref-grid:has(> .hd-ref-card:last-child:nth-child(3)) {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)) !important;
        gap: 20px !important;
        margin: 2rem auto !important;
    }
}

/* Question Header styling */
.hd-question-header h2 {
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.hd-question-header p {
    color: #64748b;
    margin-bottom: 2rem;
    font-size: 0.9rem;
}

@media (min-width: 768px) {
    .hd-question-header h2 {
        font-size: 1.8rem;
    }

    .hd-question-header p {
        font-size: 1rem;
    }
}

/* New sleek Edge-to-Edge Cards */
.hd-ref-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    position: relative;
    border: 3px solid transparent;
}

.hd-ref-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
}

.hd-ref-card.selected {
    border-color: #d14d72;
    /* Pink border for selection */
}

/* Image wrapper fills completely */
.hd-ref-card-img-wrapper {
    width: 100%;
    height: 180px;
    /* Reduced for 2-column mobile */
    background: linear-gradient(to bottom, #f8f9fa, #e9ecef);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

@media (min-width: 768px) {
    .hd-ref-card-img-wrapper {
        height: 250px;
    }
}

/* Content overlays at bottom or sits tightly below */
.hd-ref-card-content {
    padding: 10px 12px;
    background: #fff;
    color: #333;
    position: relative;
    width: 100%;
    text-align: center;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 70px;
}

@media (min-width: 768px) {
    .hd-ref-card-content {
        padding: 15px 20px;
        min-height: 80px;
    }
}

/* If the card HAS an image, overlay the content instead */
.hd-ref-card-img-wrapper+.hd-ref-card-content {
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0) 100%);
    color: white;
    position: absolute;
    bottom: 0;
    left: 0;
    text-align: left;
}

.hd-ref-card-content h3 {
    margin: 0 0 5px;
    font-size: 0.95rem;
    /* Smaller for mobile */
    font-weight: bold;
    color: inherit;
}

.hd-ref-card-content p {
    font-size: 0.75rem;
    /* Smaller for mobile */
    color: inherit;
    opacity: 0.8;
    margin: 0;
    line-height: 1.2;
}

@media (min-width: 768px) {
    .hd-ref-card-content h3 {
        font-size: 1.2rem;
    }

    .hd-ref-card-content p {
        font-size: 0.85rem;
        line-height: 1.3;
    }
}

/* Sizing overrides for 3-column mobile view */
@media (max-width: 767px) {
    .hd-ref-grid:has(> .hd-ref-card:last-child:nth-child(3)) .hd-ref-card-img-wrapper {
        height: 120px !important;
    }

    .hd-ref-grid:has(> .hd-ref-card:last-child:nth-child(3)) .hd-ref-card-content {
        padding: 6px !important;
        min-height: 50px !important;
    }

    .hd-ref-grid:has(> .hd-ref-card:last-child:nth-child(3)) .hd-ref-card-content h3 {
        font-size: 0.75rem !important;
    }

    .hd-ref-grid:has(> .hd-ref-card:last-child:nth-child(3)) .hd-ref-card-content p {
        font-size: 0.65rem !important;
        display: none;
        /* Hide descriptions if 3 per row on mobile to save space */
    }
}

/* NEW DIAGNOSIS BANNER */
.hd-final-banner {
    position: relative;
    background: linear-gradient(135deg, #fcebfa 0%, #feeadd 100%);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 2rem;
    display: flex;
    flex-direction: column;
    gap: 20px;
    text-align: center;
    align-items: center;
    z-index: 1;
}

.hd-final-banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 16px;
    padding: 3px;
    background: linear-gradient(to right, #da1e70 0%, #faa02b 100%);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
    z-index: -1;
}

@media (min-width: 768px) {
    .hd-final-banner {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        padding: 30px;
        gap: 30px;
        text-align: left;
    }
}

.hd-final-banner-left {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
}

@media (min-width: 768px) {
    .hd-final-banner-left {
        align-items: flex-start;
    }
}

.hd-final-pill {
    display: inline-block;
    background: rgba(209, 77, 114, 0.15);
    color: #d14d72;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    margin-bottom: 15px;
    text-transform: uppercase;
    font-family: 'Inter', sans-serif;
}

.hd-final-title {
    font-size: 1.8rem;
    font-weight: bold;
    color: #1a1a24;
    margin: 0 0 12px 0;
    line-height: 1.2;
    font-family: 'DM Serif Display', serif;
}

@media (min-width: 768px) {
    .hd-final-title {
        font-size: 2.2rem;
    }
}

.hd-final-desc {
    font-size: 0.9rem;
    color: #4a4a5a;
    margin: 0;
    line-height: 1.5;
    font-family: 'Inter', sans-serif;
}

@media (min-width: 768px) {
    .hd-final-desc {
        font-size: 0.95rem;
        line-height: 1.6;
    }
}

.hd-final-banner-right {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
}

@media (min-width: 768px) {
    .hd-final-banner-right {
        flex-direction: row;
        flex: 1.2;
        gap: 15px;
        justify-content: flex-end;
    }
}

.hd-attr-card {
    background: rgba(255, 255, 255, 0.65);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 15px;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    text-align: left;
    gap: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.02);
}

@media (min-width: 768px) {
    .hd-attr-card {
        flex-direction: column;
        justify-content: center;
        text-align: center;
        padding: 24px 15px;
        min-width: 105px;
        flex: 1;
        gap: 0;
    }
}

.hd-attr-icon {
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

@media (min-width: 768px) {
    .hd-attr-icon {
        margin-bottom: 12px;
    }
}

.hd-attr-text-group {
    display: flex;
    flex-direction: column;
}

@media (min-width: 768px) {
    .hd-attr-text-group {
        align-items: center;
    }
}

.hd-attr-label {
    font-size: 0.65rem;
    font-weight: 800;
    color: #7b8493;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 2px;
    font-family: 'Inter', sans-serif;
}

@media (min-width: 768px) {
    .hd-attr-label {
        margin-bottom: 6px;
    }
}

.hd-attr-value {
    font-size: 1.1rem;
    font-weight: 800;
    color: #1a1a24;
    font-family: 'DM Serif Display', serif;
}

/* FINAL ACTIONS */
.hd-final-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-top: 3rem;
    width: 100%;
}

@media (min-width: 768px) {
    .hd-final-actions {
        flex-direction: row;
        gap: 30px;
    }
}

.hd-btn-reset {
    background: transparent;
    border: none;
    color: #ac147a;
    /* Color matched to reference */
    font-size: 0.9rem;
    font-weight: 900;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    letter-spacing: 0.05em;
    padding: 10px 16px;
    transition: opacity 0.3s;
}

.hd-btn-reset svg {
    width: 18px;
    height: 18px;
}

.hd-btn-reset:hover {
    opacity: 0.8;
}

.hd-btn-asesoria {
    background-color: #25D366;
    /* WhatsApp Green */
    color: white;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    padding: 12px 24px;
    border-radius: 30px;
    font-family: 'Inter', sans-serif;
    letter-spacing: 0.05em;
    transition: background-color 0.3s, transform 0.2s, box-shadow 0.3s;
    box-shadow: 0 4px 10px rgba(37, 211, 102, 0.3);
    width: 100%;
    max-width: 320px;
}

.hd-btn-asesoria svg {
    width: 16px;
    height: 16px;
}

@media (min-width: 768px) {
    .hd-btn-asesoria {
        width: auto;
    }
}

.hd-btn-asesoria:hover {
    background-color: #1ebd5c;
    transform: translateY(-2px);
    color: white;
    box-shadow: 0 6px 15px rgba(37, 211, 102, 0.4);
}

/* NEW KIT RESULT STYLES */

.hd-grid-auto {
    justify-content: center;
}

.hd-section-title {
    font-size: 1.4rem;
    font-weight: bold;
    color: #1a1a24;
    text-align: center;
    margin: 1rem 0 0.5rem;
    font-family: 'DM Serif Display', serif;
}

.hd-section-sub {
    font-size: 0.9rem;
    font-weight: normal;
    color: #7b8493;
    display: inline-block;
    font-family: 'Inter', sans-serif;
    margin-left: 5px;
}

.hd-products-section {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 25px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.03);
    border: 1px solid #f0f0f0;
}

/* FLIP CARD RESULTS */
.hd-flip-wrapper {
    perspective: 1500px;
    margin: 30px auto;
    width: 100%;
    max-width: 550px;
    cursor: pointer;
}

.hd-flip-card {
    position: relative;
    width: 100%;
    transform-style: preserve-3d;
    transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    min-height: 500px;
    height: auto;
}

/* Hover on desktop */
@media (min-width: 992px) {
    .hd-flip-wrapper:hover .hd-flip-card {
        transform: rotateY(180deg);
    }
}

/* Flipped class for mobile touch */
.hd-flip-card.flipped {
    transform: rotateY(180deg);
}

.hd-flip-front,
.hd-flip-back {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    border-radius: 12px;
    overflow: hidden;
}

.hd-flip-front {
    z-index: 2;
    transform: rotateY(0deg);
}

.hd-flip-back {
    transform: rotateY(180deg);
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* When flipped, the back needs to be relative to occupy space if needed, or we use a fixed aspect ratio wrapper */
.hd-flip-card.flipped .hd-flip-front {
    pointer-events: none;
}

.hd-flip-hint {
    position: absolute;
    bottom: 15px;
    right: 15px;
    background: rgba(255, 255, 255, 0.9);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: bold;
    color: #d14d72;
    display: flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    z-index: 5;
    pointer-events: none;
    border: 1px solid rgba(209, 77, 114, 0.2);
}

@media (max-width: 991px) {
    .hd-flip-hint {
        display: flex !important;
    }
}

@media (min-width: 992px) {
    .hd-flip-hint {
        display: none !important;
    }
}

.hd-kit-img,
.hd-instructivo-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    border-radius: 12px;
}

.hd-instructivo-img {
    border: 1px solid #eee;
}

@media (max-width: 767px) {
    .hd-flip-card {
        min-height: 350px;
    }
}

.hd-cta-container {
    text-align: center;
    margin: 20px 0 40px;
}

.hd-btn-cta {
    display: inline-block;
    background: linear-gradient(135deg, #d14d72 0%, #faa02b 100%);
    color: white !important;
    font-size: 1.1rem;
    font-weight: bold;
    text-align: center;
    padding: 16px 40px;
    border-radius: 40px;
    text-decoration: none;
    box-shadow: 0 8px 20px rgba(209, 77, 114, 0.4);
    transition: all 0.3s ease;
    width: 100%;
    max-width: 350px;
    font-family: 'Inter', sans-serif;
}

.hd-btn-cta:hover {
    transform: translateY(-3px) scale(1.02) !important;
    box-shadow: 0 12px 25px rgba(209, 77, 114, 0.5);
    color: white !important;
}

.hd-btn-pulse {
    animation: hd-pulse 2.5s infinite;
}

@keyframes hd-pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 4px 15px rgba(209, 77, 114, 0.4);
    }

    50% {
        transform: scale(1.02);
        box-shadow: 0 8px 25px rgba(209, 77, 114, 0.6);
    }

    100% {
        transform: scale(1);
        box-shadow: 0 4px 15px rgba(209, 77, 114, 0.4);
    }
}

.center-content {
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
}

/* NEW INTRO LAYOUT */
.hd-intro-container {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    align-items: center;
    padding: 2rem 0;
    max-width: 1000px;
    margin: 0 auto;
}

.hd-intro-left {
    flex: 1 1 400px;
    text-align: left;
}

.hd-intro-right {
    flex: 1 1 400px;
    position: relative;
    border-radius: 20px;
}

.hd-intro-pill {
    display: inline-block;
    background: #fdf2f7;
    color: #922c50;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    margin-bottom: 20px;
    text-transform: uppercase;
}

.hd-intro-title {
    font-size: 3.5rem;
    font-family: 'DM Serif Display', serif;
    color: #922c50;
    line-height: 1.1;
    margin-bottom: 20px;
}

.hd-intro-title span {
    color: #8c7320;
    font-style: italic;
}

.hd-intro-text {
    font-size: 1.1rem;
    color: #555;
    line-height: 1.6;
    margin-bottom: 30px;
    font-family: 'Inter', sans-serif;
}

.hd-intro-btn-group {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.hd-intro-btn {
    background: #922c50;
    color: white !important;
    padding: 15px 30px;
    border-radius: 30px;
    font-size: 1.1rem;
    font-weight: bold;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(146, 44, 80, 0.3);
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.hd-intro-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(146, 44, 80, 0.4);
}

.hd-intro-avatars {
    display: flex;
    align-items: center;
    font-size: 0.85rem;
    color: #922c50;
    font-weight: bold;
    font-family: 'Inter', sans-serif;
}

.hd-intro-avatars .hd-avatar-group {
    display: flex;
}

.hd-intro-avatars img {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 2px solid white;
    margin-left: -10px;
    object-fit: cover;
}

.hd-intro-avatars img:first-child {
    margin-left: 0;
}

.hd-intro-avatars-text {
    margin-left: 10px;
}

.hd-intro-image-wrapper {
    position: relative;
    border-radius: 20px;
}

.hd-intro-image-wrapper>img {
    width: 100%;
    border-radius: 20px;
    display: block;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.hd-floating-card {
    position: absolute;
    bottom: -20px;
    left: -20px;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 15px;
    display: flex;
    gap: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    max-width: 250px;
    align-items: center;
}

.hd-floating-icon {
    background: #f7ca18;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1.2rem;
}

.hd-floating-content h4 {
    margin: 0 0 5px 0;
    font-size: 0.9rem;
    color: #333;
    font-weight: bold;
    font-family: 'Inter', sans-serif;
}

.hd-floating-content p {
    margin: 0;
    font-size: 0.75rem;
    color: #666;
    line-height: 1.3;
    font-family: 'Inter', sans-serif;
}

/* Bottom Cards */
.hd-intro-features {
    display: flex;
    gap: 20px;
    margin-top: 60px;
    flex-wrap: wrap;
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
}

.hd-feature-card {
    flex: 1 1 250px;
    background: #fdf2f7;
    border-radius: 16px;
    padding: 24px;
}

.hd-feature-card-icon {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: #922c50;
}

.hd-feature-card h4 {
    margin: 0 0 10px 0;
    color: #922c50;
    font-family: 'DM Serif Display', serif;
    font-size: 1.3rem;
}

.hd-feature-card p {
    margin: 0;
    font-size: 0.85rem;
    color: #666;
    line-height: 1.5;
    font-family: 'Inter', sans-serif;
}

@media (max-width: 767px) {
    .hd-intro-container {
        position: relative;
        padding: 4rem 1.5rem;
        min-height: 500px;
        display: flex;
        flex-direction: column;
        justify-content: center;
        text-align: center;
        border-radius: 24px;
        overflow: hidden;
        background: #fffcfd;
    }

    .hd-intro-right {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        z-index: 0;
        opacity: 0.18;
        /* Semi-translucid background */
        pointer-events: none;
        flex: none;
    }

    .hd-intro-image-wrapper,
    .hd-intro-image-wrapper>img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        border-radius: 0;
        box-shadow: none;
    }

    .hd-intro-left {
        position: relative;
        z-index: 1;
        width: 100%;
        flex: none;
        padding: 0;
    }

    .hd-intro-title {
        font-size: 2.8rem;
        margin-bottom: 15px;
    }

    .hd-intro-btn-group {
        justify-content: center;
        flex-direction: column;
        align-items: center;
        gap: 20px;
    }

    .hd-intro-btn {
        width: 100%;
        max-width: 320px;
        justify-content: center;
        padding: 18px 25px;
    }

    .hd-intro-avatars {
        justify-content: center;
    }

    .hd-floating-card {
        display: none;
        /* Hide floating card on mobile background mode */
    }

    /* Horizontal Carousel for Features */
    .hd-intro-features {
        display: flex !important;
        flex-wrap: nowrap !important;
        overflow-x: auto !important;
        gap: 15px !important;
        padding: 10px 20px 40px !important;
        margin-top: 30px !important;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .hd-intro-features::-webkit-scrollbar {
        display: none;
    }

    .hd-feature-card {
        flex: 0 0 260px !important;
        scroll-snap-align: center;
        padding: 20px;
        background: #fdf2f7;
        box-shadow: 0 4px 15px rgba(146, 44, 80, 0.05);
        border: 1px solid #fce1ed;
        text-align: center;
    }

    .hd-feature-card h4 {
        font-size: 1.1rem;
    }

    .hd-feature-card p {
        font-size: 0.8rem;
        white-space: normal;
    }
}

/* NEW PILL-STYLE OPTIONS */
.hd-pill-grid {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 12px 10px !important;
    justify-content: center !important;
    max-width: 900px !important;
    margin: 2rem auto !important;
    width: 100% !important;
}

.hd-option-pill {
    background: #fdf2f7;
    /* Very light pink */
    border: 2px solid #e1a6be;
    /* Soft pink border */
    border-radius: 50px;
    padding: 14px 28px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 700;
    font-size: 1rem;
    color: #4a0e2e;
    /* Darker berry text */
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 6px rgba(225, 166, 190, 0.1);
    font-family: 'Inter', sans-serif;
    user-select: none;
    line-height: 1.2;
}

.hd-option-pill:hover {
    background: #fce1ed;
    border-color: #d14d72;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(209, 77, 114, 0.15);
}

.hd-option-pill.selected {
    background: #d14d72;
    border-color: #d14d72;
    color: white;
    box-shadow: 0 4px 12px rgba(209, 77, 114, 0.3);
}

.hd-option-pill .hd-pill-icon {
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
}

@media (max-width: 767px) {
    .hd-option-pill {
        padding: 10px 20px;
        font-size: 0.9rem;
        gap: 8px;
    }
}

/* Variant Selectors */
.hd-product-variants-wrapper {
    margin: 10px 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
    margin-top: auto;
}

.hd-variant-group {
    display: flex;
    flex-direction: column;
    text-align: left;
}

.hd-variant-label {
    font-size: 0.75rem;
    font-weight: 700;
    color: #666;
    margin-bottom: 4px;
    text-transform: uppercase;
}

.hd-variant-select-wrapper {
    position: relative;
    width: 100%;
}

.hd-variant-select {
    width: 100%;
    padding: 8px 30px 8px 12px;
    border: 1px solid #eeecf1;
    border-radius: 8px;
    background-color: #faf9fb;
    color: #333;
    font-size: 0.85rem;
    font-family: 'Inter', sans-serif;
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
    transition: all 0.2s ease;
    outline: none;
}

.hd-variant-select:hover,
.hd-variant-select:focus {
    border-color: #d14d72;
    background-color: #fff;
    box-shadow: 0 0 0 2px rgba(209, 77, 114, 0.1);
}

.hd-variant-select-wrapper::after {
    content: "▼";
    font-size: 0.6rem;
    color: #d14d72;
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
}

/* Fix form alignment when variants are present */
.hd-form-card {
    display: flex;
    flex-direction: column;
    flex: 1;
    /* Pushes everything to align */
}

/* ================================================
   EXTRAS SECTION — Productos complementarios por tag
   ================================================ */
.hd-extras-section {
    background: linear-gradient(135deg, #fdf2f7 0%, #fef9ec 100%);
    border: 2px dashed #e8b4d0;
    border-radius: 16px;
    padding: 24px;
    margin-top: 30px;
    margin-bottom: 25px;
    position: relative;
    box-shadow: 0 4px 16px rgba(172, 20, 122, 0.06);
}

.hd-extras-header {
    text-align: center;
    margin-bottom: 20px;
}

.hd-extras-badge {
    display: inline-block;
    background: linear-gradient(135deg, #ac147a, #d4a017);
    color: white;
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 5px 14px;
    border-radius: 20px;
    font-family: 'Inter', sans-serif;
    margin-bottom: 10px;
}

.hd-extras-desc {
    font-size: 0.88rem;
    color: #888;
    font-family: 'Inter', sans-serif;
    margin: 0 auto;
    max-width: 420px;
    line-height: 1.5;
}

.hd-extras-section .hd-section-title {
    margin: 8px 0 6px;
    font-size: 1.25rem;
}

@media (min-width: 768px) {
    .hd-extras-section {
        padding: 30px;
    }

    .hd-extras-section .hd-section-title {
        font-size: 1.5rem;
    }
}