:root {
    --bg-color: #f4f6f8;
    --card-bg: #ffffff;
    --text-main: #1a202c;
    --text-muted: #4a5568;
    --primary-color: #00b894;
    --primary-hover: #00a383;
    --secondary-color: #edf2f7;
    --secondary-hover: #e2e8f0;
    --accent-color: #ff7675;
    --accent-hover: #d63031;
    --border-color: #e2e8f0;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: normal;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

/* --- HEADER & LOGO --- */
header {
    margin-bottom: 30px;
    padding-top: 20px;
    text-align: center;
}

.logo {
    font-size: 24px;
    font-weight: 700;
    text-decoration: none;
    color: var(--text-main);
    text-align: center;
}

.logo span {
    color: var(--primary-color);
}

.page-title {
    font-size: 32px;
    text-align: center;
    margin-bottom: 20px;
    line-height: normal;
    color: var(--text-main);
}

/* --- CARDS & GENERAL LAYOUT --- */
.card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    margin-bottom: 25px;
    border: 1px solid var(--border-color);
}

.input-row {
    display: flex;
    gap: 15px;
}

.input-row .input-group {
    flex: 1;
}

.input-group {
    margin-bottom: 20px;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-muted);
}

.input-group input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 16px;
    font-family: inherit;
    transition: border-color 0.2s;
}

.input-group input:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* --- SWITCHERS (GENDER & UNITS) --- */
.gender-switcher,
.unit-switcher {
    display: flex;
    background: var(--secondary-color);
    border-radius: 8px;
    padding: 4px;
}

.gender-switcher {
    margin-bottom: 15px;
}

.unit-switcher {
    margin-bottom: 25px;
}

.gender-btn,
.unit-btn {
    flex: 1;
    padding: 10px;
    font-size: 14px;
    background: transparent;
    color: var(--text-muted);
    border-radius: 6px;
    transition: all 0.2s;
    border: none;
    cursor: pointer;
    font-weight: 600;
}

.gender-btn.active,
.unit-btn.active {
    background: white;
    color: var(--primary-color);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* --- BUTTONS --- */
button {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
    font-family: inherit;
}

.primary-btn {
    background-color: var(--primary-color);
    color: white;
}

.primary-btn:hover {
    background-color: var(--primary-hover);
}

.secondary-btn {
    background-color: var(--secondary-color);
    color: var(--text-main);
    margin-top: 20px;
}

.secondary-btn:hover {
    background-color: var(--secondary-hover);
}

/* --- RESULTS COMPONENT --- */
.result-title {
    font-size: 28px;
    text-align: center;
    margin-bottom: 10px;
}

.category-text {
    text-align: center;
    font-size: 18px;
    font-weight: 500;
}

.weight-target-text {
    text-align: center;
    margin: 10px 0;
    font-size: 16px;
    color: var(--text-muted);
}

.weight-target-text strong {
    color: var(--text-main);
}

/* --- PROGRESS BAR --- */
#progress-container {
    margin: 20px 0;
    text-align: center;
}

#progress-container p {
    font-size: 14px;
    color: #64748b;
    margin-bottom: 8px;
    font-weight: 500;
}

.progress-bar {
    width: 100%;
    height: 10px;
    background-color: #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
}

#progress-fill {
    width: 0%;
    height: 100%;
    background-color: #00b894;
    border-radius: 10px;
    transition: width 2s linear;
}

/* --- HIGH-CONVERTING PRODUCT AFFILIATE CARD --- */
.affiliate-card {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.product-item {
    position: relative;
    background: #ffffff;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 28px 24px 24px 24px;
    text-align: left;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.product-badge {
    position: absolute;
    top: 0;
    left: 0;
    background: var(--text-main);
    color: #ffffff;
    font-size: 12px;
    font-weight: 700;
    padding: 4px 10px;
    border-top-left-radius: 10px;
    border-bottom-right-radius: 10px;
    letter-spacing: 0.5px;
}

.product-layout {
    display: flex;
    gap: 24px;
    align-items: flex-start;
}

.product-image-side {
    flex-shrink: 0;
}

.product-image-side img {
    width: 100px;
    height: 200px;
    object-fit: cover;
}

.product-info-side {
    flex-grow: 1;
}

.product-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-main) !important;
    margin-bottom: 6px;
    text-align: left;
}

/* Trustpilot Verification Framework */
.tp-rating-container {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
}

.tp-stars {
    display: flex;
    gap: 4px;
}

.tp-star {
    width: 18px;
    height: 18px;
    background-color: #00b67a; /* Native Trustpilot Brand Green */
    display: inline-block;
    position: relative;
    clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
}

.tp-star.half {
    background: linear-gradient(90deg, #00b67a 50%, #dcdcdc 50%);
}

.tp-score {
    font-size: 14px;
    font-weight: 700;
    color: #1c1c1c;
}

/* Technical Specification Matrix Grid */
.product-specs {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px 20px;
    margin-bottom: 20px;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    padding: 14px 0;
}

.spec-item {
    font-size: 14px;
    color: var(--text-muted);
}

.spec-item strong {
    color: var(--text-main);
}

.product-info-side .affiliate-btn {
    display: inline-block;
    background-color: var(--accent-color);
    color: white;
    text-decoration: none;
    width: auto;
    min-width: 180px;
    text-align: center;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 15px;
    transition: background-color 0.2s;
}

.product-info-side .affiliate-btn:hover {
    background-color: var(--accent-hover);
}

/* --- CONTENT SECTIONS & MISC --- */
.content-section {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 25px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    text-align: justify;
    text-justify: inter-word;
}

.content-section h2 {
    margin-bottom: 15px;
}

.content-section ul {
    margin-top: 15px;
    padding-left: 20px;
    color: var(--text-muted);
}

.disclaimer {
    font-size: 13px;
    color: var(--text-muted);
    background: #e2e8f0;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 30px;
}

.error {
    color: var(--accent-hover);
    margin-top: 15px;
    text-align: center;
    font-size: 14px;
}

.hidden {
    display: none !important;
}

/* --- FOOTER --- */
footer {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
    color: var(--text-muted);
    margin-bottom: 30px;
}

.footer-links {
    margin-bottom: 10px;
}

.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    margin: 0 10px;
}

.footer-links a:hover {
    color: var(--primary-color);
}

/* --- GLOBAL RESPONSIVE MEDIA QUERIES --- */
@media (max-width: 768px) {
    body.results-active .container {
        padding-top: 5px;
    }

    body.results-active header, 
    body.results-active .page-title {
        display: none; 
    }
	body.results-active .page-desc {
        display: none; 
    }

    #result-card {
        margin-top: 0;
        margin-bottom: 10px;
    }
	.page-title {
        font-size: 25px;
    }
}

@media (max-width: 540px) {
    .product-layout {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .product-title {
        text-align: center;
        margin-top: 10px;
    }
    
    .tp-rating-container {
        justify-content: center;
    }
    
    .product-specs {
        grid-template-columns: 1fr;
        gap: 8px;
        text-align: left;
        max-width: 280px;
        margin: 0 auto 20px auto;
    }
    
    .product-info-side .affiliate-btn {
        width: 100%;
    }
}