html, body {
            height: 100%;
            margin: 0;
        }
        * {
            box-sizing: border-box;
        }
        :root {
            --bg: #f5ede3;
            --surface: #fff9f3;
            --text: #2c2416;
            --accent: #c97a3a;
            --secondary: #8b8075;
        }
        .app-wrap {
            font-family: 'DM Sans', sans-serif;
            height: 100%;
            overflow-y: auto;
            background: var(--bg);
            display: flex;
            align-items: flex-start;
            justify-content: center;
            padding: 2rem;
            gap: 4rem;
            position: relative;
            padding-top: 4rem;
        }
        .menu-container {
            position: fixed;
            top: calc(2rem + 100px);
            left: 2rem;
            background: none;
            border-radius: 0;
            padding: 0;
            width: auto;
            box-shadow: none;
            height: fit-content;
            flex-shrink: 0;
        }
        .menu-title {
            font-size: 1.25rem;
            font-weight: 700;
            color: var(--text);
            margin: 0 0 1.5rem 0;
            text-align: center;
            display: none;
        }
        .menu-list {
            display: flex;
            flex-direction: column;
            gap: 0.75rem;
            min-width: 150px;
        }
        .menu-item {
            display: flex;
            align-items: center;
            gap: 0.75rem;
            padding: 0.875rem 1rem;
            border: 2px solid var(--secondary);
            background: var(--bg);
            color: var(--text);
            border-radius: 0.75rem;
            font-family: 'DM Sans', sans-serif;
            font-size: 0.75rem;
            cursor: pointer;
            transition: all 0.2s;
            font-weight: 500;
            text-align: left;
        }
        .menu-item:hover {
            border-color: var(--accent);
            background: var(--surface);
        }
        .menu-item.active {
            background: var(--accent);
            color: var(--surface);
            border-color: var(--accent);
        }
        .menu-icon {
            font-size: 1.25rem;
            flex-shrink: 0;
        }
        .menu-text {
            flex: 1;
        }
        .calculator-container {
            background: var(--surface);
            border-radius: 1.5rem;
            padding: 2rem;
            max-width: 400px;
            width: 100%;
            box-shadow: 0 4px 12px rgba(44, 36, 22, 0.1);
        }
        @media (max-width: 768px) {
            .app-wrap {
                flex-direction: column;
                gap: 1rem;
            }
            .menu-container {
                width: 100%;
                position: static;
                transform: none;
            }
            .menu-list {
                flex-direction: row;
                flex-wrap: wrap;
            }
            .menu-item {
                flex: 1;
                min-width: 120px;
            }
        }
        .title {
            font-size: 1.75rem;
            font-weight: 700;
            color: var(--text);
            margin: 0 0 2rem 0;
            text-align: center;
        }
        .input-group {
            margin-bottom: 1.5rem;
        }
        .input-group label {
            display: block;
            font-size: 0.875rem;
            font-weight: 500;
            color: var(--secondary);
            margin-bottom: 0.5rem;
        }
        .input-group input {
            width: 100%;
            padding: 0.75rem 1rem;
            border: 2px solid var(--secondary);
            border-radius: 0.5rem;
            font-family: 'DM Sans', sans-serif;
            font-size: 1rem;
            color: var(--text);
            background: var(--bg);
            transition: border-color 0.2s;
        }
        .input-group input:focus {
            outline: none;
            border-color: var(--accent);
        }
        .unit-toggle {
            display: flex;
            gap: 0.5rem;
            margin-bottom: 1.5rem;
        }
        .unit-btn {
            flex: 1;
            padding: 0.75rem;
            border: 2px solid var(--secondary);
            background: var(--bg);
            color: var(--text);
            border-radius: 0.5rem;
            font-family: 'DM Sans', sans-serif;
            font-size: 0.875rem;
            cursor: pointer;
            transition: all 0.2s;
            font-weight: 500;
        }
        .unit-btn.active {
            background: var(--accent);
            color: var(--surface);
            border-color: var(--accent);
        }
        .calculate-btn {
            width: 100%;
            padding: 1rem;
            background: var(--accent);
            color: var(--surface);
            border: none;
            border-radius: 0.5rem;
            font-family: 'DM Sans', sans-serif;
            font-size: 1rem;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.2s;
        }
        .calculate-btn:hover {
            opacity: 0.9;
            transform: translateY(-2px);
        }
        .result-section {
            margin-top: 2rem;
            padding-top: 2rem;
            border-top: 2px solid var(--secondary);
        }
        .result-item {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 1rem;
            padding: 0.75rem;
            background: var(--bg);
            border-radius: 0.5rem;
        }
        .result-label {
            font-size: 0.875rem;
            color: var(--secondary);
            font-weight: 500;
        }
        .result-value {
            font-size: 1.25rem;
            font-weight: 700;
            color: var(--accent);
        }
        .hidden {
            display: none;
        }
        .error-message {
            font-size: 0.75rem;
            color: #d32f2f;
            margin-top: 0.25rem;
            display: none;
        }
        .error-message.show {
            display: block;
        }
        .input-group.error input {
            border-color: #d32f2f;
        }
        .result-error {
            padding: 1rem;
            background: #ffebee;
            border: 2px solid #d32f2f;
            border-radius: 0.5rem;
            color: #d32f2f;
            font-size: 0.875rem;
            margin-bottom: 1rem;
            display: none;
        }
        .result-error.show {
            display: block;
        }
        /* Product search dropdown styles */
        .product-search-container {
            position: relative;
            width: 100%;
        }
        .product-search-input {
            width: 100%;
            padding: 0.75rem 1rem;
            border: 2px solid var(--secondary);
            border-radius: 0.5rem;
            font-family: 'DM Sans', sans-serif;
            font-size: 1rem;
            color: var(--text);
            background: var(--bg);
            transition: border-color 0.2s;
        }
        .product-search-input:focus {
            outline: none;
            border-color: var(--accent);
        }
        .product-dropdown {
            position: absolute;
            top: 100%;
            left: 0;
            right: 0;
            background: var(--surface);
            border: 2px solid var(--secondary);
            border-top: none;
            border-radius: 0 0 0.5rem 0.5rem;
            max-height: 200px;
            overflow-y: auto;
            z-index: 10;
            box-shadow: 0 4px 12px rgba(44, 36, 22, 0.1);
        }
        .product-dropdown.hidden {
            display: none;
        }
        .product-item {
            padding: 0.75rem 1rem;
            cursor: pointer;
            border-bottom: 1px solid #f0f0f0;
            transition: background-color 0.2s;
            font-size: 0.875rem;
            color: var(--text);
        }
        .product-item:hover {
            background-color: #f5ede3;
            color: var(--accent);
        }
        .product-item-name {
            font-weight: 500;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }
        .product-item-rate {
            font-size: 0.75rem;
            color: var(--secondary);
            margin-left: 0.5rem;
        }

body { box-sizing: border-box; }

