:root {
    --primary: #1A4D2E;
    /* Deep Green */
    --accent: #E6B800;
    /* Marula Gold */
    --bg-light: #F9F5F0;
    /* Cream */
    --surface: #FFFFFF;
    --text-main: #1A1A1A;
    --text-muted: #666666;
    --border: rgba(0, 0, 0, 0.08);
    --shadow-soft: 0 4px 20px rgba(0, 0, 0, 0.05);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: #f0f0f0;
    color: var(--text-main);
    height: 100vh;
    display: flex;
    justify-content: center;
    /* Minimum font size for mobile readability */
    font-size: 16px;
}

.app-container {
    width: 100%;
    max-width: 480px;
    background: var(--bg-light);
    height: 100%;
    position: relative;
    display: flex;
    flex-direction: column;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.1);
}

/* Header */
.app-header {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.logo {
    font-family: 'Playfair Display', serif;
    font-weight: 600;
    font-size: 20px;
    color: var(--primary);
}

.highlight {
    color: var(--accent);
}

/* Content Area */
.content-area {
    flex: 1;
    overflow-y: auto;
    padding-bottom: 80px;
    -webkit-overflow-scrolling: touch;
    /* Smooth scrolling on iOS */
}

/* Certifications */
.cert-badges {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
    margin: 16px 0;
}

.cert-badge-link {
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s;
    /* Minimum touch target size */
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cert-badge-link:hover {
    transform: scale(1.05);
}

.cert-badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    background: white;
    padding: 10px;
    border-radius: 8px;
    box-shadow: var(--shadow-soft);
    width: 80px;
}

.cert-icon {
    font-size: 20px;
}

.cert-name {
    font-size: 10px;
    text-align: center;
    color: var(--text-muted);
}

/* Nutrition Label */
.nutrition-label {
    background: white;
    border: 1px solid #000;
    padding: 12px;
    font-family: Helvetica, Arial, sans-serif;
    color: black;
    font-size: 12px;
}

.nutrition-header {
    display: flex;
    justify-content: space-between;
    border-bottom: 4px solid black;
    padding-bottom: 4px;
    margin-bottom: 4px;
    font-weight: 700;
    font-size: 14px;
}

.nutrition-row {
    display: flex;
    justify-content: space-between;
    padding: 2px 0;
    border-bottom: 1px solid #ddd;
}

.nutrition-row.thick-border {
    border-bottom: 2px solid black;
    padding-bottom: 4px;
    margin-bottom: 4px;
}

.nutrition-row strong {
    font-weight: 700;
}

/* Tab Content */
.tab-content {
    display: none;
    animation: fadeIn 0.3s ease-in;
}

.tab-content.active {
    display: block;
}

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

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

/* Product Section */
.hero-product {
    background: linear-gradient(135deg, var(--primary) 0%, #2d6b47 100%);
    padding: 24px 20px;
    color: white;
    text-align: center;
}

.product-image-container {
    margin-bottom: 16px;
}

.product-img {
    width: 140px;
    height: 140px;
    object-fit: contain;
    filter: drop-shadow(0 8px 20px rgba(0, 0, 0, 0.2));
    max-width: 100%;
}

.product-title {
    font-family: 'Playfair Display', serif;
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 8px;
}

.product-subtitle {
    font-size: 14px;
    opacity: 0.9;
}

.section-block {
    padding: 20px;
    background: white;
    margin: 12px;
    border-radius: 16px;
    box-shadow: var(--shadow-soft);
}

.section-block h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.icon {
    font-size: 20px;
}

/* Data Grid */
.data-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.data-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}

.data-row:last-child {
    border-bottom: none;
}

.label {
    font-size: 14px;
    color: var(--text-muted);
    font-weight: 500;
}

.value {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-main);
    text-align: right;
}

.value.link {
    color: var(--primary);
    text-decoration: none;
}

/* Product Description */
.product-description {
    font-size: 15px;
    line-height: 1.6;
    color: var(--text-main);
    margin-bottom: 16px;
}

/* Uses Tags */
.uses-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.use-tag {
    background: var(--bg-light);
    padding: 8px 14px;
    border-radius: 20px;
    font-size: 13px;
    color: var(--primary);
    font-weight: 500;
    border: 1px solid var(--border);
}

/* Timeline (Journey) */
.timeline {
    position: relative;
    padding-left: 30px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 10px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, var(--primary), var(--accent));
}

.timeline-item {
    position: relative;
    margin-bottom: 24px;
    padding-bottom: 24px;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -26px;
    top: 0;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--primary);
    border: 3px solid white;
    box-shadow: 0 0 0 2px var(--primary);
}

