/* Interactive Tea Selection Experience */

/*
   Note: Base .tea-card styles (height, border-radius, etc.) are now primarily
   controlled by the global style.css for consistency. This file focuses on the
   interactive overlay elements.
*/

/* Overlays for Brewing Instructions */
.brewing-instructions {
    position: absolute;
    inset: 0;
    z-index: 5;
    transition: all 0.5s cubic-bezier(0.23, 1, 0.320, 1);
    background: linear-gradient(transparent, rgba(0,0,0,0.85));
    color: white;
    padding: 20px;
    display: flex;
    align-items: flex-end;
    transform: translateY(100%);
}

.tea-card:hover .brewing-instructions {
    transform: translateY(0);
}

.brewing-instructions-content {
    width: 100%;
}

.brewing-instructions h4 {
    text-align: center;
    font-family: var(--heading-font);
    color: var(--accent-gold);
    margin-bottom: 1rem;
    font-size: 1.1rem;
    font-weight: 500;
}

.brewing-steps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

.brewing-step {
    text-align: center;
}

.brewing-step-icon {
    font-size: 1.5rem;
    margin-bottom: 5px;
    line-height: 1;
}

.brewing-step-value {
    font-weight: 700;
    font-size: 1rem;
    font-family: var(--body-font);
}

.brewing-step-label {
    font-size: 0.7rem;
    opacity: 0.7;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}


/* Tea Finder Quiz */
.tea-finder-section {
    padding: 6rem 0;
    background: var(--bg-light);
    position: relative;
}

.tea-finder-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 2rem;
    text-align: center;
}

.quiz-header {
    margin-bottom: 3rem;
}

.quiz-header h2 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.quiz-container {
    background: white;
    border-radius: 20px;
    padding: 3rem;
    box-shadow: 0 15px 40px rgba(0,0,0,0.08);
    border: 1px solid var(--border-color);
}

.quiz-question h3 {
    font-family: var(--heading-font);
    font-size: 1.5rem;
    margin-bottom: 2rem;
    color: var(--text-dark);
}

.quiz-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.quiz-option {
    padding: 1.2rem;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
    font-size: 1rem;
}

.quiz-option:hover {
    border-color: var(--accent-gold);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.quiz-option.selected {
    border-color: var(--primary-green);
    background: var(--primary-green);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(45, 90, 61, 0.2);
}

.quiz-navigation {
    margin-top: 3rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.quiz-progress {
    flex: 1;
    height: 8px;
    background: var(--border-color);
    border-radius: 4px;
    margin: 0 2rem;
    overflow: hidden;
}

.quiz-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-green), var(--accent-gold));
    width: 0%;
    transition: width 0.4s ease;
    border-radius: 4px;
}

.quiz-btn {
    padding: 0.8rem 2.5rem;
    background: var(--primary-green);
    color: white;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s ease;
    font-family: var(--body-font);
    font-weight: 500;
}

.quiz-btn:hover:not(:disabled) {
    background: #1e3d29;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.quiz-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

/* Mobile adjustments for quiz navigation */
@media (max-width: 600px) {
    .tea-finder-container {
        padding: 0 1.25rem;
    }

    .quiz-container {
        padding: 2rem 1.5rem;
    }

    .quiz-navigation {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }

    .quiz-progress {
        margin: 0.5rem 0 0;
        width: 100%;
    }

    .quiz-btn {
        width: 100%;
        max-width: none;
    }
}

/* ── Quiz Results — Product Cards ─────────────────────────────── */
.quiz-result {
    display: none;
    padding: 1rem 0 0.5rem;
}

/* Header */
.qr-header {
    text-align: center;
    margin-bottom: 2rem;
}
.qr-badge {
    display: inline-block;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--accent-gold);
    margin-bottom: 0.6rem;
}
.qr-title {
    font-family: var(--heading-font);
    font-size: clamp(1.6rem, 3.5vw, 2.4rem);
    color: var(--text-dark);
    margin: 0 0 0.5rem;
    font-weight: 400;
}
.qr-tagline {
    font-size: 0.9rem;
    color: var(--text-light);
}

/* Product grid */
.qr-products {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.4rem;
    margin-bottom: 2.2rem;
}

/* Single product card */
.qr-card {
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    background: white;
    display: flex;
    flex-direction: column;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.qr-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.09);
}

.qr-card-img-wrap {
    position: relative;
    aspect-ratio: 4/3;
    overflow: hidden;
    background: var(--bg-light);
}
.qr-card-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}
.qr-card:hover .qr-card-img-wrap img {
    transform: scale(1.05);
}
.qr-card-type-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(45,90,61,0.88);
    color: white;
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 3px 9px;
    border-radius: 20px;
    backdrop-filter: blur(4px);
}

.qr-card-body {
    padding: 1.1rem 1.2rem 1.3rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}