.timeline-date {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.timeline-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 4px;
}

.timeline-location {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.timeline-description {
    font-size: 14px;
    line-height: 1.5;
    color: var(--text-main);
}

/* Mini Badges in Timeline */
.mini-badges {
    display: flex;
    gap: 6px;
    margin-top: 8px;
    flex-wrap: wrap;
}

.mini-badge-link {
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s;
    /* Minimum touch target */
    min-height: 44px;
    display: flex;
    align-items: center;
}

.mini-badge-link:hover {
    transform: scale(1.05);
}

.mini-badge {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    color: var(--primary);
    display: inline-flex;
    align-items: center;
    gap: 4px;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

/* Circular Economy Diagram */
.circular-diagram {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
    margin: 24px 0;
    padding: 20px;
    background: linear-gradient(135deg, rgba(26, 77, 46, 0.05) 0%, rgba(230, 184, 0, 0.05) 100%);
    border-radius: 16px;
}

.circle-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    width: 90px;
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s;
    /* Minimum touch target */
    min-height: 44px;
    padding: 8px;
}

.circle-item:hover {
    transform: scale(1.05);
}

.circle-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border: 3px solid var(--primary);
}

.circle-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--primary);
    text-align: center;
}

/* Use Blocks */
.use-block {
    margin-bottom: 20px;
    padding: 16px;
    background: white;
    border-radius: 12px;
    border-left: 4px solid var(--accent);
}

.use-block h4 {
    font-size: 16px;
    color: var(--primary);
    margin-bottom: 8px;
}

.use-block p {
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-main);
}

/* Brand Section */
.brand-story {
    font-size: 15px;
    line-height: 1.7;
    color: var(--text-main);
    margin-bottom: 20px;
}

.social-links {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.social-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    background: white;
    border: 2px solid var(--border);
    border-radius: 12px;
    text-decoration: none;
    color: var(--text-main);
    font-weight: 600;
    transition: all 0.2s;
    /* Minimum touch target */
    min-height: 44px;
}

.social-btn:hover {
    border-color: var(--primary);
    background: var(--bg-light);
    transform: translateX(4px);
}

.social-icon {
    font-size: 24px;
}

/* Bottom Navigation */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 480px;
    background: white;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-around;
    padding: 8px 0;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.05);
    z-index: 100;
}

.tab-btn {
    background: none;
    border: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    color: var(--text-muted);
    cursor: pointer;
    transition: color 0.2s;
    width: 25%;
    /* Minimum touch target */
    min-height: 48px;
    padding: 8px;
    -webkit-tap-highlight-color: transparent;
    /* Remove tap highlight on mobile */
}

.tab-btn svg {
    stroke-width: 2;
}

.tab-btn span {
    font-size: 11px;
    font-weight: 500;
}

.tab-btn.active {
    color: var(--primary);
}

.tab-btn.active svg {
    stroke: var(--primary);
}

/* Mobile-specific improvements */
@media (max-width: 480px) {
    body {
        font-size: 16px;
        /* Prevent zoom on input focus */
    }

    .app-container {
        max-width: 100%;
        box-shadow: none;
    }

    .product-title {
        font-size: 22px;
    }

    .section-block {
        margin: 8px;
        padding: 16px;
    }

    .section-block h3 {
        font-size: 17px;
    }

    .data-row {
        padding: 10px 0;
    }

    .label,
    .value {
        font-size: 14px;
    }

    .timeline-title {
        font-size: 15px;
    }

    .timeline-description {
        font-size: 13px;
    }

    /* Ensure touch targets are large enough */
    .tab-btn {
        min-height: 56px;
        padding: 10px 4px;
    }

    .cert-badge-link,
    .mini-badge-link,
    .circle-item {
        min-width: 48px;
        min-height: 48px;
    }

    .social-btn {
        min-height: 52px;
        padding: 16px;
    }

    /* Better spacing for small screens */
    .circular-diagram {
        gap: 12px;
        padding: 16px;
    }

    .circle-item {
        width: 80px;
    }

    .circle-icon {
        width: 55px;
        height: 55px;
        font-size: 24px;
    }
}

/* Very small screens */
@media (max-width: 360px) {
    .product-img {
        width: 120px;
        height: 120px;
    }

    .product-title {
        font-size: 20px;
    }

    .tab-btn span {
        font-size: 10px;
    }

    .circle-item {
        width: 70px;
    }

    .circle-icon {
        width: 50px;
        height: 50px;
        font-size: 22px;
    }
}