.qr-card-name {
    font-family: var(--heading-font);
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-dark);
    margin: 0 0 0.25rem;
    line-height: 1.3;
}
.qr-card-price {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--primary-green);
    margin: 0 0 0.55rem;
}
.qr-card-desc {
    font-size: 0.8rem;
    color: var(--text-light);
    line-height: 1.6;
    margin: 0 0 1rem;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Add to Cart button on the card */
.qr-add-btn {
    width: 100%;
    padding: 0.6rem 1rem;
    background: var(--primary-green);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.82rem;
    font-weight: 600;
    font-family: var(--body-font);
    letter-spacing: 0.04em;
    transition: background 0.2s ease, transform 0.15s ease;
    margin-top: auto;
}
.qr-add-btn:hover {
    background: #1e3d29;
    transform: translateY(-1px);
}
.qr-add-btn--added {
    background: var(--accent-gold) !important;
    color: #1a1a1a;
    transform: none !important;
}

/* Footer actions */
.qr-footer {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
    padding-top: 0.5rem;
}
.quiz-btn-ghost {
    background: transparent !important;
    border: 2px solid var(--primary-green);
    color: var(--primary-green) !important;
}
.quiz-btn-ghost:hover {
    background: var(--primary-green) !important;
    color: white !important;
}

@media (max-width: 600px) {
    .qr-products {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.9rem;
    }
    .qr-card-desc { -webkit-line-clamp: 2; }
    .qr-footer { flex-direction: column; align-items: stretch; }
    .qr-footer .quiz-btn, .qr-footer a.quiz-btn { text-align: center; }
}


/* Gongfu Tea Ceremony Tutorial */
.gongfu-ceremony-section {
    padding: 6rem 0;
    background: linear-gradient(135deg, #1a4d32 0%, #2d5a3d 50%, #1e3d29 100%);
    color: white;
    position: relative;
    overflow: hidden;
}

.gongfu-ceremony-section::before, .gongfu-ceremony-section::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
}

.gongfu-ceremony-section::before {
    background-image:
        radial-gradient(circle at 20% 30%, rgba(212, 165, 116, 0.15) 0%, transparent 60%),
        radial-gradient(circle at 80% 70%, rgba(255, 255, 255, 0.08) 0%, transparent 50%);
}

.gongfu-ceremony-section::after {
     background-image:
        linear-gradient(45deg, transparent 40%, rgba(212, 165, 116, 0.03) 50%, transparent 60%),
        linear-gradient(-45deg, transparent 40%, rgba(255, 255, 255, 0.02) 50%, transparent 60%);
}

.ceremony-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    position: relative;
    z-index: 2;
}

.ceremony-header {
    text-align: center;
    margin-bottom: 4rem;
}

.ceremony-header h2 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    font-weight: 400;
    background: linear-gradient(135deg, #ffffff 40%, #d4a574 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.ceremony-header p {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.8);
    max-width: 700px;
    margin: 0 auto;
}

.ceremony-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2.5rem;
}

.ceremony-step {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 20px;
    padding: 2.5rem;
    text-align: center;
    border: 1px solid rgba(212, 165, 116, 0.2);
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
    animation: ceremonyStepReveal 0.8s ease forwards;
    opacity: 0;
}

.ceremony-step::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 50% 0, rgba(212, 165, 116, 0.1) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.ceremony-step:hover {
    transform: translateY(-10px);
    border-color: rgba(212, 165, 116, 0.5);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
}

.ceremony-step:hover::before {
    opacity: 1;
}

.step-number {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--accent-gold) 0%, #b8956a 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    box-shadow: 0 5px 15px rgba(212, 165, 116, 0.3);
}

.step-title {
    font-family: var(--heading-font);
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: white;
}

.step-description {
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.8);
}


/* Staggered animation delays would be applied via JS */
.ceremony-step:nth-child(1) { animation-delay: 0.1s; }
.ceremony-step:nth-child(2) { animation-delay: 0.2s; }
.ceremony-step:nth-child(3) { animation-delay: 0.3s; }
.ceremony-step:nth-child(4) { animation-delay: 0.4s; }
.ceremony-step:nth-child(5) { animation-delay: 0.5s; }
.ceremony-step:nth-child(6) { animation-delay: 0.6s; }

@keyframes ceremonyStepReveal {
    from {
        opacity: 0;
        transform: translateY(40px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}


/* Responsive Design */
@media (max-width: 768px) {
    .tea-name-chinese { font-size: 1.4rem; }
    .brewing-steps { grid-template-columns: 1fr; gap: 10px; }
    .quiz-options { grid-template-columns: 1fr; }
    .flavor-wheel { width: 280px; height: 280px; }

    .ceremony-header h2 { font-size: 2.5rem; }
    .gongfu-ceremony-section { padding: 4rem 0; }
    .ceremony-steps { grid-template-columns: 1fr; }
    .ceremony-step { padding: 2rem; }
}